summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin21163 -> 21162 bytes
-rw-r--r--dev-lang/boogie/Manifest4
-rw-r--r--dev-lang/boogie/boogie-3.0.9.ebuild (renamed from dev-lang/boogie/boogie-3.0.7.ebuild)21
-rw-r--r--dev-lang/python/Manifest4
-rw-r--r--dev-lang/python/python-3.12.1.ebuild532
5 files changed, 554 insertions, 7 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index 2c0ed26f2819..1f3fbc95e1f2 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/boogie/Manifest b/dev-lang/boogie/Manifest
index 7cec4cd488ce..36f1cba16802 100644
--- a/dev-lang/boogie/Manifest
+++ b/dev-lang/boogie/Manifest
@@ -1,8 +1,8 @@
AUX boogie-3.0.4-disable-analyzers.patch 764 BLAKE2B 965f6a8007a4324aa95b165109dcbc85f7bba5696d04772c53cfb1e456d0c60d2d3dce9103df641fe7f565d2a2d4e04a5d02aba43ac1ccc4527dcaae90b7b28b SHA512 b8c7b9172cd2f45be84058babd33c75f37dcb08f6c1a0b7c79b0ae2bd8afec70b29886f23d0a5553a00e1d3761a7788db0444d06788ee32aed2d1c2cd7cb9554
DIST boogie-3.0.5.tar.gz 2024714 BLAKE2B 453b09d9275923e8bed6ef80b1e331ee3a16e3ebfc7f2f454a989fa1242c5221c9a9d322b4306b11749b9ab48e012cc30cbf4d965413dc96e5bcdf52e6679f95 SHA512 212b561597ba8dea4c2ff1d073c317eb6f880c28588f032f65f3ad620a68fbf137e5cc9a20947a9f7af6f00e7543aeb56f09699ae179cfc7c4df63f825102d44
DIST boogie-3.0.6.tar.gz 2023821 BLAKE2B 0d11c5f33d25e55debb5ec2a9fc99881bc4781f69da091f157f55a13e5a26e6562c9ef8c5ebeb5e0cf307d5c6ddaeb36918a0d1e6f5a740829811291b7fd92c5 SHA512 dd2f075a9f34212edd7ca57872cc1b240fac0814c3fbbe27aa1c3ad2a4133dcdbc432c9b49db56416f700a1c0caf2a99225af35f9dfe92115b783916979a43f0
-DIST boogie-3.0.7.tar.gz 2040955 BLAKE2B ae5abfadefea49669809c22844f9749058c1751434a22fd93c3a9d1f167ad99aed2143d15d206c5b062305f7f145b9d6d1f2e88b145d47505a6c8153d433d480 SHA512 dfd9c684a0d9d4058c4b95cba67eaebf836fc39b78d742bfc8c92982c9314672c1c3b3f54b6a69b709e3b3a2226999994ce857130d609e59db3b5fe45672d693
DIST boogie-3.0.8.tar.gz 2041785 BLAKE2B 0e6343ccf9f1432a19420d8358eea8aed754583f7a5e2343d47515f5377856d288088238d9f1d61a4cb05b3bff1a860dfdb654344007da5517b9c3f30d33b071 SHA512 31e80bb657f8b8dbcc127b1a6ed0a3a789b1de762b3db7d3d2f002d52a81486d716204816ff5bcc5680a76b8edb0b99651f996193bbdab40746f437bb20a3d46
+DIST boogie-3.0.9.tar.gz 2044403 BLAKE2B 80062b0de01899902a591debe68d8557897295f79535804d5c029f916aad3eb286681b011d30313090444ce73db5e76c9703583f9b3929dd157a0625215de599 SHA512 78e7fac6fa98a39c0c19b0d805d8dc6ff273bda26088616eb8277778224213ac00faf145527d22d6c3941b25d197ce9be19278e97a8fc4c2d222b1686dc125f1
DIST microsoft.bcl.asyncinterfaces.6.0.0.nupkg 76354 BLAKE2B aca3f5db71e4037dbdd604aeaebcd0962ccc171915b77b4c409ab744bf0a469c7d588f9504fc7fa49e3863e9593b66b4083235cb49e812d1f87b3dadb32e6003 SHA512 221a05a0c910f7a87b620d8f3831ed392b4eb95d112bee274d35f27009ad2a26445de9d7cd235fe6fb4a03f2550874bda3be3dddd96edaf9c0852a9c23d7b099
DIST microsoft.codecoverage.16.2.0.nupkg 3133582 BLAKE2B 418cf403247d594cde0d827f8ca8690019a7631525f07993937085f4bbf8473364b4c99aea6e8b7b0020208d15fe0da63f0f4e69c273493c51ae011e8bd82667 SHA512 91f1d43fc038a20f5367d9aab669105dc7514dfbe749260b52789c09a75abcc6bdc000ee0c7f432231d4cc09e99bf5b863dd6289d813342f74d9dad23a651625
DIST microsoft.csharp.4.0.1.nupkg 462346 BLAKE2B 209ccebc9103b803d26ea1f0232245c3cd231078b03a83a0011a2a79a1a8a324a72c5b3fda94b2686fff170932f366e165f81a36a70df590a39c45d70778e4be SHA512 c0e75a9162f28ba4c4572c8fac4fd4c8c97d6d3505a37683646ba5f7e5f6ac0da69d5200d2646054de90e8e08f893a10e514591b69b8273640842b2cf90bddec
@@ -196,6 +196,6 @@ DIST system.xml.xpath.xmldocument.4.0.1.nupkg 86933 BLAKE2B 4c03b5a9433c2c954e75
DIST system.xml.xpath.xmldocument.4.3.0.nupkg 138523 BLAKE2B ba53f3b5ac0f2d1d1e9120940b302e6960690ed4a44b96ba15b03e16f9159f2c57d6004aa55b796ba2327009d23fc2f10d4d09e948b88eb6af36efa5f76e401b SHA512 f75b6f7c75874ab6053e8942c1662a6e9a3561aa01502437b8d67f3bfcebd1ebf906792801326889ed7acb094c55469766d7d27cd10bc61b46ddaaa94dfc11e3
EBUILD boogie-3.0.5.ebuild 9012 BLAKE2B 0783ce4ca8e4c0b3adebdb381cc256a062a6708522fcb61b8eae6488ef980c6ddc94f454e0c3f8c80ce1549824ead0ecdbbd164d6a259c4598ded80452c0ecee SHA512 b95139529d07688c7fa8d3b46df2956c2afef76ee99ac939bdd2e93edbc8cdd5ca228a780c781d6473116e6eec1f1d16c3e1f3aaacebeb23f976edf6d683d73f
EBUILD boogie-3.0.6.ebuild 9047 BLAKE2B 50fdab6ce7331e1803b8d39810cf745d1d25881b41f43d07c01a6058227b7d2aa66064ecc72e98e14066c7b77c72a883a01de37a54443566c1d5639f169176a6 SHA512 ae9b8722dfe02048fa20c63a28030f1fef50d118d7f80541bf6bd45d26048d2e212eadd834963aa9c40587c2a70f3121f8665ef0522d53eea2866a8a06c8b537
-EBUILD boogie-3.0.7.ebuild 9047 BLAKE2B 50fdab6ce7331e1803b8d39810cf745d1d25881b41f43d07c01a6058227b7d2aa66064ecc72e98e14066c7b77c72a883a01de37a54443566c1d5639f169176a6 SHA512 ae9b8722dfe02048fa20c63a28030f1fef50d118d7f80541bf6bd45d26048d2e212eadd834963aa9c40587c2a70f3121f8665ef0522d53eea2866a8a06c8b537
EBUILD boogie-3.0.8.ebuild 9207 BLAKE2B e30a4bcc0bf12884c887d3c4283c52dc6e8fc6053372e45d2e0495647b102fff8fa30ea3a6c33b467a64d4181d99e26336f28623c14aa5b75f3bc091509d59dc SHA512 a932037627a3546e200cb0d5b5a2647acba9069b943d68812d66a6abb3cafbfe7fe1b07f8565d58c0976218ed9cfaa4af18254918e9a0659200877cc621a4506
+EBUILD boogie-3.0.9.ebuild 9229 BLAKE2B aef5c35881a17a2594060adfad5b17cf5aefd9fbbebcd09f6d93a32bcced68508095c6e6e9ac293d71d1c34f8b47e09f74d00ac2eb3138a24d03a041b87ae76d SHA512 aa78521d95c675d004d2cd249f5d28bd4fa1801ce644bed06e094631658122e3b10baca9786708f24a48d699a0dda8e1419653f4a0c28c70211083c6740cc52b
MISC metadata.xml 1102 BLAKE2B 215544658792715aae72787f7c949ed89df9c05ceab5a919a861c02b7938c0d1ee228e0ede55008287b616faf70992a8c1f2854e6e5e1fc909718ae682996bb8 SHA512 b6a626c485e2a5db3390da62c629507a60417eda8b508d7ed8d1c017ac337743d2c4fe0e8554b103f989176dcd2969cc8579e91532b07a22c1b66328ef241e8d
diff --git a/dev-lang/boogie/boogie-3.0.7.ebuild b/dev-lang/boogie/boogie-3.0.9.ebuild
index 1b08f8717817..d43d6b2020ca 100644
--- a/dev-lang/boogie/boogie-3.0.7.ebuild
+++ b/dev-lang/boogie/boogie-3.0.9.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-DOTNET_PKG_COMPAT=7.0
+DOTNET_PKG_COMPAT=8.0
NUGETS="
microsoft.bcl.asyncinterfaces@6.0.0
microsoft.codecoverage@16.2.0
@@ -67,7 +67,6 @@ runtime.unix.system.net.primitives@4.3.0
runtime.unix.system.net.sockets@4.3.0
runtime.unix.system.private.uri@4.3.0
runtime.unix.system.runtime.extensions@4.3.0
-stylecop.analyzers@1.1.118
system.appcontext@4.1.0
system.buffers@4.0.0
system.buffers@4.3.0
@@ -198,7 +197,7 @@ system.xml.xpath@4.0.1
system.xml.xpath@4.3.0
"
-inherit check-reqs dotnet-pkg multiprocessing
+inherit check-reqs dotnet-pkg edo multiprocessing
DESCRIPTION="SMT-based program verifier"
HOMEPAGE="https://github.com/boogie-org/boogie/"
@@ -221,7 +220,9 @@ SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="sci-mathematics/z3"
+RDEPEND="
+ sci-mathematics/z3
+"
BDEPEND="
${RDEPEND}
test? (
@@ -254,15 +255,18 @@ src_prepare() {
local -a bad_tests=(
civl/inductive-sequentialization/BroadcastConsensus.bpl
civl/inductive-sequentialization/PingPong.bpl
+ civl/inductive-sequentialization/paxos/is.sh
livevars/bla1.bpl
prover/cvc5-offline.bpl
prover/cvc5.bpl
+ prover/exitcode.bpl
prover/z3mutl.bpl
test0/MaxKeepGoingSplits.bpl
test15/CaptureInlineUnroll.bpl
test15/CaptureState.bpl
test15/CommonVariablesPruning.bpl
test21/InterestingExamples4.bpl
+ test21/issue-735.bpl
)
local bad_test
for bad_test in "${bad_tests[@]}" ; do
@@ -277,7 +281,14 @@ src_prepare() {
}
src_test() {
- lit --threads "$(makeopts_jobs)" --verbose "${S}/Test" || die "tests failed"
+ einfo "Starting tests using the lit test tool."
+ local -a lit_opts=(
+ --order=lexical
+ --time-tests
+ --verbose
+ --workers="$(makeopts_jobs)"
+ )
+ edob lit "${lit_opts[@]}" "${S}/Test"
}
src_install() {
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 87350cb1c76c..de250a6c8ffa 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -10,6 +10,8 @@ DIST Python-3.11.7.tar.xz 20074108 BLAKE2B 3414118d30076e4223571825b5c595c579542
DIST Python-3.11.7.tar.xz.asc 833 BLAKE2B 32d6984631d7b4b064e2c2588835a89098842a0ecc3d8ccb893830c9946124a159123e2082e6da3abcdb97d27dde0fb68c1fd11e4ed2bf2e0641fa95191354bb SHA512 7b342990c6e32897047f8ba33c4d264f1be987b73843b61bd7db08bfa1a7280c616e9dcd96225f37602f876549d011ff82a4d79f1e32a5ab7d7cc22651bba44f
DIST Python-3.12.0.tar.xz 20575020 BLAKE2B 047968c76adb88326295c7133b27e6849a45651fd2d9c1768d4f7c2a4c5ed4ed9de4e0e54855c66cc99e39818759404ccaf056b000a9376aa5aad7370e4f4ce6 SHA512 4d5353151fd1dad80fe96bd2a668cec27287a0dad85086239597166f8189d4edf6c4800ed14f39c8e54816076fec13ba405d6bfa1123ad2dada8cf85c60025e6
DIST Python-3.12.0.tar.xz.asc 963 BLAKE2B 2b2b119a4314d88c9ecbf881b583fa8bd7c0a67d7307cd7ea625fbaeb1e696dbcb0d13041ec807cecf1636c8b4f1ac1862d0d966fe7705f384cd414c3097af0d SHA512 2c457f51cd4269deb2c644b35da1c617d1b1d53a6093da77b967f4e5661bc3400c70808aab4f619d9035fd33e656653f992d308c683e26f1505929a3a59b4ce2
+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.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.8.18.tar.xz 20696952 BLAKE2B 45be712aeef8bb3ba04aa2bd7d0282aa5f817327749c620ede18ee307fcb432540db9062a8186b08b49467515c74f01eb6fa739f366cca76dfadedcb22858429 SHA512 0be1d85cafade25e99b8277ba51d7b9b3a3d2dbbcc52fd0d1c633c47982e5dd87fd7a0ca180a78d7801d79a8ecafa79bd9d501d544cd7b6da53ea409daa70adf
@@ -21,6 +23,7 @@ DIST python-gentoo-patches-3.10.13.tar.xz 13996 BLAKE2B 0123a18c8c39397ac03b1be1
DIST python-gentoo-patches-3.11.6.tar.xz 7568 BLAKE2B 7ff4b1f4f2549b2df46aeff875c20fb6de40778d88071c1aa054bf2e3494f718dbb39a42d9cb791c1e0db1a025ae8eb13b24f7bd712f08b3c00ca638100bb732 SHA512 57c655d9d0df4284e167f3ed9b4e0d1c4554e5fe08605c64db253c104ac2e64da2439c8500fe60460d2545683467f8689d7fee68214cfa414584d71434735473
DIST python-gentoo-patches-3.11.7.tar.xz 7560 BLAKE2B fa836508cc85c3fd5e9bfb61d4d214b0d23923e4d29b87d30afa7a5a4d8fa23d5abb8ae8e1d571e301318ce14707a5538228bf1f2bcc8dfdfd5788e4676c0c0c SHA512 e3f94281689f500b41cd707b2881613c0c6a1be3dad2fbe1fc64330b249bce173d50cdc6e2f656daa7920b06795b7a555c1b08982b889b48955356e66416836c
DIST python-gentoo-patches-3.12.0_p1.tar.xz 6104 BLAKE2B 9064e4bd96d6aed60398113cc4e624ec53a04694146e3cc532453228bdbe1b65fed2f426ed99aa5e76dc10f2513fa5af356e6a505e71e9f66e890c2254f55280 SHA512 5ca6e8fb255fd4b3ec25e7f9d7889d1490661d121907bb86134a0dffb4ecabb2d0b0423429b83f0411a85ec1ec24b8f5162064365f298e356877d55dd570413f
+DIST python-gentoo-patches-3.12.1.tar.xz 5152 BLAKE2B bd1470dbdb4a3336f499534131d9f67329d6a1f6378b61592f6168d9a2500d9d9d65a77167065f80c38745fa1464a2073eac3e4bc0e5c096eefbbc8971a077b6 SHA512 2e608940f2f8c3a4be2699365acd1967d887c7895e71b173327dfe91ea41b6fb10a83d0845b2caa8b59884aa73ea73e49535d7805dc8b50f63b7fcdda67b438a
DIST python-gentoo-patches-3.13.0a2.tar.xz 4360 BLAKE2B 1c55b3ae512a2c04bab00fb3a47faabd2726b6cd7a082d27b4c354ff334c22cb7296d9bf4ca531fc91e2d31be8b1f385de82081980272bca9163bc208b54fea4 SHA512 c7bd4dc3f8f698d65ffe54f46432903e3591687d997b1f6b7429bead461652d9de9dea3515cb0063a662d14ddcf7916199779d61edf888cc24c01d89f1fafbee
DIST python-gentoo-patches-3.8.18.tar.xz 32424 BLAKE2B 2e0b6e1c8e3df666934ba283214ca1577b01140dea00513f6420b0255650002e4bc4cb142076620227cd430bc2547123fd392883285886e543ef72ca466f8ea6 SHA512 b005f1054b726fc8c82a50b006309de64fb7858fe5c22cc7b160687d059a7859ec9388706b74a0e6c1f42301bed071dc639eb8cfae0d7c5eef2f565c63cc2d29
DIST python-gentoo-patches-3.9.18.tar.xz 25044 BLAKE2B 1d9ace5c5a0f1c15bc23595cc51d64b4c2b416552cdaaa960c3e34360aba3e7029a06e2a077212c68fa7aee4fd20f649a3b0926bd4ebb10e529e8350ab051e63 SHA512 bc180c3346dfae60a7db221d114146ee83409bc42092171eb05c83de528bf5f0e5654d1441f40ba839d0a98e866a5b43452fb7a72047c837497620a12097b8f5
@@ -29,6 +32,7 @@ EBUILD python-3.10.13.ebuild 14207 BLAKE2B 7d9f57dd82465e6d000b834e1b3a100551855
EBUILD python-3.11.6.ebuild 15105 BLAKE2B 4833298b9756cb8191488cd8a34eb9a8fb4817a1ccb4c95a1b02edd945d1cb27aada17c853d6927f943087c972771e8e2cf61d0e66ab9def73e12cf771958bfb SHA512 61fd0faf278d437f66da968253e1ccb161345b8bc2352a673605c6a708a0f41903adde5493d30c1bc2cf1baa88eb2a8d3865b67189a0c7808c0174f9e5eca6f7
EBUILD python-3.11.7.ebuild 15113 BLAKE2B 53297048639f49417255a90a748335179953f18ea176e59511265bf1dca6110bc7297497b79b34152af58b5b7b54728ee3b4d1754efc19a8d26aad0362985e56 SHA512 c1548b4924d7807e9e47d9f6c408cab151a5b66ebd7dfb9d58d7f6e7c4824406f626c15c50c1738dd38783a88a476585e8784075263561a98fb13eb0d92a4137
EBUILD python-3.12.0_p1.ebuild 14665 BLAKE2B 6f5d08274a07a921ff299191f193011b7b3af0166ee7ecaa85375cac97e7222588235ec0df89816e0de4a9843d037d7d935ca21097e2cf65171e2610dd64c62f SHA512 1388c9d7cf9391e127bee6c753bed1c722972d3e9c12b8dd4d423b7047e416c3364a6253e00d4e9073a7c5bca31a036ff43812a9a34db1ae26a53e0096d91932
+EBUILD python-3.12.1.ebuild 14673 BLAKE2B 8cea6ceaa4a2b8ebe30d6d85f494e47a6b31ffcb89b1952daa7f26cb58f7bdf71d9f4eade3cac6a3c1d35990c1758d0e821ae5676cfbab38ba330c053cd6e761 SHA512 765454cde068682f67a8935c153240db5c0d456a49108a9f498d9ed958366725e8925878cd2563ae18ff8058c08c8c1c1294862ec0b58e5f7cf16629ebdadb53
EBUILD python-3.13.0_alpha2.ebuild 14501 BLAKE2B fc95f903c0197dc5fad73bb41e3d29907942d5f4aa51f1f17ab7704ce94631abd77cc947277460b5d3b4c4ea55fc7cf0310c30c4ef947fc6cd7601ab5988930e SHA512 06bdce88e16edfed6d25feed6653335baf65fe5cb6aa8ffc5896a2c7851ca589b20ea588ce4e1fc04c4fc7571b3d188ed35231b9ca7e8933616e5f3347cc60b2
EBUILD python-3.8.18.ebuild 12357 BLAKE2B 98c47b83e4b18bc3ed23ccf8a10a310b9d71c51c08cd8ada6050a5db32c820a059b3e3b96e07be09daa949fc93c5e12c94c3a2b0f6bede56f4a33714688e7cb2 SHA512 7ddc4c2cec2641098906583ffe1e7bb9f324ccf4e7fc348e9d291f1b9032655a992681ff464a01dce565bd3249cf44595a6ca617b21f2958205ed6473418c7ab
EBUILD python-3.9.18.ebuild 13858 BLAKE2B 935bd948e44404cf68d62a93c77998570dba12778bdac9932a04005c0ec741a48581a51d82879ddfd0042a0fcf22ebbd407eec175ff846525e8ccaa7c16d1317 SHA512 f2f9b54437a20a3565261c9dcf5f5c0b9a09f0bcf69713ef42b665cfbfde59f53d8a3a920193e2888e33db1383a8acbceaca4d01f100cea86cd685f2c3511e8e
diff --git a/dev-lang/python/python-3.12.1.ebuild b/dev-lang/python/python-3.12.1.ebuild
new file mode 100644
index 000000000000..df871bbf0ed2
--- /dev/null
+++ b/dev-lang/python/python-3.12.1.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2023 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.
+
+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[extra-filters(+)]
+ dev-python/ensurepip-pip
+ dev-python/ensurepip-setuptools
+ dev-python/ensurepip-wheel
+ )
+ valgrind? ( dev-util/valgrind )
+"
+# autoconf-archive needed to eautoreconf
+BDEPEND="
+ sys-devel/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 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
+}