commit:     a44128f035324efa9a517c0165ddfa79f255fdfa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 10 14:48:32 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 14:52:49 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a44128f0

dev-lang/python: Sec cleanup, #585946

 dev-lang/python/Manifest                |   4 -
 dev-lang/python/python-2.7.10-r1.ebuild | 347 --------------------------------
 dev-lang/python/python-3.4.3-r1.ebuild  | 324 -----------------------------
 3 files changed, 675 deletions(-)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index fa24994..44b8f56 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,12 +1,8 @@
-DIST Python-2.7.10.tar.xz 12250696 SHA256 
1cd3730781b91caf0fa1c4d472dc29274186480161a150294c42ce9b5c5effc0 SHA512 
67615a6defbcda062f15a09f9dd3b9441afd01a8cc3255e5bc45b925378a0ddc38d468b7701176f6cc153ec52a4f21671b433780d9bde343aa9b9c1b2ae29feb
 WHIRLPOOL 
3a9dcfc55b107dc55ad0ae93fb24a11eab7d4d9b4cfbe6b6830a090b6e5f71bb2ac91526b89c6f3e4f2610fa1a2cc4e82b58a83c599aa71f94894c74181b504b
 DIST Python-2.7.12.tar.xz 12390820 SHA256 
d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 SHA512 
6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f
 WHIRLPOOL 
fe4224f4c3dc8dc5c49005051da0069922c86f39880a0072c09fac422e1913d924ac695e22be11603a961329dd8c17b1cf7696b31b62ef93398e42745a6446d6
-DIST Python-3.4.3.tar.xz 14421964 SHA256 
b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8 SHA512 
55b2d7c07da8ad3a3971b4687da2e45809c6f1474732e93b0432f121f287d0b63ad8a9bf381987ea70f47a03d9474c3e55b7d86d14800bf7ef29b3324d8d35b9
 WHIRLPOOL 
f851dedc6a1ea35adec83d60784a5fbcd9dfcf6aa8858bb5ada114fa2ff55add1fbf323ab94ec039ecdedb26d59e8f2e6e171cd9fc1ed41ad9cfa434a555cff3
 DIST Python-3.4.5.tar.xz 14516820 SHA256 
ee64b1c8a47461009abf25252332d29a4e587cb4f0c1c96aa793a3732e9d898a SHA512 
b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c
 WHIRLPOOL 
43e0aed0177d46148964447b4fb24475c4c736afb2ba84ec393fbf55db3da3f192308f9c8f236deaa7a608dac56946ee7755970fadaa82bf406c910a05f36883
 DIST Python-3.5.2.tar.xz 15222676 SHA256 
0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40 SHA512 
c07c3366f1c81e214241444bb9da6db9d11da32ad66bfa29cdad5a3b2e34e4d870bda6d4ce3c3910b582942e91f1d8c8a1c1a7b9464cc147b83c9e0007012742
 WHIRLPOOL 
cf55d67f362b6a7529d43bb5aa8014c8349be190c6d4dae9d48de1679ab8623087478f41686cdced981cf18bb3d107052732cd437ff31ba5de2cc06b04ec2289
 DIST Python-3.6.0.tar.xz 16805836 SHA256 
b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622 SHA512 
9d06bee9172bc0bfd2d280fd1c27ea712f3258cfbfd2e2aeb734d0a6710998d5deeefc5d6e72251750dd9493d35461511ceaa187a29dea700ca238ff6ac1dbb2
 WHIRLPOOL 
4fbe3b971ff6fca4349c74ca07ade0406ae70e0d201cb7689e95744a6f39d1bcc010eb426f4e02aa8f692828aa996aa5c7656b8031503b342b9b4a42beeb7827
-DIST python-gentoo-patches-2.7.10-0.tar.xz 12892 SHA256 
c9a838bd62ae50cc385da23a837acfd05f2b74e4f086c9c76eb4d3aa5366ef6d SHA512 
5f100944635e360691dc0a2b340a906646c4ae9ee558246ddffc56e8b15d389f25f1fbdc1db4cc08e7d29560d04d66b058b3904902899d58ecae8c408ebdf056
 WHIRLPOOL 
