From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 09DDB138334 for ; Sat, 19 Oct 2019 01:06:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BEE1E089C; Sat, 19 Oct 2019 01:06:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 16F79E089C for ; Sat, 19 Oct 2019 01:06:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8974B34C032 for ; Sat, 19 Oct 2019 01:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7929876A for ; Sat, 19 Oct 2019 01:05:58 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1571447137.838b6612b964efa1ceba6bdd548cff6fb9da68c3.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/python/files/python-3.7.5-hashlib.patch dev-lang/python/python-3.7.5-r1.ebuild X-VCS-Directories: dev-lang/python/files/ dev-lang/python/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 838b6612b964efa1ceba6bdd548cff6fb9da68c3 X-VCS-Branch: master Date: Sat, 19 Oct 2019 01:05:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0c6ac57f-6878-4313-9fd6-3f0c9c26143e X-Archives-Hash: e1452b2d29cec0e5cb9b9e990fda9baf commit: 838b6612b964efa1ceba6bdd548cff6fb9da68c3 Author: Mike Gilbert gentoo org> AuthorDate: Sat Oct 19 01:05:37 2019 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Oct 19 01:05:37 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=838b6612 dev-lang/python: re-enable all openssl algorithms Package-Manager: Portage-2.3.77_p5, Repoman-2.3.17_p81 Signed-off-by: Mike Gilbert gentoo.org> dev-lang/python/files/python-3.7.5-hashlib.patch | 25 ++ dev-lang/python/python-3.7.5-r1.ebuild | 329 +++++++++++++++++++++++ 2 files changed, 354 insertions(+) diff --git a/dev-lang/python/files/python-3.7.5-hashlib.patch b/dev-lang/python/files/python-3.7.5-hashlib.patch new file mode 100644 index 00000000000..a70a4796310 --- /dev/null +++ b/dev-lang/python/files/python-3.7.5-hashlib.patch @@ -0,0 +1,25 @@ +From 2c0c356ca109d1550bfb09b0da7dec3f80db77a3 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 18 Oct 2019 16:39:16 -0400 +Subject: [PATCH] Call OPENSSL_init_crypto for openssl >= 1.1.0 + +--- + Modules/_hashopenssl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c +index b13ade60496..8abbde5120f 100644 +--- a/Modules/_hashopenssl.c ++++ b/Modules/_hashopenssl.c +@@ -1077,6 +1077,8 @@ PyInit__hashlib(void) + /* Load all digest algorithms and initialize cpuid */ + OPENSSL_add_all_algorithms_noconf(); + ERR_load_crypto_strings(); ++#else ++ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS|OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); + #endif + + /* TODO build EVP_functions openssl_* entries dynamically based +-- +2.23.0 + diff --git a/dev-lang/python/python-3.7.5-r1.ebuild b/dev-lang/python/python-3.7.5-r1.ebuild new file mode 100644 index 00000000000..fb27d536f6e --- /dev/null +++ b/dev-lang/python/python-3.7.5-r1.ebuild @@ -0,0 +1,329 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs + +MY_P="Python-${PV}" +PATCHSET_VERSION="3.7.4-1" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="https://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz + https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" + +LICENSE="PSF-2" +SLOT="3.7/3.7m" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" +IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:0= + app-arch/xz-utils:0= + sys-apps/util-linux:0= + >=sys-libs/zlib-1.1.3:0= + virtual/libffi:= + virtual/libintl + gdbm? ( sys-libs/gdbm:0=[berkdb] ) + ncurses? ( >=sys-libs/ncurses-5.2:0= ) + readline? ( >=sys-libs/readline-4.1:0= ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + tk? ( + >=dev-lang/tcl-8.0:0= + >=dev-lang/tk-8.0:0= + dev-tcltk/blt:0= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1:0= ) + !!/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED%/}/etc/conf.d/pydoc-${PYVER}" "${ED%/}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # for python-exec + local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} + else + vars=( PYTHON "${vars[@]}" ) + fi + + python_export "python${PYVER}" "${vars[@]}" + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${PYVER%.*} + mkdir -p "${D%/}${PYTHON_SCRIPTDIR}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" "${D%/}${PYTHON_SCRIPTDIR}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${D%/}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${D%/}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pydoc" || die + ln -s "../../../bin/pyvenv-${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/pyvenv" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${D%/}${PYTHON_SCRIPTDIR}/idle" || die + fi +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then + python_updater_warning="1" + fi +} + +eselect_python_update() { + if [[ -z "$(eselect python show)" || ! -f "${EROOT%/}/usr/bin/$(eselect python show)" ]]; then + eselect python update + fi + + if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT%/}/usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + eselect python update --python${PV%%.*} + fi +} + +pkg_postinst() { + eselect_python_update + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn "You have just upgraded from an older version of Python." + ewarn + ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." + fi +} + +pkg_postrm() { + eselect_python_update +}