From 1ccef27203b03f1fa900c9b44dc425df27e49452 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 7 Sep 2022 04:34:29 +0100 Subject: gentoo auto-resync : 07:09:2022 - 04:34:29 --- dev-lang/Manifest.gz | Bin 19188 -> 19188 bytes dev-lang/python/Manifest | 8 +- dev-lang/python/python-3.10.6_p4.ebuild | 2 +- dev-lang/python/python-3.9.13_p6.ebuild | 2 +- dev-lang/python/python-3.9.14.ebuild | 402 ++++++++++++++++++++++++++++++++ 5 files changed, 410 insertions(+), 4 deletions(-) create mode 100644 dev-lang/python/python-3.9.14.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index ac844d5ded58..a62160f857a9 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 04c8970df344..7ef241a7c305 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -12,6 +12,8 @@ DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99 DIST Python-3.8.13.tar.xz.asc 833 BLAKE2B 918894777e1a783f2a7c7958a808610631cb7a6039df84675158e8d2fd66782f29921d44ab9b4625c4ca3821852e0d0e0005163b086c7d0c3d617e3a76cb7033 SHA512 6683c4ae6cf20a97a29165f96b9f5dd09d618892583650d803aa677240695968dfe344294fc33db68fd4669c82021afcc29a1f6afe49915be51fae281eeeedbe 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 +DIST Python-3.9.14.tar.xz.asc 833 BLAKE2B 16baf31f01c2e008e77379231355bb5e80bdf394219fa797f89881d408243b81cd0744a208f46675e2c4fa7f524f1eb456ca1bf10cf6b9bcc8c7eaa46b6b621c SHA512 7cffff00ecc94d32a61e763b4ebd73caf83994e3a24b682d45453f34631e4feabcffbaae5e511952656ab6e64945bc2a3d1fb440f788352f262ffa00ec3d2203 DIST python-gentoo-patches-2.7.18_p15.tar.xz 34956 BLAKE2B d173f276dd9c0ce31004dcc55a0d18e9ce25a47683c2df3c4dd62e967dfbbb35be59a2f08cf20f30a19475a8a2344dd95b17400eafa88b5fdbe9270a12ccbf32 SHA512 d9386808265f978808e5c0ffd384cefe54fb0e05aeccfd394167d5227d9cd66e25c8e93c54914762b2cfc3c2dd851b26a7a84d62634c6aa8a0798aacbb7ac25f DIST python-gentoo-patches-3.10.6_p2.tar.xz 12040 BLAKE2B 75c93fab19137a966b3775308bc20142f4d3648bbb9364e82c4eaffae93beda54011192881c52b85d2e2493a06cfe2a90f50675609908c3d5ebdb0103fe41644 SHA512 7e451a8a18a62592c2cd7b2db71065b77256960f43e172a0d7856b22b69138dcb1552f53b39bec14585a761cfe729c81613551c1b616fe1ec8d2b59856b11453 DIST python-gentoo-patches-3.10.6_p3.tar.xz 26712 BLAKE2B 701a7a4da1a09f71dee8fdf924a45e030b8ae93e469a2789b28b904d2fd6b011589fb940eb0c262e8b19005af523a2f66075d053fb60892d6ebd473159fce718 SHA512 ed43ba18735ddf72c434bfe905894d156a144a77f9fb8266378d384e840b376c6220859d8d1af83f304293368bf1dd45881316c1797ba25d618a064daaacab17 @@ -26,11 +28,12 @@ DIST python-gentoo-patches-3.8.13_p8.tar.xz 43204 BLAKE2B 6fb162bfcd2ab8c1fb4208 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 +DIST python-gentoo-patches-3.9.14.tar.xz 20208 BLAKE2B 964f1eca6423247bbe862de36ea6d3a337acd70405d5f046493907da3519bad99f6ab9065b2d8af1ce31bbad4183cf95c285f1040d55ce1b5dfca986fc2c849a SHA512 271ccfdc065fe6ef26621d79eb9e758264c53aad2b74d1d50bdb0bf64462389019503a3383c8d5b044231e9c3e2019d7f1240b27ca7fb9502a0beb728161b9bb EBUILD python-2.7.18_p15-r1.ebuild 8315 BLAKE2B cc31d031262c95e2e8a187017e05bc90cc7c75b240efbd3c565d0fa686ee14dcf8cd9d83e533a479edb95901dbb92a9d2ff924cbebe148e9b54caa3ce635e350 SHA512 32ae3d2eab2105fd83bd23467dd1cc3e2527d8c06fbdd8bc08b48542e4ee06388c1d93db4d99e80aa7a6a5e6c8f6089e2dffb18dce1155b7a8d6bd7555389a0d EBUILD python-2.7.18_p15.ebuild 9827 BLAKE2B 77ebeacfa236e518ec0c0a791e0da60f8158d369e870c88ce69d1eef25cdc99e658903abf313452b849254e97b4c9f583e0edb75ec845faf5b47fb2fc3173ce4 SHA512 19219cd43391d8d53838c9b0e15b30f8ccb5d5a23503a213cc961ff2fa545cd17a5ecc6ce253e2a01534db3bc931be212969c40885c2e99f203c23a5ecb689a1 EBUILD python-3.10.6_p2.ebuild 11181 BLAKE2B f8180bd07e43dffedafd7d912bcb9a002e93c1514c72055b24c65f36b7ef477e748bb777fa02da4c6d2c6391a1eaa9f59266b09fafb2e7ca8a67a96efd6f423c SHA512 4613ab1e7336e38a91877d4b1c5558e5221a770d8171d92fff319c6a4f64127bd9cb6dd8c56d84e70558de8ac647a315d740336834cdfa1ad3b86b184408c54b EBUILD python-3.10.6_p3.ebuild 11161 BLAKE2B b1d379be929e3a5ef8eb45beff1581e99085fdfc3af2aad29c9202284b73c225b82ba8ae81fe1db6191bc97f45d59ad9de2bcf664407269e890bb658da4072e5 SHA512 724f964f56c8c8e7859719eaf3b009f84371b5c70c509147f2a010959e93455daf469399c4159a3cba61de80ab08c327e908d8ffdbbbdb2e9893e88172969a41 -EBUILD python-3.10.6_p4.ebuild 11162 BLAKE2B c8ac4f31a628990997d8b30e903d677770eda055c7d7296bf28543814a7d05e4be65791e355e43feccda58a60952428cc05abb01de5814463614c34486235da1 SHA512 82922d217eefe559fbddde7c628a087167262070e451f4fe6dce98491781a0f9d4a403c6e6d799e112fd4fecf60e9652a92958b5966c3849b17f29130ee2ef49 +EBUILD python-3.10.6_p4.ebuild 11161 BLAKE2B 8fb60e5fb1ac4f4cfb1fe750ba01febf36c2a75f33d29c06c33f19de1515ca5591bb36aa1bdfe202d8e43aff9e827f5cc39355923b829aa08ebe23de80b5991f SHA512 3f6a51eabc57fcb440944239496107dc95ab080e940eb59875774df56de650ed8e9408754539ff527549ba894ad323df84623eb817bb3e88f73d5f2b3763abb9 EBUILD python-3.10.7.ebuild 11162 BLAKE2B c8ac4f31a628990997d8b30e903d677770eda055c7d7296bf28543814a7d05e4be65791e355e43feccda58a60952428cc05abb01de5814463614c34486235da1 SHA512 82922d217eefe559fbddde7c628a087167262070e451f4fe6dce98491781a0f9d4a403c6e6d799e112fd4fecf60e9652a92958b5966c3849b17f29130ee2ef49 EBUILD python-3.11.0_rc1.ebuild 13384 BLAKE2B 7ac3f74190fafd1321f2ae9b478cb1b7381f13ce88d1839bbe2eea12a9abb0f14286f3e6036ca65c2d37ca6b07b62c14f557a7af080f6f05f119e7bbd77764cc SHA512 3b94a9e45017c0ec3d2bb2ca346d423a0e31d3b1f2c1fa098aa2c4f0af58e49f3626688dacde9740b2c1f44c63f143bf43ec305d0ce69c3e68de3ff6ae0a88c3 EBUILD python-3.11.0_rc1_p1.ebuild 13357 BLAKE2B fac65a9fba93a49af0ed0dd91f532e6cd729b815ae71b06dcdc40391dbf5252c56067be5a8085576cee41bf96d011fe9264ec0c390bb22db2265579d8b696092 SHA512 faa9b3067f81e57d8969825fa7851ac74690fdaab8b380f963f8567a09ce69a250592ee23df42f584c25261a49e93bafcecd23ab9d392d90ad4794e2c532d7e7 @@ -40,5 +43,6 @@ EBUILD python-3.8.13_p7.ebuild 9708 BLAKE2B d622c26fbc1791c567ea5db09e1f85e7b3c5 EBUILD python-3.8.13_p8.ebuild 9710 BLAKE2B a6ca8025de7e7212f05ec543d8a963420e9ee9b86afc8990c1e4428e48647a79abdf9c0d4bb225870fd33ec12efe9112c5e19970bbf0b1599d76ea1360c006ba SHA512 157b4c0b0c5e6e217fa264494684b245ad86345ab863f9ea3da7d93d60eb3474b8eb5e195d6f3389732f00048aeb792a5c42014300c6a7246ebe2204e14f1335 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 10965 BLAKE2B 971e8c4cffb53ce7b45971b171bb9552b7187f81e88322e774931b9d0e3619fbc6508cb9f847656bfdb227702aca298bf1b42715696692dd4ea5b37dd7a91d2d SHA512 7ea76b2370612035ea5f95059f7314aca8b7c3c8c128b86d0e42f55ab3dd350e132e020ae629d05e493fba16384cdf0e5a68028f0c2d9aaa1f1c04941afb06ce +EBUILD python-3.9.13_p6.ebuild 10964 BLAKE2B 367eff5f5f1fde3114ae2c6e215291911b90575d5705e144694d365d76e1a0ee95ce08e984125b6b0e769c17075da5cf4314d82f0f97d2845708df5fe0e49263 SHA512 042cd5aa72265de612c45e1c457f72e027e3752e31ecf7ff1bfee685115b2512aee43b4e65145ec482bb0ec31229d9b4855fe4d420f0aa9fd7d29a0251d00690 +EBUILD python-3.9.14.ebuild 10965 BLAKE2B 971e8c4cffb53ce7b45971b171bb9552b7187f81e88322e774931b9d0e3619fbc6508cb9f847656bfdb227702aca298bf1b42715696692dd4ea5b37dd7a91d2d SHA512 7ea76b2370612035ea5f95059f7314aca8b7c3c8c128b86d0e42f55ab3dd350e132e020ae629d05e493fba16384cdf0e5a68028f0c2d9aaa1f1c04941afb06ce MISC metadata.xml 1068 BLAKE2B 3c3511739ae8251d11bde32aa3a21225fd3468f2b1f31c459de956c5bb7dbc2de4103a288dd29b26d1023e40bac62631fa953d1515513e934f5c3962d9c715a7 SHA512 0f7d3f9305cc539619568aea7e54cdb9a3319579e811108cf03d7c66290e4f21080a87ca02f1a62264d4ecd41a243c91f0a639e6c064ccf2b24b460508c848b8 diff --git a/dev-lang/python/python-3.10.6_p4.ebuild b/dev-lang/python/python-3.10.6_p4.ebuild index b919f0692412..504666f90ada 100644 --- a/dev-lang/python/python-3.10.6_p4.ebuild +++ b/dev-lang/python/python-3.10.6_p4.ebuild @@ -28,7 +28,7 @@ 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" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86" IUSE=" bluetooth build +ensurepip examples gdbm hardened libedit lto +ncurses pgo +readline +sqlite +ssl test tk +xml diff --git a/dev-lang/python/python-3.9.13_p6.ebuild b/dev-lang/python/python-3.9.13_p6.ebuild index 57aa423c9b08..56753347e7f6 100644 --- a/dev-lang/python/python-3.9.13_p6.ebuild +++ b/dev-lang/python/python-3.9.13_p6.ebuild @@ -28,7 +28,7 @@ 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" +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 +xml diff --git a/dev-lang/python/python-3.9.14.ebuild b/dev-lang/python/python-3.9.14.ebuild new file mode 100644 index 000000000000..57aa423c9b08 --- /dev/null +++ b/dev-lang/python/python-3.9.14.ebuild @@ -0,0 +1,402 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +WANT_LIBTOOL="none" + +inherit autotools check-reqs 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 +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_9(-)] + 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 + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER} + +pkg_pretend() { + use test && check-reqs_pkg_pretend +} + +pkg_setup() { + use test && check-reqs_pkg_setup +} + +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 + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + -x test_gdb + -u-network + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + local -x PROFILE_TASK="${profile_task_flags[*]}" + 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 + + $(use_with lto) + $(use_enable pgo optimizations) + ) + + # 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 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict /usr/lib/python3.9/site-packages + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # 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 + + 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 +} -- cgit v1.2.3