diff options
author | Mike Gilbert <floppym@gentoo.org> | 2014-03-28 01:45:36 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-03-28 01:45:36 +0000 |
commit | 34c738dbed5381c5ac8c42b17260abbea1b60a5c (patch) | |
tree | ae74962bae769e60e7d3376f0bf57a657608f5ab /dev-lang | |
parent | Stable for HPPA (bug #500368). (diff) | |
download | historical-34c738dbed5381c5ac8c42b17260abbea1b60a5c.tar.gz historical-34c738dbed5381c5ac8c42b17260abbea1b60a5c.tar.bz2 historical-34c738dbed5381c5ac8c42b17260abbea1b60a5c.zip |
Version bump. Permanently drop the 'doc' use flag.
Package-Manager: portage-2.2.10/cvs/Linux x86_64
Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 11 | ||||
-rw-r--r-- | dev-lang/python/python-3.4.0.ebuild | 321 |
3 files changed, 334 insertions, 5 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 3976753af969..43c7527ab396 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lang/python # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.751 2014/03/28 01:35:30 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.752 2014/03/28 01:45:34 floppym Exp $ + +*python-3.4.0 (28 Mar 2014) + + 28 Mar 2014; Mike Gilbert <floppym@gentoo.org> +python-3.4.0.ebuild: + Version bump. Permanently drop the 'doc' use flag. *python-3.3.5 (28 Mar 2014) diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 04986701981c..c5d8a978d0a9 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -25,6 +25,7 @@ DIST Python-3.3.2.tar.xz 11847676 SHA256 745b32c4b810e36fa66346198dbc2e313524fd6 DIST Python-3.3.3.tar.xz 12057744 SHA256 339275b30a1a3fef1589016bf6302c14e870f7a6fd2522bf87a6c2c6d383c685 SHA512 6acd905d2ae70a259de1d502c90ce9cc831b03cd32930d55bdce1f6dd4b2657c4bb8698e46f6558253338046c43ee842befa2d62e35eeb82b82659acbe6ea0aa WHIRLPOOL 680a88bc7ca312a71237350c06573d5ed6138d826613a6a8ad9e953181561966c9a9f64b176226a627175b8bb5d13755bb7cabe20ee9510ced5da14185e092a4 DIST Python-3.3.4.tar.xz 12087568 SHA256 c6cc126d91c04e0348882cfbd36d7a844d4e50acc37a3f6a64d67764e3995689 SHA512 b6cf2cb32504020c691d5be092ee62415b3f1c1a72ca8285b9f1d8e0770ac57f0d8c451a1e6ab921b77f1abe507c4afd75189b01a3f15438c2e4a4c074c0675a WHIRLPOOL 12a5d2de31901cdf8824565a6960301da241e385d6b4166ba815e8efd0ce783284333dde6245be49260c2016ab5c9f616b97e3eae874e2f743e057db2a5e6b11 DIST Python-3.3.5.tar.xz 12116308 SHA256 abe99b484434503d8b23be0f243ec27139e743a4798cd71c1dce3cf40e63b6e5 SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550 WHIRLPOOL f4b6010d32b28b7bb038cbb7c5f98d325cc4253fd1be9a0a1089ed6fd7dd414c5169931d21ef819137d5c1084517a650828f260cf2a1d8ce871bc67aeef3fff8 +DIST Python-3.4.0.tar.xz 14084912 SHA256 f13686c0a2d45e7146759e9d5d1cbd8097a0606483c0cf7730e1e13f58b14cbe SHA512 4fd4d3352e3b64ef8017ba083a2d894b99e89882581bcf30cdb218578f0f384aa6efc89211ffe44f5bb3d783c79763e26823242d27382fd05900099dd966ca31 WHIRLPOOL 82a1bb14a7683e2bce32221792923f334b61fabc75b0b293b0ecc0d810c8a4bebf05b75a061d85dd6612a8ca699c9b4f358e2aef5d14706aad1c18f42c9b8d55 DIST Python-3.4.0rc1.tar.xz 14047816 SHA256 4142820fca96ac2b2772efc5767e51ebb74e2171eda35798f205a0efa7017f6c SHA512 30cabfc8a89eb1d0a800bc3ec8e6effca3b7a36b47599b01e7743c8ffd9c5995af1ef7f28ebc69fe9c510c465f77d8933b9c80eb121df5440faa00ea47ed885d WHIRLPOOL 2318433f5e1715111a31cdcf99ef57aac846c60fc743deac75114979232f83598022f5dc226a3328c0cf5fc3cf077fe33b814c4fd534123bdae372f8a3ea8583 DIST Python-3.4.0rc3.tar.xz 14039828 SHA256 48c99b690eb8f9e6317f1eb760a32b4f5c18a4777f03f0804429f28d3081cf37 SHA512 24777ebfdb9433ad69ac27971e0b50a6595c534edbf6c009b5f4cb6ca7a1f24cc73dbaeba118b751159e2671dd85f52016d1dbea6303595daa222a1b8501a84d WHIRLPOOL e859b240ad44574276f21853817c14b1cc001a5391658948d73f9eac48b70b2cdcdffd40d6b0697539b276cf37740b868b4c56d013feb41051bcbbe2b184c14a DIST python-gentoo-patches-2.6.8-0.tar.bz2 17608 SHA256 277dbeb19107d3244e58aee98f130ce98d03775e7d4074ff9e1577125c999c06 SHA512 2a988a81db888ce56e07d4591ab37b641e51f73f85c087ac0505dc2b703b1dd450ed36b2533e5e562935d2f5e17d581fbbcfd0b0dc4bee69c882f3442da29632 WHIRLPOOL 8ae0f01e1218ed758b9dfca9b4de6a9115c09db665a2831f9af7b8e3f9aa178c10d129104273b551b8a26e9ba575e3f8d3256d7622506a69d496935ce9d87685 @@ -36,6 +37,7 @@ DIST python-gentoo-patches-3.3.2-2.tar.xz 12884 SHA256 a99b7dade4659dcba7ae8ae13 DIST python-gentoo-patches-3.3.3-0.tar.xz 12992 SHA256 38b5c604416947fdd7d87ada2ccd3febf7407f00c1e67e6a99be8765f1b25c49 SHA512 d803b287c0f407c68dd766974296239419fb35441f1796081681f28d17b1f6c7e50e0aae807ad147469eb586db8fe486a013a166cb76e08f2b7a9ba39acb1760 WHIRLPOOL 09a9dbd1831c2e7022f4df27b57435dd1df7eace294e8fa069ce5fa5c1719f64ba9bcd8f27d614a8c13ee8605db37c7e75c13fa14885b76ce289667bf2871aaf DIST python-gentoo-patches-3.3.4-0.tar.xz 12576 SHA256 2c942420760b92df826393a57b05f2952e0ca920bcbdc0263eef0c61c6875e15 SHA512 41b57de79865ac143c62fcff7b2d28f706c8cba03439067ae2e49075d7d830a807f14e105aeac1dc75f419e816912ebeb53aa2e0cd3c49e4f83bddc91c1dea7b WHIRLPOOL 94a651e3a510843f5314fa45538b3552dd586900dec8ad1ce8ff154c2ca17410b07652f76eff46fc5abd70650ae2b8c4d61c72afde8e2a28d4bd31ec5ea22b01 DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e +DIST python-gentoo-patches-3.4.0-0.tar.xz 12900 SHA256 5e5ca54eaf446c7dde4155e5d792df5229c7790b32abb5aca38cbc4fc30f9c45 SHA512 be9851f9062f6aebbd2f23d91a4038dad1a8757049745ccbb1cc618ff6bc3dfab0326d520d27678541f4421e5db41d64f632fe6fb3e80f2cf4e73dadd3d5620b WHIRLPOOL df998b5588c928ca506f9f4434093a1f60637206f03f5e067444531dae02168f88b22c8de7d58e745bdb9d85e17abd667ed51f7f5651779c2c94da98f0925679 DIST python-gentoo-patches-3.4.0_rc1-0.tar.xz 12628 SHA256 1db8c1650e7824e61a6a6a45925573d6bf0380345395b16b7d25679ab2fb34eb SHA512 26ce4953130075c1fe981adcee8a129de5f43aea28358c60552f641b0599c340223081d111a754e32e974e9692106f3d5c220c8f192a8a954f981ae9302e5f11 WHIRLPOOL 1f393a88ac1182870935f9a069af62f693b582966f776a6598dacf6a49ced3157b69a9318c90fa87d0dadbcc6682badd9d1445089b77a200a0a6eced571e794c EBUILD python-2.6.8-r3.ebuild 11326 SHA256 dda37aee6bf09c08406b7e5e55d284a864a456e093b74560ea8af90b1ac81de5 SHA512 bf917ce50ce515f43610945194f24d9dd9c2d323a9cad3cc0fe070103e5d4be3285e23cb379d4308923132e087d50c8d9991966e527fa63f512da587d69b8af1 WHIRLPOOL 00b17ba9f1b4ff379089e44714ee1503fdfb95328c9b4d753f18858f5e6b165bd5ce4bc8a9cafad9b893c714ce9bc2bfa9bdf51407960d16c8cb1e9a452d3230 EBUILD python-2.6.9.ebuild 11291 SHA256 7c6835d6730113c085ae57f960ea1a85d8087b4554db7bba5450ca57a2ddb568 SHA512 b20d95ebaee99e86294fed7a9acc8fba21fe57e8ab8a29da66ccf44a5d3053cd16944ca217637c3657ceec23e328713fc0c94e7301441ff553ff21dea816902f WHIRLPOOL 632fd305442296dd7cc4450be72a7189723c071c8daaee1afb1247dd9476369f7708858360d37b1d96fd6af070e4d0540c199306ebce6c955bfe8860aa97a8a0 @@ -47,15 +49,16 @@ EBUILD python-3.3.2-r2.ebuild 9633 SHA256 6d1de07e89d299e7a713556703b89aa052fc0f EBUILD python-3.3.3.ebuild 9539 SHA256 18a8621efddc117e9e02c022a57c7bc89be6c5f2f93e37e5afc35b0552c19137 SHA512 e3a89954a89895fb7fd861f383f2be6473a75272e7f3aa6577aab231176f268966b800c4794aaa75c02ed02d57a9d216635c2254cbc7aefa7f3e762a54484ee3 WHIRLPOOL 3b78f77bc7c0496c724faa4bd2f8ac0334c10be9147984e341f52438bcef7cf37a2d36bd0439086327dd5db73f5fd34aa6f60be5ad21aae3a43216b666f79561 EBUILD python-3.3.4.ebuild 9453 SHA256 beaa18d3104df12339b09bd943b837a392bb861dc54bac07b121e9742ba3af77 SHA512 59e54bb6b680cfbfdcb3f5ec68ad7079a14cd699f1ebaa78151133b95c2b3bf98c677ef33ef1216af3bd951cfb6f9610f87cca14877f5f699a8fda087903d362 WHIRLPOOL 6fc5d410c77affdd5b7418d4ef27f96e9dfa0e8ee42f481ebd1369de2375f300e89644b93e3127d7234dad42d81172f8747bd07622a6ff4922914874d8cbea9a EBUILD python-3.3.5.ebuild 9448 SHA256 07af60a34f0d8c20ce7ba453636c2df3ad170942dc1c653892a617ee5741de49 SHA512 a701a42d247f844a985a950289af33db65e5cfd417960df6067aee18acbe5d97c81792d1a20e94002692db6fb9d44c120d9db3542312723036dc44913788316d WHIRLPOOL d5a229b8170f685c1c9895d584c8397c81af764886de21a3fbd364d5792b9cab03da64c862fe421ce3afcb633179c51550c1c7ff3b5b99cc66ca2b24e146fa87 +EBUILD python-3.4.0.ebuild 9435 SHA256 c659ed4c7554df46fbccaa423f63b7e1187adb84225a35edc28e56b4b57fccc4 SHA512 5b0af6c47aaaf3b6577e7b36dcb4634d8f53cddb5ccff6a6686588ff120a4b4b5a2313d6df029b2bff7cf4092c76c37cda42248c1a14db173f9c18874a0bb011 WHIRLPOOL 79c21efb0996d5dfe401d864e3c2db0aa71b23d7da70f3210bb5ce70ef23b395c833b464abbbb561cb7d46b7bc8ee68c0d2ee57b74775df978580d42e79a5204 EBUILD python-3.4.0_rc1.ebuild 9529 SHA256 190a5063dd2eaf047ba9a0c0960fec77976b51afe9c589acd5f39df9008f7ca7 SHA512 489af787cc26fdca3b70842e99a8e6a9131c4c58b2048960d3f9bb55ea4046e218a3a049be3cb056184e46c98bf341c5d804c8f3c1eaaa60cc91612ad385b766 WHIRLPOOL e711c7080eda69ea115e412c405ee59fd24bc465b07e3e3211c950bfed6cf8dbe186b1603c707378d9fc3064835c7379cee4f3f8be686621615079f29907af51 EBUILD python-3.4.0_rc3.ebuild 9533 SHA256 33bb634167ac3c81319560bbdebf4486b14c5d830073db632a78ac78779f3098 SHA512 f7a7dcb4802144dea1c489de81468b173d444aed4e965db3b2d01a1fed78e3f5aaf7829cb8ad646599e44aa109aa8d2fca341f9019e8523e4d654f268709e48b WHIRLPOOL e598e276df61825fc46f4258b6ec527d6ee46def7a87375b77ca12117071eff2d1ed132ec97b37f55fbbeb566385fa8baf0b079a1dd713a506f4865d2036aec8 -MISC ChangeLog 31350 SHA256 8578084fde3d0611742bfc0d7c5ca2073f8572e5f3490fccc8535c843c53393d SHA512 188877db455a799f93a90c90e99b7f24952b9e8b46842a6f40ab2cf7903a35b65db3a872a253d546da28e936fd66bb65a60200c4e412e8f31db14df17b6b2fd2 WHIRLPOOL eb88483abc04d8942fecca8d55e566b5c5fd6ae99c1f4ff5ed1214aac8711a89d8073fa3d4acf08af493de558eeeac2dac60dfeb4893ceb08b2eb7e0fd0033f1 +MISC ChangeLog 31504 SHA256 709bac4dac60a6501bd64dd2ac9ed2e6a4a00e3ea72c23ba5ce7d08febe19227 SHA512 e62da3f512e5d2d0f7652b811d0f51c8abed63c60ec217d11a2f2f6d804495275e642e73987e0becd107345b8d364a301c0d0bd82f91b2285df7fe9dc72a7381 WHIRLPOOL 142ca0739fa6243cf0385f3144da9fd2c426e1a28cb9950952bc8529505afc228c0ab57c87a443e2c524a6d0fa18081a006c4bc98392d2c876180e5d072b0245 MISC ChangeLog-2011 100599 SHA256 23129cb47321b2a6b1cb9323f1815d0cd11d6f30c3893908ed51575c270a0cc8 SHA512 4181ba9d965139ba58218da5b960c87b7a611b27606a1ab1ce1b4c3c9255b4e0e2947307cbfffc531f0f8b6b545ee11e083fcb29dc7b2b7ba31c6bb40b8ab128 WHIRLPOOL 4ceebb6a6ed58b906d3a7331795748ac6e4fe2e1401bcccae9024a8e81e2c444aebc5fec610398cfe6002354ad3b10487484598da5091867874727f07e239c56 MISC metadata.xml 661 SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 SHA512 871989a29417ce20d95da950fa385f1a958139de7b1567beb9cda28a1217901243cd9d25235fe3c7b0e43a82176d72286e31e4e97310b26488d2a3252ef3a8a0 WHIRLPOOL b694b1b4270ba15640d04a3b0b26a08575ea4afc9be256717f7f3b1768d75da9f71ceca6afd2f69971906227d5ba42263d2df2fc9387441aa240222d39fd094e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iF4EAREIAAYFAlM00eQACgkQC77qH+pIQ6Tj5QD+I7rm9lc22mlImeWu5VS9hYJt -l5UYrGRQUMXxdLnhNYEBAIGJ9UIDHor8HD5bWaXfkOhJ9JNSayZgH7lfVeB89dU5 -=m676 +iF4EAREIAAYFAlM01D8ACgkQC77qH+pIQ6SIoQEAra+X4UobHM8mgnAEhEaF1bFR +7p8/MjWyyFxRMLRU36AA/jy4Q+7AiUKvryf3rL7oTX44PiOjkfA4J9ywqy6tLjLr +=D1V1 -----END PGP SIGNATURE----- diff --git a/dev-lang/python/python-3.4.0.ebuild b/dev-lang/python/python-3.4.0.ebuild new file mode 100644 index 000000000000..5f8ae4d67693 --- /dev/null +++ b/dev-lang/python/python-3.4.0.ebuild @@ -0,0 +1,321 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.4.0.ebuild,v 1.1 2014/03/28 01:45:34 floppym Exp $ + +EAPI="4" +WANT_AUTOMAKE="none" +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.0-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 + http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz + mirror://gentoo/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 + !build? ( + gdbm? ( sys-libs/gdbm[berkdb] ) + ncurses? ( + >=sys-libs/ncurses-5.2 + 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 + ) + xml? ( >=dev-libs/expat-2.1 ) + ) + !!<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-admin/eselect-python + app-admin/python-updater" + +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" + + 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 + + eautoconf + eautoheader +} + +src_configure() { + if use build; then + # Disable extraneous modules with extra dependencies. + export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" + 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() { + # 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 + python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local PYTHON=./python + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. + fi + + echo "EPYTHON='${EPYTHON}'" > epython.py + 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." + ewarn + ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules." + fi +} + +pkg_postrm() { + eselect_python_update +} |