diff options
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 22131 -> 22137 bytes | |||
-rw-r--r-- | dev-lang/ada-bootstrap/Manifest | 11 | ||||
-rw-r--r-- | dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild | 109 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 5 | ||||
-rw-r--r-- | dev-lang/python/python-3.14.0_alpha3-r100.ebuild | 667 | ||||
-rw-r--r-- | dev-lang/python/python-3.14.0_alpha3.ebuild | 659 |
6 files changed, 1451 insertions, 0 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 66def7d42f44..769d5ef144af 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/ada-bootstrap/Manifest b/dev-lang/ada-bootstrap/Manifest index d79c72cccb8b..29505d70a235 100644 --- a/dev-lang/ada-bootstrap/Manifest +++ b/dev-lang/ada-bootstrap/Manifest @@ -1,8 +1,19 @@ AUX ada-bootstrap-0_p2021-gentoo.patch 2615 BLAKE2B 16607a3a88edc6918f077171b424b86a0d696bd0897405a466b62937f74371d23efcf3477b3f106d6e19a8e15d8366c98fbbd92c588ffdc24e4bee3975d6bc42 SHA512 27b6a4907dfd80f6af950141b27e8acc5b2868a9414e9215c001a107479a0ddc54e35a6221a7d349070023e41a448029414d9f6d092fcd7a59b7d6aaee80e3bf +DIST ada-bootstrap-14-aarch64-unknown-linux-gnu.gpkg.tar 44759040 BLAKE2B 4c3440bf35f14dc93e7d9265f90bca0cf534bbc2cd913f2d7356d674d9f4bc6a691b812c3c5f7d54d4fc63ad7f67ff06dd09afb5c3d008666e747dace5d3940a SHA512 8253ac27650398192081ebc8f352679b2e6fdad0cc8d52df176a1944a6da373e0adce6acc0bdbdbb3c6c37f1d666d2839fae06b86814e6e1ab7c6f6efea128ba +DIST ada-bootstrap-14-armv6j-softfp-linux-gnueabi.gpkg.tar 38379520 BLAKE2B 6ad7988780d1961a5b8c743ad2bc83c8da7173b53ecae3a3d82e02e4d425cdd49555bc6bb76f17f08cb4378b13e2a98bcfbcc8ff54e6a63397893ec9a0c3b6b4 SHA512 b253218ddfaeff7216b8770f251a4ffd3fbcf6b3d487e505bab7ebc3730bb9f616ee4f46d5c77a2c6a76c2bca0257dfff6428bb75c86bb977ea1f4a49e3cb103 +DIST ada-bootstrap-14-armv6j-unknown-linux-gnueabihf.gpkg.tar 38328320 BLAKE2B 524eb8532f9daceb72ca488cdc420e2bbe48ffdcf41dfa08cff11dfa1388aa1ad165293a542a1642d3b49f1d0dec5d5a1183f02aa8dff053064d239902e77a25 SHA512 3094662de587709ec651a53b1dca6e7a9c0e648237f4c8f79e57e55cd1d9404af5027619b03f8edc71139417931215cfb6d8ff0c9a048b2c8057eec24070ad59 +DIST ada-bootstrap-14-armv7a-softfp-linux-gnueabi.gpkg.tar 38246400 BLAKE2B 3a01cc22cdc6b6bf313e9d6b3793e4cea157213e20360403813fd92d20d47438bade8fc1f9d7034e582086784bba0258d283920910f850c5764e670b1e0343e5 SHA512 4455d0ce18ff5b7563f74dee2cc75938ec2f02c417a3a9d256a8877d6b52bf486bbd5de5a9dc4fa5bbb85716a0e3f0c8f1901defe6594e446ac19d39519605de +DIST ada-bootstrap-14-armv7a-unknown-linux-gnueabihf.gpkg.tar 38174720 BLAKE2B 1eac250bee1cf48b3371dea8d724e788f4b3a7cd1885043884a368ab44cbbdcd851ee624b272fd53a276174e0ff693f94ac45b513da0b25c55811346c4bab8f6 SHA512 224d89ec809663702fffb4651c7c5d3accd7603f78d2ef9f6b52299fb5119e0e1d6a57a2837f69d93829fe750804bb4e9e19435f3b7a86e046a4f96dd7339c40 +DIST ada-bootstrap-14-powerpc-unknown-linux-gnu.gpkg.tar 33228800 BLAKE2B b530ff260c23449788544d4b4118c402d4ac91eeab1f3e4d426c0e18eb8632d9af01703294b5e092997f81a371e626f9c5694d389849227df7e1981b5e2244c5 SHA512 71305c7b3cd132eaf31b321f8d323c25de73bccfbb487bc0c2ed4796082551ed37fa575a2ad97dfac3c579aeb1c89e934ec950131d13f76246896c8dfa77c52a +DIST ada-bootstrap-14-powerpc64-unknown-linux-gnu.gpkg.tar 35809280 BLAKE2B 4438f33b518660a9341f2f04e939b937e41afdb740a1fcc46920a3a0d653cdffe20fee916369cfc8e2e5a0708466ccb666954739f6ccabcff2b5170ad9b20ecd SHA512 13c5df10a86a02c1a17887072a851b3ff84baebb8f5ad6b4d41f37d3d364be0b836146d4464f7907128500469d861628b433b8bff316672a7324d65f146b9bfd +DIST ada-bootstrap-14-powerpc64le-unknown-linux-gnu.gpkg.tar 37027840 BLAKE2B f2e78244a1db120a526c35cfb7a786b917de569750dad2032e35ad4926e8bf9c233c9b3b4ba53f2e7f56059e74d1d26842617c72e3732939331c6b6d913cd4ff SHA512 bcc9f21f88927a29fbeb40e3c5f87c1a064913a2fe961a959e6e3293d7f39fcbb46055def6d5dfaa9521c83ee65c5e636b8098ec7faf8a991b996fc54e7d1cba +DIST ada-bootstrap-14-sparc64-unknown-linux-gnu.gpkg.tar 29941760 BLAKE2B 720e816c0f3672d277ba40140a2ec39a86caca1e8bfd344476b703941159386656d9955d3878839c1cad80eb8528ee0eaa3dda2bc3bf8f73b39fce9d9cb90c05 SHA512 a13b2444e15cfadb2a10bb96d7357e65001bb72d18f33eb32ac56c703cafd81b6e0da9f1a9ae96d0124a0135e161c7a6e5bfd7c50c9b4e8f32ab3675670c5b99 +DIST ada-bootstrap-14-x86_64-pc-linux-gnu.gpkg.tar 46643200 BLAKE2B 1a000423c4220b65df75a58a8912ea7da4b86d1b876a1d59ac5dab38a3e88a670486d27b5c646960d8cf0ae8042891d8deead3135c503175d6a349f8313b5046 SHA512 8352e4c8c945352fdb1f6f110d907354d3e475f444170e37b6ce42bfdccfb6b873964cd4772fcb7f55cb70ac3dcb17e45a89a82612728386437d4d6b4120da5c DIST gcc-10-2021-20210519-19A74-src.tar.gz 109157702 BLAKE2B 8ec307e4fde35c8726bc7b9702717329695bad928d5222a7bb691cce47500de31a60bcfcbb925129a57cb81d3d7ea92e60599aa7383d5358e63cc087b0482550 SHA512 2e2cc0ec9a3a82816a5d399d2db261c356e106b82a44efd54a1ac882b96549ab8de79c69858127c4397de6e9e9463ce6fb9994fc2e426e7d3d2f98d5efa2edb6 DIST gcc-interface-10-2021-20210519-19A75-src.tar.gz 359085 BLAKE2B 75f941a7635f2880cc0192acb49d8e7f567baca7530fb981be14dc6cb1bf46fda0e3c043c8703cdbeeb242b548894e0bc6787adfff0f27198354d150e6e36386 SHA512 0251a93d20c59cc4705963438880fe265e2e0bb94a35b7ddaaf03e9efae60e044e585a2204d0773a46f17b3b774e4d0c73adf852f5d06ba17373d26ed580ca8d DIST gnat-2021-20210519-19A70-src.tar.gz 8765762 BLAKE2B ef48f54c6109566e37bfa5dee9262305d0529b3dfd333ee28bc4e66f4709a0673f673d742bc04deb15dc145404f7618d350dbdf3f2a7ab37c861e57d011946fa SHA512 3cb79be024fdd9b738d99ffc8e224d32bb382b5da2d02b97b2061a5ea58456f33d4564c92e224af2713ce15fd5481edd715e5b9a52abc74fdc142f27e103c201 DIST gnat-gpl-2014-x86-linux-bin.tar.gz 233049287 BLAKE2B 2e8bab113f6a319533ec12fdf71c481f72aee227c22bd0cc42a53bd727b323caba1e7b6298053db8b4d3016236b31649b0b255f4ebcbb81a08a69f29f78f13fc SHA512 ac7f53fb4bd71b0e8fbd62abc45de76f7f8f2f405b80e9b60b4b65a6cef6ee98e3b06848e4b752af3c8268237e5a0529cf6145ebc5b33cd6e5cf4928d85f5be2 DIST gnat-gpl-2014-x86_64-linux-bin.tar.gz 236253400 BLAKE2B c1db70db9442ba24688b8e323d5a02e2e9707ba1f02835ea551038d0a09aafede93a224091e5186f2f2a9d0f96144027af2184ee05ca1c19cc997a6cf3902df7 SHA512 5e40a251baac3d0ace78352956ca21a7d294d902d344a9ed7a8d376e900468c283721ebfb773adfedbf4d623ace02536505c0147815a0c1908933ad611ea085e EBUILD ada-bootstrap-0_p2021-r1.ebuild 5684 BLAKE2B 2dcb08f07fcd6ba301a563ea92c650bef5baa62e6f7b5ec5d6a663b15bc80ddccbd4157a7fda214323886d8d93fdaf7e41ee6a4ee2ed4bfae7d0fb70f1a6beb5 SHA512 580626658f5ee3d8f82df25769c59357aa89e76828cd1ae0f26b249943864ab729862e61c87052da6c498881b70a527a1f3c0588cd0685102077a6a4932debaf +EBUILD ada-bootstrap-14.ebuild 3776 BLAKE2B 7a6176c5f54ee00c5aa78d709b305e188d2d10bd879897d936f5402224923c0f8da225990a930f8fbcb58ca504f7de8f7a08ad65b39f45cf74d369f02da1f9dc SHA512 4ca1efd80aa2515ed3304ef5f18662ca79438450d5b0e8bee961f24ea6505158e795dc59403c716e26f219a2c4460695ad7749e0a88a11a1ba49e00b9fe8043d MISC metadata.xml 216 BLAKE2B 921055d990617104de7e3437bc9fd4598cb830193bfcdc34254102a1df2c6025916af7025843f161dff8de731f9726641906b86f831375c5d29303ba64991da2 SHA512 8c43f5f2be76799c8ace4df222de22380c389e058bc7e36bd9b19564cbd4b90ab7515b90f822139a18b3a2cba70e76d3b4eb5426f88a0508798175893073d732 diff --git a/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild new file mode 100644 index 000000000000..25de28c7dafa --- /dev/null +++ b/dev-lang/ada-bootstrap/ada-bootstrap-14.ebuild @@ -0,0 +1,109 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +BINPKG=gcc-14.2.1_p20241116-1 + +# The binaries in SRC_URI are generated by the following (roughly): +# * taking an amd64 stage3 +# * adding USE=ada to make.conf +# * running `crossdev ${CHOST} --ex-gcc -S` +# * running `USE=ada ${CHOST}-emerge -v1 gcc` +# * copy /usr/${CHOST}/var/cache/binpkgs/sys-devel/gcc* into +# ada-bootstrap-${PV}-${CHOST}.gpkg.tar +# +# The full script is at https://github.com/thesamesam/sam-gentoo-scripts/blob/91558fb51c56a661d6f374507888ff67725ca660/build-ada-bootstraps. +# +# Binaries in SRC_URI are regular Gentoo binpkgs in the GPKG format. +# +# Note: of course, the used GCC on both CBUILD and CHOST +# must be the same version, correspond to ${PV} in ada-bootstrap, +# and be at most the newest stable GCC (ideally older). +inherit unpacker + +DESCRIPTION="Binary bootstrap compiler for GNAT (Ada compiler)" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Ada" +SRC_URI=" + amd64? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-x86_64-pc-linux-gnu.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-aarch64-unknown-linux-gnu.gpkg.tar + ) + arm? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv6j-softfp-linux-gnueabi.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv6j-unknown-linux-gnueabihf.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv7a-softfp-linux-gnueabi.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-armv7a-unknown-linux-gnueabihf.gpkg.tar + ) + ppc? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc-unknown-linux-gnu.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc64le-unknown-linux-gnu.gpkg.tar + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-powerpc64-unknown-linux-gnu.gpkg.tar + ) + sparc? ( + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-sparc64-unknown-linux-gnu.gpkg.tar + ) +" +S=${WORKDIR} + +LICENSE="GPL-2 GPL-3" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc" + +RDEPEND=" + >=dev-libs/gmp-4.3.2:= + >=dev-libs/mpfr-2.4.2:= + >=dev-libs/mpc-0.8.1:= + sys-libs/zlib + virtual/libiconv +" + +src_unpack() { + # We want to unpack only the appropriate tarball for CHOST (e.g. on arm). + TARBALL_TO_UNPACK= + + local archive + for archive in ${A} ; do + local tarball_chost=${archive/${P}-} + tarball_chost=${tarball_chost%%.gpkg.tar} + + if [[ ${tarball_chost} == ${CHOST} ]] ; then + TARBALL_TO_UNPACK=${archive} + break + fi + done + + if [[ -z ${TARBALL_TO_UNPACK} ]] ; then + die "No tarball found for CHOST=${CHOST}. Please file a bug at bugs.gentoo.org." + fi + + unpack_gpkg "${TARBALL_TO_UNPACK}" +} + +src_install() { + local chost=${TARBALL_TO_UNPACK/${P}-} + chost=${chost%%.gpkg.tar} + + dodir /usr/lib/ada-bootstrap + mv "${WORKDIR}"/${BINPKG}/image/usr/ "${ED}"/usr/lib/ada-bootstrap || die + + # Make `gcc-config`-style symlinks + insinto /usr/lib/ada-bootstrap/bin + local tool + for tool in gcc gnat{,bind,chop,clean,kr,link,ls,make,name,prep} ; do + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${tool} + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${chost}-${tool} + dosym -r /usr/lib/ada-bootstrap/usr/${chost}/gcc-bin/${PV}/${tool} /usr/lib/ada-bootstrap/bin/${chost}-${tool}-${PV} + done + + rm -rf "${ED}"/usr/lib/ada-bootstrap/usr/bin || die + # This gives us the same layout as older dev-lang/ada-bootstrap + dosym -r /usr/lib/ada-bootstrap/bin /usr/lib/ada-bootstrap/usr/bin + dosym -r /usr/lib/ada-bootstrap/usr/libexec /usr/lib/ada-bootstrap/libexec +} + +# TODO: pkg_postinst warning/log? diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 3a97fee9c418..3ae0aa85dba0 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -24,6 +24,8 @@ DIST Python-3.14.0a1.tar.xz 22613224 BLAKE2B 1427d8a8e500bceb667852dd227bf00d1dc DIST Python-3.14.0a1.tar.xz.sigstore 4799 BLAKE2B 79c271a133e49f46aa478f9645a9c6998081538a05bd20395155c9b490cf13e11c47bb72a60f82b8297fb870af1c67922af648c9ba8fab6e3b31f7040991c39f SHA512 5115325d0a2f43bd0cc3d0888cad78deb90dfb36976c3341f0c237b15334883d1df3fee1dce53af7fe70ff9d630a98c9df4c2524f36183f61a74dd69f69e6257 DIST Python-3.14.0a2.tar.xz 22696948 BLAKE2B e639838b44c0bc58522cc5344004ea6b1c6fc020eed48165a59693e34b0d5328fb861fb97b05008f04131335c138ee2dd569036b628b933deaf08e005e8e5259 SHA512 face78a7ef5d1a14b7e8c478125c660fe9745e793a5443932684c8426f0023324236c67ad73198e4286ba8793628452ae4d4d6332f007c009b285ba83ca1fc48 DIST Python-3.14.0a2.tar.xz.sigstore 5035 BLAKE2B b97954a40f640170e049a62082be0cf77dc38ceb6bb2f0c8a122592b5bab4b71b17ad42496538d90703e81127d26e41f2f2522cef745837751fb62fa3590fd56 SHA512 1f5eba0cb8dffb73b351c91072dc91cfdb55f9c833c431b484f8f443a4913d94813e04f81f1dded4df989673dbd91abda8e8ebd6f4f00464725a634477452770 +DIST Python-3.14.0a3.tar.xz 22749680 BLAKE2B 4a0457a98fe1a35c01a4607c11eefeb7ef4f4a3bc7bd8b04e129137c1f7f7ee8806fe5561e88dbf8866f461f2d7d3577618b7918fb85a0e99f7c225fd4593778 SHA512 e26c9736f00af680b5f1ff1ba0f06562c48550836088d79dd8b4c97016d52f9f76979de32fa8556e9d750a5dad488643e897807ab6cb0c1424882151fe5f3337 +DIST Python-3.14.0a3.tar.xz.sigstore 4891 BLAKE2B c251bfc3e332174c5050c2d8524aea4865e28e73c39288ac151bea10e0039c3af545a26acc48b9ae8deed9befddb11e810103620be6a7934ea79e7b1f3182eb2 SHA512 dd7d6c543ba2ba8dc8d2a6c891adcf85de7eb857ceb3ffb33f5f06fbcf0a6bcd6517502cfd35acb86ec13d85d487313eb9a396d78c42d1c506d2261e1c4b861d DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61 DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed DIST Python-3.9.20.tar.xz 19648968 BLAKE2B 80a337ff406130599b8320068d11bc275d23473cedd7c85fcb9e40134f0f2d533be6e712139e788a6423cdc74cea938f306aa37c2a5099e3051f3e390159279c SHA512 c828f33edf1704e3149499d6d34e89264cb5cdb2b09ff05561641b359716d7996f0fe928629e09f006b1fd7850fdaf937275919c7fdd83f5efc32707c64d814b @@ -44,6 +46,7 @@ DIST python-gentoo-patches-3.13.0.tar.xz 8316 BLAKE2B 8fb8ba8f41f310140ad7066b61 DIST python-gentoo-patches-3.13.1.tar.xz 8320 BLAKE2B 2fef9c501df7ed7603eabb3e01a8c3bde5bcfae3a8ac9bbe772b458cb04ffa9598cf38f3a74f6dcbcda29e7bd294d664b8fb12f7ddd9e0e42ed6268300947bb0 SHA512 419e1f12daaf19ed2d2195699b5e8c2c604779562d84d6a68adb4016dcb13fc3e0383ccc4b01eb153930600e6c9cdcc518929ffce3d6343019226a6111e9d617 DIST python-gentoo-patches-3.14.0a1-r2.tar.xz 6008 BLAKE2B bb833fb522e008eb79355fd13952c4fc3efc4684e9a2f26680d57b2bb137d25b461ce34ac7cbf0a7c64a558fa2cd63ad393f23cb90f620395efefd1c01bf01f5 SHA512 60568f83765f8045c789391b1f44ab6ac633a00ca84a6c93afb6067294093dd87a262feb6ea1d0879ed90bcdfa7d02054da5974cb9218686fbe629bdf11d0792 DIST python-gentoo-patches-3.14.0a2.tar.xz 6032 BLAKE2B 60f5b702feca8c967b0baff906d31b8d2e9788fed0a717292d73d7c2497972d785257ba58248815af10608ef4f5491f11e42715e84885c1548e7744cba4d2bee SHA512 306fd779e139994a3bd64d4ac638f5473b8998739363b5fc2ea2e89caef5b02192226a53c8ea9a03438657733db81c87d31ee4ecb3b3c2f86a9643a3f64b498c +DIST python-gentoo-patches-3.14.0a3.tar.xz 6036 BLAKE2B bbcb3f31acb533b8291f4cedcb89c0501a7054bbf1f98ea000c43e5a99e3b8bd160c6fb81e28bad90c85dd0256d523f72b9e25f30c30b5b5e9d60a9055a612d1 SHA512 9f87b3f1f326f88c924c49e37f39f63314199cfc354d452fef860ab36e143145a2c1d832c1b7d4357ade1c1090de00086bc5d6a9d7981bad210a99ffcfa2a858 DIST python-gentoo-patches-3.8.20_p2.tar.xz 42296 BLAKE2B c0f2c4d0adcb6c10eb68342b911016666cb68308717a5ca1369100a39229ce16c6e9dfdf9e1b4cffe0191d03ca5ee7d9568cd24885fd0f4f32f14e2e8c0a96a3 SHA512 cb9e98c0dd823b6e4f8a60e9095ab58e596cd9411b675678a0d4adefc92b37e14cecc7cecb82e287ac34a9ce1d4595f261b0736bcc9fc62c43c7d8c0b3be70e7 DIST python-gentoo-patches-3.8.20_p4.tar.xz 43816 BLAKE2B 9bbc86a49816b79e52cfa90e0a136faead48ad0c8017858fb380da752d6e801e18fe08a0c4c492560c79c1e70778daed2fa5bba8dd92f2b23bd45acd518e5c84 SHA512 59bcfc8c98fe9c5740d031697a04dcee6994e7dfbc9d1920bc4782b539525bcd8b006e971fc1e473ffc2dc0aba12564dc6240048dd64ab244c5c8d11ce42f946 DIST python-gentoo-patches-3.8.20_p6.tar.xz 50876 BLAKE2B df0df21c75972fb73e36f66f0c90d3f953b14d7a59bf97ce4214dce6e6d937ed52fbf3db8f3eaf42cde141bfe4d7a731b06e41723285517461c790912706be9e SHA512 48ef567f6972e7975cb61d34a876d8c0db42f1a3c0b832f9366091dd5f2ca854c02887808843d314816c8cf6d7b0738c40e7835fedbba7b84e57f2515dde45e2 @@ -68,6 +71,8 @@ EBUILD python-3.14.0_alpha1-r100.ebuild 17233 BLAKE2B bfa3da61f3418b24a1a98fab65 EBUILD python-3.14.0_alpha1.ebuild 16850 BLAKE2B 80bc058d93b5f92a6527c841c5c59e2cd0b10ca7e97272468195c59a90fb79f9b224c73e99b0cc0dd1794d5bd5474588bd4e0cf4816993ea4ff99ec2805d092a SHA512 5457714512bfefddc4ce8b895e30f3722fa472f8cf7dbcca0efa66ed7707feb274a9ea6fd55dbc9ea048b85247a4669b658358e1de22784140c286d94006ca7c EBUILD python-3.14.0_alpha2-r100.ebuild 17230 BLAKE2B d684ba20e604f29fa273b78997a397ba71bb86333929126a427b6b6dbf8c14ef59c504020a3f574a8c1b03404a78fa9bc1c8bb30f308e39db0b4ee6515e27270 SHA512 2364b711a7499b471f7792d89fe412924886bb001d543f492ee5c5b15bc71bbbddfdae560602e88c9a99862985aef9b129e167b285bae06a07ae4c206a0f0617 EBUILD python-3.14.0_alpha2.ebuild 16847 BLAKE2B 6163dc4a347ba87a8c215312cc71d483cf481d9f6da4f823485d7dd4cd0159a86e00b40f945c42db36319f0411a0410d7eb2c7679758c482ab9b24a367286c16 SHA512 7bab2e1e49963e1bfe17d192d8ad4390b8d4fabc4a2a769501e411953df216910586e69367135e87a8f124b9f223bec14b6b3fa51a3a1c75b22bb70fb067e8eb +EBUILD python-3.14.0_alpha3-r100.ebuild 17230 BLAKE2B d684ba20e604f29fa273b78997a397ba71bb86333929126a427b6b6dbf8c14ef59c504020a3f574a8c1b03404a78fa9bc1c8bb30f308e39db0b4ee6515e27270 SHA512 2364b711a7499b471f7792d89fe412924886bb001d543f492ee5c5b15bc71bbbddfdae560602e88c9a99862985aef9b129e167b285bae06a07ae4c206a0f0617 +EBUILD python-3.14.0_alpha3.ebuild 16847 BLAKE2B 6163dc4a347ba87a8c215312cc71d483cf481d9f6da4f823485d7dd4cd0159a86e00b40f945c42db36319f0411a0410d7eb2c7679758c482ab9b24a367286c16 SHA512 7bab2e1e49963e1bfe17d192d8ad4390b8d4fabc4a2a769501e411953df216910586e69367135e87a8f124b9f223bec14b6b3fa51a3a1c75b22bb70fb067e8eb EBUILD python-3.8.20_p2.ebuild 13325 BLAKE2B 0a1908bc54a0d8bc2dd0757e62817061af71de61d7bdcd787f8323dd7600c5f8ec590e4bf8f416eb495b9dcfd4eef0980d91d5cc09675d49aaf3c538eda56c4e SHA512 6395f6b29fba5973f8c18d8835c82f70a6cbea507db1eaf0e52ba0e581b82bfce29846d6dbf14153b0876674b875d366ad77d8e65c10c9b244d2fe8d0969d491 EBUILD python-3.8.20_p4.ebuild 13325 BLAKE2B 0a1908bc54a0d8bc2dd0757e62817061af71de61d7bdcd787f8323dd7600c5f8ec590e4bf8f416eb495b9dcfd4eef0980d91d5cc09675d49aaf3c538eda56c4e SHA512 6395f6b29fba5973f8c18d8835c82f70a6cbea507db1eaf0e52ba0e581b82bfce29846d6dbf14153b0876674b875d366ad77d8e65c10c9b244d2fe8d0969d491 EBUILD python-3.8.20_p6.ebuild 13327 BLAKE2B 5b3b6dbc35c0882c2e47c7141b95464dc42caba5367db37e0e6d411d5379f87d9eb9b19cd30cb338aeb6f7875938141e1f817fe984f1db5040e86e3a7037073b SHA512 00264a16b0d449b0ed440ec7a142ca9031ece0a77fa2a6551ea66f4d64637ec5786184d6b1085c6cd03deaee38a2b8a495a9da1a3a7308a4b1c97dae5d9e33ca diff --git a/dev-lang/python/python-3.14.0_alpha3-r100.ebuild b/dev-lang/python/python-3.14.0_alpha3-r100.ebuild new file mode 100644 index 000000000000..eb87a6ac8197 --- /dev/null +++ b/dev-lang/python/python-3.14.0_alpha3-r100.ebuild @@ -0,0 +1,667 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL=1 +VERIFY_SIG_METHOD=sigstore +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER="$(ver_cut 1-2)t" +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="Freethreading (no-GIL) version of Python 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.sigstore + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +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/libintl + ensurepip? ( dev-python/ensurepip-pip ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + 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? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +# https://www.python.org/downloads/metadata/sigstore/ +VERIFY_SIG_CERT_IDENTITY=hugo@python.org +VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + ewarn "Freethreading build is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python. Instead," + ewarn "please consider reporting freethreading problems upstream." +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # 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 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --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 to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + 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=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # 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 + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + 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_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # 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 + --verbose3 + -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_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 + + # Fails in profiling run, passes in src_test(). + -x test_capi + -x test_embed + -x test_external_inspection + ) + + # 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 + --without-static-libpython + --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-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --disable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + 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 + + 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 + export PYTHONSTRICTEXTENSIONBUILD=1 + + # 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=/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 + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/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} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + # Fix collision with GIL-enabled build. + rm "${ED}/usr/bin/python${PYVER%t}" || die + mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die + mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || 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 sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if use tk; then + # rename to avoid collision with dev-lang/python + mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die + else + rm -r "${ED}/usr/bin/idle${PYVER%t}" || die + rm -r "${libdir}/"{idlelib,tkinter} || 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 + # pydoc + 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.14.0_alpha3.ebuild b/dev-lang/python/python-3.14.0_alpha3.ebuild new file mode 100644 index 000000000000..3f87b266c470 --- /dev/null +++ b/dev-lang/python/python-3.14.0_alpha3.ebuild @@ -0,0 +1,659 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL=1 +VERIFY_SIG_METHOD=sigstore +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV/_alpha/a} +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.sigstore + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +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/libintl + ensurepip? ( dev-python/ensurepip-pip ) + gdbm? ( sys-libs/gdbm:=[berkdb] ) + kernel_linux? ( sys-apps/util-linux:= ) + ncurses? ( >=sys-libs/ncurses-5.2:= ) + readline? ( + !libedit? ( >=sys-libs/readline-4.1:= ) + libedit? ( dev-libs/libedit:= ) + ) + 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? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +# https://www.python.org/downloads/metadata/sigstore/ +VERIFY_SIG_CERT_IDENTITY=hugo@python.org +VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + if use jit; then + ewarn "USE=jit is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead," + ewarn "please consider reporting JIT problems upstream." + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # 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 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --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 to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + 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=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # 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 + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + 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_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # 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 + --verbose3 + -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_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 + + # Fails in profiling run, passes in src_test(). + -x test_capi + -x test_embed + ) + + # 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 + --without-static-libpython + --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-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + --enable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + myeconfargs+=( + --with-lto + ) + fi + + # Force-disable modules we don't want built. + # See Modules/Setup for docs on how this works. Setup.local contains our local deviations. + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + $(usev !gdbm '_gdbm _dbm') + $(usev !sqlite '_sqlite3') + $(usev !ssl '_hashlib _ssl') + $(usev !ncurses '_curses _curses_panel') + $(usev !readline 'readline') + $(usev !tk '_tkinter') + EOF + + # disable implicit optimization/debugging flags + local -x OPT= + + if tc-is-cross-compiler ; then + build_cbuild_python + myeconfargs+=( + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python + ) + 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 + + 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 + export PYTHONSTRICTEXTENSIONBUILD=1 + + # 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= + 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 + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + 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} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # 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 sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || 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 + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} |