f69e9a518bb7ee50c1b262a21e70e1e2443f859ee6d2f4fa84421120dbd054a06ce8dd6cfea8512cbc64bce806322b879c25c561d5eb05e1ba6cc15035b373a9
 DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 
cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 
8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6
 WHIRLPOOL 
54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6
-DIST python-gentoo-patches-3.4.3-0.tar.xz 11736 SHA256 
917a9d98d40a91379c81ea57922a8632ba3c6f6db6f304ed6262bc88c5044946 SHA512 
7ad1b30cf8bb7900fe518ed71e4ee55dd92ce7e23ae583a1f2f851b26cfa8c4f4271d28f418e780f3725a48d4ca8eeb8fd083f850810c66c29fb08c430828d72
 WHIRLPOOL 
074e8c0055b49a028eebda21d1acfb8a25ec968eb8b350c2bed37e042f9f354871e413db13e0ef2fe41d7e56d647178a7b3622019f36c4819c2c68f088366eb1
 DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 SHA256 
84ee7630670a1dac4bbbc55fabf5f99b5b29007de4f140ad956e93d2e7aba8fa SHA512 
108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8
 WHIRLPOOL 
f0248faa0b4ce5679e37381bba90f8a4d361a49db792787bffc06a54a4bc82fea4d53255120f10e6dbf51b99e12417fc1b469be9624e73508fa3a212a38e7352
 DIST python-gentoo-patches-3.5.2-0.tar.xz 12008 SHA256 
eb898fb448bd40f086ae2910e94c608faa932eb377fe40bd34f4390b4c37aac1 SHA512 
e2ef1b8f10f9ea849bf52a0be65d48f7cfecf07bdf151cbbd7e3a1c9428a8d96e901650496c4ae7fd0093af8cc90de8df674dc1a4c66ad21916a4ee45a81efc8
 WHIRLPOOL 
66b99c7c50e3eaca783f773349b3e8a357f706a7da6a66bd2e0a53946bc81d965ac99d8fd4c50ba7e42052aa84508c8aede5eacedbb95f040a48cf1a5de6b6b0
 DIST python-gentoo-patches-3.6.0-0.tar.xz 10680 SHA256 
ecf78d292f2fef1116b41c3884f492d41ea716a14f0a21755ba2f8d76aefe1a7 SHA512 
f340643cf338c693ce315fab705ba888040a2989b0887686d43886319419245c24bb46ebb71cea422644f1f3beaf64289b773e72db3377187bf11a83f9313a90
 WHIRLPOOL 
4a4d12ea0dbb03b5d2730db40b5aebe4c1c937cfe63341c775431dc06a3b60552b9390fdf9b7fff5e50024a93d11b269ef80a95afcf308327943f7003dd4c379

