summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin21851 -> 21850 bytes
-rw-r--r--dev-lang/go/Manifest2
-rw-r--r--dev-lang/go/go-1.22.0.ebuild213
-rw-r--r--dev-lang/python/Manifest32
-rw-r--r--dev-lang/python/python-3.10.13.ebuild510
-rw-r--r--dev-lang/python/python-3.11.7.ebuild538
-rw-r--r--dev-lang/python/python-3.11.8.ebuild538
-rw-r--r--dev-lang/python/python-3.11.8_p1.ebuild2
-rw-r--r--dev-lang/python/python-3.12.1.ebuild533
-rw-r--r--dev-lang/python/python-3.12.1_p1.ebuild536
-rw-r--r--dev-lang/python/python-3.12.2.ebuild536
-rw-r--r--dev-lang/python/python-3.13.0_alpha2.ebuild534
-rw-r--r--dev-lang/python/python-3.13.0_alpha3.ebuild534
-rw-r--r--dev-lang/python/python-3.13.0_alpha3_p1.ebuild533
-rw-r--r--dev-lang/python/python-3.8.18.ebuild437
-rw-r--r--dev-lang/python/python-3.9.18.ebuild496
-rw-r--r--dev-lang/rust-bin/Manifest32
-rw-r--r--dev-lang/rust-bin/metadata.xml1
-rw-r--r--dev-lang/rust-bin/rust-bin-1.76.0.ebuild245
-rw-r--r--dev-lang/rust/Manifest32
-rw-r--r--dev-lang/rust/files/1.76.0-loong-code-model.patch73
-rw-r--r--dev-lang/rust/rust-1.76.0.ebuild786
22 files changed, 1170 insertions, 5973 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index a139905e1579..040fd365dd30 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index 70bf36213654..fbfc50dcf03a 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -4,13 +4,11 @@ DIST go1.21.5.src.tar.gz 26986890 BLAKE2B a57550a3f586060d8efa93b6c8d9bf3f87d791
DIST go1.21.6.src.tar.gz 27058459 BLAKE2B 04909d067f8dc1c1bb45d9d0a87f9d0fedb69b42a4eb89ddb24d19df7c0f77c86c6283b579f3b3f9caa3ffba6ab5f325a71552e37b38ba4082e878bd0bc942a3 SHA512 8472c1c6c3fae9fecfb512a16f18ed531c04c087429a75086b9999069330c1b1e4a01a30c6561b5092169144cbc0d787ec2f5f4a50dfc4f79e74398f16423cfd
DIST go1.21.7.src.tar.gz 26991014 BLAKE2B 7002b8a6662594f9dc44f215f8c76c2d17057a117c6d8b24929b5fa015a7222a1fe56d3091fcabb74f993c22000c3239645b12b94303751053be83336120cfa0 SHA512 5cadc458265deea2650fbbc5b0652e19e858fa7a7b929ea717e82ee4be2af45214a9dfc5b8b799003e83b92aa80141962a472d1d4f0653e97e99df5b68c88e5d
DIST go1.21.8.src.tar.gz 26992984 BLAKE2B bebcd1a0b5e6d844d272fbd351709344a41856d16ebedad5ab58ac905695dcdd8ca29936a0534a895de7d0bffabed395a6169f1671bcca01e449e960405a4b0b SHA512 dde764ee12fbf58a603d31c20ea239805ffec359a90b0aad7575cc857e241393c2adc47d2f00136db5dff2cbe11b90e8d009d67f9329d363e75a0720067123b0
-DIST go1.22.0.src.tar.gz 27544122 BLAKE2B c5b1a842b9c70ac4fd77b6403398568dc9ab228e42b2bc036a2d25462bcb2da431f7fec89e8f480b519e774fb08a8b59b6e78ed863d32b15d951ccbea19ce45f SHA512 f47fdac3281463757b3db9f6ab747f86ed7263beed52c820ec2571375a578034df02c0b76912c19fab3a58df3b04d79b6aae084163d1d5847c907aeb30b936e3
DIST go1.22.1.src.tar.gz 27548577 BLAKE2B 589c2e8677d6787d2ffe68b81722da8aa5d668a7ce09faac9433514729a33e7150a72a35ab313cf3559958069e8ede2a106ba77476d7c6027a5d082bb1f80a52 SHA512 627530c3fa2ea872478e1df8ee20db2ddc3c94581fff4e66bda21ca45a643e9915f97115401f79667cd7e856ccca1b40a842f4c0b509a472c75696e3bdb3a908
EBUILD go-1.21.5.ebuild 5204 BLAKE2B 2fe9369fbc565c10082d5d508c863739e24e85dd491cd3c27691ea3025f06bb94e976c8f109d26455a8560356fbebbaaa5e5d1e034a20b7648596c9f053807d9 SHA512 ed2806d6d1efb4d9194354468157129b9f27483f63ae166d66bb559541880d416254fa1ca39dc2022d485abda6fe771d8311c007eac78ef01a7ce38b9641ed19
EBUILD go-1.21.6.ebuild 5206 BLAKE2B d1618ba01d1c74873875216e306891cc6a0610a0fee57f433d681ff73f1f40d47d2318bda92afe8a0af1747cc0e4810919fc517afb284af8c446f16db2d31bb6 SHA512 74592fb84fb461020a617396f89f0393caf1a18943dce8c1b039dfb36c1d2a966b23c02d1a06a76793fb5b684e13ca503f8a59eb9bc6334c312167da67dc66c0
EBUILD go-1.21.7.ebuild 5205 BLAKE2B bc3ea565882c296cbcf077e791f857f959fe9ecb09ac45434e94ba94b0c068a483cc242605a085f1bb7f0bb008a73724fe68440112cba1343c3044d0d35fab85 SHA512 89a2021675a60dd4a4bb620e8e1cf51955b49afc00246d300644fb20eeafcc85b822dc3bcd3cfc62ed1d3fec1a988efa3976a9d3d746ec1880bb6162287de439
EBUILD go-1.21.8.ebuild 5209 BLAKE2B 5656d72770d2f5d6092328eeb3883f303407e591845530c2041df1382ffec3cde87c150ac591f4a4bebfa2dada0b504151c36e454d66269d31fe975eab786917 SHA512 d0b37538789f820c8314dbfbe9e8b5a18de1c3a8009d3e2633d6b4f0bdf1bd100374232f8323e7e55c67300e98f70468b3e26ea57153448d7bb24d629e9387e6
-EBUILD go-1.22.0.ebuild 5274 BLAKE2B a5a2b88b048cb4a42f8d477ba507febfd99713bc9054847fa5a9beb5c0f8140c6ebc42b3bb87703f798a8dc8ee0067c7568b5d98e64a18ff617fafe98fe82faf SHA512 de58d78054b0281de2dd3bff87e9fcc8e6aa094c749ffcec398b7766dc4e2e7369179082e1193bb3dd9b913b75970ecc0144c0ba62a51225331ea55b4b15ce54
EBUILD go-1.22.1.ebuild 5274 BLAKE2B fb71001874cd0037ff66a9b8dacc058c7276bac4095402eea81fef64eaa3f336ebe04535385fc5036aaf10267f578ef0742f2b088bd15e88747c53fc742b7a13 SHA512 139516a4593e9abcb35fa754db6c0582d3f113e68ec65fb6cf34c96673eff792c0d95cddf8786a66ffcd0725782f08b0d43b61ad10229c3c00a4a372f2f2eb96
EBUILD go-9999.ebuild 5274 BLAKE2B fb71001874cd0037ff66a9b8dacc058c7276bac4095402eea81fef64eaa3f336ebe04535385fc5036aaf10267f578ef0742f2b088bd15e88747c53fc742b7a13 SHA512 139516a4593e9abcb35fa754db6c0582d3f113e68ec65fb6cf34c96673eff792c0d95cddf8786a66ffcd0725782f08b0d43b61ad10229c3c00a4a372f2f2eb96
MISC metadata.xml 589 BLAKE2B 341e4c0e91d73ca668c1795035e1223eed60f85c724afd989ef1f8fb69649f7f6eaaf8a5228f6c8f587ffcc40a438c47d332fbe6866839f5a0829872a983f642 SHA512 fe58ddddfbd4d0d060516cb035592a80c0f48e125bb59c95d3c6fac0c182271e2a9ec9bd055b9cc8e6cb8c449e6c483bff4a23c362f532c24255febfdefc273a
diff --git a/dev-lang/go/go-1.22.0.ebuild b/dev-lang/go/go-1.22.0.ebuild
deleted file mode 100644
index 373b585d242f..000000000000
--- a/dev-lang/go/go-1.22.0.ebuild
+++ /dev/null
@@ -1,213 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-
-# See "Bootstrap" in release notes
-GO_BOOTSTRAP_MIN=1.20.14
-MY_PV=${PV/_/}
-
-inherit 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
- case ${PV} in
- *_beta*|*_rc*) ;;
- *)
- KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
- ;;
- esac
-esac
-
-DESCRIPTION="A concurrent garbage collected and typesafe programming language"
-HOMEPAGE="https://go.dev"
-
-LICENSE="BSD"
-SLOT="0/${PV}"
-IUSE="abi_mips_o32 abi_mips_n64 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} )"
-
-# 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_arch() {
- # By chance most portage arch names match Go
- local tc_arch=$(tc-arch $@)
- case "${tc_arch}" in
- x86) echo 386;;
- x64-*) echo amd64;;
- loong) echo loong64;;
- mips) if use abi_mips_o32; then
- [[ $(tc-endian $@) = big ]] && echo mips || echo mipsle
- elif use abi_mips_n64; then
- [[ $(tc-endian $@) = big ]] && echo mips64 || echo mips64le
- fi ;;
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
- riscv) echo riscv64 ;;
- s390) echo s390x ;;
- *) echo "${tc_arch}";;
- esac
-}
-
-go_arm() {
- case "${1:-${CHOST}}" in
- armv5*) echo 5;;
- armv6*) echo 6;;
- armv7*) echo 7;;
- *)
- die "unknown GOARM for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_os() {
- case "${1:-${CHOST}}" in
- *-linux*) echo linux;;
- *-darwin*) echo darwin;;
- *-freebsd*) echo freebsd;;
- *-netbsd*) echo netbsd;;
- *-openbsd*) echo openbsd;;
- *-solaris*) echo solaris;;
- *-cygwin*|*-interix*|*-winnt*)
- echo windows
- ;;
- *)
- die "unknown GOOS for ${1:-${CHOST}}"
- ;;
- esac
-}
-
-go_tuple() {
- echo "$(go_os $@)_$(go_arch $@)"
-}
-
-go_cross_compile() {
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
-}
-
-PATCHES=(
- "${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
-
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
- export GOROOT="${PWD}"
- export GOBIN="${GOROOT}/bin"
-
- # Go's build script does not use BUILD/HOST/TARGET consistently. :(
- export GOHOSTARCH=$(go_arch ${CBUILD})
- export GOHOSTOS=$(go_os ${CBUILD})
- export CC=$(tc-getBUILD_CC)
-
- export GOARCH=$(go_arch)
- export GOOS=$(go_os)
- export CC_FOR_TARGET=$(tc-getCC)
- export CXX_FOR_TARGET=$(tc-getCXX)
- use arm && export GOARM=$(go_arm)
- use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
-
- cd src
- bash -x ./make.bash || die "build failed"
-}
-
-src_test() {
- go_cross_compile && return 0
-
- cd src
-
- # https://github.com/golang/go/issues/42005
- rm cmd/link/internal/ld/fallocate_test.go || die
-
- PATH="${GOBIN}:${PATH}" \
- ./run.bash -no-rebuild -k || die "tests failed"
- cd ..
- rm -fr pkg/*_race || die
- rm -fr pkg/obj/go-build || die
-}
-
-src_install() {
- dodir /usr/lib/go
- # The use of cp is deliberate in order to retain permissions
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
- einstalldocs
-
- insinto /usr/lib/go
- doins go.env VERSION
-
- # testdata directories are not needed on the installed system
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print)
-
- 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
-
- # install the @golang-rebuild set for Portage
- insinto /usr/share/portage/config/sets
- newins "${FILESDIR}"/go-sets.conf go.conf
-}
-
-pkg_postinst() {
- [[ -z ${REPLACING_VERSIONS} ]] && return
- elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild"
- elog "all packages compiled with previous versions of ${CATEGORY}/${PN}"
- elog "due to the static linking nature of go."
- elog "If this is not done, the packages compiled with the older"
- elog "version of the compiler will not be updated until they are"
- elog "updated individually, which could mean they will have"
- elog "vulnerabilities."
- elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages"
- elog "See https://bugs.gentoo.org/752153 for more info"
-}
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 65042fcab194..adfc34422684 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -4,18 +4,10 @@ DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
DIST Python-3.10.13.tar.xz 19663088 BLAKE2B d9a8edf89d0ccd665fd5ed444a144af240e078fcab1876fea8b44586c23651a08cf5833fc54c39e8471fd9e66ea0ded11fcaa5d215bc025acaf4504a15c5846d SHA512 7579772e501486b2b07f78142082dee1e99c7643640098860ac0cf2ca87daf7588b0c00b1db1960146b37f56a6ed98fd08297c25c9a19b612cf6e6a258984da8
DIST Python-3.10.13.tar.xz.asc 833 BLAKE2B b00222b30a6701e77c11c6019e2240be7cf42f2b4e558c03f7a058664d242a00665fbc52fdf03106e84c75f49b51b705d8acd1f381d1f41ada67c4647652ef4c SHA512 3083e66f8d26128302dc77a0c6ba3bfefc4229928a1bbd06460f2fec2421188bd30d493e3bce138cde1fed1df206e1dda04912b9f43a0b81229f1e69135e3a7f
-DIST Python-3.11.7.tar.xz 20074108 BLAKE2B 3414118d30076e4223571825b5c595c5795422244de20dc70d07389a03b2c2b03b98a9ff562a8fd164db8f776dd741a9d7beb1c2ae4087ec6af677619a9dfd80 SHA512 11e06f2ffe1f66888cb5b4e9f607de815294d6863a77eda6ec6d7c724ef158df9f51881f4a956d4a6fa973c2fb6fd031d495e3496e9b0bb53793fb1cc8434c63
-DIST Python-3.11.7.tar.xz.asc 833 BLAKE2B 32d6984631d7b4b064e2c2588835a89098842a0ecc3d8ccb893830c9946124a159123e2082e6da3abcdb97d27dde0fb68c1fd11e4ed2bf2e0641fa95191354bb SHA512 7b342990c6e32897047f8ba33c4d264f1be987b73843b61bd7db08bfa1a7280c616e9dcd96225f37602f876549d011ff82a4d79f1e32a5ab7d7cc22651bba44f
DIST Python-3.11.8.tar.xz 20041256 BLAKE2B 361253743c58facd01063922523c39fafe647a4204e04db79f36f0c3c180c2f1e95e8ea6662e85a8da06bdbd84d32bb7df9ac0febf361122df5b207ade562740 SHA512 434e727fa370def348838fd84acb69b4d309cfb03f61bf5069150164e9ca005637ac01dfbf997f445607d4e28d02c8bed0858b36589240ccadaa4c14c19f2320
DIST Python-3.11.8.tar.xz.asc 833 BLAKE2B c82907808de345b263cd1869589004a29e94f225c338a6da3035130728bda137727898743f30d64cc4b819a28cd035fa70123cc45cbf8719b66f9d3ef14452e2 SHA512 aebec01f84e96a76f6c5949004df2bb51c817bac3fc8d925ee26ded1ff2d80bec1b579dd0fc129004bc9cd81cbdcdcdf7c1f0471c3d26b70bd6dac11b97187e0
-DIST Python-3.12.1.tar.xz 20583448 BLAKE2B 20f6f8b7b0d7e560d269138a38c5b9362073aa414f0a862357644b97eb76f9bf70b5365cac1dd1a615895302b046bd88404966e56818d57e506b9972d34445a3 SHA512 44cf06b89ade692d87ca3105d8e3de5c7ce3f5fb318690fff513cf56f909ff5e0d0f6a0b22ae270b12e1fe3051b1bde3ec786506ec87c810b1d02e92e45dff07
-DIST Python-3.12.1.tar.xz.asc 963 BLAKE2B 6c08f666c914fc413d24c3591c24ce7ec22d459a571f9e91b50862b534ea6d98170d7141dd42602c18893cfc07a02f5b44c42edc97571a3a12cac3cdfe6ddc82 SHA512 1c85237b5921fbf940ded4e038d99c8d02682fcb357b5de761eb5bebf94142b308a11654fc6312129663727e2ce1f546fbb5a5a3747d7dc02fc7dced9cb968fd
DIST Python-3.12.2.tar.xz 20591308 BLAKE2B 419186d220d4ae5ca31466771158c8b56f5298b93e81a29993f36711e08b0384e002d891280ca29099ae826919ba99c2d056d468d9d3049a984d58e01d4972c0 SHA512 2ccfae7b9f95d8e15ea85d3f66eea5f6a8fdcaffc0b405095fecb33efc0df50b831c1215542910ced948b54e6de1f7242b0b8b9afc5f89079451c552430d7d9f
DIST Python-3.12.2.tar.xz.asc 963 BLAKE2B 45bfa01009f4df19d348a1fda722901cb4f0b76eb63fcf1061c2796949b5b2ef301fd0fdf818cd145e41d45e5785e0cfbfab8d98751765741715ee7d1b27f2f8 SHA512 fb477acb49864a662b1586db79e80fd8ebab85d4e5e14acd3bfb5afc3dbe8d6b9bf97eb518dfb77662e27040d400f451ed7575fe1264a6cc0d9feb06e4f2dc84
-DIST Python-3.13.0a2.tar.xz 20244640 BLAKE2B b1edae4c5f6c33e7250f718caa3164e163ea13f245817a997f0497d20bb9695e6e2f777eb42fc210b21fb315bd1753fe4a46b7f213312a03201481d26544fa63 SHA512 2702f630ebb49a835c213656f2f0d41f87daf2dad6b856821f4011f4614c19279656eaa1dad9f1cbfd258992aa5f59d4571577057c6a4ad1cdcfa4d8ada3b607
-DIST Python-3.13.0a2.tar.xz.asc 963 BLAKE2B db603fcf2dcf0c727b3a92a5ccbaadd080e11d664b1c07944ef082b5ca8625b2ccd4d4384d344d14e61eb73466011f2284f5240d710b3be7206c7316e2a3872b SHA512 c6a0101b844701fcd860a519ec4830bde0df486ea78377831544dbe0db25dd67c28360f46d5ef01db64aa4347cf7b0d489590f6dc91e768b16753228f2c93b25
-DIST Python-3.13.0a3.tar.xz 20351452 BLAKE2B 2d90aec5df24ac06e4d4b2e4442c062612b24441442bf3cd02dad8fde2f6db769eac7e4a1ce4943da6e7e9ea3516b2b9175dfaf40a8dd8827ae476ebb7e698ab SHA512 0cabe30ca97f89df7da35684dda9ac8a3018fb7547d97f595e7883323809fdb99ff02c48719d71fb12abdacda1fc86f0ca15b1d27717e941cdc0b31c72fd63bb
-DIST Python-3.13.0a3.tar.xz.asc 963 BLAKE2B 30b0b14dbb8ca72f889317b7cbdf75366e6b035ff0beb835c8eacd02f2aa5014e68d4723f0268d591903be4596cb73a5cdd90e069f5bc1ad79e2f7dfe124a3ce SHA512 91efe8e66085e4b60b565130a8ab43b3772e3dafe25fa6266900a8c19004082bcfd7e72e6e5293dc5bc3330ea2db233365d1028ef3b86ee4bb7df1246b6641b0
DIST Python-3.13.0a4.tar.xz 20648544 BLAKE2B 4d45bdc1d88792c0bff93b4f9023d494b5ae86cd74eef49089fb11fab951b7fd2a5b8ac5b827b50fe1d61b516ed9a50f3f0e0b112299a70128f5e29e7b1d3f0f SHA512 f0dccc822ba000e8a50853d62698975d35382b981b62091e25ad6a6e0669e4e517c880e884644b508172de38226006ec11ddc649d9271320e728c0cd6c0b4dcc
DIST Python-3.13.0a4.tar.xz.asc 963 BLAKE2B 2b27d93d4a1240b85657e455b1f148424460a10f8dc71a052a16f62c2e115a1767f1af1e6b4b7ccee5a4b59b4a92351875270567fd120aa53ee7fd50c51fd607 SHA512 261c0b23f84301f8b2aa4e8ea32995ea64a74a48dabc595028af71466915df93c118e699c939d7e4372d4575c59221743cb5ae21a936cc41241bdbafb9fab6c3
DIST Python-3.8.18.tar.xz 20696952 BLAKE2B 45be712aeef8bb3ba04aa2bd7d0282aa5f817327749c620ede18ee307fcb432540db9062a8186b08b49467515c74f01eb6fa739f366cca76dfadedcb22858429 SHA512 0be1d85cafade25e99b8277ba51d7b9b3a3d2dbbcc52fd0d1c633c47982e5dd87fd7a0ca180a78d7801d79a8ecafa79bd9d501d544cd7b6da53ea409daa70adf
@@ -23,39 +15,17 @@ DIST Python-3.8.18.tar.xz.asc 833 BLAKE2B bc4e989748d53c6be7040e78d9f1852227c6a7
DIST Python-3.9.18.tar.xz 19673928 BLAKE2B 97da9bedaf29101e5df82199ac3ee12f1da74d5cc89de21ff1510c3f6d34d7f9194489e79855f1ab3c6f26768738e784cb7231c1a692fa746edd21d35558bc4e SHA512 aab155aca757d298394eddb91ff9a8f239665bd46feb495c6b6f735bbcb7489c05c858cc4cd08f1575c24f293b33492d763e9a140d92f0b2b0cc81a165a677c7
DIST Python-3.9.18.tar.xz.asc 833 BLAKE2B b2160eedf7a7529c379ede5cd626f2d1e36db65bad8c8968adbc2940e597bf0e66f4872078c6543c69aed9b7f38b41d922fdc1cb8046738c1d8566a3f48da7d3 SHA512 dff9a86df2b0774b68e7c762bacf05e2482dbb218301acfdc9128fc600bbc51c97a3a44f6b7cee87bd4e153bcb4a0af3c98109560d0c7861b7508edc9ae05ea1
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
-DIST python-gentoo-patches-3.10.13_p2.tar.xz 15236 BLAKE2B 1b60a9ec0973de0f5fc7454e016b01c2a03e55a4515345ec86bf20e129018809908493847f55346d0c07ed6878ee2ead32f2b7dcbc25a6902d1494f718480acf SHA512 1db65a001fc307b48d034ad58c7d9aa4561a0e01b46fa1027ee730b2db1652eb6f02c73df6a9e2b8545e76d3b0541706ea32d423787f99ed83f86463951e9e81
DIST python-gentoo-patches-3.10.13_p3.tar.xz 16192 BLAKE2B f13efbaf3b41572cc9d1f3878cf2339448f513c96fd85b35d0f4a9a472cd4867d898ec46230391fc916debf5dc23ac0030b228f8ab78b2ac9e38159c75aecabb SHA512 a5eab5f3ea59b12fa6613a18b4f318981b750899d69cf382abea7705efb873be5b94024ed64fb47f19aa6f6e4f2a9ebe05c05361e7a45bd41dea5161f955448c
-DIST python-gentoo-patches-3.11.7_p1.tar.xz 8364 BLAKE2B 246da406e6d58d85ab2ef79dd3a018a134e473f90d42f8dd9274629f998a6129f3b03da228aa5e65c1b4508a71979ceb1f752a28066c356f813be21c30a40f70 SHA512 c5c1448a2e9b15b8084125e07cee288b667267779d89da8aab9df4b1d014739ba9af4d09e51b3cdc37e8942821d7aee0d1998e55820b67b83ef654d0a442767e
-DIST python-gentoo-patches-3.11.8.tar.xz 8484 BLAKE2B 2a6b9275cfcb2edc639a8bfebaa061ccdf3c43c1fda46a97a3cb7ed6eb629d7b581932bf7e3561b7559533e2374e4c5138e7929f1d8edc3e93829ee701ac0779 SHA512 bcc4a0175b7d5f78eb7c431afad5ed4681512e5ec3a0394ff291b11a4d1867212fc093ded0f2e1f504c63f7035cde4d8b19c386d3cb4e50d7a49366a1872905d
DIST python-gentoo-patches-3.11.8_p1.tar.xz 9604 BLAKE2B 9017104f160f24e0a1818a8b12225c596faee79d646cc73b6edc4ed1e3faca86cfa2fcea09a128224b85330a67dea65f658507e60dcd09b10af0d590a2b05082 SHA512 0f0afa57abfb4282953a1a78e5ad1cc5e17c0a205e96d9c152f9de6537da95671c1d429ac03fd6aa70a457b27a19b0892a1f9b81164468c4085172a58f5e8d9e
-DIST python-gentoo-patches-3.12.1.tar.xz 5152 BLAKE2B bd1470dbdb4a3336f499534131d9f67329d6a1f6378b61592f6168d9a2500d9d9d65a77167065f80c38745fa1464a2073eac3e4bc0e5c096eefbbc8971a077b6 SHA512 2e608940f2f8c3a4be2699365acd1967d887c7895e71b173327dfe91ea41b6fb10a83d0845b2caa8b59884aa73ea73e49535d7805dc8b50f63b7fcdda67b438a
-DIST python-gentoo-patches-3.12.1_p2.tar.xz 6880 BLAKE2B 20f0ba78295cc64743f6842bccc7fc684389b8800c3884572be64b61516ba38c873104612467ffaa2a84653fc35184a7d7cd77d1f6ca6e19faca0b05bce1417e SHA512 653104144c864a0c0a27972f849988833540641d24f02bf14096e99e5a9c2d41df31f5dd0d1ecbbfe36419588eefae8f2e0a4b49bff3e6d96bd8b3cf0e3b5425
-DIST python-gentoo-patches-3.12.2.tar.xz 6044 BLAKE2B cf71fac76d7eee313d249d1531e4b13166fcb5e0e03b73d311cb6203658ac7857a213d324efe9b693b2ccd607a746d087d7173ac405a9f62e350acf59dde43c1 SHA512 a2c2fce72265aeca39ce5050619c5cceacbbfe9b405169bb5590bd8eb16e89f1f665ce2f95a23682883801f31f6f4b9958d6b52082f79af9088b181c88c1d810
DIST python-gentoo-patches-3.12.2_p1.tar.xz 7208 BLAKE2B 8266f2b6c64ffd509278c0d8756680e6700dcd3ed3ab6d3f0e1be2cc87cb20bc694f9e386b474fa5d115ffecdd5d4807a956a48450e109ef7f449ed6f4a8afce SHA512 5fdb93ffae471b5a9e617c12ca1646b9521867cd260efe6da6350fcf5ba24114cad1dc715f033079ab69ecab7cc62c870e14fe2d2035c2d7f29c05cc0f1297db
-DIST python-gentoo-patches-3.13.0a2_p1.tar.xz 5176 BLAKE2B 87e278c11fafc69df918b4c105dfbc3d9ca9ff805d3862b0101ccbb0fd7614fda3460ba4e6304a0f62d0c96756a82ff046ca4a5b02d75daa3325c8e84edc99d5 SHA512 5a2692f8d113a67502b60450f6fdb0635f4f350877766e800e897aa943222a58991580dd8e1f71c9f2dfd3c381bb13fc30add9289cd7ade6fe184f3a5ca3d587
-DIST python-gentoo-patches-3.13.0a3.tar.xz 5176 BLAKE2B 388453fe1bee3a901fc526f15580cfd9e2db60bda6ed0d0546df3d1bca8bbfd680931533c8b22f091699be6886985378ef2d8e5c8f2819fa53a1aa8a1cb51750 SHA512 9787feb96bfd50d9be9a5324a3e0c30175baae9fdcb62adb7fcf0d625b6b84494dc4ecefab8f8291256ef508f908350dcb781e1bdd0b12956e662bbe97fad3ae
-DIST python-gentoo-patches-3.13.0a3_p1.tar.xz 6236 BLAKE2B a3cba29eb589390297fac8768f07123bf06b8ccc284820cd246c060487909659b2938cf31d125db31d355519a371a9abe935650c40fad8758178b85c511fb87d SHA512 fe5dc982aaffbb7a18ba6e880e2a65f48ad5f95816916a0304496175fa7fa5a575bbf14c5dbf112af4f54d161687ee4da6ad24e2936a017e48164120c3398159
DIST python-gentoo-patches-3.13.0a4.tar.xz 5256 BLAKE2B e3ad093b0c4bb044fb5883b5af14d130a6d5c94d8e9094263544f458ba2a38056ae64bd94d78ec44372caf40fafdb542d06be197cd5d1742f43a4f842d2fd2e3 SHA512 d845febc89d089791bac09beb758a615c20968b97077a3483c037562b4811edfe7c2d17e815032a77676bafda6ed838dba370fdcbba37f93ea83ee9d4b092fe8
-DIST python-gentoo-patches-3.8.18_p1.tar.xz 33160 BLAKE2B 53c7d71f2cdcc21e991a9d61c8cb8833212d144d145d5949c5b28b62080121250d7633f477453743426d6e0ebdc9f6bd6648d4ccac8dfb2d559126455d8b1da3 SHA512 7fbadb2468711b5ecb8a9fefcf4dfe567df7f9b038ec87f37095d02589e7debbf5a8ad3f759d95b69ca60ce9fcd3ccf4aecde6592ed69c030cf51250935db052
DIST python-gentoo-patches-3.8.18_p2.tar.xz 34160 BLAKE2B 2e97f70615b950798cb7e2ae076f6617da3c28ef2d3f56f4e9be5c9144a64512fab1c098ed778d740ef79fc95af3ede231efc712304937c65b867e6e18dc0405 SHA512 fd05a1f6f7ae8173f4976464116fed66486a36b937f638d97d60c2eb0f3b277525b25b60c800c3b2b3403b63c0cb813b138094c59ccf43aeecc4a23c69f2f3ca
-DIST python-gentoo-patches-3.9.18_p1.tar.xz 25792 BLAKE2B f24ab6d3443c2b39a2fdca5810790eed51d2d42c93a3b41d75cad6b6c99ebf709f598eaa9881858e13ad102867d97a159f3a6d97a42569d5183de6118fb953c6 SHA512 be0c60c65d4c982cd8b934d14b69f5f41ca9f0d6c51d6bf195d64d0a5ffff3d359edc29a6a2f2808450c896d2795cc773c9f31680970205a37955134be50ee79
DIST python-gentoo-patches-3.9.18_p2.tar.xz 26756 BLAKE2B d9625e8972e2b7536ca1f54a284f0b414361e234b869f98593d132d7bc63b7a1a311c3e6769deba1f07358053982845a96b62b14871388e3b6d211f51f7358b5 SHA512 83584170cb29fb71937dd224af381cd5602b736d893c8ae89891805d6882d74208244040e3278baef82c31a6769c827c21746265260e9be7bc55ffdb8b625b2d
EBUILD python-2.7.18_p16-r2.ebuild 8603 BLAKE2B 6a2ee7f1a5d0eae487cf0293fb2528c97679d0fb395cd51f00a08ede8abb473f3e16051c8b7b797a99c4462d520955c01b1b0d238caf0652a3166034bed60839 SHA512 e498d3f4904e2cf2de6a6d0beb8e573a462bc96970c861616bd12956434154146e1625ea36b44f984b82f3d6cc90b33860b71c4067002b7f96510eb5e632e572
-EBUILD python-3.10.13.ebuild 14263 BLAKE2B 9e9f65a3c1fcaf7eabe153faf10495909db9cc516fadcc29522f4eba3b2b5d1d0bda0d50816e0effd9ec4558af41451416df29ad7c02f8c3aa860446be2768a8 SHA512 c58c7b3637eee34628e3a7076ff297987fb69714096ebeb5349ab93f231363384094a160f63332dfb8bf37fd39af511ea38e02535bf8f047b138d09fba6dbbaa
EBUILD python-3.10.13_p3.ebuild 13970 BLAKE2B 1d8fb86cb3e911b5af8b6f54bf92e5e861aa580faf58bb6cba1bfb046e59b9211518b58556afc8eb8bf02e4838a860575f93da4180a8faf939dfefbdd1243ef0 SHA512 ac3a50e33aeadd23942255729896a3d50a9211cb3d2bc77cf051a705679e9f629870649c84cc63fc183abd49248d7858ee920f5fbc976508e00971cb848a5fd1
-EBUILD python-3.11.7.ebuild 15146 BLAKE2B ec358f59fb1421d46023f4ceb591cccb94b083c2658ede4e9664196854b96ee8c04b804869611c3fd17717b6809de355b8a67d21a40fa4acf17ff94a2b7de94d SHA512 7709a3af6d2f46ed2de9035b967a991109319cfe00c705059b69482cb9d57c1d19637aca58dc1b7e39c9ace39509dc58b9ca5a7deac6147617093ca8ddf78d0b
-EBUILD python-3.11.8.ebuild 15151 BLAKE2B 64b5594a2712d38ff3eedec6bbd20fad66c099eb71fa8a1367f33a7e61a8dd59ce65689b6bc6566bcffe38c24c66cf77968724f42e543a4939237e9d6d97d3ca SHA512 c95f6a21e7c2921255035b49455e0cbe77b416d4115be938f152a19a2d14d2f97cd8f08ff56b6eb489fbab1c73e234aff646469332c3beea5107337396e86027
-EBUILD python-3.11.8_p1.ebuild 15083 BLAKE2B 55b795ffa2f49cce71ae355ea7de781a6cd5bedcfba31d01f9845bb756df806f9a86e676b1a5e4b30adbe162cae71ecf382228a35c9f7d9bbc3ffff6b37916bb SHA512 3e1a3455d348868a9adaf9b17a1f7f05755576467b23848f0cbf0dd494589f0e87fb4649b99ea4142aacb698b0fd401e7de0f37b6913753f322576d78e7a696e
-EBUILD python-3.12.1.ebuild 14734 BLAKE2B 7da66afef9bdf39e3c893007a26cf5aa3b5eb30eadd515120c6ec287cf2c9fb7bcaf8ccfc590d8123b57201d81eb10ba092e0208e10cff1c4ef6e46a4f0bfb9a SHA512 8ad2cc71f5262cfb3881ac4a14ee54210411db7f7ab1f8cf9b8190c34d23ef58fed13bfb66782d6a21a46d3dd258eae19bc4989a17a96e99dbb79d12afef3cf4
-EBUILD python-3.12.1_p1.ebuild 14711 BLAKE2B 5bcfb291af9543bf4295f2703baf9799c0931c762f7700657a4ffcf3a5bf43f548397f4a9560c870c136174c8a17d3b363301b8f85450f64d1b2048b5680e2df SHA512 5def4b1b1fe9e8b7806bed62cdad7342dce908e4a60a5d638c5e00c9ecd2ddb0747a0dc251ee8f6488f1c798859c84f90d904f854f9a7b1981d10a54cc3be6fb
-EBUILD python-3.12.2.ebuild 14712 BLAKE2B 9a6eb939edd6b9c47cb43959ecd25ba78c2fbbac75a8220053dffead140198e4b86aa5fb54c5cce295cf106e82c2a832337afc2866b161e0288fbe0a78f68ed7 SHA512 5d61f90ed75531c306a3d383130fabad60e7cb8f1254e374ea5d973693606201db870e067fd5bd3bdaf0231467571c3b413bdd611cb0e0e62abd4b9f460ba45f
+EBUILD python-3.11.8_p1.ebuild 15082 BLAKE2B cfd01e3f4efab96a388aadfc043622d7e6c980cf6c81c6c46b5137de7a71db598e8cf5059a956267d34cc8b8655b8ca9daf01854c378ce9c221bef7bb8ce05db SHA512 ec1f0e9e29bebafc0aaef7aafc4fa47806dd89fb65bce4433d869a85b7b20096378f16e87635b428b63a5fea143bb0dce484d05ae8055fbfdbbbd0fc216eeea9
EBUILD python-3.12.2_p1.ebuild 14643 BLAKE2B 94c2f27e69d029d9e8c15538891191b3794361a33b460d2179dac8ff95f22a078ff7e4e7f077f4eea30ee5166cbeb41efaf7669e38ac247672ec91b14fa199e5 SHA512 6a77a244a4567ff4c4c278c67fe46cfae941f240483df7f40535016589b0c5d63d2e24d0f3eab90287f970a0c1b7d9dad6a04b25f3207b96685d33eacf901890
-EBUILD python-3.13.0_alpha2.ebuild 14541 BLAKE2B 32a5aa431f3be31215db12aecb23738833119f3514c747db2178987f1105bcebfda720db9784e7878cef29da408254f3852b261564ae05986cf9a9b90f0feaed SHA512 1913a4316460cf1327a57bc8fbecfd85b149e31a9820916cb972f4917ec346df63686187c46d41136e93c49f57b6bc41ee4bb0fa8a5ae851941f8e5fee1be191
-EBUILD python-3.13.0_alpha3.ebuild 14538 BLAKE2B b88ab4f23764dea74f466fbde6bc2d7958ff5af38a437c84cba95531ef664b66758651964431bc3de7f43f648449508a2cf83d9b93a2ae0c247292309c6352c1 SHA512 9e450cb086cdedd99e2a196fd098f2b578e7631d598cfc4f9f60bc513c25a7179b85b2236f747c516727b30a0adf91aac548b76615fca56c690537f02776f009
-EBUILD python-3.13.0_alpha3_p1.ebuild 14477 BLAKE2B bca4a6b3a038a50ae7638777810b72968b42e562638abf32ca111ffe80709b68a63581067d0ef5e8c7dffa3ec30ef648283c9f3c10697643b1d3abc16eb78fd0 SHA512 0c09386612f3a4b72b8612a3b8235cfcc342e0c333f09429731d1dcb5e5c0ab33b246792cf5481333ee613424aac56c76bf66d69e2a0e0f3960a4979932dc9bd
EBUILD python-3.13.0_alpha4.ebuild 14735 BLAKE2B ccabfbe4848842ea2405b6830edadd9027f6c70369e697dc3fb1cfe986a8f1fe54aa4e1687d4c48415ecd758c1e68cc5a3a47cf2120730e1183aa2e76bd3952f SHA512 5d591ff8f2cb0b85f887774ff147040f32285298eb4edcd8e8616550a51e50de4cd0cad6db5e3ad1c7afecc8f2e6f8039fa8039df6ae45b43103bef4a2a7be6e
-EBUILD python-3.8.18.ebuild 12431 BLAKE2B 6e6ee2b5b18aedc0fecf01bb9ff589d7a971e938e0aec6d0289105ac69111bb94190b3901ed8f2d84f6d5248fa296208061eb988e81751a27378f5709b6c1eea SHA512 29e7b2c98056ce161a87de4e4132c660e3476e29d1becb73c580e0449697d22887f2df6d24f5abf6a9709a778ca6f14353d82446950d67a7086ae8f6bf2b4ab0
EBUILD python-3.8.18_p2.ebuild 12141 BLAKE2B 488d7578db16922771cf0ea0c96206fb4512f83d98b32fc2fe9b4304093a9d4bb37d75a8115937196986a28ae36e3119155f84b5626659185b162ad3d8974d01 SHA512 406a1c2f1001479c57c0788f5ac09132f677d41a69f0435b8af41d874e2a8bfb80d016c44848f1030cd28daf2c5da9b82bc70738eda30705bc416a84138345c8
-EBUILD python-3.9.18.ebuild 13914 BLAKE2B cec4f1f004a90c6991a5dd2d8f6835b32e059179a961e0cf10e1398d6fffd39fe4133e9973c82e40cf6e32dbdba0904f3da6705915b6b131fcb7b411824c84d6 SHA512 c8c38870d227d34e31bf36775fbb47cf9a05596dff7ce71bd6ac301aa603aa8fbd5db60fac66b683846a7da1eb1ff1e9568732a1027ffda596d4bf791cabd02a
EBUILD python-3.9.18_p2.ebuild 13561 BLAKE2B abe58e728a9103516a78b20af56780d6b01dca5fc11543ffbf66b80a540b5680f63572d1bf95083f7605ec3478150a4879dae262e9ffcc93176b29171f3b2d17 SHA512 91392113fe4e4482e7db20334af6e4ac258e2f42443de1f715376ac060f5be9bca76b50bd3a73cfcd3ac53063d344db7de7516e2d5d34c25ea817de252096d4f
MISC metadata.xml 1437 BLAKE2B 22f737ad283774c5ffc55173878bf07b6f89d91b0ebd9cf41c11e518b35461ebc9ecfc8017a519673698869450c1ebe55b5dc2577a8b03ea716d30b99ce21d3e SHA512 9f684412c916a3909bb7c2bbfeeb93c66e1de22d4313d657370162ab8b7438e6397bc7d31641d0bbb06d3373966fbbf7578dc0a30ed44558cb1b8a3bb5bfecec
diff --git a/dev-lang/python/python-3.10.13.ebuild b/dev-lang/python/python-3.10.13.ebuild
deleted file mode 100644
index d00f770b886d..000000000000
--- a/dev-lang/python/python-3.10.13.ebuild
+++ /dev/null
@@ -1,510 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit 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}_p2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +ncurses pgo +readline +sqlite +ssl test tk valgrind +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-lang/python-exec[python_targets_python3_10(-)]
- dev-libs/libffi:=
- 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? (
- !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
- )
- xml? ( <dev-libs/expat-2.6:= )
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- valgrind? ( dev-debug/valgrind )
- test? ( app-arch/xz-utils )
-"
-# 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
-}
-
-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 and bug #864911.
- 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.
- --without-lto
- --disable-optimizations
- )
-
- 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+=" _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+=" _ctypes _crypt" 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
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- append-flags -fwrapv
- filter-flags -malign-double
-
- # 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-ffi
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(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
- build_cbuild_python
- # Point the imminent CHOST build to the Python we just
- # built for CBUILD.
- export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
- 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- local test_opts=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" 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 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.11.7.ebuild b/dev-lang/python/python-3.11.7.ebuild
deleted file mode 100644
index a5f20c83a163..000000000000
--- a/dev-lang/python/python-3.11.7.ebuild
+++ /dev/null
@@ -1,538 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit 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}_p1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- 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? (
- !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? ( 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 )
-"
-if [[ ${PV} != *_alpha* ]]; then
- RDEPEND+="
- dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
- "
-fi
-
-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
-}
-
-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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- 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_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__GDBM_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__SQLITE3_STATE=disabled
- MODULE__HASHLIB_STATE=disabled
- MODULE__SSL_STATE=disabled
- MODULE__CURSES_STATE=disabled
- MODULE__CURSES_PANEL_STATE=disabled
- MODULE_READLINE_STATE=disabled
- MODULE__TKINTER_STATE=disabled
- MODULE_PYEXPAT_STATE=disabled
- MODULE_ZLIB_STATE=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 --with-build-python value
- # immediately.
- PYTHON_DISABLE_MODULES+=" _ctypes _crypt" 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-ffi
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(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
- 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
-
- 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
-
- # force-disable modules we don't want built
- local disable_modules=( NIS )
- use gdbm || disable_modules+=( _GDBM _DBM )
- use sqlite || disable_modules+=( _SQLITE3 )
- use ssl || disable_modules+=( _HASHLIB _SSL )
- use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
- use readline || disable_modules+=( READLINE )
- use tk || disable_modules+=( _TKINTER )
-
- local mod
- for mod in "${disable_modules[@]}"; do
- echo "MODULE_${mod}_STATE=disabled"
- done >> Makefile || die
-
- # 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
- export PYTHONSTRICTEXTENSIONBUILD=1
-
- # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
- # end up writing bytecode & violating sandbox.
- # bug #831897
- local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.11.8.ebuild b/dev-lang/python/python-3.11.8.ebuild
deleted file mode 100644
index 3526c356b750..000000000000
--- a/dev-lang/python/python-3.11.8.ebuild
+++ /dev/null
@@ -1,538 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- 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? (
- !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? ( 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 )
-"
-if [[ ${PV} != *_alpha* ]]; then
- RDEPEND+="
- dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
- "
-fi
-
-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
-}
-
-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
- # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
- # libdir correctly for cross.
- 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_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__GDBM_STATE=disabled
- MODULE__DBM_STATE=disabled
- MODULE__SQLITE3_STATE=disabled
- MODULE__HASHLIB_STATE=disabled
- MODULE__SSL_STATE=disabled
- MODULE__CURSES_STATE=disabled
- MODULE__CURSES_PANEL_STATE=disabled
- MODULE_READLINE_STATE=disabled
- MODULE__TKINTER_STATE=disabled
- MODULE_PYEXPAT_STATE=disabled
- MODULE_ZLIB_STATE=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 --with-build-python value
- # immediately.
- PYTHON_DISABLE_MODULES+=" _ctypes _crypt" 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-ffi
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(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
- 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
-
- 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
-
- # force-disable modules we don't want built
- local disable_modules=( NIS )
- use gdbm || disable_modules+=( _GDBM _DBM )
- use sqlite || disable_modules+=( _SQLITE3 )
- use ssl || disable_modules+=( _HASHLIB _SSL )
- use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
- use readline || disable_modules+=( READLINE )
- use tk || disable_modules+=( _TKINTER )
-
- local mod
- for mod in "${disable_modules[@]}"; do
- echo "MODULE_${mod}_STATE=disabled"
- done >> Makefile || die
-
- # 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
- export PYTHONSTRICTEXTENSIONBUILD=1
-
- # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
- # end up writing bytecode & violating sandbox.
- # bug #831897
- local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.11.8_p1.ebuild b/dev-lang/python/python-3.11.8_p1.ebuild
index d5a9dc5eaa12..a86fff509136 100644
--- a/dev-lang/python/python-3.11.8_p1.ebuild
+++ b/dev-lang/python/python-3.11.8_p1.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
bluetooth build debug +ensurepip examples gdbm libedit
+ncurses pgo +readline +sqlite +ssl test tk valgrind
diff --git a/dev-lang/python/python-3.12.1.ebuild b/dev-lang/python/python-3.12.1.ebuild
deleted file mode 100644
index f4902a2479fe..000000000000
--- a/dev-lang/python/python-3.12.1.ebuild
+++ /dev/null
@@ -1,533 +0,0 @@
-# Copyright 1999-2024 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 python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit lto
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils[extra-filters(+)]
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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() {
- local disable
- # 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
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- # PKG_CONFIG needed for cross.
- tc-export CXX PKG_CONFIG
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -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
-
- -x test_gdb
- -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
- )
-
- 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
- --with-system-expat
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(use_with lto)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- $(use_with valgrind)
- )
- # 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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.12.1_p1.ebuild b/dev-lang/python/python-3.12.1_p1.ebuild
deleted file mode 100644
index 2ccf8d09c699..000000000000
--- a/dev-lang/python/python-3.12.1_p1.ebuild
+++ /dev/null
@@ -1,536 +0,0 @@
-# Copyright 1999-2024 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 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%_p*}_p2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.12.2.ebuild b/dev-lang/python/python-3.12.2.ebuild
deleted file mode 100644
index 09feb0f52466..000000000000
--- a/dev-lang/python/python-3.12.2.ebuild
+++ /dev/null
@@ -1,536 +0,0 @@
-# Copyright 1999-2024 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 python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_alpha2.ebuild b/dev-lang/python/python-3.13.0_alpha2.ebuild
deleted file mode 100644
index 17306dbb0b69..000000000000
--- a/dev-lang/python/python-3.13.0_alpha2.ebuild
+++ /dev/null
@@ -1,534 +0,0 @@
-# Copyright 1999-2024 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 python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_alpha/a}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}_p1"
-
-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}"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addwrite "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
- # pydoc
- ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
- fi
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_alpha3.ebuild b/dev-lang/python/python-3.13.0_alpha3.ebuild
deleted file mode 100644
index 4fdd3eb970cc..000000000000
--- a/dev-lang/python/python-3.13.0_alpha3.ebuild
+++ /dev/null
@@ -1,534 +0,0 @@
-# Copyright 1999-2024 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 python-utils-r1 toolchain-funcs 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.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- app-crypt/libb2
- <dev-libs/expat-2.6:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addwrite "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
- # pydoc
- ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
- fi
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.13.0_alpha3_p1.ebuild b/dev-lang/python/python-3.13.0_alpha3_p1.ebuild
deleted file mode 100644
index 8354775539d8..000000000000
--- a/dev-lang/python/python-3.13.0_alpha3_p1.ebuild
+++ /dev/null
@@ -1,533 +0,0 @@
-# Copyright 1999-2024 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 python-utils-r1 toolchain-funcs 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.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm libedit
- +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:=
- app-crypt/libb2
- >=dev-libs/expat-2.1:=
- dev-libs/libffi:=
- dev-python/gentoo-common
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- 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? (
- app-arch/xz-utils
- 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
- 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
-
-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.
- # 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
-
- 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 _crypt
- 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
-
- 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
-
- -x test_gdb
- -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
- )
-
- 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-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addwrite "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- # 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=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite "/usr/lib/python${PYVER}/site-packages"
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${ret} -eq 0 ]] || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- # the Makefile rules are broken
- # https://github.com/python/cpython/issues/100221
- mkdir -p "${libdir}"/lib-dynload || die
-
- # -j1 hack for now for bug #843458
- emake -j1 DESTDIR="${D}" 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 ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- 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,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
- # pydoc
- ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
- fi
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 3.11.0_beta4-r2; then
- ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
- ewarn "installed previously are no longer valid and will be regenerated"
- ewarn "(or ignored) on the next import. This may cause sandbox failures"
- ewarn "when installing some packages and checksum mismatches when removing"
- ewarn "old versions. To actively prevent this, rebuild all packages"
- ewarn "installing Python 3.11 modules, e.g. using:"
- ewarn
- ewarn " emerge -1v /usr/lib/python3.11/site-packages"
- fi
- done
-}
diff --git a/dev-lang/python/python-3.8.18.ebuild b/dev-lang/python/python-3.8.18.ebuild
deleted file mode 100644
index f70359ce0ac7..000000000000
--- a/dev-lang/python/python-3.8.18.ebuild
+++ /dev/null
@@ -1,437 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic multiprocessing pax-utils
-inherit 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}_p1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm +ncurses pgo
- +readline +sqlite +ssl test tk valgrind wininst +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- >=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
- )
- xml? ( <dev-libs/expat-2.6:= )
-"
-# 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
-
-QA_PKGCONFIG_VERSION=${PYVER}
-# false positives -- functions specific to *BSD
-QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
-
-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
-
- if ! use wininst; then
- rm Lib/distutils/command/wininst*.exe || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- # disable automagic bluetooth headers detection
- if ! use bluetooth; then
- local -x ac_cv_header_bluetooth_bluetooth_h=no
- fi
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- append-flags -fwrapv
-
- filter-flags -malign-double
-
- # 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
-
- 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-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with debug assertions)
- $(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
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- local test_opts=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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
-
- 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.18.ebuild b/dev-lang/python/python-3.9.18.ebuild
deleted file mode 100644
index 1d35ed1759fd..000000000000
--- a/dev-lang/python/python-3.9.18.ebuild
+++ /dev/null
@@ -1,496 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit 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}_p1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="
- bluetooth build debug +ensurepip examples gdbm +ncurses pgo
- +readline +sqlite +ssl test tk valgrind +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-# <expat-2.6: https://github.com/python/cpython/issues/115133
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-libs/libffi:=
- 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
- )
- xml? ( <dev-libs/expat-2.6:= )
-"
-# 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"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- append-flags -fwrapv
- filter-flags -malign-double
-
- # 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
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -x test_dtrace
- -u-network
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- -x test_asyncio
- -x test_httpservers
- -x test_logging
- -x test_multiprocessing_fork
- -x test_socket
- -x test_xmlrpc
-
- # Hangs (actually runs indefinitely executing itself w/ many cpython builds)
- # bug #900429
- -x test_tools
- )
-
- 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-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}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict "/usr/lib/python${PYVER}/site-packages"
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- local test_opts=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # workaround docutils breaking tests
- cat > Lib/docutils.py <<-EOF || die
- raise ImportError("Thou shalt not import!")
- EOF
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
- local ret=${?}
-
- rm Lib/docutils.py || die
-
- [[ ${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/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 226e4d10f1f9..a8ecda89c9a6 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -159,14 +159,44 @@ DIST rust-1.75.0-x86_64-unknown-linux-gnu.tar.xz 156249584 BLAKE2B e6ac90854f589
DIST rust-1.75.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6614cb3ef782c917e8f7fdc990c5b82e8fcffa71e075f10f9726f405ff566fd963bec64cde4dd7252d9d78e09a184b8ba22d15cc87662ad987cdd37c881d8288 SHA512 bfaeef4cd7643879991955fd33f4cdc4c34afb1202cb77c0736434fb735bd215d18d1a11c25f04a7f2514640858a36832e5805a5f85e92d8b7076aa18607ffc3
DIST rust-1.75.0-x86_64-unknown-linux-musl.tar.xz 234151836 BLAKE2B 9461afbdf26dea19e118b35ea7ef1ee60c22f601501ae6a08950658598a74a6b3179cbdfd9dc4748a0c2485af721b371e5fb523f27e7d7d702f94b532a70437f SHA512 7d650a29c5d14023a3d7d606b7bac4be6ef7988a82525f02d7af9cf3895bb88284442b8042d27be69689f4bddaa5c5370ef7609d18849986860eafcdf89d2d69
DIST rust-1.75.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B c222d0989518602c0ecde9d21dbca97e9e60d81083804d1d8b2c6bffc8114af78570fd384eb58e5dba1bf249b99300e7f3f4067c1a66c0cd9fac60443f56f751 SHA512 6f78913e34402cedb37f4a54491c65a8bfe79e535e4e40516f2381bc27783cc7655e9252e7701813578c8ffcaf6b301e61ad32917a475d4388fa472733b21b12
+DIST rust-1.76.0-aarch64-unknown-linux-gnu.tar.xz 217392212 BLAKE2B aa587d69b5acc389a8d1431875f10f6261bbedb259a9009092e663a345fb0ac0cf3ad3459ca549a496853b8d760c7fc56b797ee269bcd15d54bc735cd1100fbf SHA512 ad95566ca7597ef64a03f614cc20b9c8d9b2fe67f33141b817973fa160c2be978511509fee79bdbfc74c50076a607e8543ad5bb4b56723704df27b5573b8d606
+DIST rust-1.76.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 86834b999cb0ad9de02a32a79f801d28268c986c830ad3f16274cd4c404a4305267c90b677f7a8637f2de08c766ad3555945f77da181906358e3d51b35e258b1 SHA512 79c1b258267d6feaecba18648a7eb620a570c99fb75e422d0a5b946a66f3a5bf6d2b41dca89b4ae79feed704d498674f36de368e4b228b1e38e3499ac8cd4f21
+DIST rust-1.76.0-aarch64-unknown-linux-musl.tar.xz 197852572 BLAKE2B 93985909e049957f80d4a14842c85dd14e5eec6d74e4e439479f353b44b123947c782856de86555262829d755a344ad01a94c41e8852818e727fba74620e1d68 SHA512 1f36245932d3b9bab0b99604085d886d9fd2e575e896e1c28b1771ae916466c060f4d70486e47200d58947147eb5571b922e175b1a450a36388c3c95e6537655
+DIST rust-1.76.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 50326fb881308300aa01f3783ec6856b7ab9ef80e986cc4e64fc5d6d0bcd246add9330ee5459a3ab5c0bd417d75c2b9486bdbdc19edf5a899dfd9e1ecf31028e SHA512 0e775d73bee5cfc70035db1d0fc4506d022d593cf847e01c3f09ddc48a02c4eb24eabd42391c3241cc05ca49b15e38eea0f56786a4f800df724753ee7c557ab4
+DIST rust-1.76.0-arm-unknown-linux-gnueabi.tar.xz 181085440 BLAKE2B 024b82d285208635dda1c6dd66f634d1b921657d3921c402b7adeb7ac9b495628c31b248ed480d4e52e55293815a686f9ee52a84c2407763de5b961962ca9cc4 SHA512 c6840b3368bed511976c32dd3b22a8d1341c002843958a8cc8666c4f19547eb71d8a90946c1c075cf8af50187c1f14fcad2df488d186941d00cfd6b638b27dde
+DIST rust-1.76.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 71f2d3a9de1343eb96a75a7eec3d8d4ca9a02e7ed01a1cd2f4f352855dc6d58cae5ffbd70944d7d1e0c7559c74f8d8a25f3c1c3a14c2f00e5797d0f142b25a12 SHA512 b3dcd4b3e2fb5e5039b7fe654421f7a2f72ec5ebfa841589be715bf0a8ff4ff0a3c46a25d0978b4206678a2f2410c5ca69146f6e3eaa4b02a6231589bb099ed7
+DIST rust-1.76.0-arm-unknown-linux-gnueabihf.tar.xz 181168340 BLAKE2B 8d48ed7c79f87aeb91676c3f90877fbd396341130276e27adf42a0a0e5d3f7ded34a271cca34f1c0fa7f37d5666ba3f2f16eeccd91aa37859adc34077dd2a000 SHA512 6beba28be79a563eab4567ca33dbcaa7cba5f4389fa480ef4e16e528fcdc1ed6a2c7ccce1ee527afbaaa43545bfd80fa47ccd3ca2ea4c38ca2b397bdbee47a3a
+DIST rust-1.76.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 534e5f05848e5f6c05f2de69e0c974f5e4860c9ab4501491a651f5d2200aff69c9ece29010aa732d0eac3173b1f148afc3096b5f05146f7be7df14e5d9ecc44f SHA512 fba15a41ffc9202ae27a6c2884bac7367219fc5b1892287a599a1c8d2251bbe763df07da4b9719d73bb6d93fbac3dd1b8c4d8af75acb942200c9d7b1050be009
+DIST rust-1.76.0-armv7-unknown-linux-gnueabihf.tar.xz 184387332 BLAKE2B 7b9b03332f19859d43629d4e65815619fab1845c129a254643f164c025c5d574e71f6001899deec470e93c97fa6ac8c9d71cde5320b6f4cd822c2ab113e4b827 SHA512 3fbb7300e4dbe855207671ad309b71cdbad9cdc41b1c8144734f9de85c904918b137a2fe7284e9046f00526c7fce8b68dcbb40ab8d6543ef31ca0bbbfb396431
+DIST rust-1.76.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 050c4eead78d8161d46acd4ae47b69612706d8053bdfb5e4cfc0fe20ccbf4544643c1850f14cf93f7d17602849770857551b64c7f8f8db45594b7dbe267ecb41 SHA512 32e72430c4c9a5970994bcc6034d3be1a2a915adc6aa45a0c1cba403f6c44206af3e024afc42fe39a8501322fe46deea9921c9760f8e1f65422960baa88abafb
+DIST rust-1.76.0-i686-unknown-linux-gnu.tar.xz 211679020 BLAKE2B 06c9e52a1b6c802be3c4b0cb424dcf243f08fd5345e4b3977cca82093839cec885f6f491179e9e1f8e64c971bd7bfdbb6c551e463874b44c8b89ea649e8c9f40 SHA512 64605e0c981df2c805ba8cb31a89fabd00332faeea6d04ac57cb4898b7cedc66e4043ca3eeca799a204ffb93ecfa770150f09b99da3a7dc913d4e97331554e8f
+DIST rust-1.76.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 72d87215c5ddf03ed0cab99adb97b6f15fa8048fca68b44bdb77cd0df09cb1784cecb80f6618ad43d1b6f41a5848ddc84126ad576ff1ff08a3928cec9811a4d2 SHA512 a6d52e452a7afabb329b75155db9da91d51f809e913b19cde1c51c4d0f79831e962e698cf8e86079649e31a662d13743da23b13d16df6530427eec3e4269be7a
+DIST rust-1.76.0-loongarch64-unknown-linux-gnu.tar.xz 162940496 BLAKE2B 4c3b66199339262ea93de6785980795e493ce4e7de9d7ddf3e7c9fe38ad404f980abf408e979780905c149bb3de65d26cdc654f8b3ad0823a3d5067809fc4944 SHA512 64fac030d7edf9677757b883d1664b7e06ab9d5007d87a78d449acac359d7d6ba694bf4a6635c8bca51f274f842dad0612377aef655bb430f6290459343aa6e2
+DIST rust-1.76.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f52e951657308df5a944d35e2f9c19278f6f250474c070593f3b2072f372b8f6c32d379d144c8ae5a3ee31f7de21c00ec1da097f2c8c9a54759d9440ec5eb822 SHA512 d5ed37fd844715daa5d9901b388cbf39854fce3408c1d572f18e83d6207a20345e5e2c2b49b9c1523097245c73e1a448df8ecef2ae5b344e57bbe646b1266af6
+DIST rust-1.76.0-powerpc-unknown-linux-gnu.tar.xz 176795548 BLAKE2B 77e102e4d3821557895f3e24059b65847dc46ce3b81ce73f15063e9a6d383ba12f4c905fcbc85b79c39f00e9cb011fd2831737bb3ee9bb53103b4a7361aa312b SHA512 05ccb4294d788e948b69c9e38abf28454604f6b5bdd04704d6dd5231445e2f791cb18ea5149b4324a152ce9ae356b55036d2f74a5d9dc3aaaa05f5c7e4e69e1f
+DIST rust-1.76.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6d2fe65e5840cd7ddbf1b18ef89cd337b16e3424b6e20d21e199b274fbbc4d9fd88406c2a119d5b0bd48fc9e47145dade3f37bbf99faff68905e57bd41937c1a SHA512 a1e45e41f901513e97956d336910927d7357cb8c2362be69989528fa5ae7087da409853adfd86354b4b7faec3e8542e400838df1d195843c030d9c6fffed7557
+DIST rust-1.76.0-powerpc64-unknown-linux-gnu.tar.xz 177409476 BLAKE2B 7c9829c8e8ecf2a162663a2c382bff49739ca2bb02b785ffdbcf632edf55a3ea37ea3be09298b0a0a984512aef290123d3b0ca9ae0d088a2a816f38778aec79b SHA512 1f29f66d8e64d4c191bc90b05d791f08317aeec042ced815fd353beef6a7a4f6d5f91755481114e707728bd9a02ed9094b2a75d91d61ddb12748d9d40b211e17
+DIST rust-1.76.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3087eda9eec862455906510d38f43b81644243ff7afbd5ddf221cfb2c12408b8ac9a0bd2a269a9499776e04b56b3d52c890e056af544aa56cc06b399614f83b5 SHA512 8a90d5acea677a02b2c5eec93157ee2c47bab895e16408123a0e2c3d44b0f9a9d95fe56dfa903fa1cd2fd298f17050110793e94d60510283c8e3cc120770ce9d
+DIST rust-1.76.0-powerpc64le-unknown-linux-gnu.tar.xz 187967776 BLAKE2B 0ffbbb4e4ca44285d8387fa66c58df72971bba6410faa96f6cfd80c223f4996285fac27672104f25ae2a20cb81a0ec6be0bea1d6893d95eab0d017fbae896509 SHA512 eb8be647651b02f1e9287d075d76c288e34e66514305a68ac118ef41dc14a16e5e1a3f2c5cb8512c4565a2eef3e5063dc4eb11272fa91c01d8313a323c20755c
+DIST rust-1.76.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5f41ec8841f4004df7b65b50a451027489e303bb2863ece09a14900a229d3180ba23bbf5c770c2939399eb157e97b4a08ccc0632a66eca5ca5cf4c29a1523186 SHA512 929e415a66d8777e2509c25a780b4963b8991adb905a9841dca19a5412a5f86326fd73c43f79c304a48a2898f863b76024b0144109343933a0c5f3f1fb8ed287
+DIST rust-1.76.0-riscv64gc-unknown-linux-gnu.tar.xz 183161264 BLAKE2B 9a0b579bc076b8cc55414c95456caa2146fd0597091d2332c1033d03ac7495684b7b7989ec6a8a108953c681ed88d4b62a9a7fbb39c0300128189a91b035d2df SHA512 29fe21df7b99b9a9483af6f2370e2b5a403c12aee94a1285bfb2d2efa631f9d284c70caf863247843ab1418bc78a26c6f6d5de4e8606456a9ebd265ea3bb504f
+DIST rust-1.76.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7a380f9d2f2f7083afe7abcd81a15d34df703f076c2c842fee2433c6c40d629bc5b0818fc186b462d653aafeb1fe767de3c01b7a014ec3220d77725bf1074fed SHA512 53e4942d74f42f4a7c35ef4a33833d23a955af157d80588c277f32f30cae63e8543fd4ffb569693ad00a6a20ebdb2d8422ca078ebc85bbf98814815e32791894
+DIST rust-1.76.0-s390x-unknown-linux-gnu.tar.xz 202133724 BLAKE2B d6d68392b9b9b69914cb6986cc1501246e0461a6eb5d18eb0ffe71e0a2a7be20d27e90b117c520723254b4709d08c4fb33d145e5ab559802ba6592dfabf81317 SHA512 fa74e1605eea945445f8ea621a667d50907d8b3ceed700e6b05dbcbf58dc7fec62c1e50247ad9688a5b9c5b78c4a140d93557d494260f8a21b1eb25baa315bec
+DIST rust-1.76.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 574df1144e6e79710a73962511fc73215b3a4d1c3b6623190180c7ec13aa8295e13329c4bc66710013f874054dd756e02bfb2c5f6ce1fc8a07ae0717f958b244 SHA512 17938b3f4671127c9c46a5c51703d430938b73b2e30cd497cbc159ed372889af42e651479d1ca69c000974e21d4d34cfb9e3cf28b79ec8e35540ac319e1b8b9d
+DIST rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz 159385660 BLAKE2B 0846999358aba95a2bebd2ff35ccc9e1954ff4fca66227d1c8c1985c08e91159f2acaa1357544b81e92065a2f9ddf6aee41a2d9199d71d8de1655f9b16ba2ed3 SHA512 1cf0ffb44aee4da9768e27daf5ab3b20e67fc9e8eba5a1718b700c85ecdb61cdef129cb571633294f9c826b6e7bd2958086eec371922ca31af332266d3632609
+DIST rust-1.76.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 88e6b124812b409372ee05e2872cb4dfacbc638f8e3b4fb0d5fa4ea63f4594333a9788732502f8bd41e34b5cbc404d7ac08e7690d095a6c37c80b0043dd2be88 SHA512 f7ddca81da468d5617f48240b6d3e8d7d09336ac58f515acd3a20f2d315468ba1d53508dd3264a088ffc0141cb3fbcd8d3c17379f9628270d39c7d44f7727291
+DIST rust-1.76.0-x86_64-unknown-linux-musl.tar.xz 237333892 BLAKE2B e95b92c68e3c2df49fa0d5d84e35f6575fb80571db290b5969441cc09b6c07dee6b2b887f41a2b1ff1e3c099cda2ce2a4a8c05afbcf9f4dc8acbaed5245b69e4 SHA512 04bbbb9a6891c3bb7a20845010029e6ca979548ff70324c08d3162ebc1fa3a84e8c7e2d453495edd34aba19b7a685f048d5047993103bbf221c88ea36350370c
+DIST rust-1.76.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B cd4334fecc17cf03b7333659393004fed4bb895f9b75f93520d1c3e3ee0ce4fcd17d75d748c4a35d31984215c7aec8904ebe3a4ad8bafcd625aef30688a473f7 SHA512 a458372b41c2833bdbd3d6678c35fc23397817b406c409d1ba5e19b4c6246072afff3f938f111382de56f7ff57e660c3eaf3fea0e54871d9af50b52a54f39e41
DIST rust-src-1.71.0.tar.xz 2460128 BLAKE2B 3ab6c6cb76a7e18eb0ba085c45f8b1a8bba16e2569962c27187bb415c54d3c5c1032ce4552c52f93bd4ec2512634d8899fd35fbf1a035298a9b621b5af125971 SHA512 fd59a1ced7e950fa14fd7ec9c978043b99e678bda54338f60faaacced36110630385a2bb62af19670ef27db1144810ff60b03dde542273557473b9bb521bcf49
DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d
DIST rust-src-1.73.0.tar.xz 2512888 BLAKE2B 367b68ec0775f49844408d602164634a0bd526dfe1e469b1c8ba9ae5604cbbff2566eb770b7bfb81b2dae892ed1ae16b7441e438726198610ce181c98540955e SHA512 49f493ffd119a0b8b9f7b7f7e049543787eaf96d9beb272d46f2758a35fd648f6523c2edb28864a33fc66337aa07e80a6464ec806307da441a899be4f71bb554
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
+DIST rust-src-1.76.0.tar.xz 2590884 BLAKE2B d1a6215dab34d7b10c3177d2b248f997d3a846388f3442567572880aa5c5bc51b56398f5d4dc32727cee7c9dbef494430d6534a76b66c4ae5ac4fed07266644d SHA512 39d2fe58fae8c8c5a6cb3fb1ef2a1c7548c018fef6ccea531659fdfecd68a4aa77125299d2cbe5b58e500337b4d074928318fa9ebce358af500d0ef27260e3ca
EBUILD rust-bin-1.71.0.ebuild 6953 BLAKE2B 29cedf55007a31f3678c4588f5a0fd0149c9d2c895ca1ed468521b6fc9482e9fc4044845d4fc2605085af6b49cd0454da24c1b1955180e46b93065ca7d4a1b9d SHA512 98b6fd67f46aa885e1d1faa45450f11c6f8ad0cc99cb6c5e6c728bafdb4e012ef3bacaae2902593f4a0bef1ea010029a070d232139d837f97399dba109c468ae
EBUILD rust-bin-1.71.1.ebuild 6946 BLAKE2B 4451a141a5857f1a479ab13283a0b03f722dae79a228ad56364fe957cf22f0d3db540f793f772bd10d89d02ee9014027aa51cae457c2ff0fc15f43372d198902 SHA512 eb710d1355f7985883061aa401d249b03c9011d9a0eca244907180e17f50fea33c9f73ee2bd5ba36259559cc9f84a11d7e24ed8ea76aec1a1a3a4b31fdc209b7
EBUILD rust-bin-1.73.0.ebuild 7296 BLAKE2B 8d2e2ee3a6b077039a9656b6bf7c0529ecd52e37ab48bc37f2ecf3f3c05155f9b1732a289cf4540f96dfab423cbb3ffdb6029a2bc1db10fa46506e8ecc80f4aa SHA512 1f192b60e131d2d2eaf7490b8076001dc02e30d4f27890c5776f42cdcdd7c5d070c378384a72ad53dd7f9982dc97401449b66b3f577eadceaf1f478486dd6bf9
EBUILD rust-bin-1.74.1.ebuild 7289 BLAKE2B dc5e461c6f7e28b7e5e1bcee82a52799ea7e66e0699497aab5c8cc81846e4c2ad70ffb4c8e1970e26e90d933a5edffc4c684f8f43894c63ad60ed0ab8a07dc40 SHA512 873ee21a288d9aceb47e57f46a3ed3b21f4f82640650b387cddc7bb75788f96c909e98afbf03bf28545a4126f933f14b3ea29316f6b9e0601f9fbc42b56b4660
EBUILD rust-bin-1.75.0.ebuild 7298 BLAKE2B 51c8b35c71521370dbb127d759d36300d6601c17fb12f40c76570e6f4eff10c00ca09e2bf99c4fc4c17c494f2d3e2e04c416cb48622bc144552d86a036de64e5 SHA512 18dd9119f45f218ed154cdcd4c13ea383688366840f9fab31ec86d424eb1adf7a43ff59cf1777105cc87aa46f61f9e18d480d3e63f072a76bca5b645f29f6b31
-MISC metadata.xml 936 BLAKE2B b9e696066b04cf4fc09dbf3ba0fdae342b89c675a932416ad4ddca46f9477566b4577eb55cf1804faffdef13ec438cbbe3932c6337205e22e428cdc6bb1b76f3 SHA512 5a1ae119e87ae1e09209bce329b3e72d71ee5358110d644022fc5fc3e27c298ca92b0d44221c8abad817cef9cd9423f1be92e900e1a2008d30ff7ab7db31d456
+EBUILD rust-bin-1.76.0.ebuild 7496 BLAKE2B 7aeb5e73e7b18a70ce12034c4f6b49aa8ab17a006455ae764951edf3fb30b5083983dc55f5f1c3a8d94ca5490f5661ae27a548a66faa9baa96c5e82c509424ad SHA512 0ac1ea0c60ac8385a93130ba716a27c736520c473f4053c4823a8f707b7a5ed2460b01e0800b99014662279b18c361cf010f29cda40b193a98f76394837bff9f
+MISC metadata.xml 1094 BLAKE2B 90311afd2945fd5c55010ea84467761086eb5bc7003f38e868a025f346a615d081097acfb8eb58c6c37e8fb37f28c371b261d761194dd50ea15b3181214a0ffc SHA512 2eaf6a65b57ab7f13c58a6818959f95262b917f88749c808c7dd4b2d8c6a843c2b8331aed0b62b6dd7fc5e261c9fe2167fd6ea028d577b79974d8742627588ad
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
index 9394f9a99c4e..91f4d5850916 100644
--- a/dev-lang/rust-bin/metadata.xml
+++ b/dev-lang/rust-bin/metadata.xml
@@ -15,6 +15,7 @@
</maintainer>
<use>
<flag name="clippy">Install clippy, Rust code linter</flag>
+ <flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
<flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (language server)</flag>
<flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
diff --git a/dev-lang/rust-bin/rust-bin-1.76.0.ebuild b/dev-lang/rust-bin/rust-bin-1.76.0.ebuild
new file mode 100644
index 000000000000..cf893ca4fc23
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.76.0.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal
+
+MY_P="rust-${PV}"
+# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src"
+MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2024-02-08/rust-src-${PV}.tar.xz"
+GENTOO_BIN_BASEURI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}" # omit leading slash
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="$(rust_all_arch_uris ${MY_P})
+ rust-src? ( ${MY_SRC_URI} )
+"
+# Keep this separate to allow easy commenting out if not yet built
+#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) "
+#SRC_URI+=" mips? (
+# abi_mips_o32? (
+# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz )
+# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz )
+# )
+# abi_mips_n64? (
+# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz )
+# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz )
+# )
+#)"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT="stable"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86"
+IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix profiler rust-analyzer rust-src rustfmt"
+
+DEPEND=""
+
+RDEPEND="
+ >=app-eselect/eselect-rust-20190311
+ dev-libs/openssl
+ sys-apps/lsb-release
+ sys-devel/gcc:*
+"
+
+BDEPEND="
+ prefix? ( dev-util/patchelf )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+# stripping rust may break it (at least on x86_64)
+# https://github.com/rust-lang/rust/issues/112286
+RESTRICT="strip"
+
+QA_PREBUILT="
+ opt/${P}/bin/.*
+ opt/${P}/lib/.*.so
+ opt/${P}/libexec/.*
+ opt/${P}/lib/rustlib/.*/bin/.*
+ opt/${P}/lib/rustlib/.*/lib/.*
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
+
+pkg_pretend() {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ # sadly rust-src tarball does not have corresponding .asc file
+ # so do partial verification
+ if use verify-sig; then
+ for f in ${A}; do
+ if [[ -f ${DISTDIR}/${f}.asc ]]; then
+ verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
+ fi
+ done
+ fi
+
+ default_src_unpack
+
+ mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
+}
+
+patchelf_for_bin() {
+ local filetype=$(file -b ${1})
+ if [[ ${filetype} == *ELF*interpreter* ]]; then
+ einfo "${1}'s interpreter changed"
+ patchelf ${1} --set-interpreter ${2} || die
+ elif [[ ${filetype} == *script* ]]; then
+ hprefixify ${1}
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+
+ # start native abi install
+ pushd "${S}" >/dev/null || die
+ local analysis std
+ analysis="$(grep 'analysis' ./components)"
+ std="$(grep 'std' ./components)"
+ local components="rustc,cargo,${std}"
+ use doc && components="${components},rust-docs"
+ use clippy && components="${components},clippy-preview"
+ use profiler && components="${components},rust-demangler-preview"
+ use rustfmt && components="${components},rustfmt-preview"
+ use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}"
+ # Rust component 'rust-src' is extracted from separate archive
+ if use rust-src; then
+ einfo "Combining rust and rust-src installers"
+ mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die
+ echo rust-src >> ./components || die
+ components="${components},rust-src"
+ fi
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${ED}/opt/${P}" \
+ --mandir="${ED}/opt/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ if use prefix; then
+ local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
+ ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin"
+ find "${ED}/opt/${P}/bin" -type f -print0 | \
+ while IFS= read -r -d '' filename; do
+ patchelf_for_bin ${filename} ${interpreter} \; || die
+ done
+ eend $?
+ fi
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
+ local ver_i="${i}-bin-${PV}"
+ ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die
+ dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}"
+ dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}"
+ dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}"
+ dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}"
+
+ # make all capital underscored variable
+ local CARGO_TRIPLET="$(rust_abi)"
+ CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
+ CARGO_TRIPLET="${CARGO_TRIPLET^^}"
+ cat <<-_EOF_ > "${T}/50${P}"
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"")
+ _EOF_
+ doenvd "${T}/50${P}"
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+ popd >/dev/null || die
+ #end native abi install
+
+ else
+ local rust_target
+ rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+ dodir "/opt/${P}/lib/rustlib"
+ cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
+ "${ED}/opt/${P}/lib/rustlib" || die
+ fi
+
+ # BUG: installs x86_64 binary on other arches
+ rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}."
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index b70a2976f49f..46c86d63d9a8 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -8,6 +8,7 @@ AUX 1.72.0-bump-libc-deps-to-0.2.146.patch 5106 BLAKE2B aa3a9921c16d8ef4010d930a
AUX 1.74.1-cross-compile-libz.patch 720 BLAKE2B 60f7e0ed095546f6f1b0566bc97d6d550f129000565dd6414a0bdd58b5b9c35f390784f71f02444132f2a507b25f874dcb8f5a684e003083bd6e8f274426859a SHA512 fccbf1772d62b1217625b576828051be7cadb03c96ccc753abd15a51979c807b7b464220973bdc765ede3adf7469fafe1db88228a70e937a623240d36e99e122
AUX 1.75.0-handle-vendored-sources.patch 1786 BLAKE2B 3f6ebee13a1849f41f2dc87930bd4019fb6f0379a342065efb29071299ad324f37062d123de8aaf06c231737cc41ee7eb830e049e2657f328c9176643203ecab SHA512 827855a22a8bffa9a9b3b417f8989e19b9d186bbbde4c09222b8738a403818d5b29a9a2ffb155491053d41ece392f491bc8c6343b4980051aee471da4d4b028e
AUX 1.75.0-musl-dynamic-linking.patch 639 BLAKE2B 187634bfa7484bbe7235293f927868c264bd3bc7835e4508a520dd68cb0dde23d5bd6e49f6ff6ea84a8cbe64fe0b4997dd5c5e647adfe7bc5d7e218dba3a8b9d SHA512 9b82dfcadc844358d9436debab295020f7b40dff0b3b00e6988602c66c1b75008e4ecdf16acd9740b78a5d698d0ed9a58febcdb2c58a4eeedd7cef6c6da1f911
+AUX 1.76.0-loong-code-model.patch 3139 BLAKE2B 1d7bc9dbcf2c30f0ff2ffcbe64f554a2a457314434eec799a89bc1af5833b4b4a3b0b1a81bac2a164d028bf9630a048860c002f4ea2e7022db55c1c45564cfad SHA512 f8c6db360951fe5e6fa10e37740d3cea074b8a7d8112ca0baf0803cea21ec3dcc3ab0177bebdb3eca12438d9a126561799b70d7c0e73fb618de75b200b32b5f6
DIST rust-1.70.0-aarch64-unknown-linux-gnu.tar.xz 212261108 BLAKE2B 56e15d01ea0e84c51ca3d4fc292c124536472e9c3e6d9ae13ab524e520865117b36621eca5072b961831ee6ad3077abd84afa9e092483095234b7ab2ddcae769 SHA512 d64eb19417a03452f591bb779042b2b3ff16d2ac48a9a74d293bc7265980280801784f92cdd0ae0dbc21743433388149557da7642871c72f3bb4b3061cf7eeba
DIST rust-1.70.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 435383da02632d404ce95ecfc0b0690f18447f22cd82e67cd08e6e8aab072539b33a49c2712bdc35f34a811f8e66bda6bcf9505b41dcdaf4cc66e358df9d7f02 SHA512 634c35b52d85c524a954d0663b6f1507c5aec826768c1a51394bf72bae585afadd3d3af985a9d165a65d178e04813fd592a78d058ed1400bb0fc43b0a1614a27
DIST rust-1.70.0-aarch64-unknown-linux-musl.tar.xz 195626092 BLAKE2B df5ca11b64513c86dbcab93bbc5eee37a1f2c6307ca479c07ef62d683ec1b1f56bd596284b11695d80c8483ba5ffaacb0bf060d7618f5e79f3957bfe8bae042b SHA512 5bcc47e2e791603b419c2d1f3503a60cc9a4a7351d3e8a61e6f3823c53195f58795cfcdc56c0c2011ae40a21ec7819d7dad32f5f9981f3d39e5f28ba85083d07
@@ -126,6 +127,34 @@ DIST rust-1.74.0-x86_64-unknown-linux-gnu.tar.xz 155920616 BLAKE2B 6213da724e505
DIST rust-1.74.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9d81f9c2861963a34b0bf9bb15a584db502d388b15f73ce98f78cae6bea0357403d9bd0e6f8ea427a9f4db5946ba7dbb4242e7fb4400b561b7431235f0dbe2d5 SHA512 e1e5e3850715379d30c557791a4eeba2bea090ac85e09a982579a703b2582eddfbc060e21420f418cb492e8d4abe87d5bd81b5acf6ee8bd17b80bb6e0f65b721
DIST rust-1.74.0-x86_64-unknown-linux-musl.tar.xz 235589268 BLAKE2B d695695ebbb3bf0dea28b9d337f82d5828e6ee70cf7220c849a6008b32f2b590ff57ee35efd58d9a38cd17e0f77ac1187765e8fd6470e0ee2c6cf75f3e3f1489 SHA512 3a8d4cb87d1295b07f0ed48f6e01e69801be3c93744948ef0145217b0cb17581c11c618a07b72edb0945c2ffbe85c59ec1cfd99ef6a60c2e96486f9d5d04d38a
DIST rust-1.74.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 0ba1390f67b88fc694df26df22c99ae40f56ccdffb479d9228a17a153de965f8c31dfb4d2c65dad4819d42a0b66b96ff9d3e2c404848dd91141220fdce40710f SHA512 efc779bd0e6fb41297a67efdf731abe3857dace889be284d8ac1e6c239a35749185ad5ac3b82c3b2e55edab3f0e51754c8e53e07d207cf8b4b68ede20cdb8591
+DIST rust-1.75.0-aarch64-unknown-linux-gnu.tar.xz 215543948 BLAKE2B 6d5de2260e4720275bc8c0ce23865840886e27a3cc539ff90c7b8c3a9c04368f2c2a2955dd7c3fe2fe5471492a7ecdf4c2e5a749789a059ad8178a0d70dc32f1 SHA512 7ccd4d605c97cc5a7dfc443ecaee23b4d7c58b0e9673ebd0f9174a4a123639213eb85ed25f19479ea6a818859190e673e0479ee80235a7e35a2d971a636872be
+DIST rust-1.75.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ee4d716d905f654932ef70d65c3e83c573d9076c447b4e5831d1dd657be407621890d7a9858fee1ca8ab869420edd267f71d73948abc5861315ed4dc0880d18c SHA512 007e9b45b3b3957a8da7d01c45c5cc7d2d49942dac39067038e74b414ff32e810fd902b8dc7f7563b18c565c782b4e701f23f6d1cea397959241d3cdfd6421fd
+DIST rust-1.75.0-aarch64-unknown-linux-musl.tar.xz 195703332 BLAKE2B a662f9402ede618e78c9899c9b01c2138b927286c0269e847ff4fd389a07029eaa4dd5242576457c8ed67b6b46eef26396d079d1dc2749884cb05334676435b9 SHA512 eceececb90e3c2fb19866e58619237b416777399c6212362bc09f784138df83edd9160dd29906ed928a50e0359b2d9471868b594d765d35c1c7d8d22760c4f1e
+DIST rust-1.75.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B c37dd733fdd13617f6c4be580631dc78e40684c4f47d1e90f575e8aa1c122b36c1fd7182773944cf8cd873c84299a484c9f50a48ff70c7cf54e4b5becb6355cf SHA512 5c35f04cc4a58cd29c1d6e9a5616937492f584fca29db099ed1d59442e76700b83583b1d41e7ce4815187c7092af2eb6f307a959e8b7a647818c9ebe84cf4c8a
+DIST rust-1.75.0-arm-unknown-linux-gnueabi.tar.xz 179835780 BLAKE2B c532fc00e99c6428947e5335efe73fb979e66fd8d52f60e9cac7040d253ef15543171f74c4841ad740d2d334c0b2305f59925e42420ea0658307ad434186a715 SHA512 9d2b398cf97ccf8b70a82c1d03322c1e432f9bd4885d8a42ec26d0d6d6095b783630d83b8a9287c77d8d57b7bc648410273460ed6339e9d254d1bcb81191a578
+DIST rust-1.75.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 5ab700ba8898ab1211b20bf1d1a89bf3e4223eccad6b0e816b113254f7d44f23a03cb7fa9fe68386b0b18ca57d71f39b28b4328f072037058c301526d760b063 SHA512 12d5791f0c1d092b52862786ba6b80031607ed819568734d904e553bc24677b583c64e93cc0cd05fad2eddc7357b21c5d15ef68d720b0ab037c7787f2a47eea0
+DIST rust-1.75.0-arm-unknown-linux-gnueabihf.tar.xz 179907476 BLAKE2B 6ed49db0214fd8b35e4d184337b38dc8393f8baf2958bb62308125e6f8e2126f0aa19c8d44fed3475b7818b001447d69267504ab3c96136e257c37db5d2c2285 SHA512 61d555d9c33c8e1647338fdfe24fdfbb42e194ce4995939a58bda6c46f4b857a058e344e714b88435a7bdcc5ee4a086bbaa9c670bc01de45249ca8376ec47c80
+DIST rust-1.75.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 9d5ae3c83985aafdfd1dda6c1db4bf849b4ebaf91ca71ac7249cc8c89de2b3135e752c21850b20c45c5570bb188db1f8513e1df072ebbdd700c37b3ef5f22051 SHA512 6481cfbf21e108d440c8836963d752496eebdf6018b7439459ea079ca82fa05bfc0bd423594e3537c7b522dce05546e59c125eb0cb24ef4db13ed36413c2c1e3
+DIST rust-1.75.0-armv7-unknown-linux-gnueabihf.tar.xz 184210428 BLAKE2B ef329f05d143590d91cba77e7b9a90a977c316e9ae2d8593e7f0247a5db00ca0115c6d468da5394b36e6ce64b2716a51827f39fdc4a34dc16c9220bf5690f042 SHA512 77bfae1f170cd4b2e85a6cc0e02c6f9d621f386a4c0709a2e99c4383479f8979e067d0e92ee7d267150bbf36bc7134bc053afdff7dc0ad66f289aa182755b1d6
+DIST rust-1.75.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B d0a3ebb883641272211478bec1a8089929be0107b05b0f499d71f96515941f7d1e18870c8685f77ef2375251e6f1484f675bd04d5fc0d544854f15ba6402f0e6 SHA512 79e631dd0c44905732ee312486a7c8233440120abeaf40172172e9d5ef0c9687469bac2693ccc2aeb63030590167d88e0fb7d912663dbef655e54ee4cbe9a323
+DIST rust-1.75.0-i686-unknown-linux-gnu.tar.xz 209938900 BLAKE2B 0c9afda24a93f3f35dd779c08d65d6c2366c916a8a3ce6633cd5502bcdbbba537743d95b76daa29d0b4ed3a822915cd5516e864b911bf354e7436745d5a17021 SHA512 242775555d7d38d9aed83018f0d0f8f5f03347c07ee92751de445826c08bc66c24f8601d83eb79729d001d63e81a5b1e27dbb5fac724d80d49e6430685052ba5
+DIST rust-1.75.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9b7d778b75c2d0a6f43f48345cb4735a9d00d457a1b4d868f777eb16db040daf246459620ec478b0632ee0428e6215e5c39d819608ca800dd065b6e95b13a77d SHA512 f307db41c5e380dd023cfa3e91eda98dd1af8004d062fcaa759c4913464ee01abcf168f19a9fdbdda6dec7f718083f4765eb4296614de4c1fb6fa06144116297
+DIST rust-1.75.0-loongarch64-unknown-linux-gnu.tar.xz 160649540 BLAKE2B c96a90d28e6b71e2e5a5bea8f591e6b472f63bbcc59f181800e87d4400e647c8a18110ec50c7d6d10c8f460589386e1fbde6273ccbccea9373813c80f6612a2b SHA512 04b601e96e1fa6a7bc00c7d8463e7ad1fc4fb1bb46383e797189ecb972e23535ff864e5379c56fac400dcaf4c42923b8a5c4fd9aa08adb52bc1db8341f5254f1
+DIST rust-1.75.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9da9a6da9b631e72484a3360d692860e98dc77b74e55cf24d6a6a271e9eaa4787ea2f30c38dba483b18890500704319c1dd34b185adf2cf6aee6730bda8d239f SHA512 d6e20fca261aa2c81c019fffe46c7708b58146f9488041419b84a381761a2cd27606d78fd0f6b5e5e79945e1dd76776d54c335ddb453172deab8bac2c3fdf904
+DIST rust-1.75.0-powerpc-unknown-linux-gnu.tar.xz 174918688 BLAKE2B ff7c03e23f8d21dd8f4e0ebaa958fb97ac7779459ad318304070da0c1d98d832200d20d9331f758a33d6131da387af830392e8b34c33c4d220ae49bc93d7c060 SHA512 7a836a7d2ba883388025693044e59af34b2c41a4ffe93def5ed161bf012fbcba7da81cb521217da142852da05503b18df9a965537ba6ba33ef92f52cada8b7d6
+DIST rust-1.75.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B aa30bfeea014f600b1e3c387476a28af619bd8d63f5b6f10801cc15ee42deca5ab34d3470ec4f07fdfe2b8548f580ff6a63a89c74e1c53c7ef8cd73ddfb69272 SHA512 7efb2c4540a4be9f712698e7a9a905462b2fec70ddd65b9a6ffd28119eb595514366451932c888abe1ffbf93aa8b05c33bb0560c47b478f5122bc87be1c3bd96
+DIST rust-1.75.0-powerpc64-unknown-linux-gnu.tar.xz 174640484 BLAKE2B 768ae78a073b1a7614594ec1f6c381d7a4a9b4be14e548cd5031ea011600755c1934c442795e05f95a720a38c155cd18be188cf7e4b6417d924edc9c2a9076aa SHA512 f83ee23aa8eb7a511984b096876cce60415943d729c77ef4b4cdf0b0f9f8088082058d10881d5866d81a0e94c8515b3966de5a41dc8916d75392650715a844c0
+DIST rust-1.75.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2bcdf4419fbf491fedcb32a7b54bf2ceb2aaffe0319d9e15f7eb07997646e11283535c5b2024f2785398bbdcaf586aee0ada7128a47b9b8fbd8ffa9e7d0607b5 SHA512 89a0eb5762d49351cfbadcbe098243095a62d41381ea48ebe8a3bf322998c6a46a59ea30da29c03291738fb3d04cafb3c1f57ad1e9ffedd68b4bc1516fdef66f
+DIST rust-1.75.0-powerpc64le-unknown-linux-gnu.tar.xz 186507032 BLAKE2B 49bfbc50e087874b844a7292fefabc0df5217751e2391c44827baf3e83bc0e6a6ce9b392cca58c5b8df6f7f8503110609667fcd9b34e84122016fd0d8df29058 SHA512 536210c00f9cf4bcdcd5bac308954afa4a1e7145844914a5b614745a9023c04273a58ba4ef83214663d69a0a6fc941cd4011349d54e55d84bc090628a7624874
+DIST rust-1.75.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b7a48197f9159a6c5d46306808d4ebd17b492669745a941b5db380d76d5ca78095f4bf396804caf7b55bdf47d79b5e88fa2f74aad999306f586e62851d7de029 SHA512 27d86a35df7985a626b64ae7ec05b803a7ef5feefad476c3eddc2d89fad44fe4e520ab29bb27cac8be0a0f3aff7da85e45ae8fef15f2afceeed4962933869e0d
+DIST rust-1.75.0-riscv64gc-unknown-linux-gnu.tar.xz 179877936 BLAKE2B 210b84fe6b0729f52c2dde492b4408f33a7661ea9a40daeb1b2b312788f2c4dc80ce54ca72f08098e8575215e7fa7500694142c0448460bf8a82b2761c236290 SHA512 7cc11f07552cc50e78a2e90c0d0da1a62fb0547f56aa6facac4791ef81e7d62a2d66f3cd079cda91e0db1564c2931074ae40c8c142dc9cede1f9c374379fe49c
+DIST rust-1.75.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8230c219c9cc22c93fc25f023729e87bf5e725f0613cc0a1a205a671c24beecc48997f824e128b56e4242369328666e355fb5e630cefa6339b39ddab61ca273f SHA512 75820f06aea67b3731777d5b7a0cb907a829b65dcabb4ce2fd55bff52837f6929239be6f8c6b303b86a352ecab16d38afde3ef9683cf7d5c4b4046231c9988c0
+DIST rust-1.75.0-s390x-unknown-linux-gnu.tar.xz 199359500 BLAKE2B fffc6c690c4ad8a9985ce8d2b3e6518787b474e47cf1d5a634f38b5d9d4017ac8f5f69206a9229298dd504d2ed2648dacd2d09a8512c008678033608231c2d7c SHA512 bae263c19a59347705959bf2d285420d2074836adcb92a74d2ec922be2ce2f8aff6f758509701a2136473301654bf528b7c1c2522fd7388f5669d1ed94324c50
+DIST rust-1.75.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 74cca56622367225f8326b60540c3738adb2ab12a5e320bc85b448e1cd2111983a0816188dd8767d2f20db0f9120d5d1bcc5393548f1a18c828a55f99e4c50e6 SHA512 00e0181fbf6ea1ba2035b368f3ea143f270f8a3c5e41e441593cf3cf072c31b3874146de8c2c51e3eef5c8f0ce8594132a39516d3f614d8d5f0863b546dfb746
+DIST rust-1.75.0-x86_64-unknown-linux-gnu.tar.xz 156249584 BLAKE2B e6ac90854f589c2fb15144bb4db07a9b05b72196febd07c9de223c74c05c2637c832505f1135faceed14fe8c8bcad0a5205005540faa2bdf0f42949d934107c5 SHA512 86d1a5686f826c8f43f876c4cef42e9483785a37b1aaead73dc64a1ff64e7a025a6771d2e642771c6c847d717c25c6bd2560a2b8b59516a55dece589580b2534
+DIST rust-1.75.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6614cb3ef782c917e8f7fdc990c5b82e8fcffa71e075f10f9726f405ff566fd963bec64cde4dd7252d9d78e09a184b8ba22d15cc87662ad987cdd37c881d8288 SHA512 bfaeef4cd7643879991955fd33f4cdc4c34afb1202cb77c0736434fb735bd215d18d1a11c25f04a7f2514640858a36832e5805a5f85e92d8b7076aa18607ffc3
+DIST rust-1.75.0-x86_64-unknown-linux-musl.tar.xz 234151836 BLAKE2B 9461afbdf26dea19e118b35ea7ef1ee60c22f601501ae6a08950658598a74a6b3179cbdfd9dc4748a0c2485af721b371e5fb523f27e7d7d702f94b532a70437f SHA512 7d650a29c5d14023a3d7d606b7bac4be6ef7988a82525f02d7af9cf3895bb88284442b8042d27be69689f4bddaa5c5370ef7609d18849986860eafcdf89d2d69
+DIST rust-1.75.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B c222d0989518602c0ecde9d21dbca97e9e60d81083804d1d8b2c6bffc8114af78570fd384eb58e5dba1bf249b99300e7f3f4067c1a66c0cd9fac60443f56f751 SHA512 6f78913e34402cedb37f4a54491c65a8bfe79e535e4e40516f2381bc27783cc7655e9252e7701813578c8ffcaf6b301e61ad32917a475d4388fa472733b21b12
DIST rustc-1.71.0-src.tar.xz 151962928 BLAKE2B da8d83cd6621947816630ae487efe7d087266c1352949cedbbd441ba7c7f7c7beb13b9470e66e2f3359c37a050d0e44d22481c418532d3ebb339a456ab092648 SHA512 2c93bafdd248563765a285add48ca77c1e4bad4d5431675ae6a5cdee4cfe7a41e6bcc880a489ca1069a307fd9a005f2d5f8e230dfc95b4a69152b4f9ca49ac44
DIST rustc-1.71.0-src.tar.xz.asc 801 BLAKE2B e5ddc4b18a6caeeb63c5aed5b5d15989d086f408787d2e603e50e7b8548dc078683062627280fd2a0393bec01c314eb1cc59f9b0e3146abf07b8365a0b44c640 SHA512 cb1b208c8b2bfccf02c73c4246fb238edb0dd10e292c1ef781920964e54e40add3089d988769982c0ce06b719014685b1c37daa2d08b513d86ad73808f4ce3ac
DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4
@@ -136,9 +165,12 @@ DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5
DIST rustc-1.74.1-src.tar.xz.asc 801 BLAKE2B ddf73175b164233babf31ca3a381b03e20c0f36d017c1d5f85d6ab11f0986d861ab23b11c061e6b2444ced70c3d6a494cc3de4ec86f0deb221a805491bd75420 SHA512 9a96ff9ba9a4e2af4e267b2ec126fc0675c78d0eb767703daa2f28491c3d85c2ab00fbd8584390bf658812ec6c4ab6c57e43b386db59fd505bd3134a8873a09e
DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495 SHA512 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606
DIST rustc-1.75.0-src.tar.xz.asc 801 BLAKE2B 434da96b1dc93a5aeed07f4961b087fdd15870e407283ecc00df08dbc1e9f6c65fe459b3a25d39ee55900d53ee583207098ecf3d63f5d6ea114ef0b8398b6a63 SHA512 a0e948553af77ca6e2daa82c69d79079ef7d4ec61957bdff99efd73748200d6c7caa9282daeb3fe3ef849d81a48e66a25336df4c7b6f62f975266aa8b9b93d3a
+DIST rustc-1.76.0-src.tar.xz 162267908 BLAKE2B 0cf726841a837d9906d82a6216e65edad1e3e4a798ccd1ca3824c2098d0c45473854b8bf183c6e9ca70ba095752e77c4f5ef575d98c07243d609857214175f5e SHA512 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf
+DIST rustc-1.76.0-src.tar.xz.asc 801 BLAKE2B eadb2f54fceb9c1ac60af72407a2957e37e1ba134a696675a1e9dcf23a2958b41d7f5aa1f75156e4843cefc387cdc9c909e364c3bfcabecc6bfbe262d9c6e8af SHA512 d35c010a5a129580746bcec5c0dad1b0bc1b7864a69505c7c0ccfad436fdfbdf33f87518965a09de187d6a70fb8867dc6a20037c648861031a17501577855120
EBUILD rust-1.71.0.ebuild 23425 BLAKE2B 7456ae9f8a460c0576a139a440e2030eb79f453ea2deb3f94753dce738bd7bf1095eb2cd0d8d7bd726115cead5f9fcbea61a4f619a1f239848b7c89ae16d6ca6 SHA512 00fadd96f3027979f7b51afcc17e03c33cef2697b26f61213252335db8236e41031ab887bcc9412930771b97b4c20f2c7da5fcdb3f632e64fd6c6d69ba72c3e2
EBUILD rust-1.71.1.ebuild 23439 BLAKE2B 576de788284d1542ec308f29426fc2c3242002c1b0e975bb64227a1026990da67f9521d5f05ed81113fe7d4669b7b302da14763ad68ac356d50430040e7920b6 SHA512 560bdb93aec252001b1a952f0c8170a795fbb72928cb37d5b2e0c558d8fed0e5b1841d6ce817f37bb07558b1240fa8de71d79e251d08c5d9072fe2639e54ab21
EBUILD rust-1.73.0.ebuild 23821 BLAKE2B 4fd3079689752d8eda4158c94c69931cd91fc64847a3296dbc76596e2260cfbfbe92d154c09d4146bd40ab45979457bc238ad9a19161d968c91e6a70bf1c45fb SHA512 1ce9554dd8af71198af7b886934ac441b25a9bde4a25463e40651c7d60d5f12d84bec12628f139894697d7786d8e1855c58481e787a44dbbc2ff4623929e8f35
EBUILD rust-1.74.1.ebuild 25096 BLAKE2B faa209819a4b25cd1e14ea3ba107297adf68741159bbd97e3af57f1e3a223a022e41f20bd9447edc8dd6e4e189684fa232d62b5e0ecb5b5873957287a4945e7b SHA512 aa223d17cff70a8dc61149b23518f39fbe13d34522dc746a04590eec5e4254c40346d232c71cd403a37631d60224f9dc45ddb87d7e88e919f1b661102c7d4c5b
EBUILD rust-1.75.0-r1.ebuild 25267 BLAKE2B e682e5aaeb71547818110008eb58baad62b83be28777251854a62a5ff34118e55fe818cb57a8e834f5e348f48b9661f30f1f8c8be9ad66c9760bdde4d448d31f SHA512 f6dc333b7adc6c2c58c25778ff9dc0d249b278b6df6a190214a40e76b72f07142b15c6cfddbeb11ff2f9338b6af4f50a3b4d98bf9e465912739b1103c8932c6e
+EBUILD rust-1.76.0.ebuild 25246 BLAKE2B 1bf82f6c22a4d79bb7b5f1213f8b4bff0683a9951adef1025eca722bce5faca6acd07a3fc3fe747e0a681461f8b3b7bb8cb1c4ba00c102349010a038123be26a SHA512 e04c50340fb87ecf8de965eaa742cd5cc3655d3b2602c0f51ab3823cb3fac305ce8c79f680fed796b75e920553eb32ed536693c874e3152e55536a5cb7efeafc
MISC metadata.xml 1819 BLAKE2B 8aaed548cdcade95da7cfd24871f3d521b243b8ed33a49b12119d0f6e3c97026c60f3e1e328dd37b1b045bbc423e3d8a64b89144907c4e2302dc2c809b9b2ba8 SHA512 c6b015b4009fa9b0c4fa0caad1a98be93721fd6aa7e9b4f1411fbf56a60854e63cca66e0b47a88045d61076d8288089e3939854765a5b22d5974663ac686f815
diff --git a/dev-lang/rust/files/1.76.0-loong-code-model.patch b/dev-lang/rust/files/1.76.0-loong-code-model.patch
new file mode 100644
index 000000000000..02bfeca55b1d
--- /dev/null
+++ b/dev-lang/rust/files/1.76.0-loong-code-model.patch
@@ -0,0 +1,73 @@
+https://github.com/rust-lang/rust/pull/120661
+From: WANG Xuerui <xen0n@gentoo.org>
+Date: Mon, 5 Feb 2024 13:18:32 +0800
+Subject: [PATCH] target: default to the medium code model on LoongArch targets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Rust LoongArch targets have been using the default LLVM code model
+so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak.
+As described in the "Code Model" section of LoongArch ELF psABI spec
+v20231219 [1], one can only make function calls as far as ±128MiB with
+the "normal" code model; this is insufficient for very large software
+containing Rust components that needs to be linked into the big text
+section, such as Chromium.
+
+Because:
+
+* we do not want to ask users to recompile std if they are to build
+ such software,
+* objects compiled with larger code models can be linked with those
+ with smaller code models without problems, and
+* the "medium" code model is comparable to the "small"/"normal" one
+ performance-wise (same data access pattern; each function call
+ becomes 2-insn long and indirect, but this may be relaxed back into
+ the direct 1-insn form in a future LLVM version), but is able to
+ perform function calls within ±128GiB,
+
+it is better to just switch the targets to the "medium" code model,
+which is also "medium" in LLVM-speak.
+
+[1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs
+@@ -1,4 +1,4 @@
+-use crate::spec::{base, Target, TargetOptions};
++use crate::spec::{base, CodeModel, Target, TargetOptions};
+
+ pub fn target() -> Target {
+ Target {
+@@ -7,6 +7,7 @@ pub fn target() -> Target {
+ data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(),
+ arch: "loongarch64".into(),
+ options: TargetOptions {
++ code_model: Some(CodeModel::Medium),
+ cpu: "generic".into(),
+ features: "+f,+d".into(),
+ llvm_abiname: "lp64d".into(),
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs
+@@ -16,7 +16,7 @@ pub fn target() -> Target {
+ max_atomic_width: Some(64),
+ relocation_model: RelocModel::Static,
+ panic_strategy: PanicStrategy::Abort,
+- code_model: Some(CodeModel::Small),
++ code_model: Some(CodeModel::Medium),
+ ..Default::default()
+ },
+ }
+--- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
++++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs
+@@ -17,7 +17,7 @@ pub fn target() -> Target {
+ max_atomic_width: Some(64),
+ relocation_model: RelocModel::Static,
+ panic_strategy: PanicStrategy::Abort,
+- code_model: Some(CodeModel::Small),
++ code_model: Some(CodeModel::Medium),
+ ..Default::default()
+ },
+ }
+--
+2.43.0
+
diff --git a/dev-lang/rust/rust-1.76.0.ebuild b/dev-lang/rust/rust-1.76.0.ebuild
new file mode 100644
index 000000000000..5c6cef79e27f
--- /dev/null
+++ b/dev-lang/rust/rust-1.76.0.ebuild
@@ -0,0 +1,786 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
+ multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+ !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
+"
+
+# keep in sync with llvm ebuild of the same version as bundled one.
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai
+ LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE
+ WebAssembly X86 XCore Xtensa )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+
+IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+
+# Please keep the LLVM dependency block separate. Since LLVM is slotted,
+# we need to *really* make sure we're not pulling more than one slot
+# simultaneously.
+
+# How to use it:
+# List all the working slots in LLVM_VALID_SLOTS, newest first.
+LLVM_VALID_SLOTS=( 17 )
+LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
+
+# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
+# (-) usedep needed because we may build with older llvm without that target
+LLVM_DEPEND="|| ( "
+for _s in ${LLVM_VALID_SLOTS[@]}; do
+ LLVM_DEPEND+=" ( "
+ for _x in ${ALL_LLVM_TARGETS[@]}; do
+ LLVM_DEPEND+="
+ ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )
+ wasm? ( sys-devel/lld:${_s} )"
+ done
+ LLVM_DEPEND+=" )"
+done
+unset _s _x
+LLVM_DEPEND+=" )
+ <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
+"
+
+# to bootstrap we need at least exactly previous version, or same.
+# most of the time previous versions fail to bootstrap with newer
+# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
+# but it fails to bootstrap with 1.48.x
+# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.json
+RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
+RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
+BOOTSTRAP_DEPEND="||
+ (
+ =dev-lang/rust-"${RUST_DEP_PREV}"
+ =dev-lang/rust-bin-"${RUST_DEP_PREV}"
+ =dev-lang/rust-"${RUST_DEP_CURR}"
+ =dev-lang/rust-bin-"${RUST_DEP_CURR}"
+ )
+"
+
+BDEPEND="${PYTHON_DEPS}
+ app-eselect/eselect-rust
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
+ !system-llvm? (
+ >=dev-build/cmake-3.13.4
+ app-alternatives/ninja
+ )
+ test? ( dev-debug/gdb )
+ verify-sig? ( sec-keys/openpgp-keys-rust )
+"
+
+DEPEND="
+ >=app-arch/xz-utils-5.2
+ net-misc/curl:=[http2,ssl]
+ sys-libs/zlib:=
+ dev-libs/openssl:0=
+ system-llvm? (
+ ${LLVM_DEPEND}
+ llvm-libunwind? ( sys-libs/llvm-libunwind:= )
+ )
+ !system-llvm? (
+ !llvm-libunwind? (
+ elibc_musl? ( sys-libs/libunwind:= )
+ )
+ )
+"
+
+RDEPEND="${DEPEND}
+ app-eselect/eselect-rust
+ sys-apps/lsb-release
+"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ miri? ( nightly )
+ parallel-compiler? ( nightly )
+ rust-analyzer? ( rust-src )
+ test? ( ${ALL_LLVM_TARGETS[*]} )
+ wasm? ( llvm_targets_WebAssembly )
+ x86? ( cpu_flags_x86_sse2 )
+"
+
+# we don't use cmake.eclass, but can get a warning
+CMAKE_WARN_UNUSED_CLI=no
+
+QA_FLAGS_IGNORED="
+ usr/lib/${PN}/${PV}/bin/.*
+ usr/lib/${PN}/${PV}/libexec/.*
+ usr/lib/${PN}/${PV}/lib/lib.*.so
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_SONAME="
+ usr/lib/${PN}/${PV}/lib/lib.*.so.*
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
+"
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
+ usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o
+"
+
+# An rmeta file is custom binary format that contains the metadata for the crate.
+# rmeta files do not support linking, since they do not contain compiled object files.
+# so we can safely silence the warning for this QA check.
+QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
+
+# causes double bootstrap
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
+
+PATCHES=(
+ "${FILESDIR}"/1.75.0-musl-dynamic-linking.patch
+ "${FILESDIR}"/1.74.1-cross-compile-libz.patch
+ #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh
+ "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch
+ "${FILESDIR}"/1.67.0-doc-wasm.patch
+ "${FILESDIR}"/1.75.0-handle-vendored-sources.patch # remove for >=1.77.0
+ "${FILESDIR}"/1.76.0-loong-code-model.patch # remove for >=1.78.0
+)
+
+S="${WORKDIR}/${MY_P}-src"
+
+clear_vendor_checksums() {
+ sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die
+}
+
+toml_usex() {
+ usex "${1}" true false
+}
+
+bootstrap_rust_version_check() {
+ # never call from pkg_pretend. eselect-rust may be not installed yet.
+ [[ ${MERGE_TYPE} == binary ]] && return
+ local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
+ local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
+ local rustc_version=( $(eselect --brief --root="${BROOT}" rust show 2>/dev/null) )
+ rustc_version=${rustc_version[0]#rust-bin-}
+ rustc_version=${rustc_version#rust-}
+
+ [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+ if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
+ eerror "Rust >=${rustc_wanted} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too old"
+ elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
+ eerror "Rust <${rustc_toonew} is required"
+ eerror "please run 'eselect rust' and set correct rust version"
+ die "selected rust version is too new"
+ else
+ einfo "Using rust ${rustc_version} to build"
+ fi
+}
+
+pre_build_checks() {
+ local M=8192
+ # multiply requirements by 1.3 if we are doing x86-multilib
+ if use amd64; then
+ M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
+ fi
+ M=$(( $(usex clippy 128 0) + ${M} ))
+ M=$(( $(usex miri 128 0) + ${M} ))
+ M=$(( $(usex rustfmt 256 0) + ${M} ))
+ # add 2G if we compile llvm and 256M per llvm_target
+ if ! use system-llvm; then
+ M=$(( 2048 + ${M} ))
+ local ltarget
+ for ltarget in ${ALL_LLVM_TARGETS[@]}; do
+ M=$(( $(usex ${ltarget} 256 0) + ${M} ))
+ done
+ fi
+ M=$(( $(usex wasm 256 0) + ${M} ))
+ M=$(( $(usex debug 2 1) * ${M} ))
+ eshopts_push -s extglob
+ if is-flagq '-g?(gdb)?([1-9])'; then
+ M=$(( 15 * ${M} / 10 ))
+ fi
+ eshopts_pop
+ M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
+ M=$(( $(usex doc 256 0) + ${M} ))
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+llvm_check_deps() {
+ has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
+}
+
+# Is LLVM being linked against libc++?
+is_libcxx_linked() {
+ local code='#include <ciso646>
+#if defined(_LIBCPP_VERSION)
+ HAVE_LIBCXX
+#endif
+'
+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
+ [[ ${out} == *HAVE_LIBCXX* ]]
+}
+
+pkg_pretend() {
+ pre_build_checks
+}
+
+pkg_setup() {
+ pre_build_checks
+ python-any-r1_pkg_setup
+
+ export LIBGIT2_NO_PKG_CONFIG=1 #749381
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
+
+ use system-bootstrap || die "USE=system-bootstrap is required when cross-compiling"
+ use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
+ local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
+ use "llvm_targets_${cross_llvm_target}" || \
+ die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling"
+ fi
+
+ use system-bootstrap && bootstrap_rust_version_check
+
+ if use system-llvm; then
+ llvm_pkg_setup
+
+ local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ export LLVM_LINK_SHARED=1
+ export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
+ fi
+}
+
+esetup_unwind_hack() {
+ # https://bugs.gentoo.org/870280
+ # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
+ # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
+ # the whole idea is for stage0 to bootstrap with fake libgcc_s.
+ # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
+ local fakelib="${T}/fakelib"
+ mkdir -p "${fakelib}" || die
+ # we need both symlinks, one for cargo runtime, other for linker.
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
+ ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
+ export LD_LIBRARY_PATH="${fakelib}"
+ export RUSTFLAGS+=" -L${fakelib}"
+ # this is a literally magic variable that gets through cargo cache, without it some
+ # crates ignore RUSTFLAGS.
+ # this variable can not contain leading space.
+ export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
+}
+
+src_prepare() {
+ # Clear vendor checksums for crates that we patched to bump libc.
+ # NOTE: refresh this on each bump.
+ #for i in addr2line-0.20.0 bstr cranelift-jit crossbeam-channel elasticlunr-rs handlebars icu_locid libffi \
+ # terminal_size tracing-tree; do
+ # clear_vendor_checksums "${i}"
+ #done
+
+ if ! use system-bootstrap; then
+ has_version sys-devel/gcc || esetup_unwind_hack
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi "${CBUILD}")"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
+ --without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
+ fi
+
+ default
+}
+
+src_configure() {
+ filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
+
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets+=",\"wasm32-unknown-unknown\""
+ if use system-llvm; then
+ # un-hardcode rust-lld linker for this target
+ # https://bugs.gentoo.org/715348
+ sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/base/wasm.rs || die
+ fi
+ fi
+ rust_targets="${rust_targets#,}"
+
+ # cargo and rustdoc are mandatory and should always be included
+ local tools='"cargo","rustdoc"'
+ use clippy && tools+=',"clippy"'
+ use miri && tools+=',"miri"'
+ use profiler && tools+=',"rust-demangler"'
+ use rustfmt && tools+=',"rustfmt"'
+ use rust-analyzer && tools+=',"rust-analyzer"'
+ use rust-src && tools+=',"src"'
+
+ local rust_stage0_root
+ if use system-bootstrap; then
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
+ else
+ rust_stage0_root="${WORKDIR}"/rust-stage0
+ fi
+ # in case of prefix it will be already prefixed, as --print sysroot returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
+
+ rust_target="$(rust_abi)"
+ rust_build="$(rust_abi "${CBUILD}")"
+ rust_host="$(rust_abi "${CHOST}")"
+
+ local cm_btype="$(usex debug DEBUG RELEASE)"
+ cat <<- _EOF_ > "${S}"/config.toml
+ changelog-seen = 2
+ [llvm]
+ download-ci-llvm = false
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ ninja = true
+ targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
+ link-shared = $(toml_usex system-llvm)
+ $(if is_libcxx_linked; then
+ # https://bugs.gentoo.org/732632
+ echo "use-libcxx = true"
+ echo "static-libstdcpp = false"
+ fi)
+ $(case "${rust_target}" in
+ i586-*-linux-*)
+ # https://github.com/rust-lang/rust/issues/93059
+ echo 'cflags = "-fcf-protection=none"'
+ echo 'cxxflags = "-fcf-protection=none"'
+ echo 'ldflags = "-fcf-protection=none"'
+ ;;
+ *)
+ ;;
+ esac)
+ enable-warnings = false
+ [llvm.build-config]
+ CMAKE_VERBOSE_MAKEFILE = "ON"
+ $(if ! tc-is-cross-compiler; then
+ # When cross-compiling, LLVM is compiled twice, once for host and
+ # once for target. Unfortunately, this build configuration applies
+ # to both, which means any flags applicable to one target but not
+ # the other will break. Conditionally disable respecting user
+ # flags when cross-compiling.
+ echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\""
+ echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\""
+ echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\""
+ echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\""
+ fi)
+ [build]
+ build-stage = 2
+ test-stage = 2
+ build = "${rust_build}"
+ host = ["${rust_host}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ rustfmt = "${rust_stage0_root}/bin/rustfmt"
+ docs = $(toml_usex doc)
+ compiler-docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = true
+ tools = [${tools}]
+ verbose = 2
+ sanitizers = false
+ profiler = $(toml_usex profiler)
+ cargo-native-static = false
+ [install]
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
+ sysconfdir = "etc"
+ docdir = "share/doc/rust"
+ bindir = "bin"
+ libdir = "lib"
+ mandir = "share/man"
+ [rust]
+ # https://github.com/rust-lang/rust/issues/54872
+ codegen-units-std = 1
+ optimize = true
+ debug = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ debug-assertions-std = $(toml_usex debug)
+ debuginfo-level = $(usex debug 2 0)
+ debuginfo-level-rustc = $(usex debug 2 0)
+ debuginfo-level-std = $(usex debug 2 0)
+ debuginfo-level-tools = $(usex debug 2 0)
+ debuginfo-level-tests = 0
+ backtrace = true
+ incremental = false
+ $(if ! tc-is-cross-compiler; then
+ echo "default-linker = \"$(tc-getCC)\""
+ fi)
+ parallel-compiler = $(toml_usex parallel-compiler)
+ channel = "$(usex nightly nightly stable)"
+ description = "gentoo"
+ rpath = false
+ verbose-tests = true
+ optimize-tests = $(toml_usex !debug)
+ codegen-tests = true
+ dist-src = false
+ remap-debuginfo = true
+ lld = $(usex system-llvm false $(toml_usex wasm))
+ # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
+ # https://github.com/rust-lang/rust/issues/74976
+ # https://github.com/rust-lang/rust/issues/76526
+ deny-warnings = $(usex wasm $(usex doc false true) true)
+ backtrace-on-ice = true
+ jemalloc = false
+ lto = "$(usex lto fat off)"
+ [dist]
+ src-tarball = false
+ compression-formats = ["xz"]
+ compression-profile = "balanced"
+ _EOF_
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ export CFLAGS_${rust_target//-/_}="${arch_cflags}"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${rust_target}]
+ ar = "$(tc-getAR)"
+ cc = "$(tc-getCC)"
+ cxx = "$(tc-getCXX)"
+ linker = "$(tc-getCC)"
+ ranlib = "$(tc-getRANLIB)"
+ llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
+ # but we patch it and set to false here as well
+ if use elibc_musl; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ crt-static = false
+ _EOF_
+ fi
+ done
+ if use wasm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "$(usex system-llvm lld rust-lld)"
+ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
+ profiler = false
+ _EOF_
+ fi
+
+ if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
+ # experimental cross support
+ # discussion: https://bugs.gentoo.org/679878
+ # TODO: c*flags, clang, system-llvm, cargo.eclass target support
+ # it would be much better if we could split out stdlib
+ # complilation to separate ebuild and abuse CATEGORY to
+ # just install to /usr/lib/rustlib/<target>
+
+ # extra targets defined as a bash array
+ # spec format: <LLVM target>:<rust-target>:<CTARGET>
+ # best place would be /etc/portage/env/dev-lang/rust
+ # Example:
+ # RUST_CROSS_TARGETS=(
+ # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
+ # )
+ # no extra hand holding is done, no target transformations, all
+ # values are passed as-is with just basic checks, so it's up to user to supply correct values
+ # valid rust targets can be obtained with
+ # rustc --print target-list
+ # matching cross toolchain has to be installed
+ # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
+ # only gcc toolchains installed with crossdev are checked for now.
+
+ # BUG: we can't pass host flags to cross compiler, so just filter for now
+ # BUG: this should be more fine-grained.
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+
+ local cross_target_spec
+ for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
+ local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
+ local cross_triples="${cross_target_spec#*:}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
+ use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
+ command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
+
+ cat <<- _EOF_ >> "${S}"/config.toml
+ [target.${cross_rust_target}]
+ ar = "${cross_toolchain}-ar"
+ cc = "${cross_toolchain}-gcc"
+ cxx = "${cross_toolchain}-g++"
+ linker = "${cross_toolchain}-gcc"
+ ranlib = "${cross_toolchain}-ranlib"
+ _EOF_
+ if use system-llvm; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ _EOF_
+ fi
+ if [[ "${cross_toolchain}" == *-musl* ]]; then
+ cat <<- _EOF_ >> "${S}"/config.toml
+ musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
+ _EOF_
+ fi
+
+ # append cross target to "normal" target list
+ # example 'target = ["powerpc64le-unknown-linux-gnu"]'
+ # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
+
+ rust_targets="${rust_targets},\"${cross_rust_target}\""
+ sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
+
+ ewarn
+ ewarn "Enabled ${cross_rust_target} rust target"
+ ewarn "Using ${cross_toolchain} cross toolchain"
+ ewarn
+ if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
+ ewarn "'sys-devel/binutils[multitarget]' is not installed"
+ ewarn "'strip' will be unable to strip cross libraries"
+ ewarn "cross targets will be installed with full debug information"
+ ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
+ ewarn
+ ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
+ ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
+ ewarn
+ fi
+ done
+ fi # I_KNOW_WHAT_I_AM_DOING_CROSS
+
+ einfo "Rust configured with the following flags:"
+ echo
+ echo RUSTFLAGS="\"${RUSTFLAGS}\""
+ echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
+ echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
+ echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
+ env | grep "CARGO_TARGET_.*_RUSTFLAGS="
+ env | grep "CFLAGS_.*"
+ echo
+ einfo "config.toml contents:"
+ cat "${S}"/config.toml || die
+ echo
+}
+
+src_compile() {
+ RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_test() {
+ # https://rustc-dev-guide.rust-lang.org/tests/intro.html
+
+ # those are basic and codegen tests.
+ local tests=(
+ codegen
+ codegen-units
+ compile-fail
+ incremental
+ mir-opt
+ pretty
+ run-make
+ )
+
+ # fails if llvm is not built with ALL targets.
+ # and known to fail with system llvm sometimes.
+ use system-llvm || tests+=( assembly )
+
+ # fragile/expensive/less important tests
+ # or tests that require extra builds
+ # TODO: instead of skipping, just make some nonfatal.
+ if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
+ tests+=(
+ rustdoc
+ rustdoc-js
+ rustdoc-js-std
+ rustdoc-ui
+ run-make-fulldeps
+ ui
+ ui-fulldeps
+ )
+ fi
+
+ local i failed=()
+ einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
+ for i in "${tests[@]}"; do
+ local t="src/test/${i}"
+ einfo "rust_src_test: running ${t}"
+ if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
+ -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
+ then
+ failed+=( "${t}" )
+ eerror "rust_src_test: ${t} failed"
+ fi
+ done
+
+ if [[ ${#failed[@]} -ne 0 ]]; then
+ eerror "rust_src_test: failure summary: ${failed[@]}"
+ die "aborting due to test failures"
+ fi
+}
+
+src_install() {
+ DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
+
+ # bug #689562, #689160
+ rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
+ rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+ use rust-analyzer && symlinks+=( rust-analyzer )
+
+ einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
+ # need to fix eselect-rust to remove this hack.
+ local ver_i="${i}-${PV}"
+ if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
+ einfo "Installing ${i} symlink"
+ ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
+ else
+ ewarn "${i} symlink requested, but source file not found"
+ ewarn "please report this"
+ fi
+ dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
+ dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
+ dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
+ dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
+ dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
+
+ newenvd - "50${P}" <<-_EOF_
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ _EOF_
+
+ rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.old || die
+ rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/libexec
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use miri; then
+ echo /usr/bin/miri >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
+ fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ if use rust-analyzer; then
+ echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+
+ if use dist; then
+ insinto "/usr/lib/${PN}/${PV}/dist"
+ doins -r "${S}/build/dist/."
+ fi
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ if has_version dev-debug/gdb || has_version dev-debug/lldb; then
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+ fi
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}