aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-12-20 15:55:19 +0000
committerStuart Shelton <stuart@shelton.me>2017-12-20 15:55:19 +0000
commit2571d21059b03c8a2ab5dddfb6a722be47b717ab (patch)
tree7e6014c3195d64f864792a243c9c2d1648ef33c6 /dev-lang
parentAdd app-crypt/mit-krb5-1.15.2-r1 (diff)
downloadsrcshelton-2571d21059b03c8a2ab5dddfb6a722be47b717ab.tar.gz
srcshelton-2571d21059b03c8a2ab5dddfb6a722be47b717ab.tar.bz2
srcshelton-2571d21059b03c8a2ab5dddfb6a722be47b717ab.zip
Add dev-lang/python-2.7.14-r1, update dev-lang/python-2.7.14
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/files/2.7-disable-nis.patch21
-rw-r--r--dev-lang/python/python-2.7.14-r1.ebuild643
-rw-r--r--dev-lang/python/python-2.7.14.ebuild7
4 files changed, 667 insertions, 8 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index e4db1269..946c5dfb 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,3 +1,4 @@
+AUX 2.7-disable-nis.patch 823 SHA256 b2290fe22f34cc3d8749344070a11c2add20e7003d67c391aae4303c8bf9f3be SHA512 42b1a2790f2b4bfcf89d8451de54e83979826a16ef77c32c6f17b9903613bd8f76a138be975bb05e0e7785244155107f229cba479ce08891d36ae3e01e5be501 WHIRLPOOL 2af577517d943a0dfdd15e465eba8bdd81964c05556293f7193cb5f62aa4a031ce49e4929cef6529377aa3d06071532cc03cf80cd75ca60bdf3953046b913973
AUX CVE-2013-4238_py27.patch 11591 SHA256 050cc2d4b9d588f2587010a30819591e02130fde90594782993a39c945c1559b SHA512 f9b1d0573bc7175b8fe6bdd8b6777a376cd717a594a14a6ddb334e0107596b0fbfbfe8a0c1743a0da54ce8ac8905cb7385aa2ae26698272f679763542c13e7e2 WHIRLPOOL bbf89edb2e3620aae3f54e80feba98d75fa566594b2e71e88b75c22036201a2692a77daf56080f4413612edf159f4282f5494a0a5dd11b350bcde248ef51f139
AUX pydoc.conf 219 SHA256 ee554a8c72b34d9d3c79288f4239bc0e5ff19f779608d4ddc70f9975ef3e46b6 SHA512 eb7751d1de20755ea8305ba4377ecedf1ffca1a806574b67e04ee3078fb4bfc46b4207032c5386320b5ea45a9e9f6208e2b43c188d48f5f49f63f2cfeb958d74 WHIRLPOOL 4c549f2ef728a1e21a926dd5d1af601335b157073d46411133c7e9ac637539a20df7db8a5093783d347253fdaa6e51195f31d10ba61df9419718821072e3b1ac
AUX pydoc.init 624 SHA256 f28affff180db4eb65ba6811b673939b3e983ec78c66216899e58df4bfa7ef44 SHA512 7ea6a6cd0b2e623e7529c389c28d71d75851518ea158f378ed991ce17defeaa7f7decd85917efc6de62ecf759a0ca09c2ebe8f68e717d7d0e1daaa4c1d044815 WHIRLPOOL e4854fb295fda406031fe1bd43e376b241212d579512135217fdfe8ff190cf1f7cac03ca4c2c3d2d04dc2140b6a856aea5018768285e765a1980d160b164e802
@@ -39,7 +40,8 @@ DIST python-prefix-2.7.8-gentoo-patches.tar.bz2 17154 SHA256 6c5f171f15f662c2b88
EBUILD python-2.7.10-r1.ebuild 20847 SHA256 db967fbdbf079a49b2ff59d23fbf8e5689e3b9fb160f58110bd8542d7d421805 SHA512 13de987f85ede0cb42cc108a8bcf5957a7691597d26c59283d79b5d8914261b2cb5925a25b1249d0865037b96fcfb9f7da7d17f4fc5cf657f04cbfffcad3aa19 WHIRLPOOL 1dcd65b99a29efea931e3ea6efa9960df9bc63b9ed3664e480627d45af0cb5f0fb4ea3c7446a4f25a6572449ac6d9126856b93e3c5af2995e96f7eeaaf284c0d
EBUILD python-2.7.10.ebuild 21279 SHA256 074dbbc02ca0814f688e689ba477d6209ef2cedaa1cc34d60cceedb76d368403 SHA512 ae505170a3d249994edbec9865b41e7c616587998d2a497ad18e6900c558e6f83b2fa8693de0567b342bcca8ee337de03d6960ad513b15bcc04ce45e989d0b92 WHIRLPOOL 5a0280c43e6dfabf830f5ead6c171a467fd8bd13b99abc52310856069c81bbdb526320f3d86c1236488f2ac485d476e12d89fe66ea750d62bf8169586729d9cf
EBUILD python-2.7.12.ebuild 22305 SHA256 7b2906b2f86cda233879b61596b68752903e3c2dd42e47fabd7bb7104e92c7e2 SHA512 545cec6228ce96869f49906f2aed90bed2dd3bc139b513759027f166ff38939468c1c935f0f4e672f2c0ba55e50340548a558ce2f872f4ac99711d32f676dd50 WHIRLPOOL 8f44196a6462d377490c0f687158aea29b5e3d409e9d875a2747abd30cc641e2b128195728754309f10372504502a510187088a47834ebe0e19802fe1799b6a6
-EBUILD python-2.7.14.ebuild 22689 SHA256 db1879b29e977866f89b6f7edbcff9729a9485f007bd2c7a94626638b3d27e4c SHA512 bf54e5c09b25034b0ae605d2ce95cb4a5f5639132a31f836cd623d67b8a3c463cdb165ce47c7c1b77f4ffd5eeea7b85600b1a4811e88424b9ed74882b4ab9216 WHIRLPOOL aafc0715ed1d17bd0a125fbe90b2b8ea286b74e0fed17e18df01c2b2b3d9aebf4461d4ea4b90e7a2ec5c86694dc81920ea9470a812aae2d1717c5ad85b1d45b7
+EBUILD python-2.7.14-r1.ebuild 22346 SHA256 91571671fd6f987638afb35c628532d9c8cfb3efe2e6213fc31880034d6e0df0 SHA512 3b3d5b0abff6bc9e5f9fdbc5013f299666169ab6f97238d1692cc6121cebd642aed2dc27354c7eee0a9eb655ac12058ca04e521caa30493df6044dedb2e10078 WHIRLPOOL cec42cccb62e3b90ddc4e8e625b1bff4ee321c166e82e9bd2b512cf78a23bf752bef70484303f04c0fac5680a8af045071d7c0bb6d11e6ec78868418ebeed5a9
+EBUILD python-2.7.14.ebuild 22307 SHA256 5dc4ed9aa90d270cb86beba1418b0cbb0730865e43d32ab5bd20e28ebd8e7eb0 SHA512 0cc8747ace680c83d3e7eb2a5926822688a334bb767f2500175abfc6bcfa69a7b41d600cb989c962de3570b5618cef95c88d81882232e541a0f83f7b22799a94 WHIRLPOOL 36a0d23ac2d65affae3a64803c3f5f033f6dd05152016813a2a4b08831a4077bf8eda21acc3db143754b1c3ed5820980056ae3bc742bd4337635e178bd4a64f9
EBUILD python-2.7.5-r4.ebuild 19587 SHA256 28a65355a3997d89ccf803d048a33cd7fd30dca9e7fc2437d66f3c700a59b7da SHA512 417a24513b084c53ce6a7b1e53e824c6b187a5100df34099dde8170b7c0513295d5a14dda8dd52cf5dd13d2f09933b1a75a15c06f8181df8a7baf56558658a7c WHIRLPOOL 9fda9d3bf8e5768c3c9892c5cfce82551ec83bdebf95a7d060587f4358597cf8cba9291a115000f3c6080ad0ab311206e4d256d53e00ae1d820b324ba3d7f7f1
EBUILD python-2.7.6-r1.ebuild 19844 SHA256 ae90edccce43a0351643a6e5447a482d3ddd3b130ab2130307576750441ddd8b SHA512 c7200d305a1fd4edd0b9feeae7544be759655a746e86ba8bd051bda780587b7ad1f4a10034155c5d0305505def2ae7160b634f05b1e535d5a9edd4e47fe28c93 WHIRLPOOL a0918e832c27cc6bd8c5a5238b807db13cd9a74a8aa1f1442aa7daae843174a8b67f7014f6edcdd726dc38a485c53f13939f64f12bf211a3a2d3cef6994f39dd
EBUILD python-2.7.8.ebuild 20405 SHA256 c8178f68f20f84e3cb411cc01f409690dd1a720cb0e140ec01e0071e06f9a8c2 SHA512 c2f86616651acee3a4624901ddaccc4e9dc0b75ef0e7cfe76f986e2e94babc7445489ad152b92087bb0853e371ff20f2f2ed52271831eab220047f05c3d9e17f WHIRLPOOL 9d587f2fd70f5a7a694b04c7f3a174a3faff84f9c31680eb6b741dff1a227963fc1b7c7891aee0b0569976207c0608f59f2c2fd2038cbc76e2d56b344cfd12cd
diff --git a/dev-lang/python/files/2.7-disable-nis.patch b/dev-lang/python/files/2.7-disable-nis.patch
new file mode 100644
index 00000000..5a6cb3e4
--- /dev/null
+++ b/dev-lang/python/files/2.7-disable-nis.patch
@@ -0,0 +1,21 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1346,17 +1346,7 @@ class PyBuildExt(build_ext):
+ else:
+ missing.append('resource')
+
+- # Sun yellow pages. Some systems have the functions in libc.
+- if (host_platform not in ['cygwin', 'atheos', 'qnx6'] and
+- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
+- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
+- libs = ['nsl']
+- else:
+- libs = []
+- exts.append( Extension('nis', ['nismodule.c'],
+- libraries = libs) )
+- else:
+- missing.append('nis')
++ missing.append('nis')
+ else:
+ missing.extend(['nis', 'resource', 'termios'])
+
diff --git a/dev-lang/python/python-2.7.14-r1.ebuild b/dev-lang/python/python-2.7.14-r1.ebuild
new file mode 100644
index 00000000..bfe163cc
--- /dev/null
+++ b/dev-lang/python/python-2.7.14-r1.ebuild
@@ -0,0 +1,643 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+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.14-0"
+PREFIX_PATCHREV="r0"
+CYGWINPORTS_GITREV="7be648659ef46f33db6913ca0ca5a809219d5629"
+
+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
+ prefix? ( https://dev.gentoo.org/~grobian/distfiles/python-prefix-${PV}-gentoo-patches-${PREFIX_PATCHREV}.tar.xz )"
+
+[[ -n ${CYGWINPORTS_GITREV} ]] &&
+SRC_URI+=" elibc_Cygwin? ( https://github.com/cygwinports/python2/archive/${CYGWINPORTS_GITREV}.zip )"
+
+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"
+KEYWORDS+="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="aqua -berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +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:0=
+ >=sys-libs/zlib-1.1.3:0=
+ !m68k-mint? ( virtual/libffi )
+ virtual/libintl
+ 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: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:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=[-aqua]
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ !!<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-20140125-r1"
+
+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"
+
+ # if building a patched source-tar, comment the rm's above, and uncomment
+ # this line:
+ #local EPATCH_EXCLUDE=" 01_all_prefix-no-patch-invention.patch"
+
+ # Prefix' round of patches
+ # http://prefix.gentooexperimental.org:8000/python-patches-2_7
+ use prefix && EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/python-prefix-${PV}-gentoo-patches-${PREFIX_PATCHREV}
+
+ if use aqua ; then
+ # make sure we don't get a framework reference here
+ sed -i -e '/-DPREFIX=/s:$(prefix):$(FRAMEWORKUNIXTOOLSPREFIX):' \
+ -e '/-DEXEC_PREFIX=/s:$(exec_prefix):$(FRAMEWORKUNIXTOOLSPREFIX):' \
+ Makefile.pre.in || die
+ # Python upstream refuses to listen to configure arguments
+ sed -i -e '/FRAMEWORKINSTALLAPPSPREFIX=/s:="[^"]*":="${prefix}/../Applications":' \
+ configure.ac configure || die
+ # we handle creation of symlinks in src_install
+ sed -i -e '/ln -fs .*PYTHONFRAMEWORK/d' Makefile.pre.in || die
+ fi
+ # don't try to do fancy things on Darwin
+ sed -i -e 's/__APPLE__/__NO_MUCKING_AROUND__/g' Modules/readline.c || die
+ # On AIX, we've wrapped /usr/ccs/bin/nm to work around long TMPDIR.
+ sed -i -e "/^NM=.*nm$/s,^.*$,NM=$(tc-getNM)," Modules/makexp_aix || die
+ # fix header standards conflicts on Solaris
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # GCC5 switched the default from gnu89 to gnu11, a standards
+ # conflict arises from that, which can be solved by upgrading
+ # _XOPEN_SOURCE from 500 to 600, but since it is compiler
+ # version specific, just force the old standard onto the
+ # compiler. Python 3 properly detects this.
+ CC="$(tc-getCC) -std=gnu89"
+ sed -i -e "/_XOPEN_SOURCE/s/500/600/" \
+ Modules/_multiprocessing/multiprocessing.h || die
+ fi
+
+ # Fix for cross-compiling.
+ epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+ epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+ epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
+ epatch "${FILESDIR}/2.7-disable-nis.patch"
+ epatch "${FILESDIR}/python-3.4-pyfpe-dll.patch" # Cygwin: --with-fpectl
+
+ # Make sure python doesn't use the host libffi.
+ if use prefix; then
+ epatch "${FILESDIR}/python-2.7.14-libffi-pkgconfig.patch"
+ rm configure
+ fi
+
+ if [[ -n ${CYGWINPORTS_GITREV} ]] && use elibc_Cygwin; then
+ local p d="${WORKDIR}/python2-${CYGWINPORTS_GITREV}"
+ for p in $(
+ eval "$(sed -ne '/PATCH_URI="/,/"/p' < "${d}"/python.cygport)"
+ echo ${PATCH_URI}
+ ); do
+ # dropped by 01_all_prefix-no-patch-invention.patch
+ [[ ${p} == *-tkinter-* ]] && continue
+ epatch "${d}/${p}"
+ done
+ fi
+
+ epatch_user
+
+ 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@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ # 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.
+ [[ ${CHOST} == *64-apple-darwin* ]] && disable+=" Nav _Qt" # Carbon
+ [[ ${CHOST} == *-apple-darwin11 ]] && disable+=" _Fm _Qd _Qdoffs"
+ 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
+
+ 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
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=302137
+ if [[ ${CHOST} == powerpc-*-darwin* ]] &&
+ ( is-flag "-mtune=*" || is-flag "-mcpu=*" ) ||
+ [[ ${CHOST} == powerpc64-*-darwin* ]];
+ then
+ replace-flags -O2 -O3
+ replace-flags -Os -O3 # comment #14
+ fi
+
+ if use prefix ; then
+ # for Python's setup.py not to do false assumptions (only looking in
+ # host paths) we need to make explicit where Prefix stuff is
+ append-cppflags -I"${EPREFIX}"/usr/include
+ append-ldflags -L"${EPREFIX}"/$(get_libdir)
+ append-ldflags -L"${EPREFIX}"/usr/$(get_libdir)
+ # fix compilation on some 64-bits Linux hosts, #381163, #473520
+ for hostlibdir in /usr/lib32 /usr/lib64 /usr/lib /lib32 /lib64; do
+ [[ -d ${hostlibdir} ]] || continue
+ append-ldflags -L${hostlibdir}
+ done
+ # Have to move $(CPPFLAGS) to before $(CFLAGS) to ensure that
+ # local include paths - set in $(CPPFLAGS) - are searched first.
+ sed -i -e "/^PY_CFLAGS[ \\t]*=/s,\\\$(CFLAGS)[ \\t]*\\\$(CPPFLAGS),\$(CPPFLAGS) \$(CFLAGS)," Makefile.pre.in || die
+ fi
+
+ # Export CC so even AIX will use gcc instead of xlc_r.
+ # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
+ tc-export CC 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!
+ # On AIX this is not needed, but would record '.' as runpath.
+ [[ ${CHOST} == *-aix* ]] ||
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+ if use berkdb; then
+ dbmliborder+="${dbmliborder:+:}bdb"
+ fi
+
+ # Don't include libmpc on IRIX - it is only available for 64bit MIPS4 (mips-sgi-irix64)
+ [[ ${CHOST} == *-irix ]] && export ac_cv_lib_mpc_usconfig=no
+
+ [[ ${CHOST} == *-mint* ]] && export ac_cv_func_poll=no
+
+ # we need this to get pythonw, the GUI version of python
+ # --enable-framework and --enable-shared are mutually exclusive:
+ # http://bugs.python.org/issue5809
+ local myshared
+ use aqua \
+ && myshared="--enable-framework=${EPREFIX}/usr/lib" \
+ || myshared="--enable-shared"
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ # note: for a framework build we need to use ucs2 because macOS
+ # uses that internally too:
+ # http://bugs.python.org/issue763708
+ # HAS_HG to avoid finding obsolete hg of the host
+ ECONF_SOURCE="${S}" OPT="" HAS_HG="no" \
+ econf \
+ --with-fpectl \
+ ${myshared} \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $( (use wide-unicode && ! use aqua) && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \
+ --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() {
+ # 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
+
+ # Daylight saving time problem
+ # https://bugs.python.org/issue22067
+ # https://bugs.gentoo.org/610628
+ local -x TZ=UTC
+
+ # 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
+
+ [[ ${CHOST} == *-mint* ]] && keepdir /usr/lib/python${SLOT}/lib-dynload/
+
+ if ! use aqua ; then
+ emake DESTDIR="${D}" altinstall
+ else
+ local fwdir="${EPREFIX}"/usr/$(get_libdir)/Python.framework
+
+ # do not make multiple targets in parallel when there are broken
+ # sharedmods (during bootstrap), would build them twice in parallel.
+
+ # Python_Launcher is kind of a wrapper, and we should fix it for
+ # Prefix (it uses /usr/bin/pythonw) so useless
+ # IDLE doesn't run, no idea, but definitely not used
+ sed -i -e 's/install_\(BuildApplet\|PythonLauncher\|IDLE\)[^:]//g' \
+ Mac/Makefile || die
+
+ # let the makefiles do their thing
+ emake -j1 CC="$(tc-getCC)" DESTDIR="${D}" STRIPFLAG= altinstall
+ rmdir "${ED}"/Applications/Python* || die
+ rmdir "${ED}"/Applications || die
+
+ # avoid framework incompatability, degrade to a normal UNIX lib
+ mkdir -p "${ED}"/usr/$(get_libdir)
+ cp "${D}${fwdir}"/Versions/${SLOT}/Python \
+ "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib || die
+ chmod u+w "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib
+ install_name_tool \
+ -id "${EPREFIX}"/usr/$(get_libdir)/libpython${SLOT}.dylib \
+ "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib
+ chmod u-w "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib
+ cp libpython${SLOT}.a "${ED}"/usr/$(get_libdir)/ || die
+
+ # rebuild python executable to be the non-pythonw (python wrapper)
+ # version so we don't get framework crap
+ rm "${ED}"/usr/bin/python${SLOT} # drop existing symlink, bug #390861
+ $(tc-getCC) "${ED}"/usr/$(get_libdir)/libpython${SLOT}.dylib \
+ -o "${ED}"/usr/bin/python${SLOT} \
+ Modules/python.o || die
+
+ # don't install the "Current" symlink, will always conflict
+ rm "${D}${fwdir}"/Versions/Current || die
+ # update whatever points to it, eselect-python sets them
+ rm "${D}${fwdir}"/{Headers,Python,Resources} || die
+
+ # remove unversioned files (that are not made versioned below)
+ pushd "${ED}"/usr/bin > /dev/null
+ rm -f python python-config python${SLOT}-config
+ # python${SLOT} was created above
+ for f in pythonw smtpd${SLOT}.py pydoc idle ; do
+ rm -f ${f} ${f}${SLOT}
+ done
+ # pythonw needs to remain in the framework (that's the whole
+ # reason we go through this framework hassle)
+ ln -s ../lib/Python.framework/Versions/${SLOT}/bin/pythonw${SLOT} || die
+ # copy the scripts to we can fix their shebangs
+ for f in 2to3 pydoc${SLOT} idle${SLOT} python${SLOT}-config ; do
+ # for some reason sometimes they already exist, bug #347321
+ rm -f ${f}
+ cp "${D}${fwdir}"/Versions/${SLOT}/bin/${f} . || die
+ sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python'"${SLOT}" \
+ ${f} || die
+ done
+ # "fix" to have below collision fix not to bail
+ mv pydoc${SLOT} pydoc || die
+ mv idle${SLOT} idle || die
+ popd > /dev/null
+
+ # basically we don't like the framework stuff at all, so just move
+ # stuff around or add some symlinks to make our life easier
+ mkdir -p "${ED}"/usr
+ mv "${D}${fwdir}"/Versions/${SLOT}/share \
+ "${ED}"/usr/ || die "can't move share"
+ # get includes just UNIX style
+ mkdir -p "${ED}"/usr/include
+ mv "${D}${fwdir}"/Versions/${SLOT}/include/python${SLOT} \
+ "${ED}"/usr/include/ || die "can't move include"
+ pushd "${D}${fwdir}"/Versions/${SLOT}/include > /dev/null
+ ln -s ../../../../../include/python${SLOT} || die
+ popd > /dev/null
+ rm -f "${ED}"/usr/share/man/man1/python{,2}.1
+
+ # same for libs
+ # NOTE: can't symlink the entire dir, because a real dir already exists
+ # on upgrade (site-packages), however since we h4x0rzed python to
+ # actually look into the UNIX-style dir, we just switch them around.
+ mkdir -p "${ED}"/usr/$(get_libdir)/python${SLOT}
+ mv "${D}${fwdir}"/Versions/${SLOT}/lib/python${SLOT}/* \
+ "${ED}"/usr/$(get_libdir)/python${SLOT}/ \
+ || die "can't move python${SLOT}"
+ rmdir "${D}${fwdir}"/Versions/${SLOT}/lib/python${SLOT} || die
+ pushd "${D}${fwdir}"/Versions/${SLOT}/lib > /dev/null
+ ln -s ../../../../python${SLOT} || die
+ popd > /dev/null
+ # remove now dead symlinks
+ rm "${ED}"/usr/lib/python${SLOT}/config/libpython${SLOT}.a
+ rm "${ED}"/usr/lib/python${SLOT}/config/libpython${SLOT}.dylib
+
+ # fix up Makefile
+ sed -i \
+ -e '/^LINKFORSHARED=/s/-u _PyMac_Error.*$//' \
+ -e '/^LDFLAGS=/s/=.*$/=/' \
+ -e '/^prefix=/s:=.*$:= '"${EPREFIX}"'/usr:' \
+ -e '/^PYTHONFRAMEWORK=/s/=.*$/=/' \
+ -e '/^PYTHONFRAMEWORKDIR=/s/=.*$/= no-framework/' \
+ -e '/^PYTHONFRAMEWORKPREFIX=/s/=.*$/=/' \
+ -e '/^PYTHONFRAMEWORKINSTALLDIR=/s/=.*$/=/' \
+ -e '/^LDLIBRARY=/s:=.*$:libpython$(VERSION).dylib:' \
+ "${libdir}"/config/Makefile || die
+ # and sysconfigdata likewise
+ sed -i \
+ -e "/'LINKFORSHARED'/s/-u _PyMac_Error[^']*'/'/" \
+ -e "/'LDFLAGS'/s/:.*$/:'',/" \
+ -e "/'prefix'/s|:.*$|:'${EPREFIX}/usr',|" \
+ -e "/'PYTHONFRAMEWORK'/s/:.*$/:'',/" \
+ -e "/'PYTHONFRAMEWORKDIR'/s/:.*$/:'no-framework',/" \
+ -e "/'PYTHONFRAMEWORKPREFIX'/s/:.*$/:'',/" \
+ -e "/'PYTHONFRAMEWORKINSTALLDIR'/s/:.*$/:'',/" \
+ -e "/'LDLIBRARY'/s|:.*$|:'libpython${SLOT}.dylib',|" \
+ "${libdir}"/_sysconfigdata.py || die
+
+ # add missing version.plist file
+ mkdir -p "${D}${fwdir}"/Versions/${SLOT}/Resources
+ cat > "${D}${fwdir}"/Versions/${SLOT}/Resources/version.plist << EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>BuildVersion</key>
+ <string>1</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${PV}</string>
+ <key>CFBundleVersion</key>
+ <string>${PV}</string>
+ <key>ProjectName</key>
+ <string>Python</string>
+ <key>SourceVersion</key>
+ <string>${PV}</string>
+</dict>
+</plist>
+EOF
+ fi
+
+ sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
+ if [[ ${CHOST} == *-aix* ]]; then
+ # fix upstream bugs with quite large proposed diffs still to be sorted out:
+ # http://bugs.python.org/issue13493
+ # http://bugs.python.org/issue14150
+ # http://bugs.python.org/issue15590
+ # http://bugs.python.org/issue16189
+ sed -e "/Libs:/s|\$| -Wl,-bE:${EPREFIX}/${libdir#$ED}/config/python.exp -lld|" \
+ -i "${ED}"usr/$(get_libdir)/pkgconfig/python-${SLOT}.pc || die "sed failed"
+ sed -e "s|:Modules/python.exp|:${EPREFIX}/${libdir#$ED}/config/python.exp|" \
+ -e 's| -bI:| -Wl,-bI:|g' \
+ -e '/LINKFORSHARED/s|-bE:|-bI:|g' \
+ -e '/LINKFORSHARED/s| -lld||g' \
+ -i "${libdir}"/{_sysconfigdata.py,config/Makefile} || die "sed failed"
+ fi
+
+ # 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"
+
+ 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}
+
+ 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
+ if use aqua ; then
+ # we do framework, so the emake trick below returns a pathname
+ # since that won't work here, use a (cheap) trick instead
+ libname=libpython${SLOT}
+ else
+ libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
+ emake --no-print-directory -s -f - 2>/dev/null)
+ fi
+ 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 PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON="./python$( sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile )"
+ local -x LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${PWD}"
+ local -x DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${PWD}"
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${SLOT}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${SLOT%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/python${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/python${SLOT}-config" \
+ "${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-${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ 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
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
+
+# vi: set diffopt=iwhite,filler:
diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild
index c58dc38e..a30f0fc6 100644
--- a/dev-lang/python/python-2.7.14.ebuild
+++ b/dev-lang/python/python-2.7.14.ebuild
@@ -547,13 +547,6 @@ EOF
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
rm -f "${ED}usr/bin/smtpd.py"
- # http://src.opensolaris.org/source/xref/jds/spec-files/trunk/SUNWPython.spec
- # These #defines cause problems when building c99 compliant python modules
- # http://bugs.python.org/issue1759169
- [[ ${CHOST} == *-solaris* ]] && sed -i -e \
- 's:^\(^#define \(_POSIX_C_SOURCE\|_XOPEN_SOURCE\|_XOPEN_SOURCE_EXTENDED\).*$\):/* \1 */:' \
- "${ED}"/usr/include/python${SLOT}/pyconfig.h
-
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