diff --git a/dev-lang/python/python-2.7.10-r1.ebuild 
b/dev-lang/python/python-2.7.10-r1.ebuild
deleted file mode 100644
index de85de7..00000000
--- a/dev-lang/python/python-2.7.10-r1.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 
toolchain-funcs multiprocessing
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="2.7.10-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/";
-SRC_URI="http://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="2.7"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc 
x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses 
+readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
-
-# 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
-       >=sys-libs/zlib-1.1.3
-       virtual/libffi
-       virtual/libintl
-       xml? ( >=dev-libs/expat-2.1 )
-       !build? (
-               berkdb? ( || (
-                       sys-libs/db:5.3
-                       sys-libs/db:5.2
-                       sys-libs/db:5.1
-                       sys-libs/db:5.0
-                       sys-libs/db:4.8
-                       sys-libs/db:4.7
-                       sys-libs/db:4.6
-                       sys-libs/db:4.5
-                       sys-libs/db:4.4
-                       sys-libs/db:4.3
-                       sys-libs/db:4.2
-               ) )
-               gdbm? ( sys-libs/gdbm[berkdb] )
-               ncurses? (
-                       >=sys-libs/ncurses-5.2:0
-                       readline? ( >=sys-libs/readline-4.1 )
-               )
-               sqlite? ( >=dev-db/sqlite-3.3.8:3 )
-               ssl? ( dev-libs/openssl )
-               tk? (
-                       >=dev-lang/tk-8.0
-                       dev-tcltk/blt
-                       dev-tcltk/tix
-               )
-       )
-       !!<sys-apps/portage-2.1.9"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig
-       >=sys-devel/autoconf-2.65
-       !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )
-       doc? ( dev-python/python-docs:${SLOT} )"
-PDEPEND="app-eselect/eselect-python"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-       if use berkdb; then
-               ewarn "'bsddb' module is out-of-date and no longer maintained 
inside"
-               ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been 
additionally"
-               ewarn "removed in Python 3. A maintained alternative of 
'bsddb3' module"
-               ewarn "is provided by dev-python/bsddb3."
-       else
-               if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
-                       ewarn "You are migrating from 
=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
-                       ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
-                       ewarn "You might need to migrate your databases."
-               fi
-       fi
-}
-
-src_prepare() {
-       # Ensure that internal copies of expat, libffi and zlib are not used.
-       rm -r Modules/expat || die
-       rm -r Modules/_ctypes/libffi* || die
-       rm -r Modules/zlib || die
-
-       if tc-is-cross-compiler; then
-               local 
EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
-       fi
-
-       EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
-
-       # Fix for cross-compiling.
-       epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
-       epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
-
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-               Lib/distutils/command/install.py \
-               Lib/distutils/sysconfig.py \
-               Lib/site.py \
-               Lib/sysconfig.py \
-               Lib/test/test_site.py \
-               Makefile.pre.in \
-               Modules/Setup.dist \
-               Modules/getpath.c \
-               setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-       epatch_user
-
-       eautoreconf
-}
-
-src_configure() {
-       if use build; then
-               # Disable extraneous modules with extra dependencies.
-               export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses 
_curses_panel readline _sqlite3 _tkinter"
-               export PYTHON_DISABLE_SSL="1"
-       else
-               # dbm module can be linked against berkdb or gdbm.
-               # Defaults to gdbm when both are enabled, #204343.
-               local disable
-               use berkdb   || use gdbm || disable+=" dbm"
-               use berkdb   || disable+=" _bsddb"
-               use gdbm     || disable+=" gdbm"
-               use ncurses  || disable+=" _curses _curses_panel"
-               use readline || disable+=" readline"
-               use sqlite   || disable+=" _sqlite3"
-               use ssl      || export PYTHON_DISABLE_SSL="1"
-               use tk       || disable+=" _tkinter"
-               use xml      || disable+=" _elementtree pyexpat" # _elementtree 
uses pyexpat.
-               export PYTHON_DISABLE_MODULES="${disable}"
-
-               if ! use xml; then
-                       ewarn "You have configured Python without XML support."
-                       ewarn "This is NOT a recommended configuration as you"
-                       ewarn "may face problems parsing any XML documents."
-               fi
-       fi
-
-       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
-               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
-       fi
-
-       if [[ "$(gcc-major-version)" -ge 4 ]]; then
-               append-flags -fwrapv
-       fi
-
-       filter-flags -malign-double
-
-       [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
-
-       # https://bugs.gentoo.org/show_bug.cgi?id=50309
-       if is-flagq -O3; then
-               is-flagq -fstack-protector-all && replace-flags -O3 -O2
-               use hardened && replace-flags -O3 -O2
-       fi
-
-       if tc-is-cross-compiler; then
-               # Force some tests that try to poke fs paths.
-               export ac_cv_file__dev_ptc=no
-               export ac_cv_file__dev_ptmx=yes
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
-       tc-export CXX
-       # The configure script fails to use pkg-config correctly.
-       # http://bugs.python.org/issue15506
-       export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
-       # Set LDFLAGS so we link modules with -lpython2.7 correctly.
-       # Needed on FreeBSD unless Python 2.7 is already installed.
-       # Please query BSD team before removing this!
-       append-ldflags "-L."
-
-       local dbmliborder
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-       if use berkdb; then
-               dbmliborder+="${dbmliborder:+:}bdb"
-       fi
-
-       BUILD_DIR="${WORKDIR}/${CHOST}"
-       mkdir -p "${BUILD_DIR}" || die
-       cd "${BUILD_DIR}" || die
-
-       ECONF_SOURCE="${S}" OPT="" \
-       econf \
-               --with-fpectl \
-               --enable-shared \
-               $(use_enable ipv6) \
-               $(use_with threads) \
-               $(use wide-unicode && echo "--enable-unicode=ucs4" || echo 
"--enable-unicode=ucs2") \
-               --infodir='${prefix}/share/info' \
-               --mandir='${prefix}/share/man' \
-               --with-dbmliborder="${dbmliborder}" \
-               --with-libc="" \
-               --enable-loadable-sqlite-extensions \
-               --with-system-expat \
-               --with-system-ffi \
-               --without-ensurepip
-
-       if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" 
pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-}
-
-src_compile() {
-       # Avoid invoking pgen for cross-compiles.
-       touch Include/graminit.h Python/graminit.c
-
-       cd "${BUILD_DIR}" || die
-       emake
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax_kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       cd "${BUILD_DIR}" || die
-
-       # Skip failing tests.
-       local skipped_tests="distutils gdb"
-
-       for test in ${skipped_tests}; do
-               mv "${S}"/Lib/test/test_${test}.py "${T}"
-       done
-
-       # Rerun failed tests in verbose mode (regrtest -w).
-       emake test EXTRATESTOPTS="-w" < /dev/tty
-       local result="$?"
-
-       for test in ${skipped_tests}; do
-               mv "${T}/test_${test}.py" "${S}"/Lib/test
-       done
-
-       elog "The following tests have been skipped:"
-       for test in ${skipped_tests}; do
-               elog "test_${test}.py"
-       done
-
-       elog "If you would like to run them, you may:"
-       elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
-       elog "and run the tests separately."
-
-       if [[ "${result}" -ne 0 ]]; then
-               die "emake test failed"
-       fi
-}
-
-src_install() {
-       local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
-
-       cd "${BUILD_DIR}" || die
-       emake DESTDIR="${D}" altinstall
-
-       sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die 
"sed failed"
-
-       # Backwards compat with Gentoo divergence.
-       dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
-
-       # Fix collisions between different slots of Python.
-       mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
-       mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
-       mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
-       rm -f "${ED}usr/bin/smtpd.py"
-
-       if use build; then
-               rm -fr "${ED}usr/bin/idle${SLOT}" 
"${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
-       else
-               use berkdb || rm -r 
"${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die
-               use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || 
die
-               use tk || rm -r "${ED}usr/bin/idle${SLOT}" 
"${libdir}/"{idlelib,lib-tk} || die
-               use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
-       fi
-
-       use threads || rm -r "${libdir}/multiprocessing" || die
-       use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
-
-       dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               insinto /usr/share/doc/${PF}/examples
-               doins -r "${S}"/Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' 
| \
-               emake --no-print-directory -s -f - 2>/dev/null)
-       newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${SLOT}:" \
-               -i "${ED}etc/conf.d/pydoc-${SLOT}" 
"${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
-
-       # for python-exec
-       local vars=( EPYTHON PYTHON_SITEDIR )
-
-       # 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}:}.
-       else
-               vars=( PYTHON "${vars[@]}" )
-       fi
-
-       python_export "python${SLOT}" "${vars[@]}"
-       echo "EPYTHON='${EPYTHON}'" > epython.py || die
-       python_domodule epython.py
-}
-
-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
-}
-
-pkg_postrm() {
-       eselect_python_update
-}

