From 3cd09a18bad26aad2645241b868755cfdf41b6ae Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 10 Apr 2025 08:43:23 +0100 Subject: gentoo auto-resync : 10:04:2025 - 08:43:23 --- dev-lang/Manifest.gz | Bin 22625 -> 22621 bytes dev-lang/crystal/Manifest | 6 +- dev-lang/crystal/crystal-1.15.0-r1.ebuild | 126 ----- dev-lang/crystal/crystal-1.16.0.ebuild | 126 +++++ dev-lang/go/Manifest | 4 +- .../go/files/go-1.24-dont-force-gold-arm.patch | 55 ++ dev-lang/go/go-1.24.2-r1.ebuild | 132 +++++ dev-lang/go/go-9999.ebuild | 4 +- dev-lang/pypy/Manifest | 4 + dev-lang/pypy/pypy-3.10.7.3.19_p2.ebuild | 239 +++++++++ dev-lang/pypy/pypy-3.11.7.3.19_p5.ebuild | 239 +++++++++ dev-lang/python/Manifest | 14 +- dev-lang/python/python-3.10.17.ebuild | 2 +- dev-lang/python/python-3.11.12.ebuild | 2 +- dev-lang/python/python-3.12.10.ebuild | 2 +- dev-lang/python/python-3.13.3.ebuild | 2 +- dev-lang/python/python-3.8.20_p7.ebuild | 491 +++++++++++++++++ dev-lang/python/python-3.9.22.ebuild | 584 +++++++++++++++++++++ 18 files changed, 1891 insertions(+), 141 deletions(-) delete mode 100644 dev-lang/crystal/crystal-1.15.0-r1.ebuild create mode 100644 dev-lang/crystal/crystal-1.16.0.ebuild create mode 100644 dev-lang/go/files/go-1.24-dont-force-gold-arm.patch create mode 100644 dev-lang/go/go-1.24.2-r1.ebuild create mode 100644 dev-lang/pypy/pypy-3.10.7.3.19_p2.ebuild create mode 100644 dev-lang/pypy/pypy-3.11.7.3.19_p5.ebuild create mode 100644 dev-lang/python/python-3.8.20_p7.ebuild create mode 100644 dev-lang/python/python-3.9.22.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 52889e527116..abc9d135f337 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest index f52b56690e91..79278054b79f 100644 --- a/dev-lang/crystal/Manifest +++ b/dev-lang/crystal/Manifest @@ -1,10 +1,10 @@ AUX crystal-0.27.0-gentoo-tests-long-unix-2.patch 469 BLAKE2B 66bcc1d0dd9582cac4ba89a2ccc2c7a2ac3ff4994cd687191470f2d481f9a6e3a91aaaf705f92f7600118a9cda015a9554056520502df7ae6462e111665c7330 SHA512 d840ac343ef566e404dc84e908bead5a020dfd88b8c0432f17bceea8d710d435626dc72b4be6622dbcd683a149bca16e781320cf74fc3f2598f84d169c6f7faa AUX crystal-0.27.0-gentoo-tests-long-unix.patch 3317 BLAKE2B df1040abdb587ac3fffb8129d4f1bafc492e38ad5dcfdea5cfbf4426849b099c4d94dac61c93ae7fcae46b60dea1809f52ad373efcd89796a3c1f119614063c1 SHA512 a9ed819a864465e062b4d6a568f14fbb8adc1db01071c79164dede8b2b8d83e07b785cd8196826097de5119e0bdc7d6e194cf4e10cc677bd2bdf158d124c2ad2 AUX crystal-1.15.0-remove-enviroment-clearing-tests.patch 936 BLAKE2B e9d3f2384c79eb17a52b71636147ac97aada9a7ddccc619fd0a5ccd2c89d3e7f135d9526931557f4bd15eef5232e0cb469715568d8d07b7e5530947720f67921 SHA512 e0e48d65098d07511238b4be0c1daa8c8d9aec42148a5115526431f1f507425160324e98d2ca647fb135b3a0b534cf0b376ae7563bd6c9046ea1264b860f44ad -DIST crystal-1.15.0-1-linux-x86_64.tar.gz 51497623 BLAKE2B 03059b38b1df3a035c82472f0691c3b37d9b82ae90e0cae922a36c069750e5d00444dc5759fd5cefee294fbde20b17aac233323067256caf161ef542d27e51d5 SHA512 ee0a85d98fd1170c97380184bd845cafd426765bf633d0d26885e970a5e15241d76a93a11c1a207ddedef9a1d76978e5f32be17b074cd3c03c3f5cc5b7e064b9 -DIST crystal-1.15.0.gh.tar.gz 3812860 BLAKE2B a6b52007d6a4975d2011104f65cec932300bb6f84f497bfda138d987e844cb025d4690b0f74335aff42295c5d355ac73371cab86db87ca9819c1885d98f76bd8 SHA512 ea07de4b9c6c46e96f05d816d0504f8b0206e89fe7e4236038dc3b0875e52e89c711cc798b8fc30f66b02dd48cec70e0ea76160f14447577761411a41f1b28fa DIST crystal-1.15.1-1-linux-x86_64.tar.gz 51499223 BLAKE2B 11f94a67c97215f410c4a5987abaaa34d1264cdb4340a34223843e33152697125de05acc1a47604bb85456e1fd507fc854f38498adcc7b19492cb87c160184db SHA512 94faf3859212f0b9b80b4f2ce46bfa8a90cbf9d2c71f0127453baeff6ca8d1d76cde36d9af2c7bb6019e809de08e8eafdc39cc2621695d05c612d2fc8765f303 DIST crystal-1.15.1.gh.tar.gz 3814922 BLAKE2B 0667e93e3c2b7b80d44347377303195161bfee1709fa64e78fd978cc3409813836542642ac04054d94bf280828a29e592af6db8fdbd4a7bf8f04e8ef62ca209e SHA512 3c552bf4acb06a5e0e3adae2a22cc42c8a003b91a3c9f2ce4cc80d790f5981e94178ad0667504f4d709dfa3f1bc9505ef8ae42b8eb79489f4d1396bd9fc456ff -EBUILD crystal-1.15.0-r1.ebuild 2784 BLAKE2B cff25e85a08daf3126d27420128d048e82f56086f7777d678ced3a4c208f654be13d4c88722e115078fd12764b6d467faeefa2eafea26b44e3068f5d4a8f2875 SHA512 d8cb55ed0837398f12b336175686d889682f83271819d8b74602349ce63d4f5427cac3a244ba01c14b9034122a8ce5905066889de0742f6672fd1e0c2cb2703c +DIST crystal-1.16.0-1-linux-x86_64.tar.gz 51689322 BLAKE2B 853a5152d0b6addbbcafc65b7a608fa2502b3aaef47aa0c1f5f36a57e2abc93885dc6d8fffb15510d6f489b628c1118e25b8481f4e5dbd3f0e0a3b96ea2a72f5 SHA512 6d6372d47331a950c11fc02386223f16bf06b647cfe3ea7ed9a3e82d80732d93baca6786b95f2f1f26670e447000c4ee912781f8edb8c3bd639f4c08ceefd938 +DIST crystal-1.16.0.gh.tar.gz 3717850 BLAKE2B da8a4502efbfa784fc02549fb1022c00b51a00701c307fb256caa26df920667718f8f9da1a3705b682c2fe5c1e2670f9ac35fcb7877298300ba46593b66390d9 SHA512 8f1bda2bb077c989d4760f88cc065dd13bdd424547d4733bcc650315c6086fbfd1fb3fde72597f396f75675966c177df538223502ab743af0c531e0d06dc5676 EBUILD crystal-1.15.1.ebuild 2784 BLAKE2B cff25e85a08daf3126d27420128d048e82f56086f7777d678ced3a4c208f654be13d4c88722e115078fd12764b6d467faeefa2eafea26b44e3068f5d4a8f2875 SHA512 d8cb55ed0837398f12b336175686d889682f83271819d8b74602349ce63d4f5427cac3a244ba01c14b9034122a8ce5905066889de0742f6672fd1e0c2cb2703c +EBUILD crystal-1.16.0.ebuild 2785 BLAKE2B cf0495de84b1af4d292bd05c153db8a1412dcfed2a4bef00abd4c6b984d368b822f162c09ab0177f0b070e39aae2cbfc3582630c51f6f7bfe4a9c6efa83b406e SHA512 5333b4f5456ab7a58c3df1669627dae50e9a82ab71c77ddf564fba73e3d182c29721a7ac624b3e1ab0584f79097d6ca37f0c313b420d29507aedafb4c1de7b94 MISC metadata.xml 762 BLAKE2B 591f38c882318a6564501cc61abe6222264b65adeaffaf3b23d959ee86b83bae33eaf99029229705f92070fa539fd6d63d8242afc38475904483a9a0b997effd SHA512 ea223d568a3c336a43b183efc61bd1f1a9d1e5e0e8d963275e0b23ee879551bc7d8aae797b1e2edba49d119ad306692599eb535c5d164ebee0c6721dfeab78dc diff --git a/dev-lang/crystal/crystal-1.15.0-r1.ebuild b/dev-lang/crystal/crystal-1.15.0-r1.ebuild deleted file mode 100644 index 6b61638ca307..000000000000 --- a/dev-lang/crystal/crystal-1.15.0-r1.ebuild +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -BV="${PV}-1" -BV_AMD64="${BV}-linux-x86_64" - -LLVM_COMPAT=( {18..19} ) - -inherit llvm-r1 multiprocessing shell-completion toolchain-funcs - -DESCRIPTION="The Crystal Programming Language" -HOMEPAGE="https://crystal-lang.org/ - https://github.com/crystal-lang/crystal/" -SRC_URI=" - https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz - amd64? ( - https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz - ) -" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64" -IUSE="doc debug llvm-libunwind" -RESTRICT="test" # Upstream test suite not reliable. - -DEPEND=" - dev-libs/boehm-gc:=[threads] - dev-libs/gmp:= - dev-libs/libatomic_ops:= - dev-libs/libevent:= - dev-libs/libpcre2:=[unicode] - dev-libs/pcl:= - $(llvm_gen_dep ' - llvm-core/llvm:${LLVM_SLOT}= - ') - llvm-libunwind? ( - llvm-runtimes/libunwind:= - ) - !llvm-libunwind? ( - sys-libs/libunwind:= - ) -" -RDEPEND=" - ${DEPEND} - dev-libs/libxml2 - dev-libs/libyaml -" - -PATCHES=( - "${FILESDIR}/${PN}-0.27.0-gentoo-tests-long-unix.patch" - "${FILESDIR}/${PN}-0.27.0-gentoo-tests-long-unix-2.patch" - "${FILESDIR}/${PN}-1.15.0-remove-enviroment-clearing-tests.patch" -) - -src_prepare() { - default - - # Link against system boehm-gc instead of upstream prebuilt static library - # bug #929123, #929989 and #931100 - # https://github.com/crystal-lang/crystal/issues/12035#issuecomment-2522606612 - rm "${WORKDIR}/crystal-${BV}"/lib/crystal/libgc.a || die -} - -src_configure() { - local bootstrap_path="${WORKDIR}/${PN}-${BV}/bin" - if [[ ! -d "${bootstrap_path}" ]] ; then - eerror "Binary tarball does not contain expected directory:" - die "'${bootstrap_path}' path does not exist." - fi - - # crystal uses 'LLVM_TARGETS' to override default list of targets - unset LLVM_TARGETS - - MY_EMAKE_COMMON_ARGS=( - PATH="${bootstrap_path}:${PATH}" - - CRYSTAL_CONFIG_VERSION="${PV}" - CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal" - - $(usex debug "" release=1) - progress=true - stats=1 - threads="$(makeopts_jobs)" - verbose=1 - check_lld= # disable opportunistic lld - - AR="$(tc-getAR)" - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - LLVM_CONFIG="$(get_llvm_prefix -d)/bin/llvm-config" - ) -} - -src_compile() { - emake "${MY_EMAKE_COMMON_ARGS[@]}" - - use doc && emake docs "${MY_EMAKE_COMMON_ARGS[@]}" -} - -src_test() { - emake std_spec "${MY_EMAKE_COMMON_ARGS[@]}" -} - -src_install() { - insinto "/usr/$(get_libdir)/crystal" - doins -r src/. - - exeinto /usr/bin - doexe .build/crystal - - newzshcomp etc/completion.zsh _crystal - newfishcomp etc/completion.fish crystal.fish - - dodoc -r samples - doman "man/${PN}.1" - newbashcomp etc/completion.bash "${PN}" - - if use doc ; then - docinto api - dodoc -r docs/. - fi -} diff --git a/dev-lang/crystal/crystal-1.16.0.ebuild b/dev-lang/crystal/crystal-1.16.0.ebuild new file mode 100644 index 000000000000..573dc999fa39 --- /dev/null +++ b/dev-lang/crystal/crystal-1.16.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +BV="${PV}-1" +BV_AMD64="${BV}-linux-x86_64" + +LLVM_COMPAT=( {18..19} ) + +inherit llvm-r1 multiprocessing shell-completion toolchain-funcs + +DESCRIPTION="The Crystal Programming Language" +HOMEPAGE="https://crystal-lang.org/ + https://github.com/crystal-lang/crystal/" +SRC_URI=" + https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz + amd64? ( + https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz + ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc debug llvm-libunwind" +RESTRICT="test" # Upstream test suite not reliable. + +DEPEND=" + dev-libs/boehm-gc:=[threads] + dev-libs/gmp:= + dev-libs/libatomic_ops:= + dev-libs/libevent:= + dev-libs/libpcre2:=[unicode] + dev-libs/pcl:= + $(llvm_gen_dep ' + llvm-core/llvm:${LLVM_SLOT}= + ') + llvm-libunwind? ( + llvm-runtimes/libunwind:= + ) + !llvm-libunwind? ( + sys-libs/libunwind:= + ) +" +RDEPEND=" + ${DEPEND} + dev-libs/libxml2 + dev-libs/libyaml +" + +PATCHES=( + "${FILESDIR}/${PN}-0.27.0-gentoo-tests-long-unix.patch" + "${FILESDIR}/${PN}-0.27.0-gentoo-tests-long-unix-2.patch" + "${FILESDIR}/${PN}-1.15.0-remove-enviroment-clearing-tests.patch" +) + +src_prepare() { + default + + # Link against system boehm-gc instead of upstream prebuilt static library + # bug #929123, #929989 and #931100 + # https://github.com/crystal-lang/crystal/issues/12035#issuecomment-2522606612 + rm "${WORKDIR}/crystal-${BV}"/lib/crystal/libgc.a || die +} + +src_configure() { + local bootstrap_path="${WORKDIR}/${PN}-${BV}/bin" + if [[ ! -d "${bootstrap_path}" ]] ; then + eerror "Binary tarball does not contain expected directory:" + die "'${bootstrap_path}' path does not exist." + fi + + # crystal uses 'LLVM_TARGETS' to override default list of targets + unset LLVM_TARGETS + + MY_EMAKE_COMMON_ARGS=( + PATH="${bootstrap_path}:${PATH}" + + CRYSTAL_CONFIG_VERSION="${PV}" + CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal" + + $(usex debug "" release=1) + progress=true + stats=1 + threads="$(makeopts_jobs)" + verbose=1 + check_lld= # disable opportunistic lld + + AR="$(tc-getAR)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + LLVM_CONFIG="$(get_llvm_prefix -d)/bin/llvm-config" + ) +} + +src_compile() { + emake "${MY_EMAKE_COMMON_ARGS[@]}" + + use doc && emake docs "${MY_EMAKE_COMMON_ARGS[@]}" +} + +src_test() { + emake std_spec "${MY_EMAKE_COMMON_ARGS[@]}" +} + +src_install() { + insinto "/usr/$(get_libdir)/crystal" + doins -r src/. + + exeinto /usr/bin + doexe .build/crystal + + newzshcomp etc/completion.zsh _crystal + newfishcomp etc/completion.fish crystal.fish + + dodoc -r samples + doman "man/${PN}.1" + newbashcomp etc/completion.bash "${PN}" + + if use doc ; then + docinto api + dodoc -r docs/. + fi +} diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest index 070e6527c968..4bb09ae03aaa 100644 --- a/dev-lang/go/Manifest +++ b/dev-lang/go/Manifest @@ -1,3 +1,4 @@ +AUX go-1.24-dont-force-gold-arm.patch 2151 BLAKE2B 1a2a16464d0fffdd78b195346cb7e8ddd9077c2e2e8472a8ca16de3c3b8468c4662f68398ada29463cc6b83869a8cdcab0f8ef0d0807fecf3f03bcc4becba03e SHA512 75eb534c214e9ba2ed7667d04c8007131b34dbae8b6e3e6ad0b8b7fe9ccee90fdb1c3bafe2f7e2bdd3270dc4a1cf3bcac789b03625f0eead9b51ce471bd294eb AUX go-1.24-skip-gdb-tests.patch 408 BLAKE2B 062d5ee7bda4e4891a3098e4a9328136b128ac029cf4613d13dcc062a0af03d687f67a4c35bd3b130aad6af8661371b48408df471760eceb76d4e757a60189c2 SHA512 311e45c7fa8f0c32f7c2b3cd017af126a1781fbfddc5d62c5fbd6a2f2b4bc9f9d7492a6ba231bd97806821b1c75b0e096e1e7e526ea9c2d8bbe6108e5a907ca2 AUX go-never-download-newer-toolchains.patch 368 BLAKE2B 0c90f46492af80622f430b2d506b143f3b553b5276085f78f41b93fee8219745179038302462603b5b1677554d92911eb4865084d0488aaa4c71ae1abc307f71 SHA512 b5acf97ccf96c6a353fcb7bd97113c38562defd82338828124fcc72c71334feda9c4e839d2aae5b66b809bc8a692eac96396c54a478e17a7ffd8d2c68fea95e6 AUX go-sets.conf 256 BLAKE2B 670afd72a2fa961e2b3882ac48d10e9d047af7a68f47bc8c8985b2de7a84022410fb1acfe2c710f8b3804ec3b043bf18c948478cf7d31c982cff47714b309cdf SHA512 028fba72c2d82ef893416970c27cb277be15f7c5c67773c0a62cd8ce2c192813ba851339596f10a6f5394c479e67b62dd4e4520379cc03f764ed4a4ab834fba6 @@ -6,6 +7,7 @@ DIST go1.23.8.src.tar.gz 28182772 BLAKE2B 568b9fcc7ed12cb19e10b458fc1890a5977c97 DIST go1.24.2.src.tar.gz 30787666 BLAKE2B bb5f998a87e6527def304347b854c4addb0860a03da82e711f60e2af460bd43c36273b25126c643a679ae22fca226e6a4fc5ba55967d21965ffdc8f564781e35 SHA512 6366a32f6678e7908b138f62dafeed96f7144b3b93505e75fba374b33727da8b1d087c1f979f493382b319758ebfcbeb30e9d7dadcb2923b628c8abe7db41c6f EBUILD go-1.23.7.ebuild 4219 BLAKE2B 5d42a222a7aab58bba44ba7504c1785260547e0a61adbd7801fef84a69308929d2b90fe941993ef6b6b4df6df7f2e2d2b532e6749e7b32a999f760180f4b72c8 SHA512 f78e742f821b52dcff9d0edd6dd27629b0d691a868b0d35eac4b46025163b6d33174554d730999182ae3721ae45ef97fa18709b05203bb005b7e7ec5711a33d2 EBUILD go-1.23.8.ebuild 4220 BLAKE2B a5bf3912f35bdf251e9168b3ad6a7e90c9017c6f4054f7d1ae6fd13ece2040f448076957d8e10c706d509955c08cd8f91f08143db377435f64bd24dee36af1b6 SHA512 cb33910362e7913ca692c62e63e1ef075ef7762dc9103914a651c3d071aadb8401736874444033046f8c3c586a910a8977a2163de4ea184ab6d49e21abe6dfc4 +EBUILD go-1.24.2-r1.ebuild 3368 BLAKE2B 4124a02284437def9edfe9daea363d64c96d1943713aab0449a290740cdb9f98162c5fd54890e12575fb4bf2200eedb417d369822b381b1810796902e75fec3b SHA512 1a735e35d2d3bada964a1cfe2d0ad40dec00e82c3b665d72b96f3f7a015f9b6bbd09a13f31458f14f4d3354378cc76937ed3c8843076ca32808dc72e59e146d2 EBUILD go-1.24.2.ebuild 3401 BLAKE2B 2ea55f57bad1c6970c494fe110f1d5c57af9db310d3d4071763f91594cae0ae838627d1e691b5ec8f3087c3a790f91e946a8ca299e0d8748fcc10ec7e5c3696e SHA512 7ea5b4533b6a7a46f26d8c447c1a8afd47efaaa263fe37c26684cb9fe1880f077e1e4562de05c85686769913568ed71b3e786e54170e184dad9aa89dbb8f4e79 -EBUILD go-9999.ebuild 3363 BLAKE2B 49672850d9c2e09b4263d4fa7211608251a080be138abeef75fd4602db68e346f7591832e18ef3248a37519af5c9126f192c908549bbcb62d1e09a764aaacd7f SHA512 99ed1c3388e560e851213dc6239a2da268818fa6fc74f068e912af05f3794b49d1bc26de8d6047a961d7596dbe46a2aaacdf97a15e792dece609bbfa9403ff19 +EBUILD go-9999.ebuild 3325 BLAKE2B 44e91a7a333928cf9776903747221b227951d35cafee81b4df3ce8cc3fc847b21503cd34b339cdade49de5a4c810aee5a2f00698542615a42efb189b9bf26208 SHA512 f7cb4aa003edf37bfc89ebd3269e16049a1a33345d2aa779a32029c6c7fbdff3e6d051e499676dbaee0eb061fccc27de9d5e5413b8ffb676ee6a8f237955d858 MISC metadata.xml 589 BLAKE2B 341e4c0e91d73ca668c1795035e1223eed60f85c724afd989ef1f8fb69649f7f6eaaf8a5228f6c8f587ffcc40a438c47d332fbe6866839f5a0829872a983f642 SHA512 fe58ddddfbd4d0d060516cb035592a80c0f48e125bb59c95d3c6fac0c182271e2a9ec9bd055b9cc8e6cb8c449e6c483bff4a23c362f532c24255febfdefc273a diff --git a/dev-lang/go/files/go-1.24-dont-force-gold-arm.patch b/dev-lang/go/files/go-1.24-dont-force-gold-arm.patch new file mode 100644 index 000000000000..4869b38593c4 --- /dev/null +++ b/dev-lang/go/files/go-1.24-dont-force-gold-arm.patch @@ -0,0 +1,55 @@ +Don't default to -fuse-ld=gold on arm64. The gold linker is deprecated in +GNU Binutils and the referenced bfd bug which led to this default being +added is long-fixed. + +https://src.fedoraproject.org/rpms/golang/raw/rawhide/f/0006-Default-to-ld.bfd-on-ARM64.patch +https://bugs.gentoo.org/893956 +https://github.com/golang/go/issues/22040 +https://github.com/golang/go/pull/49748 +https://sourceware.org/PR19962 + +From 46ec67413008607e2150e3395668e54e538c5b6b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= +Date: Wed, 19 Jun 2024 10:18:58 +0200 +Subject: [PATCH] Default to ld.bfd on ARM64 + +--- + src/cmd/link/internal/ld/lib.go | 20 +++++++------------- + 1 file changed, 7 insertions(+), 13 deletions(-) + +diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go +index eab74dc328..b401f58727 100644 +--- a/src/cmd/link/internal/ld/lib.go ++++ b/src/cmd/link/internal/ld/lib.go +@@ -1620,22 +1620,16 @@ func (ctxt *Link) hostlink() { + } + + if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" { +- // On ARM64, the GNU linker will fail with +- // -znocopyreloc if it thinks a COPY relocation is +- // required. Switch to gold. +- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962 +- // https://go.dev/issue/22040 +- altLinker = "gold" +- +- // If gold is not installed, gcc will silently switch +- // back to ld.bfd. So we parse the version information +- // and provide a useful error if gold is missing. ++ // Use ld.bfd as the default linker ++ altLinker = "bfd" ++ ++ // Provide a useful error if ld.bfd is missing + name, args := flagExtld[0], flagExtld[1:] +- args = append(args, "-fuse-ld=gold", "-Wl,--version") ++ args = append(args, "-fuse-ld=bfd", "-Wl,--version") + cmd := exec.Command(name, args...) + if out, err := cmd.CombinedOutput(); err == nil { +- if !bytes.Contains(out, []byte("GNU gold")) { +- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out) ++ if !bytes.Contains(out, []byte("GNU ld")) { ++ log.Fatalf("ARM64 external linker must be ld.bfd, but is not: %s", out) + } + } + } +-- +2.45.1 diff --git a/dev-lang/go/go-1.24.2-r1.ebuild b/dev-lang/go/go-1.24.2-r1.ebuild new file mode 100644 index 000000000000..2be24178ea79 --- /dev/null +++ b/dev-lang/go/go-1.24.2-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +# See "Bootstrap" in release notes +GO_BOOTSTRAP_MIN=1.22.12 +MY_PV=${PV/_/} + +inherit go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="cpu_flags_x86_sse2" + +BDEPEND="|| ( + >=dev-lang/go-${GO_BOOTSTRAP_MIN} + >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT=" strip" + +DOCS=( + CONTRIBUTING.md + PATENTS + README.md + SECURITY.md +) + +go_tuple() { + echo "$(go-env_goos $@)_$(go-env_goarch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +PATCHES=( + "${FILESDIR}"/go-1.24-skip-gdb-tests.patch + "${FILESDIR}"/go-1.24-dont-force-gold-arm.patch + "${FILESDIR}"/go-never-download-newer-toolchains.patch +) + +src_compile() { + if has_version -b ">=dev-lang/go-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b ">=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go-env_goarch ${CBUILD}) + export GOHOSTOS=$(go-env_goos ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go-env_goarch) + export GOOS=$(go-env_goos) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go-env_goarm) + use x86 && export GO386=$(go-env_go386) + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + cd src + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild -k || die "tests failed" +} + +src_install() { + dodir /usr/lib/go + # The use of cp is deliberate in order to retain permissions + cp -R . "${ED}"/usr/lib/go + einstalldocs + + # testdata directories are not needed on the installed system + # The other files we remove are installed by einstalldocs + rm -r $(find "${ED}"/usr/lib/go -iname testdata -type d -print) || die + rm "${ED}"/usr/lib/go/{CONTRIBUTING.md,PATENTS,README.md} || die + rm "${ED}"/usr/lib/go/{SECURITY.md,codereview.cfg,LICENSE} || die + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done +} diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild index f371daa2831b..923732906b23 100644 --- a/dev-lang/go/go-9999.ebuild +++ b/dev-lang/go/go-9999.ebuild @@ -31,9 +31,6 @@ LICENSE="BSD" SLOT="0/${PV}" IUSE="cpu_flags_x86_sse2" -RDEPEND=" -arm? ( sys-devel/binutils[gold(-)] ) -arm64? ( sys-devel/binutils[gold(-)] )" BDEPEND="|| ( >=dev-lang/go-${GO_BOOTSTRAP_MIN} >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" @@ -71,6 +68,7 @@ go_cross_compile() { } PATCHES=( + "${FILESDIR}"/go-1.24-dont-force-gold-arm.patch "${FILESDIR}"/go-never-download-newer-toolchains.patch ) diff --git a/dev-lang/pypy/Manifest b/dev-lang/pypy/Manifest index 58324939511b..3dc0cfb70d58 100644 --- a/dev-lang/pypy/Manifest +++ b/dev-lang/pypy/Manifest @@ -1,10 +1,14 @@ DIST pypy2.7-gentoo-patches-7.3.19.tar.xz 5328 BLAKE2B c997c0e7f39a4a6a9ec34811b38fc8f9b90ccae8c958ca420074013d63a4f1b453b6331be79a2df299efe177cc99d91038ae56156d37b5f9b9f8715ccd2cb75d SHA512 7bac5331fa868c60b376e405df212a29d406f117035fbc1ad8bd6d81212ab2ea4ce5b6b40e8dbbb6303fe941152e37aae17608a2eca9efd16767c8844f6f5fdb DIST pypy2.7-v7.3.19-src.tar.bz2 21011665 BLAKE2B b8e205927c829753dd3e5aba0868923efff73f62e5338d6200aab2470857fff9cf38763ab8b63a74a39299d4956d4794eedf5d474d083875bbb9cee9ea757e64 SHA512 8ab8d9c0fa94ec96ebfae30b7f97eb8dff6ad4ee17fa688df123927c45f3ffea2c7f5dbb98bd2f8a49f7db6baf0ba3e98fd230df0bdc8602e407fb2bc33144e3 DIST pypy3.10-gentoo-patches-7.3.19_p1.tar.xz 6344 BLAKE2B 40ebbf87d0864e2a3957671680b7b9c0bea151fcdef808aef70711c24fdbd94846c15b010a3bd906915ab7a551d46f18264b2bda2c732d68b2594796d29226c8 SHA512 cd9d0ad4b48c21497f227f3b6540b01265df23de8cedaf212fe51dcae830a2812df6df169fdba3db36ccac29fb2d77aa2202f8e9b4bca543bd569db0d53c5736 +DIST pypy3.10-gentoo-patches-7.3.19_p2.tar.xz 11012 BLAKE2B a7d8e9cc9698760ea39f92bb073356c6ee5f777d20293e6bc483d9f090f67fd5a95a59e21f5c6bdf6ea19716da7577bb317811bbbad8f6308b0cebd6f9c1cf7a SHA512 545757e498cd0c21a35059ceed6f13d19cdde23ee1956dab91af1886a6df66f7824bd0564f1f69e3cec02af5be5cd37a47dd606ebc5d14e65ea0c43270a8b487 DIST pypy3.10-v7.3.19-src.tar.bz2 24547353 BLAKE2B 975de34c7e01117c74e184693b6659ba0e3d8d488d724c03737dbd64533452c954e045e45058e1e77b9bee68e01060e74e30d7898d29f1adce417ce4b46579b8 SHA512 8fa24d3556bcf9cd0e2facd697827a5001fcfae9bf7874957843e4751b259f85a8b36166921282d71f39bb468d1706bb669373aebbc52486b683fcc824fb30ad DIST pypy3.11-gentoo-patches-7.3.19_p4.tar.xz 7008 BLAKE2B b441decac64d3565cf1d8d5b5e7f3b29f39a462c51f0bee3f480bc31847a1dd02d468241f78c01ec355fa33823bba508cc3eb5c5b97340cc208067d22eb535be SHA512 f52e3dbde99cfe55d286554deb1826cdf4ce63073f6e4c29d43bd33d9c78a4fcedbd32029ddfd1a854d0bf77524e82dee6cc4367e81f5b23e355af3e302d115a +DIST pypy3.11-gentoo-patches-7.3.19_p5.tar.xz 11936 BLAKE2B e38ffcc6fa9d9a544d6128d9d0412e0ddb63d1bec6344a139433bdd3c206321d799ea779c465924564d4091a7bbdfef942e0ffd449c1422bc3a5e92b55a07461 SHA512 124c4249e2fe9c745f612f81f75ca99f8164d3b2d9ebf3a6010c80c3e7a9cfa9cbb8e912cadf2dd6b7da2c29cfa636d6801f75eee4e033b6b9cd0c575a1679c3 DIST pypy3.11-v7.3.19-src.tar.bz2 24916380 BLAKE2B febc61b3a1c5055b5ab92e7f3af2c307605c8510131437b12df27b58a13b29f6fd0a4bf82d101f7f8f441ca93b20cf70dbd540af11578be297ea871d59304ea3 SHA512 ab078e81e5eefe16823350bdc9adcc444e0ef6835ff2234197f9e5cb0903c5208deb6df60722e99aa529ffff703c5dcbc08eaa7f753c2e5c1185afea6358395a EBUILD pypy-2.7.7.3.19.ebuild 7390 BLAKE2B 0a2de7fe0cf184c8509edad7866a0642e154582b968987324c6a7deab7b8cc91a61283384b03554b55bbf5142fdfd4c2c32d734c67836f4079e8d23685845fe7 SHA512 a8e9978a6b27e54cf912083c10a6d3652d6e9b012e047434ae24a89a2cf0308df24e7f8b92e4008c1891c274d206201d68f915469a3f8b1ea786e054485e1d73 EBUILD pypy-3.10.7.3.19_p1.ebuild 7154 BLAKE2B 7f9552092b1e5fde0ea58acee8ed657e644742784a7a4c359cc226c91344b40dca146a6ea54af3d0f4393ae4946456c390c3bc1894308873ff1d8c05c1cb648e SHA512 e2667579d7e7c032d08e1f1379b3462c398f681794ef121d9b8270125f51771d67d272dfcdee51691e6f1e75f32fd5773797b22b42063661ef33fc52c2a29056 +EBUILD pypy-3.10.7.3.19_p2.ebuild 7154 BLAKE2B 7f9552092b1e5fde0ea58acee8ed657e644742784a7a4c359cc226c91344b40dca146a6ea54af3d0f4393ae4946456c390c3bc1894308873ff1d8c05c1cb648e SHA512 e2667579d7e7c032d08e1f1379b3462c398f681794ef121d9b8270125f51771d67d272dfcdee51691e6f1e75f32fd5773797b22b42063661ef33fc52c2a29056 EBUILD pypy-3.11.7.3.19_p4-r1.ebuild 7106 BLAKE2B 4ac410c5186155023267a0f759c2e83659ad55d6ac9e4a78ba11e5cb2398ac8cdbd6b3fdda1f2dfd229426a5eabff18fabad057fae334e79fa0e39530a2fe2f4 SHA512 51c4180dc673dbc437afcf5a3e7eb0f7289780e2cb8bc9a9365a6efda30f68285e277e9dbe939400c7ab91839244763f63b940f887c9b383b8cecd3aac9ea761 +EBUILD pypy-3.11.7.3.19_p5.ebuild 7106 BLAKE2B 4ac410c5186155023267a0f759c2e83659ad55d6ac9e4a78ba11e5cb2398ac8cdbd6b3fdda1f2dfd229426a5eabff18fabad057fae334e79fa0e39530a2fe2f4 SHA512 51c4180dc673dbc437afcf5a3e7eb0f7289780e2cb8bc9a9365a6efda30f68285e277e9dbe939400c7ab91839244763f63b940f887c9b383b8cecd3aac9ea761 MISC metadata.xml 1124 BLAKE2B f1d09d26175cf20d1440a9a83352cf6f2f2e514d35d95116caf4a5ee86547f0165a6369e7a6b129ded75d28ba5a0c1c8f4da7d664d7c1e3c1e95153593057b3c SHA512 ae95400c9a1efc75372201c2353b128302355d1d087094953d73c325fa72bc24662d31c7287ae6a2583448ac345bb60744ac19391e07f8da8ef0327627e0e462 diff --git a/dev-lang/pypy/pypy-3.10.7.3.19_p2.ebuild b/dev-lang/pypy/pypy-3.10.7.3.19_p2.ebuild new file mode 100644 index 000000000000..71b0224f5834 --- /dev/null +++ b/dev-lang/pypy/pypy-3.10.7.3.19_p2.ebuild @@ -0,0 +1,239 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs + +PYVER=$(ver_cut 1-2) +PATCHSET_PV=$(ver_cut 3-) +PYPY_PV=${PATCHSET_PV%_p*} + +MY_P="pypy${PYVER}-v${PYPY_PV/_}" +PATCHSET="pypy${PYVER}-gentoo-patches-${PATCHSET_PV/_rc/rc}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language" +HOMEPAGE=" + https://pypy.org/ + https://github.com/pypy/pypy/ +" +SRC_URI=" + https://downloads.python.org/pypy/${MY_P}-src.tar.bz2 + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' +# also check pypy/interpreter/pycode.py -> pypy_incremental_magic +SLOT="${PYVER}/pypy310-pp73-384" +KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="+ensurepip gdbm +jit ncurses sqlite +symlink +test-install tk" +# many tests are failing upstream +# see https://buildbot.pypy.org/summary?branch=py${PYVER} +RESTRICT="test" + +RDEPEND=" + || ( + >=dev-python/pypy3_10-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?] + >=dev-python/pypy3_10-exe-bin-${PYPY_PV}:${PYPY_PV} + ) + dev-lang/python-exec[python_targets_pypy3(-)] + dev-libs/openssl:0= + dev-python/gentoo-common + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !dev-python/pypy3_10 + symlink? ( + ! lib-python/3/epython.py || die + + einfo "Generating caches and CFFI modules ..." + + # Generate Grammar and PatternGrammar pickles. + "./pypy${PYVER}-c" - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" + import lib2to3.pygram + import lib2to3.patcomp + lib2to3.patcomp.PatternCompiler() + EOF + + # Generate cffi modules + # Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py! + # (NB: we build CFFI modules first to avoid error log when importing + # build_cffi_imports). + cffi_targets=( + pypy_util blake2/_blake2 sha3/_sha3 ssl + audioop syslog pwdgrp resource lzma posixshmem + ctypes_test testmultiphase + ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + "../pypy${PYVER}-c" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + # testcapi does not have a "build" script + "../pypy${PYVER}-c" -c "import _testcapi" || die + + # Verify that CFFI module list is up-to-date + local expected_cksum=a4138e48 + local local_cksum=$( + "../pypy${PYVER}-c" - <<-EOF + import binascii + import json + from pypy_tools.build_cffi_imports import cffi_build_scripts as x + print("%08x" % (binascii.crc32(json.dumps(x).encode()),)) + EOF + ) + if [[ ${local_cksum} != ${expected_cksum} ]]; then + die "Please verify cffi_targets and update checksum to ${local_cksum}" + fi + + # Cleanup temporary objects + find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die + find -type d -empty -delete || die + cd .. || die + + # Generate sysconfig data + local host_gnu_type=$(sh pypy/tool/release/config.guess) + local overrides=( + HOST_GNU_TYPE "${host_gnu_type:-unknown}" + INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}" + LIBDIR "${EPREFIX}/usr/$(get_libdir)" + TZPATH "${EPREFIX}/usr/share/zoneinfo" + WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip" + ) + "./pypy${PYVER}-c" -m sysconfig --generate-posix-vars "${overrides[@]}" || die + local outdir + outdir=$( pypy_incremental_magic +SLOT="${PYVER}/pypy311-pp73-416" +KEYWORDS="amd64 ~arm64 ~ppc64 x86" +IUSE="+ensurepip gdbm +jit ncurses sqlite symlink +test-install tk" +# many tests are failing upstream +# see https://buildbot.pypy.org/summary?branch=py${PYVER} +RESTRICT="test" + +RDEPEND=" + || ( + dev-lang/pypy3-exe:${PV%_p*}[bzip2(+),ncurses?] + dev-lang/pypy3-exe-bin:${PV%_p*} + ) + dev-lang/python-exec[python_targets_pypy3(-)] + dev-libs/openssl:0= + dev-python/gentoo-common + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + symlink? ( + !dev-lang/pypy:3.10[symlink] + ! lib-python/3/epython.py || die + + einfo "Generating caches and CFFI modules ..." + + # Generate Grammar and PatternGrammar pickles. + "./pypy${PYVER}-c" - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" + import lib2to3.pygram + import lib2to3.patcomp + lib2to3.patcomp.PatternCompiler() + EOF + + # Generate cffi modules + # Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py! + # (NB: we build CFFI modules first to avoid error log when importing + # build_cffi_imports). + cffi_targets=( + pypy_util blake2/_blake2 sha3/_sha3 ssl + audioop syslog pwdgrp resource lzma posixshmem + ctypes_test testmultiphase + ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + "../pypy${PYVER}-c" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + # testcapi does not have a "build" script + "../pypy${PYVER}-c" -c "import _testcapi" || die + + # Verify that CFFI module list is up-to-date + local expected_cksum=a4138e48 + local local_cksum=$( + "../pypy${PYVER}-c" - <<-EOF + import binascii + import json + from pypy_tools.build_cffi_imports import cffi_build_scripts as x + print("%08x" % (binascii.crc32(json.dumps(x).encode()),)) + EOF + ) + if [[ ${local_cksum} != ${expected_cksum} ]]; then + die "Please verify cffi_targets and update checksum to ${local_cksum}" + fi + + # Cleanup temporary objects + find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die + find -type d -empty -delete || die + cd .. || die + + # Generate sysconfig data + local host_gnu_type=$(sh pypy/tool/release/config.guess) + local overrides=( + HOST_GNU_TYPE "${host_gnu_type:-unknown}" + INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}" + LIBDIR "${EPREFIX}/usr/$(get_libdir)" + TZPATH "${EPREFIX}/usr/share/zoneinfo" + WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip" + ) + "./pypy${PYVER}-c" -m sysconfig --generate-posix-vars "${overrides[@]}" || die + local outdir + outdir=$( /dev/null || die + # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Avoid as many dependencies as possible for the cross build. + cat >> Makefile <<-EOF || die + MODULE_NIS=disabled + MODULE__DBM=disabled + MODULE__GDBM=disabled + MODULE__DBM=disabled + MODULE__SQLITE3=disabled + MODULE__HASHLIB=disabled + MODULE__SSL=disabled + MODULE__CURSES=disabled + MODULE__CURSES_PANEL=disabled + MODULE_READLINE=disabled + MODULE__TKINTER=disabled + MODULE_PYEXPAT=disabled + MODULE_ZLIB=disabled + EOF + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the Python it was pointed to + # immediately. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake + popd &> /dev/null || die + fi + + # 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= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + hprefixify setup.py + 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 + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + # 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=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || 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 + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + 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 +} diff --git a/dev-lang/python/python-3.9.22.ebuild b/dev-lang/python/python-3.9.22.ebuild new file mode 100644 index 000000000000..393ad5d74b86 --- /dev/null +++ b/dev-lang/python/python-3.9.22.ebuild @@ -0,0 +1,584 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic multiprocessing pax-utils +inherit prefix 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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE=" + bluetooth build debug +ensurepip examples gdbm +ncurses pgo + +readline +sqlite +ssl test tk valgrind +" +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-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + virtual/libcrypt:= + virtual/libintl + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + 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 + ) +" +# bluetooth requires headers from bluez +DEPEND=" + ${RDEPEND} + bluetooth? ( net-wireless/bluez ) + test? ( app-arch/xz-utils ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=/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} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +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" + export PYTHON_DISABLE_MODULES="${disable}" + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + append-flags -fwrapv + filter-flags -malign-double + + # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. + # PKG_CONFIG needed for cross. + tc-export CXX PKG_CONFIG + + local dbmliborder= + if use gdbm; then + dbmliborder+="${dbmliborder:+:}gdbm" + fi + + # Set baseline test skip flags. + COMMON_TEST_SKIPS=( + -x test_gdb + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_descr + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_descr + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # 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_concurrent_futures + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + profile_task_flags+=( + -x test_os + ) + ;; + hppa*) + profile_task_flags+=( + -x test_descr + # bug 931908 + -x test_exceptions + -x test_os + ) + ;; + powerpc64-*) # big endian + profile_task_flags+=( + # bug 931908 + -x test_exceptions + ) + ;; + riscv*) + profile_task_flags+=( + -x test_statistics + ) + ;; + esac + + 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 + --without-lto + --with-system-expat + --with-system-ffi + --with-system-libmpdec + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + + $(use_with debug assertions) + $(use_enable pgo optimizations) + $(use_with valgrind) + ) + + # disable implicit optimization/debugging flags + local -x OPT= + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + if tc-is-cross-compiler ; then + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 and bug #864911. + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross. + --without-lto + --disable-optimizations + ) + + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}" + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \ + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Avoid as many dependencies as possible for the cross build. + cat >> Makefile <<-EOF || die + MODULE_NIS=disabled + MODULE__DBM=disabled + MODULE__GDBM=disabled + MODULE__DBM=disabled + MODULE__SQLITE3=disabled + MODULE__HASHLIB=disabled + MODULE__SSL=disabled + MODULE__CURSES=disabled + MODULE__CURSES_PANEL=disabled + MODULE_READLINE=disabled + MODULE__TKINTER=disabled + MODULE_PYEXPAT=disabled + MODULE_ZLIB=disabled + EOF + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the Python it was pointed to + # immediately. + PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake + popd &> /dev/null || die + fi + + # 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= + + # Fix implicit declarations on cross and prefix builds. Bug #674070. + if use ncurses; then + append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw + fi + + hprefixify setup.py + 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} + + # Gentoo hack to disable accessing system site-packages + export GENTOO_CPYTHON_BUILD=1 + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + 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=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || 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 + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + 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