summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-08 19:30:29 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-08 19:30:29 +0100
commit541eca7cf7b9950f0adaaf9158f94c76ba0aedc9 (patch)
treeb80d0f20ca0dc04843c819a54cc618cc8baf0479 /dev-lang
parent4df758340c38fb7f188a6356561aeb4ed2c3f38c (diff)
gentoo auto-resync : 08:10:2022 - 19:30:29
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin19336 -> 19341 bytes
-rw-r--r--dev-lang/ghc/Manifest4
-rw-r--r--dev-lang/ghc/files/ghc-9.0.2-riscv64-llvm.patch799
-rw-r--r--dev-lang/ghc/ghc-9.0.2.ebuild4
-rw-r--r--dev-lang/python/Manifest18
-rw-r--r--dev-lang/python/python-2.7.18_p15-r1.ebuild2
-rw-r--r--dev-lang/python/python-3.10.7.ebuild2
-rw-r--r--dev-lang/python/python-3.11.0_rc1.ebuild482
-rw-r--r--dev-lang/python/python-3.11.0_rc1_p1.ebuild481
-rw-r--r--dev-lang/python/python-3.11.0_rc1_p2.ebuild481
-rw-r--r--dev-lang/python/python-3.8.13_p7.ebuild348
-rw-r--r--dev-lang/python/python-3.8.14.ebuild2
-rw-r--r--dev-lang/python/python-3.9.13_p5.ebuild402
13 files changed, 11 insertions, 3014 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index 479ed934bc12..d63c1f8c973b 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 646612781cbf..0bb74e1ad4c7 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -12,11 +12,11 @@ AUX ghc-9.0.2-disable-unboxed-arrays.patch 1298 BLAKE2B d3d8cf5b8f7f012cb93f6481
AUX ghc-9.0.2-fix-tests-python310.patch 1116 BLAKE2B fc7a7390cbbc737c66ea8401c9211318d078499bfd103f07ec2df0db9824041dfee279e364601a21d4d37a694a9442f3570c0333b2baab6173d6daa366c931da SHA512 0620ebffc49a06a65bd45bf324de4674b98e874291e6bebae1a95d585bbdf38cc201a734f7f20133880b46e9abf0839b59278688b00c892b94091d1c0257352b
AUX ghc-9.0.2-llvm-13.patch 988 BLAKE2B dee0a02ffb7b79981981615e7933f5ba3348f700794dac1a34fa71987ab9d267af9a79a40db7d66f6bf6ffdb26bed57bdd7dc157f3f27efa296c4152b8e81070 SHA512 a20213400f48882e8c8521a950088fa9dcbfe7cc2ae678d76fd6f1298f019dae9ed334f03050116527554d9ada60b649694d6674a914ce48fa1b5bbf918aa712
AUX ghc-9.0.2-modorigin-semigroup.patch 1210 BLAKE2B e29917dd740bded98257366ca37d3ac8fdc8ffd0e988e6286b8cf21fb9f0232ce1584a1a22665f4afad36e5585c29091040cac16b1204022f5a5f3328420c4ff SHA512 dc54fb02dfed55f5a9309c61ec23859ad4f80fd271fe0ccb41b786fc7d44bc0d9722069e2f56731c6af5ad1703c5081ba9e4b4e683911af4ad9b498f53b67a5e
-AUX ghc-9.0.2-riscv64-llvm.patch 30125 BLAKE2B 203fa506162aade3a974b280e915f427624e3fb8c5640fb71542d887a78558391c8d14b8461d853db8c1f2f2950468d39f74a5c3e42966db80815ff2aed01731 SHA512 94c12a2d82df0688f7e61eff01018543fe93dd5be14c248407c1829ab923cc2f9c974e1818aaf3a7582e8cba376bccbdf93fbf6c3ed797e31b5dc5f33a196e64
AUX ghc-bash-completion 6496 BLAKE2B dc94a1979e886026a2fbe04bf7b45718ffa3e025a0e8945262e21a1243bfce6517fa1794f2ba6cd54cc853e93ad5d80472b9019b95762f10b5be83634a479955 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5
AUX latomic-subword 2886 BLAKE2B 97c6fb8d055e2ae4abf366f9f0e255588ca2f61f189d9356c5d0e6ff0dd7e7f10676469c72c02d1bd1bc10e5329bc31056670d2ddf03d6e65ae3ff1a5b4cb561 SHA512 8e7e261211ce4cc9baf855ca7b9a289b07fdda27b9738434c42374f9381429fa5798fd15f9cfeb50cc17839a8b8d3634653b72dc8ae9bb5970cf88d35553516c
DIST ghc-8.10.6-src.tar.xz 19932832 BLAKE2B f5d0c43aa5df87648e32beeb5ed6866b231cbce4f344fb03110db826b36bbac435f5e89d9ffeef3f87c15e830fdee6b95150b7bdcd06906575bfcd9c83797dff SHA512 6314eb9744d47d803b30b621bd12bf6179dad5cc578ec267b3a65b89e9c9b431bdb4913936f040c7ca4fcc71a676a43e78b5f6173d123a844e7f29004405b8b6
DIST ghc-8.10.6-testsuite.tar.xz 2265044 BLAKE2B 72a1e955acecc92a720ee2747d96cacf56f2968c9deabb254c882a969c154baa0fdb639a857844ec91a4e47ee553dd13b58c3b790202e7e73500095c1ec85ee9 SHA512 f74d743bd8f889c2941be8fd5348e92abcaf75bce48140f7f9cc0c6ce33ba24a8479bef48631ffe2a10397c0ecf166b3bddb6ca8ee905859c029175de5d43f2a
+DIST ghc-9.0.2-riscv64-llvm.patch.xz 7148 BLAKE2B 01a0d4036b649f663aebebab06990ac041533e7462d3ee9e143444f1119b736f2f8f2dfc293d61da1fac9f0d3ef12e98bab5b0c9fe8440ed1eab22a1d45fb9d7 SHA512 8afb62d5363d8a1a8f63e85335f3c8fa35b7d22899ebe334218a60ce9519852325c8ce93bb0be794c36cbc3c1cc031b7b1e2f4d7665d71f49e95f737bd91ba1a
DIST ghc-9.0.2-src.tar.xz 27270396 BLAKE2B 0a73d910d3ef11161f895849025fe37ce231932f7cde441fdf620cf8c51678060a804467879eb0ee5c0a30413604c56e28e2aa1cde01e45c620b76987d9c0c0e SHA512 32994c7d2b8f47bae604cd825bfcf9c788d79ce26d1d5f58bd73a7093e11ae6c3c17b31dc0c9e454dbf67ca169b942f92213c388d615768cae86055bf6094dee
DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b15147913ffa8d3cd3ff7fc63ef7e20b4efd8b443cf21f12e1ab0f5044790f6d8af6cf7788bda85a21b2f356ddface86eb896670 SHA512 b2375500ae837d74af8085d099899b5a7a589c59bdcc033ca0bd6e00f33c4f8d90b481e0c7c3de113e607fcfafdfe8edde4713e6d242b2d4ee87df2eb960c9c7
DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
@@ -28,5 +28,5 @@ DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2
DIST ghc-bin-9.0.2-riscv64-unknown-linux-gnu.tar.gz 313475807 BLAKE2B a5e1bbd4630eaff63dd01d79fdcb26a663771c0241d3211aa3a0033cb58addbe8e696177500ac06ae727fc645bfc6f16a3df763a6a0ae039b8823bcbfb9918bb SHA512 5e462f6f9d3f3507b3e09230729faa2a3e1fa92a8024fac602d75b804fff25f27e335871658f4b7b2c671f9e066373ca0285720da315a6c22f6f2c9c3cfea927
DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c
EBUILD ghc-8.10.6.ebuild 26284 BLAKE2B 6285637fa2be744f41815e25ba512146381106fd8deffb8a684fe94307e256242357c52b36a584cab5d2f54bb629c067b25cffc4d2d38df49bfe31baf666ead6 SHA512 d2ed3dfd4d3416573229af26416ba96382861eda5c09764facc5dac95b485d61e8425799d10ebd6bc1e98b7be680f86fb63c4df8b764f7ed3855c5debece356c
-EBUILD ghc-9.0.2.ebuild 27566 BLAKE2B 52671f6d3e98aa4fee365eee1db7f97ce509fd15414e5dd32d0832f2f5894135e104bfba3ea6505b8e6d66cca45137bac67e0fa16269be840f5851369754b1f9 SHA512 cac35885b4c0b3b2fede44847bda66759b54919db95b0e4459792c4649c268789f69178127c2346c2a33ca848bedd3147d13a64f2770cc6e8f55bdc5ed959a7b
+EBUILD ghc-9.0.2.ebuild 27654 BLAKE2B 375f49561a551468ec7d122bcb8d7b8a95fcd245b1beb9884a521747fd883012189dfd13b4aa87409ccdfbf5baad74915f8f47b59da3eaa47e7a736bd5995f12 SHA512 a32c471a40367cac8b41862b8863c3a7b15d3d125842cad6bc1df562951ec23429127e8fc1610c7e2f728d9f5710b5cc4e049d8ac16ff44f85baaf89cd97f11c
MISC metadata.xml 1172 BLAKE2B 88b5e4af0e8c0e3335185f2c5469837a43ee87e6fc598242f29aced9bb8a3c330139978c564eb4ca503101934917e8406e9400dffd2eeaf7cd9983e8dc96105e SHA512 b03bb932efa54be0d55be591850064fcc967c8d77afdded255be91794544d47bdbbbd2959103cb739f6ec57b8571a955352e965ee1540a9854235a963b218bd3
diff --git a/dev-lang/ghc/files/ghc-9.0.2-riscv64-llvm.patch b/dev-lang/ghc/files/ghc-9.0.2-riscv64-llvm.patch
deleted file mode 100644
index 0dcd6cde197b..000000000000
--- a/dev-lang/ghc/files/ghc-9.0.2-riscv64-llvm.patch
+++ /dev/null
@@ -1,799 +0,0 @@
-GHC supplied all of the information necessary for a registerised build on riscv using LLVM codegen in 9.2.
-Andreas Schwab backported this to 8.10.7 in OpenSUSE: https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/ghc
-This is a forward-port of the backport to 9.0.
-
-diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs
-index 23175a1cd2..3f77573495 100644
---- a/compiler/GHC/CmmToAsm.hs
-+++ b/compiler/GHC/CmmToAsm.hs
-@@ -182,6 +182,7 @@ nativeCodeGen dflags this_mod modLoc h us cmms
- ArchAlpha -> panic "nativeCodeGen: No NCG for Alpha"
- ArchMipseb -> panic "nativeCodeGen: No NCG for mipseb"
- ArchMipsel -> panic "nativeCodeGen: No NCG for mipsel"
-+ ArchRISCV64 -> panic "nativeCodeGen: No NCG for RISCV64"
- ArchUnknown -> panic "nativeCodeGen: No NCG for unknown arch"
- ArchJavaScript-> panic "nativeCodeGen: No NCG for JavaScript"
-
-diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
-index 105e2ebdf9..07eca93ac3 100644
---- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
-+++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
-@@ -120,6 +120,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcInteger conflicts excl
- ArchMipseb -> panic "trivColorable ArchMipseb"
- ArchMipsel -> panic "trivColorable ArchMipsel"
- ArchS390X -> panic "trivColorable ArchS390X"
-+ ArchRISCV64 -> panic "trivColorable ArchRISCV64"
- ArchJavaScript-> panic "trivColorable ArchJavaScript"
- ArchUnknown -> panic "trivColorable ArchUnknown")
- , count2 <- accSqueeze 0 cALLOCATABLE_REGS_INTEGER
-@@ -151,6 +152,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclus
- ArchMipseb -> panic "trivColorable ArchMipseb"
- ArchMipsel -> panic "trivColorable ArchMipsel"
- ArchS390X -> panic "trivColorable ArchS390X"
-+ ArchRISCV64 -> panic "trivColorable ArchRISCV64"
- ArchJavaScript-> panic "trivColorable ArchJavaScript"
- ArchUnknown -> panic "trivColorable ArchUnknown")
- , count2 <- accSqueeze 0 cALLOCATABLE_REGS_FLOAT
-@@ -184,6 +186,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu
- ArchMipseb -> panic "trivColorable ArchMipseb"
- ArchMipsel -> panic "trivColorable ArchMipsel"
- ArchS390X -> panic "trivColorable ArchS390X"
-+ ArchRISCV64 -> panic "trivColorable ArchRISCV64"
- ArchJavaScript-> panic "trivColorable ArchJavaScript"
- ArchUnknown -> panic "trivColorable ArchUnknown")
- , count2 <- accSqueeze 0 cALLOCATABLE_REGS_DOUBLE
-diff --git a/compiler/GHC/CmmToAsm/Reg/Linear.hs b/compiler/GHC/CmmToAsm/Reg/Linear.hs
-index 1ab353cc34..d8228c69cd 100644
---- a/compiler/GHC/CmmToAsm/Reg/Linear.hs
-+++ b/compiler/GHC/CmmToAsm/Reg/Linear.hs
-@@ -225,6 +225,7 @@ linearRegAlloc config entry_ids block_live sccs
- ArchAlpha -> panic "linearRegAlloc ArchAlpha"
- ArchMipseb -> panic "linearRegAlloc ArchMipseb"
- ArchMipsel -> panic "linearRegAlloc ArchMipsel"
-+ ArchRISCV64 -> panic "linearRegAlloc ArchRISCV64"
- ArchJavaScript -> panic "linearRegAlloc ArchJavaScript"
- ArchUnknown -> panic "linearRegAlloc ArchUnknown"
- where
-diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs b/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
-index b89c056a82..1768422f5c 100644
---- a/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
-+++ b/compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
-@@ -83,5 +83,6 @@ maxSpillSlots config = case platformArch (ncgPlatform config) of
- ArchAlpha -> panic "maxSpillSlots ArchAlpha"
- ArchMipseb -> panic "maxSpillSlots ArchMipseb"
- ArchMipsel -> panic "maxSpillSlots ArchMipsel"
-+ ArchRISCV64 -> panic "maxSpillSlots ArchRISCV64"
- ArchJavaScript-> panic "maxSpillSlots ArchJavaScript"
- ArchUnknown -> panic "maxSpillSlots ArchUnknown"
-diff --git a/compiler/GHC/CmmToAsm/Reg/Target.hs b/compiler/GHC/CmmToAsm/Reg/Target.hs
-index ba249801ba..284df45983 100644
---- a/compiler/GHC/CmmToAsm/Reg/Target.hs
-+++ b/compiler/GHC/CmmToAsm/Reg/Target.hs
-@@ -51,6 +51,7 @@ targetVirtualRegSqueeze platform
- ArchAlpha -> panic "targetVirtualRegSqueeze ArchAlpha"
- ArchMipseb -> panic "targetVirtualRegSqueeze ArchMipseb"
- ArchMipsel -> panic "targetVirtualRegSqueeze ArchMipsel"
-+ ArchRISCV64 -> panic "targetVirtualRegSqueeze ArchRISCV64"
- ArchJavaScript-> panic "targetVirtualRegSqueeze ArchJavaScript"
- ArchUnknown -> panic "targetVirtualRegSqueeze ArchUnknown"
-
-@@ -70,6 +71,7 @@ targetRealRegSqueeze platform
- ArchAlpha -> panic "targetRealRegSqueeze ArchAlpha"
- ArchMipseb -> panic "targetRealRegSqueeze ArchMipseb"
- ArchMipsel -> panic "targetRealRegSqueeze ArchMipsel"
-+ ArchRISCV64 -> panic "targetRealRegSqueeze ArchRISCV64"
- ArchJavaScript-> panic "targetRealRegSqueeze ArchJavaScript"
- ArchUnknown -> panic "targetRealRegSqueeze ArchUnknown"
-
-@@ -88,6 +90,7 @@ targetClassOfRealReg platform
- ArchAlpha -> panic "targetClassOfRealReg ArchAlpha"
- ArchMipseb -> panic "targetClassOfRealReg ArchMipseb"
- ArchMipsel -> panic "targetClassOfRealReg ArchMipsel"
-+ ArchRISCV64 -> panic "targetClassOfRealReg ArchRISCV64"
- ArchJavaScript-> panic "targetClassOfRealReg ArchJavaScript"
- ArchUnknown -> panic "targetClassOfRealReg ArchUnknown"
-
-@@ -106,6 +109,7 @@ targetMkVirtualReg platform
- ArchAlpha -> panic "targetMkVirtualReg ArchAlpha"
- ArchMipseb -> panic "targetMkVirtualReg ArchMipseb"
- ArchMipsel -> panic "targetMkVirtualReg ArchMipsel"
-+ ArchRISCV64 -> panic "targetMkVirtualReg ArchRISCV64"
- ArchJavaScript-> panic "targetMkVirtualReg ArchJavaScript"
- ArchUnknown -> panic "targetMkVirtualReg ArchUnknown"
-
-@@ -124,6 +128,7 @@ targetRegDotColor platform
- ArchAlpha -> panic "targetRegDotColor ArchAlpha"
- ArchMipseb -> panic "targetRegDotColor ArchMipseb"
- ArchMipsel -> panic "targetRegDotColor ArchMipsel"
-+ ArchRISCV64 -> panic "targetRegDotColor ArchRISCV64"
- ArchJavaScript-> panic "targetRegDotColor ArchJavaScript"
- ArchUnknown -> panic "targetRegDotColor ArchUnknown"
-
-diff --git a/compiler/GHC/CmmToLlvm/Mangler.hs b/compiler/GHC/CmmToLlvm/Mangler.hs
-index 0436dbcf07..5c71655ab3 100644
---- a/compiler/GHC/CmmToLlvm/Mangler.hs
-+++ b/compiler/GHC/CmmToLlvm/Mangler.hs
-@@ -42,7 +42,7 @@ llvmFixupAsm dflags f1 f2 = {-# SCC "llvm_mangler" #-}
-
- -- | These are the rewrites that the mangler will perform
- rewrites :: [Rewrite]
--rewrites = [rewriteSymType, rewriteAVX]
-+rewrites = [rewriteSymType, rewriteAVX, rewriteCall]
-
- type Rewrite = DynFlags -> B.ByteString -> Maybe B.ByteString
-
-@@ -106,6 +106,27 @@ rewriteAVX dflags s
- isVmovdqa = B.isPrefixOf (B.pack "vmovdqa")
- isVmovap = B.isPrefixOf (B.pack "vmovap")
-
-+-- | This rewrites (tail) calls to avoid creating PLT entries for
-+-- functions on riscv64. The replacement will load the address from the
-+-- GOT, which is resolved to point to the real address of the function.
-+rewriteCall :: Rewrite
-+rewriteCall dflags l
-+ | not isRISCV64 = Nothing
-+ | isCall l = Just $ replaceCall "call" "jalr" "ra" l
-+ | isTail l = Just $ replaceCall "tail" "jr" "t1" l
-+ | otherwise = Nothing
-+ where
-+ isRISCV64 = platformArch (targetPlatform dflags) == ArchRISCV64
-+ isCall = B.isPrefixOf (B.pack "call\t")
-+ isTail = B.isPrefixOf (B.pack "tail\t")
-+
-+ replaceCall call jump reg l =
-+ appendInsn (jump ++ "\t" ++ reg) $ removePlt $
-+ replaceOnce (B.pack call) (B.pack ("la\t" ++ reg ++ ",")) l
-+ where
-+ removePlt = replaceOnce (B.pack "@plt") (B.pack "")
-+ appendInsn i = (`B.append` B.pack ("\n\t" ++ i))
-+
- -- | @replaceOnce match replace bs@ replaces the first occurrence of the
- -- substring @match@ in @bs@ with @replace@.
- replaceOnce :: B.ByteString -> B.ByteString -> B.ByteString -> B.ByteString
-diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
-index 8edf49dfdd..d66404e916 100644
---- a/compiler/GHC/Driver/Pipeline.hs
-+++ b/compiler/GHC/Driver/Pipeline.hs
-@@ -936,6 +936,7 @@ llvmOptions dflags =
- ++ [("", "-mcpu=" ++ mcpu) | not (null mcpu)
- , not (any (isInfixOf "-mcpu") (getOpts dflags opt_lc)) ]
- ++ [("", "-mattr=" ++ attrs) | not (null attrs) ]
-+ ++ [("", "-target-abi=" ++ abi) | not (null abi) ]
-
- where target = platformMisc_llvmTarget $ platformMisc dflags
- Just (LlvmTarget _ mcpu mattr) = lookup target (llvmTargets $ llvmConfig dflags)
-@@ -965,6 +966,11 @@ llvmOptions dflags =
- ++ ["+bmi" | isBmiEnabled dflags ]
- ++ ["+bmi2" | isBmi2Enabled dflags ]
-
-+ abi :: String
-+ abi = case platformArch (targetPlatform dflags) of
-+ ArchRISCV64 -> "lp64d"
-+ _ -> ""
-+
- -- -----------------------------------------------------------------------------
- -- | Each phase in the pipeline returns the next phase to execute, and the
- -- name of the file in which the output was placed.
-diff --git a/compiler/GHC/Platform/RISCV64.hs b/compiler/GHC/Platform/RISCV64.hs
-new file mode 100644
-index 0000000000..289e2e27a8
---- /dev/null
-+++ b/compiler/GHC/Platform/RISCV64.hs
-@@ -0,0 +1,9 @@
-+{-# LANGUAGE CPP #-}
-+
-+module GHC.Platform.RISCV64 where
-+
-+import GHC.Prelude
-+
-+#define MACHREGS_NO_REGS 0
-+#define MACHREGS_riscv64 1
-+#include "../../../includes/CodeGen.Platform.hs"
-diff --git a/compiler/GHC/Platform/Regs.hs b/compiler/GHC/Platform/Regs.hs
-index 1bf21370c7..e0bdf5d6e5 100644
---- a/compiler/GHC/Platform/Regs.hs
-+++ b/compiler/GHC/Platform/Regs.hs
-@@ -15,6 +15,7 @@ import qualified GHC.Platform.S390X as S390X
- import qualified GHC.Platform.SPARC as SPARC
- import qualified GHC.Platform.X86 as X86
- import qualified GHC.Platform.X86_64 as X86_64
-+import qualified GHC.Platform.RISCV64 as RISCV64
- import qualified GHC.Platform.NoRegs as NoRegs
-
- -- | Returns 'True' if this global register is stored in a caller-saves
-@@ -31,6 +32,7 @@ callerSaves platform
- ArchSPARC -> SPARC.callerSaves
- ArchARM {} -> ARM.callerSaves
- ArchAArch64 -> AArch64.callerSaves
-+ ArchRISCV64 -> RISCV64.callerSaves
- arch
- | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->
- PPC.callerSaves
-@@ -53,6 +55,7 @@ activeStgRegs platform
- ArchSPARC -> SPARC.activeStgRegs
- ArchARM {} -> ARM.activeStgRegs
- ArchAArch64 -> AArch64.activeStgRegs
-+ ArchRISCV64 -> RISCV64.activeStgRegs
- arch
- | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->
- PPC.activeStgRegs
-@@ -70,6 +73,7 @@ haveRegBase platform
- ArchSPARC -> SPARC.haveRegBase
- ArchARM {} -> ARM.haveRegBase
- ArchAArch64 -> AArch64.haveRegBase
-+ ArchRISCV64 -> RISCV64.haveRegBase
- arch
- | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->
- PPC.haveRegBase
-@@ -87,6 +91,7 @@ globalRegMaybe platform
- ArchSPARC -> SPARC.globalRegMaybe
- ArchARM {} -> ARM.globalRegMaybe
- ArchAArch64 -> AArch64.globalRegMaybe
-+ ArchRISCV64 -> RISCV64.globalRegMaybe
- arch
- | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->
- PPC.globalRegMaybe
-@@ -104,6 +109,7 @@ freeReg platform
- ArchSPARC -> SPARC.freeReg
- ArchARM {} -> ARM.freeReg
- ArchAArch64 -> AArch64.freeReg
-+ ArchRISCV64 -> RISCV64.freeReg
- arch
- | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->
- PPC.freeReg
-diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
-index de53f7f548..483a601602 100644
---- a/compiler/ghc.cabal.in
-+++ b/compiler/ghc.cabal.in
-@@ -261,6 +261,7 @@ Library
- GHC.Platform.AArch64
- GHC.Platform.NoRegs
- GHC.Platform.PPC
-+ GHC.Platform.RISCV64
- GHC.Platform.S390X
- GHC.Platform.SPARC
- GHC.Platform.X86
-diff --git a/configure.ac b/configure.ac
-index 20911ae43f..b017d50bd6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -283,7 +283,7 @@ dnl --------------------------------------------------------------
-
- AC_MSG_CHECKING(whether target supports a registerised ABI)
- case "$TargetArch" in
-- i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm|aarch64)
-+ i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm|aarch64|riscv64)
- UnregisterisedDefault=NO
- AC_MSG_RESULT([yes])
- ;;
-@@ -318,7 +318,7 @@ AC_MSG_CHECKING(whether target supports tables next to code)
- case "$Unregisterised" in
- NO)
- case "$TargetArch" in
-- ia64|powerpc64|powerpc64le|s390x)
-+ ia64|powerpc64|powerpc64le|s390x|riscv64)
- TablesNextToCodeDefault=NO
- AC_MSG_RESULT([no])
- ;;
-@@ -347,7 +347,7 @@ AC_SUBST(TablesNextToCode)
- dnl ** Does target have runtime linker support?
- dnl --------------------------------------------------------------
- case "$target" in
-- powerpc64-*|powerpc64le-*|powerpc-ibm-aix*|s390x-ibm-linux)
-+ powerpc64-*|powerpc64le-*|powerpc-ibm-aix*|s390x-ibm-linux|riscv64-*)
- TargetHasRTSLinker=NO
- ;;
- *)
-diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
-index b00acfa38a..8c942662e6 100644
---- a/includes/CodeGen.Platform.hs
-+++ b/includes/CodeGen.Platform.hs
-@@ -380,6 +380,74 @@ import GHC.Platform.Reg
- # define f14 30
- # define f15 31
-
-+#elif defined(MACHREGS_riscv64)
-+
-+# define zero 0
-+# define ra 1
-+# define sp 2
-+# define gp 3
-+# define tp 4
-+# define t0 5
-+# define t1 6
-+# define t2 7
-+# define s0 8
-+# define s1 9
-+# define a0 10
-+# define a1 11
-+# define a2 12
-+# define a3 13
-+# define a4 14
-+# define a5 15
-+# define a6 16
-+# define a7 17
-+# define s2 18
-+# define s3 19
-+# define s4 20
-+# define s5 21
-+# define s6 22
-+# define s7 23
-+# define s8 24
-+# define s9 25
-+# define s10 26
-+# define s11 27
-+# define t3 28
-+# define t4 29
-+# define t5 30
-+# define t6 31
-+
-+# define ft0 32
-+# define ft1 33
-+# define ft2 34
-+# define ft3 35
-+# define ft4 36
-+# define ft5 37
-+# define ft6 38
-+# define ft7 39
-+# define fs0 40
-+# define fs1 41
-+# define fa0 42
-+# define fa1 43
-+# define fa2 44
-+# define fa3 45
-+# define fa4 46
-+# define fa5 47
-+# define fa6 48
-+# define fa7 49
-+# define fs2 50
-+# define fs3 51
-+# define fs4 52
-+# define fs5 53
-+# define fs6 54
-+# define fs7 55
-+# define fs8 56
-+# define fs9 57
-+# define fs10 58
-+# define fs11 59
-+# define ft8 60
-+# define ft9 61
-+# define ft10 62
-+# define ft11 63
-+
- #endif
-
- callerSaves :: GlobalReg -> Bool
-@@ -667,7 +735,7 @@ globalRegMaybe :: GlobalReg -> Maybe RealReg
- #if defined(MACHREGS_i386) || defined(MACHREGS_x86_64) \
- || defined(MACHREGS_sparc) || defined(MACHREGS_powerpc) \
- || defined(MACHREGS_arm) || defined(MACHREGS_aarch64) \
-- || defined(MACHREGS_s390x)
-+ || defined(MACHREGS_s390x) || defined(MACHREGS_riscv64)
- # if defined(REG_Base)
- globalRegMaybe BaseReg = Just (RealRegSingle REG_Base)
- # endif
-diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
-index be7b7d60b4..1a9012e7ef 100644
---- a/includes/stg/MachRegs.h
-+++ b/includes/stg/MachRegs.h
-@@ -663,6 +663,68 @@ the stack. See Note [Overlapping global registers] for implications.
- #define CALLER_SAVES_D5
- #define CALLER_SAVES_D6
-
-+/* -----------------------------------------------------------------------------
-+ The riscv64 register mapping
-+
-+ Register | Role(s) | Call effect
-+ ------------+-----------------------------------------+-------------
-+ zero | Hard-wired zero | -
-+ ra | Return address | caller-saved
-+ sp | Stack pointer | callee-saved
-+ gp | Global pointer | callee-saved
-+ tp | Thread pointer | callee-saved
-+ t0,t1,t2 | - | caller-saved
-+ s0 | Frame pointer | callee-saved
-+ s1 | - | callee-saved
-+ a0,a1 | Arguments / return values | caller-saved
-+ a2..a7 | Arguments | caller-saved
-+ s2..s11 | - | callee-saved
-+ t3..t6 | - | caller-saved
-+ ft0..ft7 | - | caller-saved
-+ fs0,fs1 | - | callee-saved
-+ fa0,fa1 | Arguments / return values | caller-saved
-+ fa2..fa7 | Arguments | caller-saved
-+ fs2..fs11 | - | callee-saved
-+ ft8..ft11 | - | caller-saved
-+
-+ Each general purpose register as well as each floating-point
-+ register is 64 bits wide.
-+
-+ -------------------------------------------------------------------------- */
-+
-+#elif defined(MACHREGS_riscv64)
-+
-+#define REG(x) __asm__(#x)
-+
-+#define REG_Base s1
-+#define REG_Sp s2
-+#define REG_Hp s3
-+#define REG_R1 s4
-+#define REG_R2 s5
-+#define REG_R3 s6
-+#define REG_R4 s7
-+#define REG_R5 s8
-+#define REG_R6 s9
-+#define REG_R7 s10
-+#define REG_SpLim s11
-+
-+#define REG_F1 fs0
-+#define REG_F2 fs1
-+#define REG_F3 fs2
-+#define REG_F4 fs3
-+#define REG_F5 fs4
-+#define REG_F6 fs5
-+
-+#define REG_D1 fs6
-+#define REG_D2 fs7
-+#define REG_D3 fs8
-+#define REG_D4 fs9
-+#define REG_D5 fs10
-+#define REG_D6 fs11
-+
-+#define MAX_REAL_FLOAT_REG 6
-+#define MAX_REAL_DOUBLE_REG 6
-+
- #else
-
- #error Cannot find platform to give register info for
-diff --git a/includes/stg/MachRegsForHost.h b/includes/stg/MachRegsForHost.h
-index 3597b2be90..e902d528f6 100644
---- a/includes/stg/MachRegsForHost.h
-+++ b/includes/stg/MachRegsForHost.h
-@@ -71,6 +71,10 @@
- #define MACHREGS_s390x 1
- #endif
-
-+#if defined(riscv64_HOST_ARCH)
-+#define MACHREGS_riscv64 1
-+#endif
-+
- #endif
-
- #include "MachRegs.h"
-diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
-index 389dd95c88..f12fd3f71b 100644
---- a/includes/stg/SMP.h
-+++ b/includes/stg/SMP.h
-@@ -377,6 +377,8 @@ write_barrier(void) {
- __asm__ __volatile__ ("" : : : "memory");
- #elif defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)
- __asm__ __volatile__ ("dmb st" : : : "memory");
-+#elif defined(riscv64_HOST_ARCH)
-+ __asm__ __volatile__ ("fence w,w" : : : "memory");
- #else
- #error memory barriers unimplemented on this architecture
- #endif
-@@ -401,6 +403,8 @@ store_load_barrier(void) {
- __asm__ __volatile__ ("dmb" : : : "memory");
- #elif defined(aarch64_HOST_ARCH)
- __asm__ __volatile__ ("dmb sy" : : : "memory");
-+#elif defined(riscv64_HOST_ARCH)
-+ __asm__ __volatile__ ("fence w,r" : : : "memory");
- #else
- #error memory barriers unimplemented on this architecture
- #endif
-@@ -426,6 +430,8 @@ load_load_barrier(void) {
- __asm__ __volatile__ ("dmb" : : : "memory");
- #elif defined(aarch64_HOST_ARCH)
- __asm__ __volatile__ ("dmb sy" : : : "memory");
-+#elif defined(riscv64_HOST_ARCH)
-+ __asm__ __volatile__ ("fence w,r" : : : "memory");
- #else
- #error memory barriers unimplemented on this architecture
- #endif
-diff --git a/libraries/ghc-boot/GHC/Platform.hs b/libraries/ghc-boot/GHC/Platform.hs
-index 186f8c8af6..44d2c68c0a 100644
---- a/libraries/ghc-boot/GHC/Platform.hs
-+++ b/libraries/ghc-boot/GHC/Platform.hs
-@@ -130,6 +130,7 @@ data Arch
- | ArchAlpha
- | ArchMipseb
- | ArchMipsel
-+ | ArchRISCV64
- | ArchJavaScript
- deriving (Read, Show, Eq)
-
-@@ -171,6 +172,7 @@ stringEncodeArch = \case
- ArchAlpha -> "alpha"
- ArchMipseb -> "mipseb"
- ArchMipsel -> "mipsel"
-+ ArchRISCV64 -> "riscv64"
- ArchJavaScript -> "js"
-
- isARM :: Arch -> Bool
-@@ -338,6 +340,7 @@ platformCConvNeedsExtension :: Platform -> Bool
- platformCConvNeedsExtension platform = case platformArch platform of
- ArchPPC_64 _ -> True
- ArchS390X -> True
-+ ArchRISCV64 -> True
- _ -> False
-
-
-diff --git a/libraries/ghci/GHCi/InfoTable.hsc b/libraries/ghci/GHCi/InfoTable.hsc
-index ad4eb4d6a8..1d1f8cd074 100644
---- a/libraries/ghci/GHCi/InfoTable.hsc
-+++ b/libraries/ghci/GHCi/InfoTable.hsc
-@@ -73,6 +73,7 @@ data Arch = ArchSPARC
- | ArchPPC64
- | ArchPPC64LE
- | ArchS390X
-+ | ArchRISCV64
- deriving Show
-
- mkJumpToAddr :: MonadFail m => EntryFunPtr-> m ItblCodes
-@@ -109,6 +110,8 @@ mArch =
- Just ArchPPC64LE
- #elif defined(s390x_HOST_ARCH)
- Just ArchS390X
-+#elif defined(riscv64_HOST_ARCH)
-+ Just ArchRISCV64
- #else
- Nothing
- #endif
-@@ -288,6 +291,15 @@ mkJumpToAddr' platform a = case platform of
- 0xC0, 0x19, byte3 w64, byte2 w64, byte1 w64, byte0 w64,
- 0x07, 0xF1 ]
-
-+ ArchRISCV64 ->
-+ let w64 = fromIntegral (funPtrToInt a) :: Word64
-+ in Right [ 0x00000297 -- auipc t0,0
-+ , 0x01053283 -- ld t0,16(t0)
-+ , 0x00028067 -- jr t0
-+ , 0x00000013 -- nop
-+ , fromIntegral w64
-+ , fromIntegral (w64 `shiftR` 32) ]
-+
- byte0 :: (Integral w) => w -> Word8
- byte0 w = fromIntegral w
-
-diff --git a/llvm-targets b/llvm-targets
-index c328b2e001..0f809b2418 100644
---- a/llvm-targets
-+++ b/llvm-targets
-@@ -38,6 +38,8 @@
- ,("powerpc64le-unknown-linux-musl", ("e-m:e-i64:64-n32:64", "ppc64le", "+secure-plt"))
- ,("powerpc64le-unknown-linux", ("e-m:e-i64:64-n32:64", "ppc64le", ""))
- ,("s390x-ibm-linux", ("E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64", "z10", ""))
-+,("riscv64-unknown-linux-gnu", ("e-m:e-p:64:64-i64:64-i128:128-n64-S128", "", "+m +a +f +d +c +relax"))
-+,("riscv64-unknown-linux", ("e-m:e-p:64:64-i64:64-i128:128-n64-S128", "", "+m +a +f +d +c +relax"))
- ,("i386-apple-darwin", ("e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:128-n8:16:32-S128", "penryn", ""))
- ,("x86_64-apple-darwin", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "penryn", ""))
- ,("arm64-apple-darwin", ("e-m:o-i64:64-i128:128-n32:64-S128", "apple-a12", "+v8.3a +fp-armv8 +neon +crc +crypto +fullfp16 +ras +lse +rdm +rcpc +zcm +zcz +sha2 +aes"))
-diff --git a/m4/fptools.m4 b/m4/fptools.m4
-index 8c6c9b7062..7dbe53d3b4 100644
---- a/m4/fptools.m4
-+++ b/m4/fptools.m4
-@@ -231,7 +231,10 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
- mipsel)
- test -z "[$]2" || eval "[$]2=ArchMipsel"
- ;;
-- hppa|hppa1_1|ia64|m68k|nios2|riscv32|riscv64|rs6000|s390|sh4|vax)
-+ riscv64)
-+ test -z "[$]2" || eval "[$]2=ArchRISCV64"
-+ ;;
-+ hppa|hppa1_1|ia64|m68k|nios2|riscv32|rs6000|s390|sh4|vax)
- test -z "[$]2" || eval "[$]2=ArchUnknown"
- ;;
- *)
-diff --git a/mk/config.mk.in b/mk/config.mk.in
-index 48b8e23145..e260730991 100644
---- a/mk/config.mk.in
-+++ b/mk/config.mk.in
-@@ -179,7 +179,7 @@ ifeq "$(TargetArch_CPP)" "arm"
- # We don't support load/store barriers pre-ARMv7. See #10433.
- ArchSupportsSMP=$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)
- else
--ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc powerpc64 powerpc64le s390x aarch64)))
-+ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc powerpc64 powerpc64le s390x aarch64 riscv64)))
- endif
-
- # The THREADED_RTS requires `BaseReg` to be in a register and the
-diff --git a/rts/StgCRunAsm.S b/rts/StgCRunAsm.S
-index 60f1bf9a13..16b125a7e8 100644
---- a/rts/StgCRunAsm.S
-+++ b/rts/StgCRunAsm.S
-@@ -232,6 +232,150 @@ StgReturn:
- .size StgReturn, .-StgReturn
-
- .section .note.GNU-stack,"",@progbits
-+
-+#elif defined(riscv64_HOST_ARCH)
-+# define STACK_FRAME_SIZE (RESERVED_C_STACK_BYTES+208)
-+ .text
-+ .align 1
-+ .globl StgRun
-+ .type StgRun, @function
-+StgRun:
-+ .cfi_startproc
-+ addi sp,sp,-208
-+ .cfi_def_cfa_offset 208
-+ /* save callee-saved registers */
-+ sd ra,200(sp)
-+ sd s0,192(sp)
-+ sd s1,184(sp)
-+ sd s2,176(sp)
-+ sd s3,168(sp)
-+ sd s4,160(sp)
-+ sd s5,152(sp)
-+ sd s6,144(sp)
-+ sd s7,136(sp)
-+ sd s8,128(sp)
-+ sd s9,120(sp)
-+ sd s10,112(sp)
-+ sd s11,104(sp)
-+ fsd fs0,88(sp)
-+ fsd fs1,80(sp)
-+ fsd fs2,72(sp)
-+ fsd fs3,64(sp)
-+ fsd fs4,56(sp)
-+ fsd fs5,48(sp)
-+ fsd fs6,40(sp)
-+ fsd fs7,32(sp)
-+ fsd fs8,24(sp)
-+ fsd fs9,16(sp)
-+ fsd fs10,8(sp)
-+ fsd fs11,0(sp)
-+ /* allocate stack frame */
-+ li t0,RESERVED_C_STACK_BYTES
-+ sub sp,sp,t0
-+ .cfi_def_cfa_offset STACK_FRAME_SIZE
-+ .cfi_offset 1, -8
-+ .cfi_offset 8, -16
-+ .cfi_offset 9, -24
-+ .cfi_offset 18, -32
-+ .cfi_offset 19, -40
-+ .cfi_offset 20, -48
-+ .cfi_offset 21, -56
-+ .cfi_offset 22, -64
-+ .cfi_offset 23, -72
-+ .cfi_offset 24, -80
-+ .cfi_offset 25, -88
-+ .cfi_offset 26, -96
-+ .cfi_offset 27, -104
-+ .cfi_offset 40, -120
-+ .cfi_offset 41, -128
-+ .cfi_offset 50, -136
-+ .cfi_offset 51, -144
-+ .cfi_offset 52, -152
-+ .cfi_offset 53, -160
-+ .cfi_offset 54, -168
-+ .cfi_offset 55, -176
-+ .cfi_offset 56, -184
-+ .cfi_offset 57, -192
-+ .cfi_offset 58, -200
-+ .cfi_offset 59, -208
-+ /* set STGs BaseReg from RISCV a1 */
-+ mv s1,a1
-+ /* jump to STG function */
-+ jr a0
-+ .cfi_endproc
-+ .size StgRun, .-StgRun
-+
-+ .text
-+ .align 1
-+ .globl StgReturn
-+ .type StgReturn, @function
-+StgReturn:
-+ .cfi_startproc
-+ /* set return value from STGs R1 (RISCV s4) */
-+ mv a0,s4
-+ /* deallocate stack frame */
-+ li t0,RESERVED_C_STACK_BYTES
-+ add sp,sp,t0
-+ .cfi_def_cfa_offset 208
-+ /* restore callee-saved registers */
-+ ld ra,200(sp)
-+ .cfi_restore 1
-+ ld s0,192(sp)
-+ .cfi_restore 8
-+ ld s1,184(sp)
-+ .cfi_restore 9
-+ ld s2,176(sp)
-+ .cfi_restore 18
-+ ld s3,168(sp)
-+ .cfi_restore 19
-+ ld s4,160(sp)
-+ .cfi_restore 20
-+ ld s5,152(sp)
-+ .cfi_restore 21
-+ ld s6,144(sp)
-+ .cfi_restore 22
-+ ld s7,136(sp)
-+ .cfi_restore 23
-+ ld s8,128(sp)
-+ .cfi_restore 24
-+ ld s9,120(sp)
-+ .cfi_restore 25
-+ ld s10,112(sp)
-+ .cfi_restore 26
-+ ld s11,104(sp)
-+ .cfi_restore 27
-+ fld fs0,88(sp)
-+ .cfi_restore 40
-+ fld fs1,80(sp)
-+ .cfi_restore 41
-+ fld fs2,72(sp)
-+ .cfi_restore 50
-+ fld fs3,64(sp)
-+ .cfi_restore 51
-+ fld fs4,56(sp)
-+ .cfi_restore 52
-+ fld fs5,48(sp)
-+ .cfi_restore 53
-+ fld fs6,40(sp)
-+ .cfi_restore 54
-+ fld fs7,32(sp)
-+ .cfi_restore 55
-+ fld fs8,24(sp)
-+ .cfi_restore 56
-+ fld fs9,16(sp)
-+ .cfi_restore 57
-+ fld fs10,8(sp)
-+ .cfi_restore 58
-+ fld fs11,0(sp)
-+ .cfi_restore 59
-+ addi sp,sp,208
-+ .cfi_def_cfa_offset 0
-+ /* jump back to caller of StgRun() */
-+ ret
-+ .cfi_endproc
-+ .size StgReturn, .-StgReturn
-+
-+ .section .note.GNU-stack,"",@progbits
- #endif
-
- #endif /* !USE_MINIINTERPRETER */
-diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
-index 1da69d03fa..0aa1c8dd3f 100644
---- a/rts/linker/Elf.c
-+++ b/rts/linker/Elf.c
-@@ -412,6 +412,12 @@ ocVerifyImage_ELF ( ObjectCode* oc )
- #endif
- #if defined(EM_AARCH64)
- case EM_AARCH64: IF_DEBUG(linker,debugBelch( "aarch64" )); break;
-+#endif
-+#if defined(EM_RISCV)
-+ case EM_RISCV: IF_DEBUG(linker,debugBelch( "riscv" ));
-+ errorBelch("%s: RTS linker not implemented on riscv",
-+ oc->fileName);
-+ return 0;
- #endif
- default: IF_DEBUG(linker,debugBelch( "unknown" ));
- errorBelch("%s: unknown architecture (e_machine == %d)"
-diff --git a/utils/genapply/Main.hs b/utils/genapply/Main.hs
-index a6d944efa4..a5697b427f 100644
---- a/utils/genapply/Main.hs
-+++ b/utils/genapply/Main.hs
-@@ -17,6 +17,8 @@ module Main(main) where
- -- We improperly include *HOST* macros for our target...
- #include "../../includes/ghcconfig.h"
-
-+#undef UnregisterisedCompiler
-+
- -- ...so that this header defines the right stuff. It is the RTS's host, but
- -- our target, as we are generating code that uses that RTS.
- #include "../../includes/stg/MachRegsForHost.h"
-diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh
-index 32032cb97e..092e0892e5 100755
---- a/utils/llvm-targets/gen-data-layout.sh
-+++ b/utils/llvm-targets/gen-data-layout.sh
-@@ -76,6 +76,9 @@ TARGETS=(
- "powerpc64le-unknown-linux"
- # Linux s390x
- "s390x-ibm-linux"
-+ # Linux riscv64
-+ "riscv64-unknown-linux-gnu"
-+ "riscv64-unknown-linux"
-
- #########################
- # Darwin
diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index 47d7344fd4de..cadfe300318d 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -68,6 +68,8 @@ SRC_URI="!binary? (
https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-src.tar.xz
test? ( https://downloads.haskell.org/ghc/${PV/_/-}/${GHC_P}-testsuite.tar.xz )
)"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-riscv64-llvm.patch.xz"
+
S="${WORKDIR}"/${GHC_P}
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
@@ -539,7 +541,7 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-9.0.2-disable-unboxed-arrays.patch
eapply "${FILESDIR}"/${PN}-9.0.2-llvm-13.patch
eapply "${FILESDIR}"/latomic-subword
- eapply "${FILESDIR}"/${PN}-9.0.2-riscv64-llvm.patch
+ eapply "${WORKDIR}"/${P}-riscv64-llvm.patch
# mingw32 target
pushd "${S}/libraries/Win32"
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 22d23a7c0b4b..17bf40a5f6a6 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -6,8 +6,6 @@ DIST Python-3.10.6.tar.xz 19600672 BLAKE2B b21398f68e13cf8464077aa2c7f08d9044198
DIST Python-3.10.6.tar.xz.asc 833 BLAKE2B ea6546c01a4fbfe3f3e56b2f980da53f0692d9c638534bd25fb96a0f657424f979b6a82a01c77c05ddfded30441b4a0348cc407d5b29290ffc653a508ca32ec8 SHA512 9288e2f62f2e8c8208ad176372261545a64e675d737bb616403bcd888bc91177909257632e4cc0b5d688d612bea38a274030ec6989dc7d56c03064e32ad9903e
DIST Python-3.10.7.tar.xz 19618696 BLAKE2B 45e38e8b8a87ea5c041998a9be5e8fb25c2b57c1f26823833518b06bbf8795b30256fae71ff2175ec53e7af51bf383e6f5109d8fabe370e4aa5f6fc61821c889 SHA512 dc3432d72ee7382617318c9645204876d13bb61d4caf3fbbb65e6b14897261123c743049657c95e159e5566daf4dcde613d2e393f025de758f610b44eb958313
DIST Python-3.10.7.tar.xz.asc 833 BLAKE2B 201ef40872ac8dc8886128b98fc13a0b14ab80db03ec467933fef0356f4a8728679eb77ae1044c51653cf3bd81e93f0a00f59c6f852e75499af95b34f2d6607d SHA512 a65d152d87870de763de3384a1c0ff0309068a2af0fcdfa39a6f968a52b59c56229553cf6a955ec0af1d3db5bf4641c4e91d6150764548d2e9fb0e9a01ab759d
-DIST Python-3.11.0rc1.tar.xz 19815524 BLAKE2B 7dae240dbed052667b46927ccbb483a717b0fe0ba199721d526354d1b89a6dd2842ab0f6c3b078385e4acb7557d06f252d61aacb07d70c7f5598ed91567d2053 SHA512 2a72ea59277f8115e418ced671969fc0d5ba271c7740f70c665a4b450a59d7752278d061bd59f136dacfa608ed167f983c6589b214a973b1b63ea2115ea298bb
-DIST Python-3.11.0rc1.tar.xz.asc 833 BLAKE2B da46a0ab62ef3f2b7a7921294a0d775ca6ab254e3229338232b3d11107aa1d74adc21911678f08f44cc1cd9184beada00d4b60dde60722ef91a247367b13e191 SHA512 d4cffc90c2ed7b8ea7228a21f7ac902a92f27003f1420ad751b1691de950974ea174cb0471b6e19ed1548dc5382012fa9ad5fcf83c34646c7ea2d73c88799e38
DIST Python-3.11.0rc2.tar.xz 19828340 BLAKE2B c4e8578d967917fc6f19355c466ba8e5487e83a17b373dd03ae90f2a73f5f6d07c38ec308c03435d23454cdcb06e63b74fc9ceb3900079996ae71b9327a4a5b3 SHA512 8b37bc9df3c966bd35cffdb7d6406a3c1a5ccfbea10bd8dad498880e3b1492f8cdbbe227ab3a30557843eb05d8fb93077c791e25d71b33ed420992d54b6c9473
DIST Python-3.11.0rc2.tar.xz.asc 833 BLAKE2B 80ea3e8a3565fef6552da2287a5bf07a764002c273842b7d03a417a75adfe616e1b7816c161c42751a495b32ab8d8c11efc6c90ade97c0b31be54f7391ee9c9d SHA512 13e6bfa719db29aa169763399203168923cbfbb01d209e18269399ca84723582f480134edd3bf9f24785cd5ab0486411132d6bbb354fa45ebbba68bf4c70021a
DIST Python-3.8.13.tar.xz 19023016 BLAKE2B d3cb8624496e56d93d34f2aa5082746869a99210197529bc19e6a9d265f4ce246e0e83a3528a7602a28aac8855bf84e6bf6495b85e9202fcf04ef90600cb5e43 SHA512 5c732b5d21b189b99a0e9ccd3ae59466bed60a930d5d3f437a262d38f0797b776cecbf12a1852eaebcfb638a6f2e28e471cc2ebf94237cc728144be21842cb81
@@ -23,34 +21,24 @@ DIST python-gentoo-patches-3.10.6_p2.tar.xz 12040 BLAKE2B 75c93fab19137a966b3775
DIST python-gentoo-patches-3.10.6_p3.tar.xz 26712 BLAKE2B 701a7a4da1a09f71dee8fdf924a45e030b8ae93e469a2789b28b904d2fd6b011589fb940eb0c262e8b19005af523a2f66075d053fb60892d6ebd473159fce718 SHA512 ed43ba18735ddf72c434bfe905894d156a144a77f9fb8266378d384e840b376c6220859d8d1af83f304293368bf1dd45881316c1797ba25d618a064daaacab17
DIST python-gentoo-patches-3.10.6_p4.tar.xz 28612 BLAKE2B 197ef33c3086cb9efaf09868145826e2889f61d6fb207df8b60ac6cfc4ca637c8a87fd10afa2d8a7a47ae81bcf0ae589085c694523e1ca6f85acdc4e517b7d07 SHA512 8bd0aa8f7a775d12914d542dbb04c7b555055228002dd826a815255d4a35392e09c44d560cc5da7df1feae98e2f73e8fbf476e2811ae5269f91120c11cbb6291
DIST python-gentoo-patches-3.10.7.tar.xz 12040 BLAKE2B fcbf07894376fff4145534d592c97a5be6b361e9754c548ae483a388916acca8e7ff6c6cab1344d36af52974166590c82bf548e681401a6d2e5604f3e4ae9e23 SHA512 d67e16fc19afed997ac383284afa08fc079cf8128b457a8a5d15218ae7d6718f81e88bed60207f10318fa7ce7a415d0645655b5610d7b2087383fbd07d0ef2c6
-DIST python-gentoo-patches-3.11.0rc1.tar.xz 4384 BLAKE2B 31bcdc055bfaf3434dbb02543aaf66910eaccd01808d9a0e57bf7cb3b097fc0046c00ac44737d9c37e3b6d074c524f4dd3ab439a741e66d74a0425889ecaead5 SHA512 05b044e2d8f881c471528600ee300bfd9cf5160609dfb3d7cbdb8e43f47b681542582a85de97e28e6a3b89a3fb6c8d7398e029d31e20cea9c5a2a71700382d4e
-DIST python-gentoo-patches-3.11.0rc1_p1.tar.xz 19584 BLAKE2B 33c87e2e7141fa5cdf343df8cf30e8e0bd37fdfc7b4d84564b1131c57db27b5886184fd1291b2a898efafec60da5c01d16dce8b3c8792df7df15793d767d74cd SHA512 dc5547622a17bc899dfa7f55a4705f780fd3b731ccdb2c0a87e3d71b4490a32b54683ff862f412e2ac3480f0e84acf2e88176ecf89a8d62b97454e51258696ea
-DIST python-gentoo-patches-3.11.0rc1_p2-r1.tar.xz 22364 BLAKE2B 7069ae59e64214b269aa05e8ce86191743aa339fc78a57f5a6deaf79c009ce5011f73c4c30cdeb21cfce51b80fc75153549ae4c3ceaf200886c799faa07eb96e SHA512 43d811c57fe44bd90f468f0ce6fef1b57e44d4322313cf0323df25a3b9dc4489130edb09af50c4228506705e8e567a5b566cd273dc072f629e4bbcbecf41990f
DIST python-gentoo-patches-3.11.0rc2.tar.xz 5124 BLAKE2B 2e8150c45d8da16309902757f57c8433d871d531153e1b51aa6868dad36d16c1eaada4ba67bfa8057315ff6771f6d17502de8b9b07a5c7c734cbc8f9b379cba7 SHA512 f9d84262204a6eb4a76e4e7c16e9f2f0f23a5d0458e81648f4c5c79c83b865000d2d34ee65f01316e14b596fa68f8b036f558a6bbbb06c66b33db7d2b891a5b5
DIST python-gentoo-patches-3.8.13_p6.tar.xz 27968 BLAKE2B 0cafbdfed47e0d58a9798c1e090abb17428472f769ebe4125cf1210218b90bcfd2ad8790fafbfdc1daccc51078a6bf5e068157f05151c2283eb80d5fe128d85c SHA512 b23d51478cc126a6f7f3d1d6d2302a13f3e873a3fac19c7b2b86b79f4b25bd421b60e5ecbe9bb606ee0eedc0e6871d20c0befd1b6596b525bf6ef79a19230ae2
-DIST python-gentoo-patches-3.8.13_p7.tar.xz 41332 BLAKE2B e61fe83b1260fbdc3086384834914625ae361c3ab2365f5f86c454423f4738b1aa20f46cf95b8a64b54b7cc000761964d5db65383bba9bdcc2a86894aacbdd5b SHA512 e71fff8291c4dfec43d3609e84de2fe6afc29ee6087410f047e972294e555e5a17b7f8d19778a79e67bad66855fd7a163b5a047aee99ee357d5306d7cd01f989
DIST python-gentoo-patches-3.8.13_p8.tar.xz 43204 BLAKE2B 6fb162bfcd2ab8c1fb4208716382aa144bf21b1bd8c2f00a2bd60e7cd0b0d8e034803e8f4129cf49cf6e594467aa2e4a45eb4cb72ddd8516ffd8f797570d59cd SHA512 41ec04e3257021fdcc848587c2275b241d0b31d1d6c10162e30b86920109286c92171d6143bb8be6d1f1c9070d43d31dc0290bdffac50d09d32c2493e631637c
DIST python-gentoo-patches-3.8.14.tar.xz 25700 BLAKE2B de4ff020ecc6889a1c7ae29917cf0f06f930dbfbc2084d13149d8c64e25e1f9881b9f6ded5943101df871e91176a05bf983efdaa293831cc7801a8bad8e8f6d7 SHA512 8073bf34b12cbe71fcc54cf438b8686cd1b073e41846a6877482483951ed25e09fc74106b787f3f6c5705961b83e83f0c79184c1b5b4de3539a4e670b70efcb2
DIST python-gentoo-patches-3.9.13_p4.tar.xz 22072 BLAKE2B a0e084eff35d075d2255b139d0db114d282cb6c9c0c2ea51a8ecb7f5f1dc8096d6578ae5f804b7583a2b7842152b5723ad802ca816d46813c40aaa756118afc8 SHA512 cdf8d43fd5263c4956be234f36c0767215ab2495705d4f2a060b32ecbfbe159e618e31693b0538a1b970f7b27ebe4953063f585930d074dcaf59f2f61486e6b6
-DIST python-gentoo-patches-3.9.13_p5.tar.xz 35660 BLAKE2B be3fe3a4db5e94a06c6bcb36eee71fd7e33cf27a4f3a259e5d0bd332b4765e77d5753247ddf5bbc3cbf10647f55e1897c943a7149afc76a9649d634fbfaff682 SHA512 7d6f1d215df0e50b1b4837f62c160d3262c6d9a29dad1a3f82590f5f84245defcd9b3de500ec78f01a3308275647b7a5e72a16c7425aec1edb841ba079100e1b
DIST python-gentoo-patches-3.9.13_p6.tar.xz 37508 BLAKE2B 6d55aec9ae139cbe6d35b84335174d5fba5784bf52eb665e2d3a27693a2abb843bce1f190c92bfd173359c3782cae06a6b3520932b08aec678332928c5a27277 SHA512 1b1dec45d959849bf72b0646329e8cf74301e0f5373d6e2dbefb63d60fdddbe9fc33abda7d2312af8c52feadf3bacd04b627626d876acecc8984d3192a2d029d
DIST python-gentoo-patches-3.9.14.tar.xz 20208 BLAKE2B 964f1eca6423247bbe862de36ea6d3a337acd70405d5f046493907da3519bad99f6ab9065b2d8af1ce31bbad4183cf95c285f1040d55ce1b5dfca986fc2c849a SHA512 271ccfdc065fe6ef26621d79eb9e758264c53aad2b74d1d50bdb0bf64462389019503a3383c8d5b044231e9c3e2019d7f1240b27ca7fb9502a0beb728161b9bb
-EBUILD python-2.7.18_p15-r1.ebuild 8315 BLAKE2B cc31d031262c95e2e8a187017e05bc90cc7c75b240efbd3c565d0fa686ee14dcf8cd9d83e533a479edb95901dbb92a9d2ff924cbebe148e9b54caa3ce635e350 SHA512 32ae3d2eab2105fd83bd23467dd1cc3e2527d8c06fbdd8bc08b48542e4ee06388c1d93db4d99e80aa7a6a5e6c8f6089e2dffb18dce1155b7a8d6bd7555389a0d
+EBUILD python-2.7.18_p15-r1.ebuild 8309 BLAKE2B b41802cf88e35498fdacc296c7842d6531a134bd28621f9412192e7cf8c15abac2e1e5912995fa954c892bbb49a9adf9af24dc090376cb4e1cc096c55254bdf7 SHA512 1e6e09e145a8afe266f536aa5ab29b5150886ff2c147b62db802c6136aa204e0acce86fd48f11db7f1aab3ade50cf01c52f4bd6898b1d84219b32aaef5804abf
EBUILD python-2.7.18_p15.ebuild 9827 BLAKE2B 77ebeacfa236e518ec0c0a791e0da60f8158d369e870c88ce69d1eef25cdc99e658903abf313452b849254e97b4c9f583e0edb75ec845faf5b47fb2fc3173ce4 SHA512 19219cd43391d8d53838c9b0e15b30f8ccb5d5a23503a213cc961ff2fa545cd17a5ecc6ce253e2a01534db3bc931be212969c40885c2e99f203c23a5ecb689a1
EBUILD python-3.10.6_p2.ebuild 11181 BLAKE2B f8180bd07e43dffedafd7d912bcb9a002e93c1514c72055b24c65f36b7ef477e748bb777fa02da4c6d2c6391a1eaa9f59266b09fafb2e7ca8a67a96efd6f423c SHA512 4613ab1e7336e38a91877d4b1c5558e5221a770d8171d92fff319c6a4f64127bd9cb6dd8c56d84e70558de8ac647a315d740336834cdfa1ad3b86b184408c54b
EBUILD python-3.10.6_p3.ebuild 11161 BLAKE2B b1d379be929e3a5ef8eb45beff1581e99085fdfc3af2aad29c9202284b73c225b82ba8ae81fe1db6191bc97f45d59ad9de2bcf664407269e890bb658da4072e5 SHA512 724f964f56c8c8e7859719eaf3b009f84371b5c70c509147f2a010959e93455daf469399c4159a3cba61de80ab08c327e908d8ffdbbbdb2e9893e88172969a41
EBUILD python-3.10.6_p4.ebuild 11158 BLAKE2B ffc60d5825f03183cf13557e9c88af963bef569bdea2a410c0d2b7efedbac0f6c7f6ea90647bf46e012567c87da49f5f9744cac3cce9faaad64418295135ddcb SHA512 945b1f59c7c9c805f331f88e2d69321c9d7df9b0d9471cb5a0fc40507bf815ebae9399b0853f1669cca89ce81f528ebc8d30f97ff2be3d9378ed9e547011aba4
-EBUILD python-3.10.7.ebuild 11162 BLAKE2B c8ac4f31a628990997d8b30e903d677770eda055c7d7296bf28543814a7d05e4be65791e355e43feccda58a60952428cc05abb01de5814463614c34486235da1 SHA512 82922d217eefe559fbddde7c628a087167262070e451f4fe6dce98491781a0f9d4a403c6e6d799e112fd4fecf60e9652a92958b5966c3849b17f29130ee2ef49
-EBUILD python-3.11.0_rc1.ebuild 13384 BLAKE2B 7ac3f74190fafd1321f2ae9b478cb1b7381f13ce88d1839bbe2eea12a9abb0f14286f3e6036ca65c2d37ca6b07b62c14f557a7af080f6f05f119e7bbd77764cc SHA512 3b94a9e45017c0ec3d2bb2ca346d423a0e31d3b1f2c1fa098aa2c4f0af58e49f3626688dacde9740b2c1f44c63f143bf43ec305d0ce69c3e68de3ff6ae0a88c3
-EBUILD python-3.11.0_rc1_p1.ebuild 13357 BLAKE2B fac65a9fba93a49af0ed0dd91f532e6cd729b815ae71b06dcdc40391dbf5252c56067be5a8085576cee41bf96d011fe9264ec0c390bb22db2265579d8b696092 SHA512 faa9b3067f81e57d8969825fa7851ac74690fdaab8b380f963f8567a09ce69a250592ee23df42f584c25261a49e93bafcecd23ab9d392d90ad4794e2c532d7e7
-EBUILD python-3.11.0_rc1_p2.ebuild 13360 BLAKE2B 20debe9759b033b1c2a54e991cfba8beb164e8b7eb37c2df235f31041c4e3d859a65d626d68b151455a746506b28b9a8df4812e1e62faae19f66aa79187db246 SHA512 1cefca94317fdd87dab7a4fc8db0aaba62e8c5a9f95f2c5d8962c67ce5ee89287290e194e3b085cf89fa74a5cc6f191a4c0334e5a13c0a60290b4ab0bb3f2a46
+EBUILD python-3.10.7.ebuild 11160 BLAKE2B 38952cce0d02320f9d1ddf4a4966cb338a832982a16982d4300e0f7a55f5578909cee92eebe0c69bd2bece4e78d197b86a6fd18d8a912fded39371ee58c2254f SHA512 dcab16c151d51520d794c3657e6ad84b249229544f97abb35e25b523bce0db41c0f9fa6e4bf31120b40ff55bcbed88bcbb6e0b1370a1660b6c0a4bcd5a289b1c
EBUILD python-3.11.0_rc2.ebuild 13357 BLAKE2B fac65a9fba93a49af0ed0dd91f532e6cd729b815ae71b06dcdc40391dbf5252c56067be5a8085576cee41bf96d011fe9264ec0c390bb22db2265579d8b696092 SHA512 faa9b3067f81e57d8969825fa7851ac74690fdaab8b380f963f8567a09ce69a250592ee23df42f584c25261a49e93bafcecd23ab9d392d90ad4794e2c532d7e7
EBUILD python-3.8.13_p6.ebuild 9731 BLAKE2B 0660743997da89023e3192c16bee0c1a14289ddc2f3fa43e19f105d208359eed8155a8345f29c214322ada0aa5c7e5eb50a564546f506abc3ea2204f44d1217c SHA512 b47a01911ed23390ef2091b1f09edf16d2398178ba0d9ec792f8afd06fcf1fb472c020a908af3a6b7c20396f8c6049767d2f11cfe9d15afa4df135b2cc0ee046
-EBUILD python-3.8.13_p7.ebuild 9708 BLAKE2B d622c26fbc1791c567ea5db09e1f85e7b3c50f9894e7734c4f50de99142f029a47ffb2ce81808ab773958f44ea34d2dc110318589c950f4ee70144702d2ca20c SHA512 76b37e2a085df15d02ca285fa3f0980a043067591e70ab47d44bd010b609c34a521f0a2f7cebf34d349c9e4275f3a9b8bd09439eb16e5e7ea84b55d4d3b01ef1
EBUILD python-3.8.13_p8.ebuild 9705 BLAKE2B ce8180be109068fe25e8b2931a69f4247ee10f841a15528d7d976ad0acd36bbc6a58cdcb72a2158abc6fe79e8f581f8abb5ac61af6e8f157b0993c1ff9febfcc SHA512 9c0169004d8c820ce53b62576898ad0ca36df2ef0c41cb313943042f5cb76b0246165a3aecf7c14f5c233d86273dcbf1800bfc928714947f304316db2412a357
-EBUILD python-3.8.14.ebuild 9712 BLAKE2B 1fc6b71d1bfc7f508fe722c2370ce0d841bcc9c9248143b90ea5cdd6ac5db52fcecf19d213b7b79a4fe0aa2964814bc99674838a5de682d814351d6b390c2688 SHA512 89de4861a64051de93b226aa61cc4afc39db0207692455b5772556885f33904f129b48e3be3f919b704225a680c49791169e4ff97c197c3a37c450dd83080b59
+EBUILD python-3.8.14.ebuild 9708 BLAKE2B 5b5a745272d4f416e8e8b044a3b8b75674b5cba19f8a1dcc0c3b4f3c3bb5ccbb0b37f48d0b49d9001cf9fe35918199f4d8e40fe8c9269d32fd078e54dab9ec8c SHA512 c2bf2a454e3fb368bac78483f4898798ba6b6d9869e0019808b2a1ac89c84ecde4a7221e810bbafc40d008e08fd3185234ea24bdec5f62fd091813b39e73580e
EBUILD python-3.9.13_p4.ebuild 10984 BLAKE2B 8743da1a832eb69289727f94f19a9ca7c9e42156847d25168adb1bee66cbc980d28f2969260baf5ddca124c01498f085bb9fd50c5e80083609a5d987337429b4 SHA512 d8cf0aae2e36445efb4a0d0df4a028ab7d990f017196a18127973b7d88dc4979585901102106c32d8281f640334b079a8efedea8f45fca75a13c2453cff4b64c
-EBUILD python-3.9.13_p5.ebuild 10964 BLAKE2B 367eff5f5f1fde3114ae2c6e215291911b90575d5705e144694d365d76e1a0ee95ce08e984125b6b0e769c17075da5cf4314d82f0f97d2845708df5fe0e49263 SHA512 042cd5aa72265de612c45e1c457f72e027e3752e31ecf7ff1bfee685115b2512aee43b4e65145ec482bb0ec31229d9b4855fe4d420f0aa9fd7d29a0251d00690
EBUILD python-3.9.13_p6.ebuild 10960 BLAKE2B dcd386bfd116294e4723017de6afe87f8b99749553a57d20671e1a3454cfa481af0e2e15353dc2f0aa85fa050ae64b542e8c4707090fc0736496eb17407c7cde SHA512 13263d81cbd8e40e0428034753a6c290e48c44a149b438c5e23132b15b908fd49991a64515772860c89a9fd0dc867e4a309341ad52289242505ef7d92044d759
EBUILD python-3.9.14.ebuild 10965 BLAKE2B 971e8c4cffb53ce7b45971b171bb9552b7187f81e88322e774931b9d0e3619fbc6508cb9f847656bfdb227702aca298bf1b42715696692dd4ea5b37dd7a91d2d SHA512 7ea76b2370612035ea5f95059f7314aca8b7c3c8c128b86d0e42f55ab3dd350e132e020ae629d05e493fba16384cdf0e5a68028f0c2d9aaa1f1c04941afb06ce
MISC metadata.xml 1068 BLAKE2B 3c3511739ae8251d11bde32aa3a21225fd3468f2b1f31c459de956c5bb7dbc2de4103a288dd29b26d1023e40bac62631fa953d1515513e934f5c3962d9c715a7 SHA512 0f7d3f9305cc539619568aea7e54cdb9a3319579e811108cf03d7c66290e4f21080a87ca02f1a62264d4ecd41a243c91f0a639e6c064ccf2b24b460508c848b8
diff --git a/dev-lang/python/python-2.7.18_p15-r1.ebuild b/dev-lang/python/python-2.7.18_p15-r1.ebuild
index 6ca084a510fb..6ca25eb84b3b 100644
--- a/dev-lang/python/python-2.7.18_p15-r1.ebuild
+++ b/dev-lang/python/python-2.7.18_p15-r1.ebuild
@@ -27,7 +27,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="
berkdb bluetooth build examples gdbm hardened +ncurses +readline
+sqlite +ssl tk wininst +xml
diff --git a/dev-lang/python/python-3.10.7.ebuild b/dev-lang/python/python-3.10.7.ebuild
index b919f0692412..5670e81124d4 100644
--- a/dev-lang/python/python-3.10.7.ebuild
+++ b/dev-lang/python/python-3.10.7.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk +xml
diff --git a/dev-lang/python/python-3.11.0_rc1.ebuild b/dev-lang/python/python-3.11.0_rc1.ebuild
deleted file mode 100644
index 77ad9301d29f..000000000000
--- a/dev-lang/python/python-3.11.0_rc1.ebuild
+++ /dev/null
@@ -1,482 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build +ensurepip examples gdbm hardened libedit lto
- +ncurses pgo +readline +sqlite +ssl test tk
-"
-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:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? (
- !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
- )
- !!<sys-apps/sandbox-2.21
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
- !sys-devel/gcc[libffi(-)]
-"
-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=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # https://bugs.gentoo.org/850151
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs)
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- 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
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- if use ncurses; then
- append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- fi
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -u-network
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- -x test_asyncio
- -x test_httpservers
- -x test_logging
- -x test_multiprocessing_fork
- -x test_socket
- -x test_xmlrpc
- )
-
- if has_version "app-arch/rpm" ; then
- # Avoid sandbox failure (attempts to write to /var/lib/rpm)
- profile_task_flags+=(
- -x test_distutils
- )
- fi
- local -x PROFILE_TASK="${profile_task_flags[*]}"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --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-system-ffi
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with lto)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- local -x CFLAGS_NODIST=${CFLAGS}
- local -x LDFLAGS_NODIST=${LDFLAGS}
- local -x CFLAGS= LDFLAGS=
-
- if tc-is-cross-compiler ; then
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- # 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
- )
-
- myeconfargs+=(
- # Point the imminent CHOST build to the Python we just
- # built for CBUILD.
- --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
- )
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- 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.
- emake
- popd &> /dev/null || die
- 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
-
- # 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/python3.11/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
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite /usr/lib/python3.11/site-packages
-
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
-
- 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.0_rc1_p1.ebuild b/dev-lang/python/python-3.11.0_rc1_p1.ebuild
deleted file mode 100644
index bba860f7875a..000000000000
--- a/dev-lang/python/python-3.11.0_rc1_p1.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build +ensurepip examples gdbm hardened libedit lto
- +ncurses pgo +readline +sqlite +ssl test tk
-"
-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:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? (
- !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
- )
- !!<sys-apps/sandbox-2.21
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
- !build? ( app-misc/mime-types )
-"
-if [[ ${PV} != *_alpha* ]]; then
- RDEPEND+="
- dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
- "
-fi
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # https://bugs.gentoo.org/850151
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs)
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- 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
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- if use ncurses; then
- append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- fi
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -u-network
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- -x test_asyncio
- -x test_httpservers
- -x test_logging
- -x test_multiprocessing_fork
- -x test_socket
- -x test_xmlrpc
- )
-
- if has_version "app-arch/rpm" ; then
- # Avoid sandbox failure (attempts to write to /var/lib/rpm)
- profile_task_flags+=(
- -x test_distutils
- )
- fi
- local -x PROFILE_TASK="${profile_task_flags[*]}"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --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-system-ffi
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with lto)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- local -x CFLAGS_NODIST=${CFLAGS}
- local -x LDFLAGS_NODIST=${LDFLAGS}
- local -x CFLAGS= LDFLAGS=
-
- if tc-is-cross-compiler ; then
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- # 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
- )
-
- myeconfargs+=(
- # Point the imminent CHOST build to the Python we just
- # built for CBUILD.
- --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
- )
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- 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.
- emake
- popd &> /dev/null || die
- 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
-
- # 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/python3.11/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
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite /usr/lib/python3.11/site-packages
-
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
-
- 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.0_rc1_p2.ebuild b/dev-lang/python/python-3.11.0_rc1_p2.ebuild
deleted file mode 100644
index 2777f4c09df3..000000000000
--- a/dev-lang/python/python-3.11.0_rc1_p2.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}-r1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build +ensurepip examples gdbm hardened libedit lto
- +ncurses pgo +readline +sqlite +ssl test tk
-"
-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:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? (
- !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
- )
- !!<sys-apps/sandbox-2.21
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
- !build? ( app-misc/mime-types )
-"
-if [[ ${PV} != *_alpha* ]]; then
- RDEPEND+="
- dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
- "
-fi
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # https://bugs.gentoo.org/850151
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs)
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- 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
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- if use ncurses; then
- append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- fi
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -u-network
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- -x test_asyncio
- -x test_httpservers
- -x test_logging
- -x test_multiprocessing_fork
- -x test_socket
- -x test_xmlrpc
- )
-
- if has_version "app-arch/rpm" ; then
- # Avoid sandbox failure (attempts to write to /var/lib/rpm)
- profile_task_flags+=(
- -x test_distutils
- )
- fi
- local -x PROFILE_TASK="${profile_task_flags[*]}"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --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-system-ffi
- --with-platlibdir=lib
- --with-pkg-config=yes
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with lto)
- $(use_enable pgo optimizations)
- $(use_with readline readline "$(usex libedit editline readline)")
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- local -x CFLAGS_NODIST=${CFLAGS}
- local -x LDFLAGS_NODIST=${LDFLAGS}
- local -x CFLAGS= LDFLAGS=
-
- if tc-is-cross-compiler ; then
- # We need to build our own Python on CBUILD first, and feed it in.
- # bug #847910
- local myeconfargs_cbuild=(
- "${myeconfargs[@]}"
-
- # 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
- )
-
- myeconfargs+=(
- # Point the imminent CHOST build to the Python we just
- # built for CBUILD.
- --with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
- )
-
- mkdir "${WORKDIR}"/${P}-${CBUILD} || die
- pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
- 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.
- emake
- popd &> /dev/null || die
- 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
-
- # 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/python3.11/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
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
- # workaround https://bugs.gentoo.org/775416
- addwrite /usr/lib/python3.11/site-packages
-
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || 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
-
- 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.8.13_p7.ebuild b/dev-lang/python/python-3.8.13_p7.ebuild
deleted file mode 100644
index 699bd117f340..000000000000
--- a/dev-lang/python/python-3.8.13_p7.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2022 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 python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
- +readline +sqlite +ssl test tk 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.
-
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-lang/python-exec[python_targets_python3_8(-)]
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? ( >=dev-libs/openssl-1.1.1:= )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
- !build? ( app-misc/mime-types )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # https://bugs.gentoo.org/850151
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs)
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- # disable automagic bluetooth headers detection
- if ! use bluetooth; then
- local -x ac_cv_header_bluetooth_bluetooth_h=no
- fi
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- append-flags -fwrapv
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- # PKG_CONFIG needed for cross.
- tc-export CXX PKG_CONFIG
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- if use ncurses; then
- append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- fi
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --enable-ipv6
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- local -x CFLAGS_NODIST=${CFLAGS}
- local -x LDFLAGS_NODIST=${LDFLAGS}
- local -x CFLAGS= LDFLAGS=
-
- econf "${myeconfargs[@]}"
-
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
- eerror "configure has detected that the sem_open function is broken."
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
- die "Broken sem_open function (bug 496328)"
- fi
-
- # install epython.py as part of stdlib
- echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
- # Prevent using distutils bundled by setuptools.
- # https://bugs.gentoo.org/823728
- export SETUPTOOLS_USE_DISTUTILS=stdlib
-
- # 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
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- rm -r "${libdir}"/ensurepip/_bundled || die
- if ! use ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- if ! use sqlite; then
- rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- fi
- if ! use tk; then
- rm -r "${ED}/usr/bin/idle${PYVER}" || die
- rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
- fi
- if ! use wininst; then
- rm "${libdir}/distutils/command/"wininst-*.exe || 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.8.14.ebuild b/dev-lang/python/python-3.8.14.ebuild
index add41cfe710b..034a3f2c94f2 100644
--- a/dev-lang/python/python-3.8.14.ebuild
+++ b/dev-lang/python/python-3.8.14.ebuild
@@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk wininst +xml
diff --git a/dev-lang/python/python-3.9.13_p5.ebuild b/dev-lang/python/python-3.9.13_p5.ebuild
deleted file mode 100644
index 56753347e7f6..000000000000
--- a/dev-lang/python/python-3.9.13_p5.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
-inherit python-utils-r1 toolchain-funcs verify-sig
-
-MY_PV=${PV/_rc/rc}
-MY_P="Python-${MY_PV%_p*}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${MY_PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="
- https://www.python.org/
- https://github.com/python/cpython/
-"
-SRC_URI="
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
- https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
- verify-sig? (
- https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
- )
-"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="
- bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
- +readline +sqlite +ssl test tk +xml
-"
-RESTRICT="!test? ( test )"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="
- app-arch/bzip2:=
- app-arch/xz-utils:=
- dev-lang/python-exec[python_targets_python3_9(-)]
- dev-libs/libffi:=
- sys-apps/util-linux:=
- >=sys-libs/zlib-1.1.3:=
- virtual/libcrypt:=
- virtual/libintl
- ensurepip? ( dev-python/ensurepip-wheels )
- gdbm? ( sys-libs/gdbm:=[berkdb] )
- ncurses? ( >=sys-libs/ncurses-5.2:= )
- readline? ( >=sys-libs/readline-4.1:= )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? ( >=dev-libs/openssl-1.1.1:= )
- tk? (
- >=dev-lang/tcl-8.0:=
- >=dev-lang/tk-8.0:=
- dev-tcltk/blt:=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:= )
-"
-# bluetooth requires headers from bluez
-DEPEND="
- ${RDEPEND}
- bluetooth? ( net-wireless/bluez )
- test? ( app-arch/xz-utils[extra-filters(+)] )
-"
-# autoconf-archive needed to eautoreconf
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/awk
- virtual/pkgconfig
- verify-sig? ( sec-keys/openpgp-keys-python )
-"
-RDEPEND+="
- !build? ( app-misc/mime-types )
-"
-
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-QA_PKGCONFIG_VERSION=${PYVER}
-
-pkg_pretend() {
- use test && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- use test && check-reqs_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- # Ensure that internal copies of expat and libffi are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
-
- local PATCHES=(
- "${WORKDIR}/${PATCHSET}"
- )
-
- default
-
- # https://bugs.gentoo.org/850151
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
-
- # force the correct number of jobs
- # https://bugs.gentoo.org/737660
- local jobs=$(makeopts_jobs)
- sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
- sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
-
- eautoreconf
-}
-
-src_configure() {
- # disable automagic bluetooth headers detection
- if ! use bluetooth; then
- local -x ac_cv_header_bluetooth_bluetooth_h=no
- fi
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- append-flags -fwrapv
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/700012
- if is-flagq -flto || is-flagq '-flto=*'; then
- append-cflags $(test-flags-CC -ffat-lto-objects)
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- # PKG_CONFIG needed for cross.
- tc-export CXX PKG_CONFIG
-
- # Fix implicit declarations on cross and prefix builds. Bug #674070.
- if use ncurses; then
- append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
- fi
-
- local dbmliborder=
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- if use pgo; then
- local profile_task_flags=(
- -m test
- "-j$(makeopts_jobs)"
- --pgo-extended
- -x test_gdb
- -u-network
-
- # All of these seem to occasionally hang for PGO inconsistently
- # They'll even hang here but be fine in src_test sometimes.
- # bug #828535 (and related: bug #788022)
- -x test_asyncio
- -x test_httpservers
- -x test_logging
- -x test_multiprocessing_fork
- -x test_socket
- -x test_xmlrpc
- )
-
- if has_version "app-arch/rpm" ; then
- # Avoid sandbox failure (attempts to write to /var/lib/rpm)
- profile_task_flags+=(
- -x test_distutils
- )
- fi
- local -x PROFILE_TASK="${profile_task_flags[*]}"
- fi
-
- local myeconfargs=(
- # glibc-2.30 removes it; since we can't cleanly force-rebuild
- # Python on glibc upgrade, remove it proactively to give
- # a chance for users rebuilding python before glibc
- ac_cv_header_stropts_h=no
-
- --enable-shared
- --enable-ipv6
- --infodir='${prefix}/share/info'
- --mandir='${prefix}/share/man'
- --with-computed-gotos
- --with-dbmliborder="${dbmliborder}"
- --with-libc=
- --enable-loadable-sqlite-extensions
- --without-ensurepip
- --with-system-expat
- --with-system-ffi
- --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
-
- $(use_with lto)
- $(use_enable pgo optimizations)
- )
-
- # disable implicit optimization/debugging flags
- local -x OPT=
- # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
- # propagated to sysconfig for built extensions
- local -x CFLAGS_NODIST=${CFLAGS}
- local -x LDFLAGS_NODIST=${LDFLAGS}
- local -x CFLAGS= LDFLAGS=
-
- econf "${myeconfargs[@]}"
-
- if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
- eerror "configure has detected that the sem_open function is broken."
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
- die "Broken sem_open function (bug 496328)"
- fi
-
- # install epython.py as part of stdlib
- echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
-}
-
-src_compile() {
- # Ensure sed works as expected
- # https://bugs.gentoo.org/594768
- local -x LC_ALL=C
- # Prevent using distutils bundled by setuptools.
- # https://bugs.gentoo.org/823728
- export SETUPTOOLS_USE_DISTUTILS=stdlib
-
- # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
- # end up writing bytecode & violating sandbox.
- # bug #831897
- local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
-
- if use pgo ; then
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- addpredict /usr/lib/python3.9/site-packages
- fi
-
- # also need to clear the flags explicitly here or they end up
- # in _sysconfigdata*
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Restore saved value from above.
- local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- local test_opts=(
- -u-network
- -j "$(makeopts_jobs)"
-
- # fails
- -x test_gdb
- )
-
- if use sparc ; then
- # bug #788022
- test_opts+=(
- -x test_multiprocessing_fork
- -x test_multiprocessing_forkserver
- )
- fi
-
- # bug 660358
- local -x COLUMNS=80
- local -x PYTHONDONTWRITEBYTECODE=
-
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
-}
-
-src_install() {
- local libdir=${ED}/usr/lib/python${PYVER}
-
- emake DESTDIR="${D}" altinstall
-
- # Remove static library
- rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
- # Fix collisions between different slots of Python.
- rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}/usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}/usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- # python seems to get rebuilt in src_install (bug 569908)
- # Work around it for now.
- if has_version dev-libs/libffi[pax-kernel]; then
- pax-mark E "${ED}/usr/bin/${abiver}"
- else
- pax-mark m "${ED}/usr/bin/${abiver}"
- fi
-
- rm -r "${libdir}"/ensurepip/_bundled || die
- if ! use ensurepip; then
- rm -r "${libdir}"/ensurepip || die
- fi
- if ! use sqlite; then
- rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
- fi
- if ! use tk; then
- rm -r "${ED}/usr/bin/idle${PYVER}" || die
- rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
- fi
-
- dodoc Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(
- printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
- emake --no-print-directory -s -f - 2>/dev/null
- )
- newins Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}/etc/conf.d/pydoc-${PYVER}" \
- "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- local EPYTHON=python${PYVER}
- local scriptdir=${D}$(python_get_scriptdir)
- mkdir -p "${scriptdir}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
- ln -s "python${pymajor}" "${scriptdir}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${scriptdir}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
- # 2to3, pydoc
- ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
- fi
-}