diff --git a/dev-lang/python/python-3.4.3-r1.ebuild 
b/dev-lang/python/python-3.4.3-r1.ebuild
deleted file mode 100644
index 43e1369..00000000
--- a/dev-lang/python/python-3.4.3-r1.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 
toolchain-funcs multiprocessing
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.4.3-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/";
-SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
-       
https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz";
-
-LICENSE="PSF-2"
-SLOT="3.4"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc 
x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="build elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite 
+ssl +threads tk wininst +xml"
-
-# 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
-       app-arch/xz-utils
-       >=sys-libs/zlib-1.1.3
-       virtual/libffi
-       virtual/libintl
-       xml? ( >=dev-libs/expat-2.1 )
-       !build? (
-               gdbm? ( sys-libs/gdbm[berkdb] )
-               ncurses? (
-                       >=sys-libs/ncurses-5.2:0
-                       readline? ( >=sys-libs/readline-4.1 )
-               )
-               sqlite? ( >=dev-db/sqlite-3.3.8:3 )
-               ssl? ( dev-libs/openssl )
-               tk? (
-                       >=dev-lang/tk-8.0
-                       dev-tcltk/blt
-                       dev-tcltk/tix
-               )
-       )
-       !!<sys-apps/sandbox-2.6-r1"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig
-       >=sys-devel/autoconf-2.65
-       !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND="app-eselect/eselect-python"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
-       # Ensure that internal copies of expat, libffi and zlib are not used.
-       rm -fr Modules/expat
-       rm -fr Modules/_ctypes/libffi*
-       rm -fr Modules/zlib
-
-       if tc-is-cross-compiler; then
-               # Invokes BUILDPYTHON, which is built for the host arch
-               local 
EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
-       fi
-
-       EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
-       epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
-
-       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-               Lib/distutils/command/install.py \
-               Lib/distutils/sysconfig.py \
-               Lib/site.py \
-               Lib/sysconfig.py \
-               Lib/test/test_site.py \
-               Makefile.pre.in \
-               Modules/Setup.dist \
-               Modules/getpath.c \
-               setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-       # Disable ABI flags.
-       sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed 
failed"
-
-       epatch_user
-
-       eautoreconf
-}
-
-src_configure() {
-       if use build; then
-               # Disable extraneous modules with extra dependencies.
-               export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel 
readline _sqlite3 _tkinter"
-               export PYTHON_DISABLE_SSL="1"
-       else
-               local disable
-               use gdbm     || disable+=" gdbm"
-               use ncurses  || disable+=" _curses _curses_panel"
-               use readline || disable+=" readline"
-               use sqlite   || disable+=" _sqlite3"
-               use ssl      || export PYTHON_DISABLE_SSL="1"
-               use tk       || disable+=" _tkinter"
-               use xml      || disable+=" _elementtree pyexpat" # _elementtree 
uses pyexpat.
-               export PYTHON_DISABLE_MODULES="${disable}"
-
-               if ! use xml; then
-                       ewarn "You have configured Python without XML support."
-                       ewarn "This is NOT a recommended configuration as you"
-                       ewarn "may face problems parsing any XML documents."
-               fi
-       fi
-
-       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
-               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
-       fi
-
-       if [[ "$(gcc-major-version)" -ge 4 ]]; then
-               append-flags -fwrapv
-       fi
-
-       filter-flags -malign-double
-
-       [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
-
-       # https://bugs.gentoo.org/show_bug.cgi?id=50309
-       if is-flagq -O3; then
-               is-flagq -fstack-protector-all && replace-flags -O3 -O2
-               use hardened && replace-flags -O3 -O2
-       fi
-
-       # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-       tc-export CXX
-       # The configure script fails to use pkg-config correctly.
-       # http://bugs.python.org/issue15506
-       export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
-       # Set LDFLAGS so we link modules with -lpython3.2 correctly.
-       # Needed on FreeBSD unless Python 3.2 is already installed.
-       # Please query BSD team before removing this!
-       append-ldflags "-L."
-
-       local dbmliborder
-       if use gdbm; then
-               dbmliborder+="${dbmliborder:+:}gdbm"
-       fi
-
-       BUILD_DIR="${WORKDIR}/${CHOST}"
-       mkdir -p "${BUILD_DIR}" || die
-       cd "${BUILD_DIR}" || die
-
-       ECONF_SOURCE="${S}" OPT="" \
-       econf \
-               --with-fpectl \
-               --enable-shared \
-               $(use_enable ipv6) \
-               $(use_with threads) \
-               --infodir='${prefix}/share/info' \
-               --mandir='${prefix}/share/man' \
-               --with-computed-gotos \
-               --with-dbmliborder="${dbmliborder}" \
-               --with-libc="" \
-               --enable-loadable-sqlite-extensions \
-               --with-system-expat \
-               --with-system-ffi \
-               --without-ensurepip
-
-       if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" 
pyconfig.h; then
-               eerror "configure has detected that the sem_open function is 
broken."
-               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
-               die "Broken sem_open function (bug 496328)"
-       fi
-}
-
-src_compile() {
-       # Ensure sed works as expected
-       # https://bugs.gentoo.org/594768
-       local -x LC_ALL=C
-
-       # Avoid invoking pgen for cross-compiles.
-       touch Include/graminit.h Python/graminit.c || die
-
-       cd "${BUILD_DIR}" || die
-       emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
-
-       # Work around bug 329499. See also bug 413751 and 457194.
-       if has_version dev-libs/libffi[pax_kernel]; then
-               pax-mark E python
-       else
-               pax-mark m python
-       fi
-}
-
-src_test() {
-       # Tests will not work when cross compiling.
-       if tc-is-cross-compiler; then
-               elog "Disabling tests due to crosscompiling."
-               return
-       fi
-
-       cd "${BUILD_DIR}" || die
-
-       # Skip failing tests.
-       local skipped_tests="gdb"
-
-       for test in ${skipped_tests}; do
-               mv "${S}"/Lib/test/test_${test}.py "${T}"
-       done
-
-       local -x PYTHONDONTWRITEBYTECODE=
-       emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < 
/dev/tty
-       local result=$?
-
-       for test in ${skipped_tests}; do
-               mv "${T}/test_${test}.py" "${S}"/Lib/test
-       done
-
-       elog "The following tests have been skipped:"
-       for test in ${skipped_tests}; do
-               elog "test_${test}.py"
-       done
-
-       elog "If you would like to run them, you may:"
-       elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
-       elog "and run the tests separately."
-
-       if [[ ${result} -ne 0 ]]; then
-               die "emake test failed"
-       fi
-}
-
-src_install() {
-       local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
-
-       cd "${BUILD_DIR}" || die
-
-       emake DESTDIR="${D}" altinstall
-
-       sed \
-               -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
-               -e "s/\(PY_LDFLAGS=\).*/\1/" \
-               -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
-
-       # Backwards compat with Gentoo divergence.
-       dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
-
-       # Fix collisions between different slots of Python.
-       rm -f "${ED}usr/$(get_libdir)/libpython3.so"
-
-       if use build; then
-               rm -fr "${ED}usr/bin/idle${SLOT}" 
"${libdir}/"{idlelib,sqlite3,test,tkinter}
-       else
-               use elibc_uclibc && rm -fr "${libdir}/test"
-               use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
-               use tk || rm -fr "${ED}usr/bin/idle${SLOT}" 
"${libdir}/"{idlelib,tkinter,test/test_tk*}
-       fi
-
-       use threads || rm -fr "${libdir}/multiprocessing"
-       use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
-
-       dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
-       if use examples; then
-               insinto /usr/share/doc/${PF}/examples
-               find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
-               doins -r "${S}"/Tools
-       fi
-       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-       local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' 
| \
-               emake --no-print-directory -s -f - 2>/dev/null)
-       newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
-       newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
-       newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
-       sed \
-               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
-               -e "s:@PYDOC@:pydoc${SLOT}:" \
-               -i "${ED}etc/conf.d/pydoc-${SLOT}" 
"${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
-
-       # for python-exec
-       local vars=( EPYTHON PYTHON_SITEDIR )
-
-       # 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}:}.
-       else
-               vars=( PYTHON "${vars[@]}" )
-       fi
-
-       python_export "python${SLOT}" "${vars[@]}"
-       echo "EPYTHON='${EPYTHON}'" > epython.py || die
-       python_domodule epython.py
-}
-
-pkg_preinst() {
-       if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version 
">=${CATEGORY}/${PN}-${SLOT}_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
-}

Reply via email to