summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-07 16:36:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-07 16:36:21 +0100
commit4f49fc7caa0253a7ab164331f55bd4c70bba1bf7 (patch)
treea54fc9fe9ce5d43bee554b0c4ef7c26fb45e72d6 /dev-lang
parenta0e773d57146b0a0ec25567af504a10e6f187811 (diff)
gentoo auto-resync : 07:09:2022 - 16:36:21
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin19185 -> 19190 bytes
-rw-r--r--dev-lang/lua/Manifest4
-rw-r--r--dev-lang/lua/lua-5.3.6-r102.ebuild11
-rw-r--r--dev-lang/lua/lua-5.4.4-r102.ebuild11
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/python-3.8.14.ebuild348
6 files changed, 376 insertions, 2 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index 74ae52d32084..f59d035360fc 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index 6f2e4cd05ed4..0680c05cd7e3 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -20,8 +20,8 @@ DIST lua-5.4.4.tar.gz 360876 BLAKE2B 8747ef5c83bd4c54b73eeaad6991ab5fccc54ee0009
DIST lua-5.4.4.tar.xz 606456 BLAKE2B ba6cad647c0171e5e737151b189b5b404948c08182e9f17d7974a6c6c3b7d99b03cf930add863188db22674b8613fc600d771f62f9dfc99232aab9caea9b073c SHA512 8f3950ed5972a29d7c79e72af617526f6b9f6be7ab268e66206d7e453acc2564541c9d01e2de08a7e9046ab24c66b02167e48a0d5764753befd95dc922b61219
EBUILD lua-5.1.5-r109.ebuild 3914 BLAKE2B 383d47a68be976dc6f8209ac97950121e6addba34fab4963bfd19524e23f492e8f9603b515e45361c30d38c1ec283ed694959a126dc4d0e072d982cdf13e644b SHA512 3792e38944c5c43f7113bb0e45886a3bef01dfedd3a42c0fd513e5069a707d480922a110945d932d9978ddb7d8e0d5afd13c499e400a7542199c96ba601d105a
EBUILD lua-5.1.5-r200.ebuild 1222 BLAKE2B 03df051642039b6a3cb58bc1245a34424631e9a39d0b9935691c5dfaf4efe01ea6d2b07826d09ab0ebd27e74d528f23ab0436771e4d17c823593b35dc2ea7132 SHA512 854fe8280d090d445bd62825a90bd7462c37843b1badfaded21cc0271066a901e2b429c16c19bbc40dd5a30fb1547640ece2d7c591190369fb5571814b3d4a96
-EBUILD lua-5.3.6-r102.ebuild 1134 BLAKE2B 0b8674c1df3d2e9657351ef98ede14f41f7ab881e5035f0b35c72121b9e9385a0bf6b05140818062c4c3210b5bbfbfe02f49c4c0af1f8aef3aced6dd9f9d2672 SHA512 2a7f68c8512847f47d4cd7307fb271c4bbf42348e019effa102df20229665c529d78414f2f7cf97e579318e0ef9448b505c96f5d824741b758ed2d893a50cf15
+EBUILD lua-5.3.6-r102.ebuild 1408 BLAKE2B 0117697a98580782eb0317573084dffd5fa700696768df3f9b698a45a7b4dc4c191646996309c7851aa9b630c0b4cf505ab700905c934bf9a823958e74e20458 SHA512 7fe5dca0206d76d00977a2d0e7e6ae2a85037565334f86f0c12af17e7bb386d1021b99abe0e2ae0ea11c106b397923686e939b338bc301ecf6b457cd3600b4ca
EBUILD lua-5.3.6-r5.ebuild 5435 BLAKE2B 676951874703c07a081e7051dc0b5b8b9474005546a94793bacfbe35d7fdaea1a19d00cae1e857704c587c295454e87708c0651200b14ce6b10f30d7bc84265f SHA512 058413e7b87c0b3c20c80f4e843430b50a8534352969eaa0612e7b8c2e90529967fe6991a57f7016d42aae72f887e30b8ec3e9a183c16c5cff3f3eae55c03596
-EBUILD lua-5.4.4-r102.ebuild 1117 BLAKE2B 17a1c460bfd900961018a96c1b88ccf5e259b2e59679752a1c8c6dd1fe91aee13c09317dd2f89c35c054bb199cc787bad4b104e247fab93d1bf204260b667b6a SHA512 e8beeeed57d2ed55a0e70e41d9b494b9d146b02305aa3bab256ba47914f9ca7a9a6de5f8ede509c7d3cc30b0484d3ffbdbb52111d1424a5ec2ac5b2d16d0d8fb
+EBUILD lua-5.4.4-r102.ebuild 1391 BLAKE2B 3d81964a3e34b2e792803340b67e9f2a3421ed34cf0a8992e1a138035dce966771b2e657cfebe0cd8d5cd6a9f8495a1aa9dee6b69b7bf4ab4fd09f519949f417 SHA512 e141c856c49d0e8746203d79f8154a6834936ff99e93427c428cd46ef32eacc785e505164151fcad87fcffa37dea824612119ff2620a17a2759e1a27da48b531
EBUILD lua-5.4.4-r2.ebuild 5386 BLAKE2B 59e698059fc1fa98e74d9b1d01b6f14ad109725ff361d06a2215905c2030f7326bfa8c1aeb84af384377127bd04b1e05c4e8ae4eefaa319f997850b2c5f82ef5 SHA512 aad663628355e4911fbfd5a7db367e69d6d7529c5c70832e6f666dc3a361e3536a930b74cc36c5796444265412b694d8610b8f9a2a876dfd4dbf637fe865ae3d
MISC metadata.xml 525 BLAKE2B cd450b981b7ae039f32a0c6484548c59eff8d9c032975c84ef9b5530219413f7ff7a95d66593da6252c08808189cc61f02fbef88efe36f71dc64d9aec3c0e90e SHA512 4f127caf48df93a75b562f516e3a522ae3edcc601f434b2d034d76b106cbfd96848e6898bdc850acf757101843696e44da9ab1f42292e96bd294c30b631ccaa8
diff --git a/dev-lang/lua/lua-5.3.6-r102.ebuild b/dev-lang/lua/lua-5.3.6-r102.ebuild
index a31377bb535a..bbca587b56da 100644
--- a/dev-lang/lua/lua-5.3.6-r102.ebuild
+++ b/dev-lang/lua/lua-5.3.6-r102.ebuild
@@ -22,6 +22,17 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
+src_prepare() {
+ default
+
+ if use elibc_musl; then
+ # locales on musl are non-functional (#834153)
+ # https://wiki.musl-libc.org/open-issues.html#Locale-limitations
+ sed -e 's|os.setlocale("pt_BR") or os.setlocale("ptb")|false|g' \
+ -i tests/literals.lua || die
+ fi
+}
+
src_configure() {
use deprecated && append-cppflags -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2
econf $(use_with readline)
diff --git a/dev-lang/lua/lua-5.4.4-r102.ebuild b/dev-lang/lua/lua-5.4.4-r102.ebuild
index bf4b915abf75..1667e6078222 100644
--- a/dev-lang/lua/lua-5.4.4-r102.ebuild
+++ b/dev-lang/lua/lua-5.4.4-r102.ebuild
@@ -22,6 +22,17 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
+src_prepare() {
+ default
+
+ if use elibc_musl; then
+ # locales on musl are non-functional (#834153)
+ # https://wiki.musl-libc.org/open-issues.html#Locale-limitations
+ sed -e 's|os.setlocale("pt_BR") or os.setlocale("ptb")|false|g' \
+ -i tests/literals.lua || die
+ fi
+}
+
src_configure() {
use deprecated && append-cppflags -DLUA_COMPAT_5_3
econf $(use_with readline)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 0eed8cfa72e4..7056fe25ba9b 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -10,6 +10,8 @@ DIST Python-3.11.0rc1.tar.xz 19815524 BLAKE2B 7dae240dbed052667b46927ccbb483a717
DIST Python-3.11.0rc1.tar.xz.asc 833 BLAKE2B da46a0ab62ef3f2b7a7921294a0d775ca6ab254e3229338232b3d11107aa1d74adc21911678f08f44cc1cd9184beada00d4b60dde60722ef91a247367b13e191 SHA512 d4cffc90c2ed7b8ea7228a21f7ac902a92f27003f1420ad751b1691de950974ea174cb0471b6e19ed1548dc5382012fa9ad5fcf83c34646c7ea2d73c88799e38
DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99210197529bc19e6a9d265f4ce246e0e83a3528a7602a28aac8855bf84e6bf6495b85e9202fcf04ef90600cb5e43 SHA512 5c732b5d21b189b99a0e9ccd3ae59466bed60a930d5d3f437a262d38f0797b776cecbf12a1852eaebcfb638a6f2e28e471cc2ebf94237cc728144be21842cb81
DIST Python-3.8.13.tar.xz.asc 833 BLAKE2B 918894777e1a783f2a7c7958a808610631cb7a6039df84675158e8d2fd66782f29921d44ab9b4625c4ca3821852e0d0e0005163b086c7d0c3d617e3a76cb7033 SHA512 6683c4ae6cf20a97a29165f96b9f5dd09d618892583650d803aa677240695968dfe344294fc33db68fd4669c82021afcc29a1f6afe49915be51fae281eeeedbe
+DIST Python-3.8.14.tar.xz 19031932 BLAKE2B 5044743ba4d0b9dd634b42c08e6693126ee396a75b4b728e80333aaac94ade447a12bed16e29d32c480fd670e75b44315ea6951489cc9b85c7fd385116b383ef SHA512 380de19b461e71e268943ef555b78ba68814f4ff77a7576fbcd45d6690db750590213171e1905326b8bcb217070adf66228a00792350293ec6575c20b27a6cc3
+DIST Python-3.8.14.tar.xz.asc 833 BLAKE2B fe4ae94ecc96ea78089d36db79922825d0207301ab45ab202c2333d7b16cce2699446699614ab0e96ff58ddc6488734697c1c47b44e49d6546a166d1ea128928 SHA512 1226702abc3027c29004b2fe2bd35e7a06b72146e428d92b1ec13600456e5948b1f814a3c031dd2439854cee696d4ccb0871112a0c66f135db611d6da1932f3d
DIST Python-3.9.13.tar.xz 19754368 BLAKE2B 4f583f66c28b791e19cd6d79695fe9eb815fd333542be22aec8bd73d1f4d3f17f2c4e9de198e7b16c1ca6362a613a8a02fb965c7dc7db3e510fd31de15ba2d19 SHA512 e9664e7f908092df11236b22465d217531d6f0378e88d889108d19fe77f28f46ffb629b8733f84b41409e255367321893a2b1bd64518930d9d8cae5d1b774d23
DIST Python-3.9.13.tar.xz.asc 833 BLAKE2B db01c01be9d56cd15f9ab4a9e2cfa800faf4ebecb92b01c133865d3b3134bc910258a33b766306c3d01f98e35bbf9c03c7cba697760b7095999cbd63ed6c276c SHA512 9367afe8ec32195adbb64fa32eb9e3881cfdbbb38efcb5e0804a15486232aecbc81ed20a8ffed652f06a881744f3efd2c2df3cc652d70671c94d6668a17a391e
DIST Python-3.9.14.tar.xz 19750176 BLAKE2B 0f6b5177fc3572f40d14ddfca4ee37e7839b996826b5c929551a6d152cd2707de6312a8b0cd05dba62c98fd309b00ece07a750cca88803de2a18dd4a09238ae3 SHA512 691a7814cf6c7bee96d8dbb7c5c85cb11f2e999101e20491b99435cdec07c3bbd5ce43ad3d9c64f695383b79197884caa1965c4346e4525e23b09c686271e4ab
@@ -25,6 +27,7 @@ DIST python-gentoo-patches-3.11.0rc1_p2.tar.xz 21580 BLAKE2B 188a3b2e5bc0d067dac
DIST python-gentoo-patches-3.8.13_p6.tar.xz 27968 BLAKE2B 0cafbdfed47e0d58a9798c1e090abb17428472f769ebe4125cf1210218b90bcfd2ad8790fafbfdc1daccc51078a6bf5e068157f05151c2283eb80d5fe128d85c SHA512 b23d51478cc126a6f7f3d1d6d2302a13f3e873a3fac19c7b2b86b79f4b25bd421b60e5ecbe9bb606ee0eedc0e6871d20c0befd1b6596b525bf6ef79a19230ae2
DIST python-gentoo-patches-3.8.13_p7.tar.xz 41332 BLAKE2B e61fe83b1260fbdc3086384834914625ae361c3ab2365f5f86c454423f4738b1aa20f46cf95b8a64b54b7cc000761964d5db65383bba9bdcc2a86894aacbdd5b SHA512 e71fff8291c4dfec43d3609e84de2fe6afc29ee6087410f047e972294e555e5a17b7f8d19778a79e67bad66855fd7a163b5a047aee99ee357d5306d7cd01f989
DIST python-gentoo-patches-3.8.13_p8.tar.xz 43204 BLAKE2B 6fb162bfcd2ab8c1fb4208716382aa144bf21b1bd8c2f00a2bd60e7cd0b0d8e034803e8f4129cf49cf6e594467aa2e4a45eb4cb72ddd8516ffd8f797570d59cd SHA512 41ec04e3257021fdcc848587c2275b241d0b31d1d6c10162e30b86920109286c92171d6143bb8be6d1f1c9070d43d31dc0290bdffac50d09d32c2493e631637c
+DIST python-gentoo-patches-3.8.14.tar.xz 25700 BLAKE2B de4ff020ecc6889a1c7ae29917cf0f06f930dbfbc2084d13149d8c64e25e1f9881b9f6ded5943101df871e91176a05bf983efdaa293831cc7801a8bad8e8f6d7 SHA512 8073bf34b12cbe71fcc54cf438b8686cd1b073e41846a6877482483951ed25e09fc74106b787f3f6c5705961b83e83f0c79184c1b5b4de3539a4e670b70efcb2
DIST python-gentoo-patches-3.9.13_p4.tar.xz 22072 BLAKE2B a0e084eff35d075d2255b139d0db114d282cb6c9c0c2ea51a8ecb7f5f1dc8096d6578ae5f804b7583a2b7842152b5723ad802ca816d46813c40aaa756118afc8 SHA512 cdf8d43fd5263c4956be234f36c0767215ab2495705d4f2a060b32ecbfbe159e618e31693b0538a1b970f7b27ebe4953063f585930d074dcaf59f2f61486e6b6
DIST python-gentoo-patches-3.9.13_p5.tar.xz 35660 BLAKE2B be3fe3a4db5e94a06c6bcb36eee71fd7e33cf27a4f3a259e5d0bd332b4765e77d5753247ddf5bbc3cbf10647f55e1897c943a7149afc76a9649d634fbfaff682 SHA512 7d6f1d215df0e50b1b4837f62c160d3262c6d9a29dad1a3f82590f5f84245defcd9b3de500ec78f01a3308275647b7a5e72a16c7425aec1edb841ba079100e1b
DIST python-gentoo-patches-3.9.13_p6.tar.xz 37508 BLAKE2B 6d55aec9ae139cbe6d35b84335174d5fba5784bf52eb665e2d3a27693a2abb843bce1f190c92bfd173359c3782cae06a6b3520932b08aec678332928c5a27277 SHA512 1b1dec45d959849bf72b0646329e8cf74301e0f5373d6e2dbefb63d60fdddbe9fc33abda7d2312af8c52feadf3bacd04b627626d876acecc8984d3192a2d029d
@@ -41,6 +44,7 @@ EBUILD python-3.11.0_rc1_p2.ebuild 13357 BLAKE2B fac65a9fba93a49af0ed0dd91f532e6
EBUILD python-3.8.13_p6.ebuild 9731 BLAKE2B 0660743997da89023e3192c16bee0c1a14289ddc2f3fa43e19f105d208359eed8155a8345f29c214322ada0aa5c7e5eb50a564546f506abc3ea2204f44d1217c SHA512 b47a01911ed23390ef2091b1f09edf16d2398178ba0d9ec792f8afd06fcf1fb472c020a908af3a6b7c20396f8c6049767d2f11cfe9d15afa4df135b2cc0ee046
EBUILD python-3.8.13_p7.ebuild 9708 BLAKE2B d622c26fbc1791c567ea5db09e1f85e7b3c50f9894e7734c4f50de99142f029a47ffb2ce81808ab773958f44ea34d2dc110318589c950f4ee70144702d2ca20c SHA512 76b37e2a085df15d02ca285fa3f0980a043067591e70ab47d44bd010b609c34a521f0a2f7cebf34d349c9e4275f3a9b8bd09439eb16e5e7ea84b55d4d3b01ef1
EBUILD python-3.8.13_p8.ebuild 9707 BLAKE2B a0e6ffa6192d57e95736585c7c66c3b231e5435b9018762e97bdbb01039cb71b5be77b2d131d7eef7a5191ce36c76b647d73c821d231697ae58a5a5ab6888445 SHA512 8539d615307c7b839e16e22402404316f1906d98d1e0554cc48191db65330c729e2bfb2a608137d4e6618a1228eb32e32963b6e16169d2dff9f0ab01d1a734a6
+EBUILD python-3.8.14.ebuild 9712 BLAKE2B 1fc6b71d1bfc7f508fe722c2370ce0d841bcc9c9248143b90ea5cdd6ac5db52fcecf19d213b7b79a4fe0aa2964814bc99674838a5de682d814351d6b390c2688 SHA512 89de4861a64051de93b226aa61cc4afc39db0207692455b5772556885f33904f129b48e3be3f919b704225a680c49791169e4ff97c197c3a37c450dd83080b59
EBUILD python-3.9.13_p4.ebuild 10984 BLAKE2B 8743da1a832eb69289727f94f19a9ca7c9e42156847d25168adb1bee66cbc980d28f2969260baf5ddca124c01498f085bb9fd50c5e80083609a5d987337429b4 SHA512 d8cf0aae2e36445efb4a0d0df4a028ab7d990f017196a18127973b7d88dc4979585901102106c32d8281f640334b079a8efedea8f45fca75a13c2453cff4b64c
EBUILD python-3.9.13_p5.ebuild 10964 BLAKE2B 367eff5f5f1fde3114ae2c6e215291911b90575d5705e144694d365d76e1a0ee95ce08e984125b6b0e769c17075da5cf4314d82f0f97d2845708df5fe0e49263 SHA512 042cd5aa72265de612c45e1c457f72e027e3752e31ecf7ff1bfee685115b2512aee43b4e65145ec482bb0ec31229d9b4855fe4d420f0aa9fd7d29a0251d00690
EBUILD python-3.9.13_p6.ebuild 10963 BLAKE2B 482f9d357f9cbd73cd1e4e86bcd0938e3b7a65ac0770e2b8735fae64e32cf2221fc75b917b7688cd5ad5cd0380b92e2e4c5bc957442cc3547ce5b69f8002cdb3 SHA512 efb1ae2cf7d1a527f0efc949d61da970ed2ddb1a517e3640a2f918671fae2a9f247bdaa1bbcfc85199cf7e56c0fb8d6d1c7de967e59ebfe62984dddcad07a745
diff --git a/dev-lang/python/python-3.8.14.ebuild b/dev-lang/python/python-3.8.14.ebuild
new file mode 100644
index 000000000000..add41cfe710b
--- /dev/null
+++ b/dev-lang/python/python-3.8.14.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic multiprocessing pax-utils
+inherit python-utils-r1 toolchain-funcs verify-sig
+
+MY_PV=${PV/_rc/rc}
+MY_P="Python-${MY_PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${MY_PV}"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="
+ https://www.python.org/
+ https://github.com/python/cpython/
+"
+SRC_URI="
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
+ verify-sig? (
+ https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
+ )
+"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="PSF-2"
+SLOT="${PYVER}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="
+ bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+ +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:=
+ app-arch/xz-utils:=
+ dev-lang/python-exec[python_targets_python3_8(-)]
+ dev-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ ensurepip? ( dev-python/ensurepip-wheels )
+ 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-1.1.1:= )
+ tk? (
+ >=dev-lang/tcl-8.0:=
+ >=dev-lang/tk-8.0:=
+ dev-tcltk/blt:=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:= )
+"
+# bluetooth requires headers from bluez
+DEPEND="
+ ${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ sys-devel/autoconf-archive
+ virtual/awk
+ virtual/pkgconfig
+ verify-sig? ( sec-keys/openpgp-keys-python )
+"
+RDEPEND+="
+ !build? ( app-misc/mime-types )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
+
+QA_PKGCONFIG_VERSION=${PYVER}
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
+ fi
+ default
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat and libffi are not used.
+ rm -r Modules/expat || die
+ rm -r Modules/_ctypes/libffi* || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ # https://bugs.gentoo.org/850151
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
+
+ # force the correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs)
+ sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # disable automagic bluetooth headers detection
+ if ! use bluetooth; then
+ local -x ac_cv_header_bluetooth_bluetooth_h=no
+ fi
+ 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
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ append-flags -fwrapv
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/700012
+ if is-flagq -flto || is-flagq '-flto=*'; then
+ append-cflags $(test-flags-CC -ffat-lto-objects)
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ # PKG_CONFIG needed for cross.
+ tc-export CXX PKG_CONFIG
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ if use ncurses; then
+ append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+ fi
+
+ local dbmliborder=
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ local myeconfargs=(
+ # glibc-2.30 removes it; since we can't cleanly force-rebuild
+ # Python on glibc upgrade, remove it proactively to give
+ # a chance for users rebuilding python before glibc
+ ac_cv_header_stropts_h=no
+
+ --enable-shared
+ --enable-ipv6
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+ --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
+ )
+
+ # disable implicit optimization/debugging flags
+ local -x OPT=
+ # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
+ # propagated to sysconfig for built extensions
+ local -x CFLAGS_NODIST=${CFLAGS}
+ local -x LDFLAGS_NODIST=${LDFLAGS}
+ local -x CFLAGS= LDFLAGS=
+
+ econf "${myeconfargs[@]}"
+
+ if 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
+
+ # install epython.py as part of stdlib
+ echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+ # Prevent using distutils bundled by setuptools.
+ # https://bugs.gentoo.org/823728
+ export SETUPTOOLS_USE_DISTUTILS=stdlib
+
+ # also need to clear the flags explicitly here or they end up
+ # in _sysconfigdata*
+ 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
+
+ local test_opts=(
+ -u-network
+ -j "$(makeopts_jobs)"
+
+ # fails
+ -x test_gdb
+ )
+
+ if use sparc ; then
+ # bug #788022
+ test_opts+=(
+ -x test_multiprocessing_fork
+ -x test_multiprocessing_forkserver
+ )
+ fi
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ emake test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ # Fix collisions between different slots of Python.
+ rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}/usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}/usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax-kernel]; then
+ pax-mark E "${ED}/usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}/usr/bin/${abiver}"
+ fi
+
+ rm -r "${libdir}"/ensurepip/_bundled || die
+ if ! use ensurepip; then
+ rm -r "${libdir}"/ensurepip || die
+ fi
+ if ! use sqlite; then
+ rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ fi
+ if ! use tk; then
+ rm -r "${ED}/usr/bin/idle${PYVER}" || die
+ rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+ fi
+ if ! use wininst; then
+ rm "${libdir}/distutils/command/"wininst-*.exe || die
+ fi
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r 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 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"
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ local EPYTHON=python${PYVER}
+ local scriptdir=${D}$(python_get_scriptdir)
+ mkdir -p "${scriptdir}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
+ ln -s "python${pymajor}" "${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 > "${scriptdir}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${scriptdir}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
+ # 2to3, pydoc
+ ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
+ fi
+}