summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin17498 -> 17492 bytes
-rw-r--r--dev-lang/crystal/Manifest6
-rw-r--r--dev-lang/crystal/crystal-1.1.1.ebuild107
-rw-r--r--dev-lang/crystal/metadata.xml11
-rw-r--r--dev-lang/ghc/Manifest6
-rw-r--r--dev-lang/ghc/files/ghc-8.10.5-modorigin-verbose-conflict.patch20
-rw-r--r--dev-lang/ghc/ghc-8.10.6.ebuild814
-rw-r--r--dev-lang/go/Manifest2
-rw-r--r--dev-lang/go/go-1.17.ebuild2
-rw-r--r--dev-lang/moarvm/Manifest2
-rw-r--r--dev-lang/moarvm/moarvm-2021.08.ebuild60
-rw-r--r--dev-lang/nqp/Manifest2
-rw-r--r--dev-lang/nqp/nqp-2021.08.ebuild159
-rw-r--r--dev-lang/perl/Manifest1
-rw-r--r--dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch180
-rw-r--r--dev-lang/php/Manifest6
-rw-r--r--dev-lang/php/php-7.3.30.ebuild758
-rw-r--r--dev-lang/php/php-7.4.23.ebuild750
-rw-r--r--dev-lang/php/php-8.0.10.ebuild749
-rw-r--r--dev-lang/python/Manifest12
-rw-r--r--dev-lang/python/python-3.10.0_rc1_p2.ebuild346
-rw-r--r--dev-lang/python/python-3.6.14_p1.ebuild337
-rw-r--r--dev-lang/python/python-3.7.11_p1.ebuild329
-rw-r--r--dev-lang/python/python-3.8.12.ebuild335
-rw-r--r--dev-lang/python/python-3.9.6_p2.ebuild344
-rw-r--r--dev-lang/rakudo/Manifest2
-rw-r--r--dev-lang/rakudo/rakudo-2021.08.ebuild72
27 files changed, 5226 insertions, 186 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index 051532da4b0f..448293211a4f 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
index 914036b529fb..8ce5d81e0d81 100644
--- a/dev-lang/crystal/Manifest
+++ b/dev-lang/crystal/Manifest
@@ -8,5 +8,9 @@ AUX crystal-1.1.0-verbose.patch 803 BLAKE2B 2fa91a0d3f5dda1cd2790a09a32dad212d47
DIST crystal-1.1.0-1-linux-i686.tar.gz 30747190 BLAKE2B 7fe29248ae69c81cb0c79419488c5b544bb55810894ac1d7f276ccdf2d2d98c7c2bc4f8c007214e5ffd18ee39bdf6983f33b13c08f012105fce714eeaa18fac9 SHA512 df267250971c11d1e2f4f869a14f7b2f1e5a32cf15c407a0ee9291aeb4ddc21241c3f21c7706ee2305dfbf4ac645681a06bb70a6ee9246968a30f59b7595ea8a
DIST crystal-1.1.0-1-linux-x86_64.tar.gz 27998777 BLAKE2B 06be8a51b28266b25f1a3629b1a1ac6f3878aacdd4ca4019ac201369ca0507f3ed27bfea46ea7d8d4dfa67888268a8e027586bb32e9964d4754661f43e36ac12 SHA512 8c4542ce0623e459b61591b7bd13f416ee30c89913ce827830e570225c72ec79ad5466d414b05f520d384f04363f11964ff8bf158f0ae798da3864208655319e
DIST crystal-1.1.0.tar.gz 2476748 BLAKE2B 2874da651a8b4454c6a34b00ac4ef93be6beaabe01ff66aaac86583a9d9c1baccde9473358d70d78490b367db3a307af3b5219af6751c1d83cb5084e74955197 SHA512 fcd14338c4c6cb9189cfb9d4d93af7feab806a49e10b9c83399f9252f0c5f3488605141f09adef82d48343eab5653b754b9196fb659590df8d4deb2c4b6499f4
+DIST crystal-1.1.1-1-linux-i686.tar.gz 30749110 BLAKE2B d79113bc616685b30a80bb8632593c1b0a24d770ee9fa50810e771996f9ca95cdb5cdab64a7c445bc461e27e77e457b8334877e3a62281a3f9cbe59975518eae SHA512 eecd485fe06642a534aee2f837ac9ad6eeb5b52fa5fb4ab0f36bcf167535b784b5e306c0bb578a3198b58552efd3f0afc356b2711b0b7dc00f25fb1a2f4fe43f
+DIST crystal-1.1.1-1-linux-x86_64.tar.gz 27999355 BLAKE2B 115d9002973d9e0e1ad2edac55a10d4275176f95352634eee00f29d6ebeef2e3538f30a26904a1c6b68fa5b42e70b4cf54bb50ed4aa1097bb2d2dc716ff83427 SHA512 f27277af810f295c8ee4f5fedc3b7f1ffb06d166970fcc25d2de43e1c41e0af01de2a508292b44aac48a1583ac9892058f54fa3a7c361fc56dd483265f8bc36c
+DIST crystal-1.1.1.tar.gz 2477825 BLAKE2B 4e1b06c831a22447a4d1f065be64b12642ee4b4a75f24b0b73b990944afe6e2a6fca95189b46ea0656b8d13bd7c6a83a23452779b494822803a0264e02b9d4ce SHA512 6e9e977792c863d17ae94aa285a65a453da581a71c3fd9c57cc606ae20813504d675faffa74f78e7c4cf863b6334c4a63ab5356c04fb11d3267dd516e060fe74
EBUILD crystal-1.1.0.ebuild 3077 BLAKE2B af72e22439f83e8942e395396bce25139164627b3126abf42fb3bdabcd3e96140939f47af206f617b9dee21cf87f71123ea422799ee37bdb8a2f5d22c04bed14 SHA512 ff77873e8ee40d5851eb061e99cfc52502fc74d7365f2f1acd3f23262ff5fb7a016654e80c0b73c50ba5625c0fbc62a04990a6a8e5c3eb923467f24e070e9600
-MISC metadata.xml 910 BLAKE2B 9d07b880c1e1780ad7faa4421eb7621f1385d282b17e8b33b1db9ae26bdaf77aca4a99b1f61327945ded75295fef34b55058e67d915ebca19d4ca65dd5045fb5 SHA512 c786809187d76dca77dcbde53d5758d1acc5bd4600a746fc7ffe5ec497bc3d957e19582685b89bd72292f999f6d41c7bf09e3b65c3f4a27e332fe877471aac36
+EBUILD crystal-1.1.1.ebuild 2670 BLAKE2B 7903a569997c6aa99c09b954a421c60676c6518b9ef80ba9a442d62db905dbaa78c95cff6926e5d6d4f96f334cc705d23449e4018e7e81f72759ec8f3bc897fd SHA512 c331bef8dd867fc6791bf7f7eb971ef96628fb2ea398fc8c06cbe04b84ff73f43f90700f6ef8bb57bf3179c9345d6ff019c9c0b3a6453d3d0d52d958d1edd4d0
+MISC metadata.xml 1136 BLAKE2B 936349d0b5cf3dab52d1eeba11b8d6bb88716a5e485778a89001dc4ef24ec72cbd5de76363e7018f072fe575525a5c6ff7ab7671c83263ca35f3be8d2479c6bb SHA512 ee0d00e606aa118b441c2ff34f83e5c3a58b2da3c7d7948c2ef6ac5cca00612580ea5be31c61ffe749761537131ce4f6031f1f7b22b483bda7100e266b654ae8
diff --git a/dev-lang/crystal/crystal-1.1.1.ebuild b/dev-lang/crystal/crystal-1.1.1.ebuild
new file mode 100644
index 000000000000..5917510958e7
--- /dev/null
+++ b/dev-lang/crystal/crystal-1.1.1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
+
+BV=${PV}-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV/-*}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug"
+
+# Upstream test suite not reliable
+RESTRICT=test
+
+# See https://github.com/crystal-lang/crystal/issues/10434
+LLVM_MAX_SLOT=11
+
+DEPEND="
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/gmp:=
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ dev-libs/pcl:=
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ sys-libs/libunwind:=
+"
+RDEPEND="${DEPEND}
+ dev-libs/libxml2
+ dev-libs/libyaml
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.0-verbose.patch
+ "${FILESDIR}"/${PN}-0.26.1-gentoo-tests-sandbox.patch
+ "${FILESDIR}"/${PN}-0.27.0-extra-spec-flags.patch
+ "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix.patch
+ "${FILESDIR}"/${PN}-0.27.0-gentoo-tests-long-unix-2.patch
+)
+
+src_configure() {
+ local bootstrap_path=${WORKDIR}/${PN}-${BV}/bin
+ if [[ ! -d ${bootstrap_path} ]]; then
+ eerror "Binary tarball does not contain expected directory:"
+ die "'${bootstrap_path}' path does not exist."
+ fi
+
+ MY_EMAKE_COMMON_ARGS=(
+ $(usex debug "" release=1)
+ progress=true
+ stats=1
+ threads=$(makeopts_jobs)
+ verbose=1
+ CC=$(tc-getCC)
+ CXX=$(tc-getCXX)
+ AR=$(tc-getAR)
+ LLVM_CONFIG="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
+ PATH="${bootstrap_path}:${PATH}"
+ CRYSTAL_PATH=src
+ CRYSTAL_CONFIG_VERSION=${PV}
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ )
+
+ # crystal uses 'LLVM_TARGETS' to override default list of targets
+ unset LLVM_TARGETS
+}
+
+src_compile() {
+ emake "${MY_EMAKE_COMMON_ARGS[@]}"
+ use doc && emake docs
+}
+
+src_test() {
+ # EXTRA_SPEC_FLAGS is useful to debug individual tests
+ # as part of full build:
+ # USE=debug EXTRA_SPEC_FLAGS='-e parse_set_cookie' emerge -1 crystal
+ emake std_spec "${MY_EMAKE_COMMON_ARGS[@]}" "EXTRA_SPEC_FLAGS=${EXTRA_SPEC_FLAGS}"
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r docs/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
diff --git a/dev-lang/crystal/metadata.xml b/dev-lang/crystal/metadata.xml
index dd69de87393b..b068886f2e1a 100644
--- a/dev-lang/crystal/metadata.xml
+++ b/dev-lang/crystal/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>toshokan@shojigate.net</email>
+ <name>J. Pz</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<longdescription lang="en">
Crystal is a programming language that resembles Ruby but compiles to
native code and tries to be much more efficient, at the cost of
@@ -24,6 +31,6 @@
</flag>
</use>
<upstream>
- <remote-id type="github">manastech/crystal</remote-id>
+ <remote-id type="github">crystal-lang/crystal</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index 088ae7165109..e69acca87fec 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -4,6 +4,7 @@ AUX ghc-8.0.2-no-relax-everywhere.patch 766 BLAKE2B 76ca925d56a9d2961cd342971ef8
AUX ghc-8.10.1-allow-cross-bootstrap.patch 541 BLAKE2B b77b3c9ebb7a33af6f82ec1b9927664e9bfce04450560a8e436ffa87feca50d606824192b7333e3b98d5552622592b6d39d0b184037ce646d6f7ebd205deb348 SHA512 d87a99ac96846e161d8c939079f8314d380be8e1dc62f956e3afcce1339a76447a14002b30bac1c86c807fd8eba23a0648912a3d074248f3513f9aadacd27489
AUX ghc-8.10.3-C99-typo-ac270.patch 348 BLAKE2B 8d23baffa0ae781db4610ee78fea812ebc25450c94e942d8008c591cca78c6072c24b042e7a9dab08ae5213ed4ba931ff932ad4685fc029fc004039494a70c7f SHA512 9e224c6863b5f0f0deb032d4554dd41f2396a8cbc373b860294ba76feaf1abe7594711ac02e9a06356c024df8d6fc6a7a064ca428eaa1e4e6209b3a29d4317fb
AUX ghc-8.10.4-sphinx-quote.patch 872 BLAKE2B 2459d9b2d7d7d30eb0fdda999ca0da86264bbe324786eecfd4a2eab0eee04cd50e378972901a0f84c31d857321218b455aab452e87386c5b3659d4d619efa196 SHA512 05637a55c6e27fe4a128c1978b86c72b6d848cee609c8fb035f32b2d48a8d6536add73717d1dbb232a2a84d7834c80455e6e67000f58813447f7e555b6868d39
+AUX ghc-8.10.5-modorigin-verbose-conflict.patch 956 BLAKE2B 8ce1e156c92d0d931930a4ad366f62be184be46beb1f25b92ad97be03d47c9702313be758c33a17c40002816a26e70f4017e4e02325f1513864086e50ac6136b SHA512 27f884e8b4e6250cbd2620a190531ae72693518da8cb56e736fe58bc436fca67ba9eb8d3fa89fcd0234858a8533ca3e15d5b0c20ed1953fba56736000fc8a732
AUX ghc-8.2.1-darwin.patch 910 BLAKE2B 2f1a44dd7ead59301b5dd59c8cab932710655416640f2c8d5273cf07da4a45bf702d840768e2d32822e89f1b07cc9ed3a6110e1847e11468fca5c515e9e26f70 SHA512 0177fda8717d9158a99d96853feb1bf40ff13df8f5c5669c7c48f33accf69d6ddb05876776cda66705e85ee56c5ecff8f81722d8e748b6c2ed6b9bf611e42a2c
AUX ghc-8.2.1_rc1-hp2ps-cross.patch 3865 BLAKE2B d68b1e15c091047d086be780dc0bb5ce2a1b713244ee240ae045052ccac947baf6a5bdea8cad50d0fac2984700069af7dcd320b96ca09af8c7b81021329da41c SHA512 d2ed48701216f5c03567e61c207e32d6218009380941275c690edd8eb0197728e7e3c0edb00d512792dc2041a958de82ceef393e96d3324b690157162e28d29a
AUX ghc-8.2.1_rc1-win32-cross-2-hack.patch 6231 BLAKE2B 8ad4428ebe9a373e08e94e5373ad9578cafdf95b866ced2a4000434d9e5d4298b129e832e13e8e175e8977b9dda9351d01a896e2c320a1a40551d5892b0efc33 SHA512 8617c1346ba7aa2b41ee01feaa47f2ca477353f9b825be48c5d3505a134e0a80b613efc6cb92e7fbd3fe062e77450e197c826151a42c0c77177fc6ef8e65287f
@@ -15,6 +16,8 @@ DIST ghc-8.10.4-src.tar.xz 19818108 BLAKE2B 069dd8436c373ccf73c20d8b577243792ffd
DIST ghc-8.10.4-testsuite.tar.xz 2236932 BLAKE2B 17d0520ad5c6daa0cc60530279ae7e617e4d79328b9f436abbe75e72f0803d9a997fb9e1ae61425326b070f45794a488d8507957fec9a6ed49eea86d30a1e579 SHA512 1bf129c8d872e3ceff7c19929605adc5d68daab9ded9aa2e5109b0de162089631472c66f04993adf8481291f8128bf804fe64a9d344c81e257f1b962ba5e382c
DIST ghc-8.10.5-src.tar.xz 19920148 BLAKE2B bd3b702fdac4d1c94366bb233a665c2f5677b795d9041c61cc13d813aa43738d5270c3604731f964393035cef90768d4c6e0e401aa35fec6dab61465782f41dc SHA512 b5f39be0accd5c1cecf1cc326ba3142f561d2ac93e9abf366fe46307d7c0712aac244836e659e1a4d9d0fb98299ea96edc8e8a06f3a81b528b14914b94057ffe
DIST ghc-8.10.5-testsuite.tar.xz 2270504 BLAKE2B 076afc4565c7ba52814547b09313c44bfc3875fc0b05d1af1d3fa702cec9b6b219d86fd56d26a3df07aaa00b37eeb87c58b509162a231bf4e03a07bcc57e9550 SHA512 adae7ff8005c73fc5ded42035c51b1ad6c476beed54de7ba336437a67e81a75d7af8c1be3817516e877b1b2ff0e771fe667d07b93d3a73de8df26a06ed42f334
+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-8.8.4-src.tar.xz 19395252 BLAKE2B 6fa898b9552398a724f0452f5cc88ba073264a5645288c73507258959efec40ce5a56a0eaafdabe58f15c5a9210b2c9da5954411dff5c81c52e061569d6a350a SHA512 efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090
DIST ghc-8.8.4-testsuite.tar.xz 1965820 BLAKE2B 3b715700561788b8abdc986961d533b91399461d57a1686ededb4ccc36881503cdc3fc126b9a7b204a728c24b9a9ca97320142348644367aca9b47c87a5b3b51 SHA512 79d8fb0ba8de0fb48c938bd54c8c3278f1895d8ce5c700ce8cf6b3fc550073bb757208e85d4f9818400ebecca96f51d9248b8bbdac9eb2995671756164d08c16
DIST ghc-9.0.1-src.tar.xz 20782336 BLAKE2B 53eaf903081d705d641459fbc1e6fa7387a6039f9cd466b4708bda86e81252a84d80878d6eb956ec2e1e5b721a313e68eeb796f8345244ca62f536a7a3f0c6df SHA512 bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
@@ -23,12 +26,15 @@ DIST ghc-bin-8.10.4-i686-pc-linux-gnu.tbz2 123831294 BLAKE2B 1ca4c1b5c34c9480110
DIST ghc-bin-8.10.4-x86_64-pc-linux-gnu.tbz2 122558873 BLAKE2B 9f07c7bdc3beccfa629d28b2524ccd2f4688a5c0036a45408f5ace2d530a2a0e42f95b3cda5037ebb365317999e1ae776c6f9d21692867abfe85e33f2892b1be SHA512 68bd70f94961547746a696aa2839e156c95858fda0c7ec5b2ecf802070724ab7102b0aa86bcbf93432170d521cce4af10f46b851b470e5dc49dfa5b07380f46d
DIST ghc-bin-8.10.5-i686-pc-linux-gnu.tbz2 124356781 BLAKE2B 53c5d259a19f11db83d69f7a2f39090d623b07caf1859eb8bf0385183586f538d8eb3eadb06f56f4b7160fa82043eb0f7b8df1632d55af562b8b1cb21c08b4c3 SHA512 58676b4eaeef9e05f69b7c821e115f3a678487b0de696e702ff6378f7d8f23fafda997b0c19d52a730c22bf8012a99c01783d16d00e356fe12532156d5965fc6
DIST ghc-bin-8.10.5-x86_64-pc-linux-gnu.tbz2 123186918 BLAKE2B 5049514a7c2c58e7f5c929cfb9e818cdc20280f4fc002350cf0cc19f410eb4d4be4d0b46db88205633fde73151e322f3cabd050a9c07e05ccae168c7e6be8be9 SHA512 3a8ef5f0c259ad86adc6a7a5718db419fb0e38a5d1e0bdcc8676e44d1a0130a4b25658ab23572e4e860307b024409da021e08b038fac64a773437c23519b1d0a
+DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
+DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
DIST ghc-bin-8.8.4-i686-pc-linux-gnu.tbz2 120336081 BLAKE2B 55dfbb90d5e55c2af5e93c69249828a85cd9171c164b80dfdaf86512972b2c6854c8e4f07426af4ab52a5fb1a85d96a58c2cf003fb02372c55428001cfaea491 SHA512 ad3b83344349976d3253934195b2dc6299648391572b13735943c5ea2239c031c19b0cafd86c16cfb0c061e73bc72e9248f9c1731494a9a15fbe188f02913c12
DIST ghc-bin-8.8.4-x86_64-pc-linux-gnu.tbz2 118897883 BLAKE2B a180b2dd1a3bc222044ece809ad700aee29d0c3e75b57ee9af3ca33c9c0f59dbf36f68202f746d99f80915cb717a9c41fc12db507f1cb469981732703a06b9cc SHA512 9d4be02dbd9704c93ef18feb92ea30bd5d590df31f288bf1b364818424c5019ca9ada26eec88418199f90ae8f4459d0a9352104e3f3186bbdc241891eb1b66c4
DIST ghc-bin-9.0.1-i686-pc-linux-gnu.tbz2 122955511 BLAKE2B b870f46cc78fcc1d715aafe7108951582cfd12495b4e9d804d4b66562c66a6a2b2d9513031aedc8f3630a0cdbb3257943304b05732301a084f89487452f2f2d9 SHA512 aafd4233c40f93b71e6ac1acc8a75e30d49b826e4bce6d9832836966fd5f6c4898963bd4c2f34577f4199c1d9a3f537ac1e7d87eab11e9fb5e849573580ed3fb
DIST ghc-bin-9.0.1-x86_64-pc-linux-gnu.tbz2 121542968 BLAKE2B 837870e68138f8d97dc8b2aae90090cf02416628602ca4ba4417ac92b49155f10028b05ac465665b8872b32372a5cee075616983f2eacdebb0188bd2ce6a93d2 SHA512 0e8c6d2e6f32fac95588f7323a4e02dddfc9ec2476a82b97bf5a106d3810f7e638fda7124c53b5bbc563fce70f4436553c282d8ea2f1f5fdf4fcccfb15a2b079
EBUILD ghc-8.10.4-r1.ebuild 26143 BLAKE2B 8476b6ed1671f2b7ba5d1a202eab94299f12804af89e7626917a970a658b63e8988c0f9d38140ed1e823f4574d5230c038610662dd04ab82aefa9f5516cfc59f SHA512 272a8a08096b437bd73eab7a3b38576f1c373f0c21352c340d27516755c5eb1c061806b204948dec0df325819213414d575bdb28c060750714ba16bfdc05e7d1
EBUILD ghc-8.10.5-r1.ebuild 26077 BLAKE2B c81a9599ec300b0ec3264f1016bd3dfb692a5ccb2f5fe85e4763accf2327179164dc32ca52fefd64ef5cf680426d05a5afef2e2043def5f1b334f70f1c7004d0 SHA512 c84517d16762dd379aec574a4381fd2f5ab895c1ba162618e147f418cdb8439bda1054a9752b72c2c688835e4546f267d581d76b62ea74ffed6144f748ab6626
+EBUILD ghc-8.10.6.ebuild 26102 BLAKE2B 9331e6bb99d4b1a34a6b1e0a95d0d8685780e856f861ead2548fa3b2251b9922694d154ad88e456b3ab4e43e023628a571c705c7397556375486371b4cc2bcab SHA512 1569cfa1937910ccf6cc252dc144010a8853efc3584862c157d64f57233a9d0320e7804cd1f2e62ddd0ebea1f3b4e179c5a7c65ffb64276ae88923b97bab2a67
EBUILD ghc-8.8.4-r1.ebuild 26732 BLAKE2B 0ce893b3987c17490048c6af365fc783a21c00c54aca09abd9a940dca291dbffb97739cf900dbd3a1ae59c8fbd20ab63194d2295777922451006e827bbe0fdf0 SHA512 0adb531579435c4e73c7132668540a476889c62cf15b1ad20df4235127867ca3a8ed4f3df318f8f79bad044a626133cf559c6f87741ba645c8c0e25b74ff53a7
EBUILD ghc-9.0.1-r1.ebuild 26047 BLAKE2B 320a76fcc9f8ccad091535fcea42e630fe7b52483969e05b947c0bb64ffa7561d81ae55fdd9823067e2647321e531bbf12a2a3a679e79f541a1ec6fcadea32be SHA512 a6cac26a91b0eb08862dfea253ae53c7bc36c8eea3a8a46f115fd77e68f13d5c50d480002192fee2b15dcc7ec3becc6e11e3fe3e47dd7d1b77150eb3615304ad
MISC metadata.xml 877 BLAKE2B 763db2ffce8c241ef55110ca08aa9f7383f14bbe7f96a443b438f027214e04f56f8216b0cd0d871e516a13f07a8a5a52835b0f75ddd3eb9ebd7faccd3a6b03d9 SHA512 516ad3cdb3b26b242668ae2bbf48628c8fb95fdc84ab3dc00afc940c68c2b78a7aa85634c228e9b3427963f0b86263d24ba043d0fd9ae57752e5075392a0322c
diff --git a/dev-lang/ghc/files/ghc-8.10.5-modorigin-verbose-conflict.patch b/dev-lang/ghc/files/ghc-8.10.5-modorigin-verbose-conflict.patch
new file mode 100644
index 000000000000..a34c0c9059fe
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.10.5-modorigin-verbose-conflict.patch
@@ -0,0 +1,20 @@
+--- a/compiler/main/Packages.hs
++++ b/compiler/main/Packages.hs
+@@ -219,12 +219,14 @@ fromFlag = ModOrigin Nothing [] [] True
+ instance Semigroup ModuleOrigin where
+ ModOrigin e res rhs f <> ModOrigin e' res' rhs' f' =
+ ModOrigin (g e e') (res ++ res') (rhs ++ rhs') (f || f')
+- where g (Just b) (Just b')
++ where g x@(Just b) y@(Just b')
+ | b == b' = Just b
+- | otherwise = panic "ModOrigin: package both exposed/hidden"
++ | otherwise = pprPanic "ModOrigin: package both exposed/hidden" $
++ text "x: " <> ppr x $$ text "y: " <> ppr y
+ g Nothing x = x
+ g x Nothing = x
+- _x <> _y = panic "ModOrigin: hidden module redefined"
++ x <> y = pprPanic "ModOrigin: hidden module redefined" $
++ text "x: " <> ppr x $$ text "y: " <> ppr y
+
+ instance Monoid ModuleOrigin where
+ mempty = ModOrigin Nothing [] [] False
diff --git a/dev-lang/ghc/ghc-8.10.6.ebuild b/dev-lang/ghc/ghc-8.10.6.ebuild
new file mode 100644
index 000000000000..4276efffd616
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.10.6.ebuild
@@ -0,0 +1,814 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+PYTHON_COMPAT=( python3_{7..9} )
+inherit python-any-r1
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib multiprocessing pax-utils toolchain-funcs prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="https://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+BIN_PV=${PV}
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ #alpha) return 0 ;;
+ #arm64) return 0 ;;
+ #arm) return 0 ;;
+ amd64) return 0 ;;
+ #ia64) return 0 ;;
+ #ppc) return 0 ;;
+ #ppc64)
+ # use big-endian && return 0
+ # return 0
+ # ;;
+ #sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.10.0.20200123 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+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 )
+)"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+ # "hackage-name hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~amd64 ~x86"
+IUSE="big-endian +doc elfutils ghcbootstrap ghcmakebinary +gmp numa profile test"
+IUSE+=" binary"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ dev-libs/gmp:0=
+ sys-libs/ncurses:=[unicode(+)]
+ elfutils? ( dev-libs/elfutils )
+ !ghcmakebinary? ( dev-libs/libffi:= )
+ numa? ( sys-process/numactl )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+ sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-python/sphinx
+ >=dev-libs/libxslt-1.1.2 )
+ !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
+ test? ( ${PYTHON_DEPS} )
+"
+
+needs_python() {
+ # test driver is written in python
+ use test && return 0
+ return 1
+}
+
+# we build binaries without profiling support
+REQUIRED_USE="
+ ?? ( ghcbootstrap binary )
+ ?? ( profile binary )
+"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+ [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+if ! is_crosscompile; then
+ PDEPEND="!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )"
+fi
+
+# returns tool prefix for crosscompiler.
+# Example:
+# CTARGET=armv7a-unknown-linux-gnueabi
+# CHOST=x86_64-pc-linux-gnu
+# "armv7a-unknown-linux-gnueabi-"
+# CTARGET=${CHOST}
+# ""
+# Used in tools and library prefix:
+# "${ED}"/usr/bin/$(cross)haddock
+# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+ if is_crosscompile; then
+ echo "${CTARGET}-"
+ else
+ echo ""
+ fi
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+ local pn=$1 pv=$2
+ local p=${pn}-${pv}
+ local f
+
+ einfo "Bumping ${pn} up to ${pv}"
+
+ for f in ghc.mk GNUmakefile; do
+ mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+ done
+ mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+ mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ SRC_URI+=" https://hackage.haskell.org/package/${pn}-${pv}/${pn}-${pv}.tar.gz"
+ done
+}
+
+update_SRC_URI
+
+bump_libs() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ bump_lib "${pn}" "${pv}"
+ done
+}
+
+ghc_setup_cflags() {
+ # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+ if ! is_native; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ einfo " prefix: $(cross)"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+ # Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+ # options to gcc.
+ if is_native; then
+ # prevent from failing to build unregisterised ghc:
+ # https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1 ghc_v=${BIN_PV}
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${ghc_v}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+ "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${ghc_v}" \
+ "${WORKDIR}/usr/bin/ghci-${ghc_v}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${ghc_v}" \
+ "${WORKDIR}/usr/bin/haddock-ghc-${ghc_v}" \
+ "${WORKDIR}/usr/bin/hp2ps" \
+ "${WORKDIR}/usr/bin/hpc" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${ghc_v}" \
+ "${WORKDIR}/usr/$(get_libdir)/${PN}-${ghc_v}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ hprefixify "${bin_libpath}"/${PN}*/settings
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+ghc-check-reqs() {
+ # These are pessimistic values (slightly bigger than worst-case)
+ # Worst case is UNREG USE=profile ia64. See bug #611866 for some
+ # numbers on various arches.
+ CHECKREQS_DISK_BUILD=8G
+ CHECKREQS_DISK_USR=2G
+ # USE=binary roughly takes
+ use binary && CHECKREQS_DISK_BUILD=4G
+
+ "$@"
+}
+
+pkg_pretend() {
+ ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ ghc-check-reqs check-reqs_pkg_setup
+
+ # quiet portage about prebuilt binaries
+ use binary && QA_PREBUILT="*"
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+ [[ -z $(type -P ghc) ]] && \
+ die "Could not find a ghc to bootstrap with."
+ else
+ if ! yet_binary; then
+ eerror "Please try emerging with USE=ghcbootstrap and report build"
+ eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+ die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+ fi
+ fi
+
+ if needs_python; then
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Create the ${S} dir if we're using the binary version
+ use binary && mkdir "${S}"
+
+ # the Solaris and Darwin binaries from ghc (maeder) need to be
+ # unpacked separately, so prevent them from being unpacked
+ local ONLYA=${A}
+ case ${CHOST} in
+ *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
+ esac
+ unpack ${ONLYA}
+}
+
+src_prepare() {
+ ghc_setup_cflags
+
+ if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/ghc-${BIN_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${PN}-${BIN_PV}/bin/ghc"
+ fi
+
+ if use binary; then
+ if use prefix; then
+ relocate_ghc "${EPREFIX}"
+ fi
+
+ # Move unpacked files to the expected place
+ mv "${WORKDIR}/usr" "${S}"
+ eapply_user
+ else
+ if ! use ghcbootstrap; then
+ case ${CHOST} in
+ *-darwin* | *-solaris*)
+ # UPDATE ME for ghc-7
+ mkdir "${WORKDIR}"/ghc-bin-installer || die
+ pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+ use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+ use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+ use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+ use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+ popd > /dev/null
+
+ pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+ # fix the binaries so they run, on Solaris we need an
+ # LD_LIBRARY_PATH which has our prefix libdirs, on
+ # Darwin we need to replace the frameworks with our libs
+ # from the prefix fix before installation, because some
+ # of the tools are actually used during configure/make
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ local readline_framework=GNUreadline.framework/GNUreadline
+ local gmp_framework=/opt/local/lib/libgmp.10.dylib
+ local ncurses_file=/opt/local/lib/libncurses.5.dylib
+ for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+ install_name_tool -change \
+ ${readline_framework} \
+ "${EPREFIX}"/lib/libreadline.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${gmp_framework} \
+ "${EPREFIX}"/usr/lib/libgmp.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${ncurses_file} \
+ "${EPREFIX}"/usr/lib/libncurses.dylib \
+ ${binary} || die
+ done
+ # we don't do frameworks!
+ sed -i \
+ -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+ -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+ rts/package.conf.in || die
+ fi
+
+ # it is autoconf, but we really don't want to give it too
+ # many arguments, in fact we do the make in-place anyway
+ ./configure --prefix="${WORKDIR}"/usr || die
+ make install || die
+ popd > /dev/null
+ ;;
+ *)
+ relocate_ghc "${WORKDIR}"
+ ;;
+ esac
+ fi
+
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise eapply will break
+
+ eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+ eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
+ eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
+ eapply "${FILESDIR}"/${PN}-8.10.5-modorigin-verbose-conflict.patch
+
+ # a bunch of crosscompiler patches
+ # needs newer version:
+ #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ eapply_user
+ # as we have changed the build system
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+ echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+ echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${PF}" >> mk/build.mk
+
+ # We also need to use the GHC_FLAGS flags when building ghc itself
+ echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+ echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+ echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+ # Speed up initial Cabal bootstrap
+ echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+ # We can't depend on haddock except when bootstrapping when we
+ # must build docs and include them into the binary .tbz2 package
+ # app-text/dblatex is not in portage, can not build PDF or PS
+ echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
+ echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+ echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+ # this controls presence on 'xhtml' and 'haddock' in final install
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+
+ # not used outside of ghc's test
+ if [[ -n ${GHC_BUILD_DPH} ]]; then
+ echo "BUILD_DPH = YES" >> mk/build.mk
+ else
+ echo "BUILD_DPH = NO" >> mk/build.mk
+ fi
+
+ # Any non-native build has to skip as it needs
+ # target haddock binary to be runnabine.
+ if ! is_native; then
+ # disable docs generation as it requires running stage2
+ echo "HADDOCK_DOCS=NO" >> mk/build.mk
+ echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+ echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+ fi
+
+ if is_crosscompile; then
+ # Install ghc-stage1 crosscompiler instead of
+ # ghc-stage2 cross-built compiler.
+ echo "Stage1Only=YES" >> mk/build.mk
+ fi
+
+ # allows overriding build flavours for libraries:
+ # v - vanilla (static libs)
+ # p - profiled
+ # dyn - shared libraries
+ # example: GHC_LIBRARY_WAYS="v dyn"
+ if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+ echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+ fi
+ echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+ # Get ghc from the unpacked binary .tbz2
+ # except when bootstrapping we just pick ghc up off the path
+ if ! use ghcbootstrap; then
+ export PATH="${WORKDIR}/usr/bin:${PATH}"
+ fi
+
+ echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+ # don't strip anything. Very useful when stage2 SIGSEGVs on you
+ echo "STRIP_CMD = :" >> mk/build.mk
+
+ local econf_args=()
+
+ # GHC embeds toolchain it was built by and uses it later.
+ # Don't allow things like ccache or versioned binary slip.
+ # We use stable thing across gcc upgrades.
+ # User can use EXTRA_ECONF=CC=... to override this default.
+ econf_args+=(
+ AR=${CTARGET}-ar
+ CC=${CTARGET}-gcc
+ # these should be inferred by GHC but ghc defaults
+ # to using bundled tools on windows.
+ Windres=${CTARGET}-windres
+ DllWrap=${CTARGET}-dllwrap
+ # we set the linker explicitly below
+ --disable-ld-override
+ )
+ case ${CTARGET} in
+ arm*)
+ # ld.bfd-2.28 does not work for ghc. Force ld.gold
+ # instead. This should be removed once gentoo gets
+ # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+ econf_args+=(LD=${CTARGET}-ld.gold)
+ ;;
+ sparc*)
+ # ld.gold-2.28 does not work for ghc. Force ld.bfd
+ # instead. This should be removed once gentoo gets
+ # a fix for missing --no-relax support bug:
+ # https://sourceware.org/ml/binutils/2017-07/msg00183.html
+ econf_args+=(LD=${CTARGET}-ld.bfd)
+ ;;
+ *)
+ econf_args+=(LD=${CTARGET}-ld)
+ esac
+
+ if [[ ${CBUILD} != ${CHOST} ]]; then
+ # GHC bug: ghc claims not to support cross-building.
+ # It does, but does not distinct --host= value
+ # for stage1 and stage2 compiler.
+ econf_args+=(--host=${CBUILD})
+ fi
+
+ if use ghcmakebinary; then
+ # When building booting libary we are trying to
+ # bundle or restrict most of external depends
+ # with unstable ABI:
+ # - embed libffi (default GHC behaviour)
+ # - disable ncurses support for ghci (via haskeline)
+ # https://bugs.gentoo.org/557478
+ # - disable ncurses support for ghc-pkg
+ echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+ echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+ elif is_native; then
+ # using ${GTARGET}'s libffi is not supported yet:
+ # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+ econf_args+=(--with-system-libffi)
+ econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
+ fi
+
+ einfo "Final mk/build.mk:"
+ cat mk/build.mk || die
+
+ econf ${econf_args[@]} \
+ --enable-bootstrap-with-devel-snapshot \
+ $(use_enable elfutils dwarf-unwind) \
+ $(use_enable numa)
+
+ if [[ ${PV} == *9999* ]]; then
+ GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_P=${PN}-${GHC_PV}
+ fi
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ # Stage1Only crosscompiler does not build stage2
+ if ! is_crosscompile; then
+ # 1. build/pax-mark compiler binary first
+ emake ghc/stage2/build/tmp/ghc-stage2
+ # 2. pax-mark (bug #516430)
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 2. build/pax-mark haddock using ghc-stage2
+ if is_native; then
+ # non-native build does not build haddock
+ # due to HADDOCK_DOCS=NO, but it could.
+ emake utils/haddock/dist/build/tmp/haddock
+ pax-mark -m utils/haddock/dist/build/tmp/haddock
+ fi
+ fi
+ # 3. and then all the rest
+ emake all
+ fi # ! use binary
+}
+
+src_test() {
+ # TODO: deal with:
+ # - sandbox (pollutes environment)
+ # - extra packages (to extend testsuite coverage)
+ # bits are taken from 'validate'
+ local make_test_target='test' # can be fulltest
+ # not 'emake' as testsuite uses '$MAKE' without jobserver available
+ make $make_test_target stage=2 THREADS=$(makeopts_jobs)
+}
+
+src_install() {
+ if use binary; then
+ use prefix && mkdir -p "${ED}"
+ mv "${S}/usr" "${ED}"
+ else
+ [[ -f VERSION ]] || emake VERSION
+
+ # -j1 due to a rare race in install script:
+ # make --no-print-directory -f ghc.mk phase=final install
+ # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+ # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+ # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
+ # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+ # /usr/bin/install: cannot create regular file \
+ # '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+ emake -j1 install DESTDIR="${D}"
+
+ # Skip for cross-targets as they all share target location:
+ # /usr/share/doc/ghc-9999/
+ if ! is_crosscompile; then
+ dodoc "distrib/README" "LICENSE" "VERSION"
+ fi
+
+ # rename ghc-shipped files to avoid collision
+ # of external packages. Motivating example:
+ # user had installed:
+ # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+ # dev-haskell/transformers-0.4.2.0
+ # then user tried to update to
+ # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+ # this will lead to single .conf file collision.
+ local shipped_conf renamed_conf
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ for shipped_conf in "${package_confdir}"/*.conf; do
+ # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+ renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+ mv "${shipped_conf}" "${renamed_conf}" || die
+ done
+
+ # remove link, but leave 'haddock-${GHC_P}'
+ rm -f "${ED}"/usr/bin/$(cross)haddock
+
+ if ! is_crosscompile; then
+ newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+ newbashcomp utils/completion/ghc.bash ghc
+ fi
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+ # copy the package.conf.d, including timestamp, save it so we can help
+ # users that have a broken package.conf.d
+ cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+ # copy the package.conf, including timestamp, save it so we later can put it
+ # back before uninstalling, or when upgrading.
+ cp -p "${PKGCACHE}"{,.shipped} \
+ || die "failed to copy package.conf.d/package.cache"
+
+ if is_crosscompile; then
+ # When we build a cross-compiler the layout is the following:
+ # usr/lib/${CTARGET}-ghc-${VER}/ contains target libraries
+ # but
+ # usr/lib/${CTARGET}-ghc-${VER}/bin/ directory
+ # containst host binaries (modulo bugs).
+
+ # Portage's stripping mechanism does not skip stripping
+ # foreign binaries. This frequently causes binaries to be
+ # broken.
+ #
+ # Thus below we disable stripping of target libraries and allow
+ # stripping hosts executables.
+ dostrip -x "/usr/$(get_libdir)/$(cross)${GHC_P}"
+ dostrip "/usr/$(get_libdir)/$(cross)${GHC_P}/bin"
+ fi
+}
+
+pkg_preinst() {
+ # have we got an earlier version of ghc installed?
+ if has_version "<${CATEGORY}/${PF}"; then
+ haskell_updater_warn="1"
+ fi
+}
+
+pkg_postinst() {
+ ghc-reregister
+
+ # path to the package.cache
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+ # give the cache a new timestamp, it must be as recent as
+ # the package.conf.d directory.
+ touch "${PKGCACHE}"
+
+ if [[ "${haskell_updater_warn}" == "1" ]]; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "You have just upgraded from an older version of GHC."
+ ewarn "You may have to run"
+ ewarn " 'haskell-updater'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+ rm -rf "${PKGCACHE}"
+
+ cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+ ghc-package_pkg_postrm
+}
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
index 81f9c0b92daa..b9d336883ec0 100644
--- a/dev-lang/go/Manifest
+++ b/dev-lang/go/Manifest
@@ -2,6 +2,6 @@ AUX go-sets.conf 313 BLAKE2B 03e94776e317d34b72bfb8385b8b0dfa6a599a6086e4d0c9214
DIST go1.16.7.src.tar.gz 20922206 BLAKE2B 65e53684f66975313caf4661a7c52b178dde8b32ac40f98fe8164fe035c835e1407ef442d41c7cbf907d5093703e440d0e62c398f8ed541bad074b537f6dd6ff SHA512 1aab6f3dcbae71ebfa29a1d9a46613a3aa48de01cee82b48842d92abbb4ee57db019a4d47a3f12af9553c8e2a982e90114a06ee187f908f7c29245d9786b9186
DIST go1.17.src.tar.gz 22178549 BLAKE2B 86cb84ff782eaee3fc0411b1f31cd985f3fdcda7b2709f3a94cba0fbe827ac13632d0476e1f67deaf06d2352c2ea3ac9217db7d170702dffff6a64beabdb0814 SHA512 bb94d69555faa103bc092ce85b73168954a553a5c72e4b38c39bd99a3eb4db679f352685e66507b0945ed12676eb2a0c51674e456f68a9a5b98c3ec6a948d35b
EBUILD go-1.16.7.ebuild 4794 BLAKE2B 54a75927b9d5e7fd50a83de625087f34ec4f0abbdaed135ab709b9581e141f0e96b52cc9fd64b797a3092e8e057fd84c9d9db3ad74de9945a72253c23a7d328f SHA512 02ff8dd6f4e225e3c414ef6e3d7792fb6a8e95914e8ef75caf8606c3f931bce72e7e2c77d54d6f350b743bc5de7f441ba405a5b8ff758b5a3be64a7922b2e41c
-EBUILD go-1.17.ebuild 4871 BLAKE2B 33d3dde2df84bc7525235a64af7a96bf6a0bc5928eec2b1cef27e81dc40a7bcc094820c1526ab680dc3c103e002f0f3814362f26baf5b1bac3d64ed58c992021 SHA512 669f73d7584c154977ef6e38284321f5461865bbbaafce07bdc25872dd090f363a521f1463bcfd672b766a8e9417aebb6d6aaa178d8724bc12719d7e100db858
+EBUILD go-1.17.ebuild 4868 BLAKE2B 00ba0cded39fd819257207ca29f9fb05061a0a08c9594c456fa7947f7fe2b192753a95b97673babdcf1d751be77e6d652f8536f9d29232310497b8c0b8406d83 SHA512 269368e6caf90524fef72167010a86c104311993e092590e5025d6dcf92dfdea96122ac88d30d16306d56aded36fa45b74a930e43864f8452d50e8166d622523
EBUILD go-9999.ebuild 4873 BLAKE2B c22ce3b3a554a8936decdef9d1c58578eccfdb44fe44316bd36c3fe232d14e53766c1e85a616b1758ef992754ef5bcafc045e7b1166ef35c6d8424642442437e SHA512 74b629a6055047dfc58cedc9e0848b76b2544675e20e76d702a0d0e00f64d84644e1df034d5959fccd26b6c4b230cb4a56f526f1d4a19e4172e85ab450d718b1
MISC metadata.xml 462 BLAKE2B d9d4280e921286791a55619a7e5557c7041b0de157aa0f8bf6f17cf5041f802df4037270eeb3e8d37263f9fc17939c619a0dd3bce449c5f247279884da10bf67 SHA512 26fa7bfe26f00e8e1766cc0a1052fb8b5352799a33c9eb8f0c4f4523601d3eb5d1da8adc4b731f0d778039788734a9ad483f22e58e4bf1551ec8e9dccbcb87ba
diff --git a/dev-lang/go/go-1.17.ebuild b/dev-lang/go/go-1.17.ebuild
index 0d2f65b9fb56..bfde2d27f4dc 100644
--- a/dev-lang/go/go-1.17.ebuild
+++ b/dev-lang/go/go-1.17.ebuild
@@ -21,7 +21,7 @@ case ${PV} in
case ${PV} in
*_beta*|*_rc*) ;;
*)
- KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+ KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
esac
esac
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
index 32115fafa772..dda748662398 100644
--- a/dev-lang/moarvm/Manifest
+++ b/dev-lang/moarvm/Manifest
@@ -1,4 +1,6 @@
DIST MoarVM-2021.06.tar.gz 5449936 BLAKE2B 2bf6fc2e1a4dd0741819305e506945b09ed2a0fc1348ff98565cae397e76044176f05e87faeed1f52d5efadccb6d44edcb987553f5e164417153a8f23ba09493 SHA512 b23e20ed3e0830395ac09bd84a33ea3ab7ba52bce835c67b1feec45823ca2f0c9d04957d1f1b48b400fc30a48db37c5f89c3975b0273f684d9677145e2296f2c
+DIST MoarVM-2021.08.tar.gz 13643526 BLAKE2B 433cfaaad4138d8b98fc4bacd5495281f2a8da5195aa74aded118126afdf11cdf0175fd033472e951e91ab3c1eb11877ab039cd24d911553d5854be18021a87e SHA512 6199871f51a4998e1b5260ba833e3bf09c6115e12334a94de5aa4135b93f8dc754967712ce8e092a36b4940368433be840cbf1a8ce7aec52219f768acd90078d
EBUILD moarvm-2021.06-r1.ebuild 1453 BLAKE2B e55f7009cdd23d8bcff869bb590959982e7a5ef6fa419d6155476f944c555b766247c10e20fe8d60dfb5cce6dd7fa98c6ce8ed9f7e461322b74ea25c92bd6c35 SHA512 f4b022aa0c8385cf6e0e75f8b59470ed27da5a24767401f76e9561d347162101e352deda1272eeab4f28a644770dc4fc411c09811898daf79cac4e5c33fbb693
+EBUILD moarvm-2021.08.ebuild 1453 BLAKE2B e55f7009cdd23d8bcff869bb590959982e7a5ef6fa419d6155476f944c555b766247c10e20fe8d60dfb5cce6dd7fa98c6ce8ed9f7e461322b74ea25c92bd6c35 SHA512 f4b022aa0c8385cf6e0e75f8b59470ed27da5a24767401f76e9561d347162101e352deda1272eeab4f28a644770dc4fc411c09811898daf79cac4e5c33fbb693
EBUILD moarvm-9999.ebuild 1740 BLAKE2B 8cc6d8b3dff8d5fc12f335e854b0d83f3fec8384500a1ca38be253066a7ae8b858c561f8e55579888ed4d224f4216d9eff0bf5f995f139f8cedce936ccdc06da SHA512 3e2223a691efe6cacd229d72559990a8f72b21b39fe697f8e8e2e347c2ddeed82dfac12d49160aa6acbd0baf821e43f6cd7d805fb154fe936bb9882c3d61539c
MISC metadata.xml 802 BLAKE2B a2fc329ff27764a800785617bf71bdb99f764c3709130a094ac398d99aeef1414c1188d55088ada2f41eb4892709ef681d47b9f64e27a0426d5ec0cd8c90640e SHA512 2afbbc8899857a4bd3583f2bad121fd68208dfbdd4d0852bfbf28860e45e49a4b600ee74c254f7ffa782e8c1e939d56744acf82771a49fe0caed7e31492b8c60
diff --git a/dev-lang/moarvm/moarvm-2021.08.ebuild b/dev-lang/moarvm/moarvm-2021.08.ebuild
new file mode 100644
index 000000000000..965484962763
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2021.08.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+
+IUSE="asan clang debug doc +jit optimize static-libs ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ >=dev-libs/libuv-1.26:=
+ dev-libs/libffi:="
+DEPEND="${RDEPEND}
+ clang? ( >=sys-devel/clang-3.1 )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ MAKEOPTS+=" NOISY=1"
+ use doc && DOCS+=( docs/* )
+ local prefix="${EPREFIX}/usr"
+ local libdir="${EPREFIX}/usr/$(get_libdir)"
+ einfo "--prefix '${prefix}'"
+ einfo "--libdir '${libdir}'"
+ local myconfigargs=(
+ "--prefix" "${prefix}"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--libdir" "${libdir}"
+ "--compiler" "$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+
+ perl Configure.pl "${myconfigargs[@]}" moarshared || die
+}
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
index 655f4efd7a37..97064504eaaa 100644
--- a/dev-lang/nqp/Manifest
+++ b/dev-lang/nqp/Manifest
@@ -1,4 +1,6 @@
DIST nqp-2021.06.tar.gz 5208065 BLAKE2B 7314f425e418161befc55f9490453a3a4c3caa0ddf13e2b3bbcc9a20a6204aba9517885b6ecccddbbaf078b60c74be90fe556bf99dcc6014e57a7c873e96381d SHA512 482ec4a99d09b3660f03fd3c822a2f8c72dbdfeda1bcfdac0b4bcfa364ec57cbfdebf3b2872f8649c86d3d2d7603961d75e00d73dc417e5ac2a32f643bcfcabe
+DIST nqp-2021.08.tar.gz 5208527 BLAKE2B 1f2e454e63484a8a636f61c9110b4a20775ec59dd7734fe32a93b01aaad5ea977ea74678085a66d9f072234de5768d8023182d6df56a448f2a0aa0fd3c1c76c3 SHA512 fca1dc8c36f914304f97330cb33be3a94c539f3cb6cc80d898c734dcf04b12b8be30ffce358a0a5320c6ea56afd627f792b4a8fa3f94134776922ae088b92814
EBUILD nqp-2021.06.ebuild 3634 BLAKE2B 5d8351300dcfe9ead4467a1253f0cafc2ea23afcc3c2200711fd8acbee95048c08adc10ed44978c496b3d1e79071dc4755d7c005d1045bd871d068525b69c167 SHA512 d6c66b3e9d127586524e368560afc6ba49e5f8a48b3054ef8dcbacfe6fe7e81325269f3eeeb72e2237cbeaa203b85797d636944459e55378490ce98df2ca2fb8
+EBUILD nqp-2021.08.ebuild 3634 BLAKE2B 5d8351300dcfe9ead4467a1253f0cafc2ea23afcc3c2200711fd8acbee95048c08adc10ed44978c496b3d1e79071dc4755d7c005d1045bd871d068525b69c167 SHA512 d6c66b3e9d127586524e368560afc6ba49e5f8a48b3054ef8dcbacfe6fe7e81325269f3eeeb72e2237cbeaa203b85797d636944459e55378490ce98df2ca2fb8
EBUILD nqp-9999.ebuild 3634 BLAKE2B 5d8351300dcfe9ead4467a1253f0cafc2ea23afcc3c2200711fd8acbee95048c08adc10ed44978c496b3d1e79071dc4755d7c005d1045bd871d068525b69c167 SHA512 d6c66b3e9d127586524e368560afc6ba49e5f8a48b3054ef8dcbacfe6fe7e81325269f3eeeb72e2237cbeaa203b85797d636944459e55378490ce98df2ca2fb8
MISC metadata.xml 516 BLAKE2B 82a24b38f05cfc436b30a042aa0aa16f638cd471a3ca51d1c0f6c096387a83d95a4e4ed7b9ba3f0f84d3faa630dc6e4d5b6fa884cf76aaaa67aa544eeefc8ae0 SHA512 c96c7a42e554542060ef6b83b9a44ac33c425748b788d7ea438590a49346e06ee71decc29afaa72b758fa4a963e1f0692eac24420141d6e016aefc08f97881c8
diff --git a/dev-lang/nqp/nqp-2021.08.ebuild b/dev-lang/nqp/nqp-2021.08.ebuild
new file mode 100644
index 000000000000..81e93919b90b
--- /dev/null
+++ b/dev-lang/nqp/nqp-2021.08.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/perl6/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="https://rakudo.org"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.8 )"
+DEPEND="${CDEPEND}"
+BDEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.8 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=${EPREFIX}/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
index 2bbb4ec4c559..e8730472bdd3 100644
--- a/dev-lang/perl/Manifest
+++ b/dev-lang/perl/Manifest
@@ -1,5 +1,4 @@
AUX perl-5.26.2-hppa.patch 3231 BLAKE2B d59eab55eea3daceb0d3df39778d43ebaee2c065c052ca048ec17c06fa90049eb7fd5ae40092f11248de25cdf9cff96dc69626e7f3269b24cf618004deeb5859 SHA512 24856ae3c637c58d16d543240f5028e137c33c7aeae7c0c3dfa1a69b621057a84ab4ddf8b12ac6ef251381af4b190c200262bec9bdaa6001199dbd1d15cf4bae
-AUX perl-5.30.3-darwin-macos11.patch 6367 BLAKE2B 5fb6a34bf5e422ba4a5f76d9462328fb81e44e6de7dc363ad595d9315ac622d5eb2973700e3eb209f630bfd2d002adfe33f1a3a10f7c5818ed44fc3a26bd55d5 SHA512 c8d88c2f21b781e777ca19115eedecdf4d8bc0f93b01da6da578be489e0151f3ab7d3204e6b7a28848f9286bad90bcf6f33edc63be82949060e06fc6c739fb7f
AUX perl-5.34.0-crossfit.patch 388 BLAKE2B dda2f10732422857f1a3977b6aa6ec0536dffaa53658e23378083393a55cf283906ef8f41dde2eb83e0de4e5dfd6dcd06d6b236f0a91c44086172bcaf105396a SHA512 5da4dd913790bd125667851807da9e37dac9cda78cce18ecffb8780f42d30b65f46817633e65027f5438f1a39286139fcf961d4bc98caf70946152200c3e72ee
DIST perl-5.32.0-patches-1.tar.xz 20220 BLAKE2B 46ebca5c74f59aa935ceec2a5807426c0e653ad7ba27de441d26e049e62dc67b17d58dfe5755f31bdd157e349d47fd46a98699207729f8f4f747930ed1064ba2 SHA512 42ed00f5f6be40af59e02691ff439a048cccd96fb970cca0976209faa921af98a773cc4cb1466e164328350d58cb46950ffa8c6f2fddabbeb3e8819349b06849
DIST perl-5.32.1.tar.xz 12610988 BLAKE2B 9f89bcf9cffb245a0f2cb0afa17c25f092c84cc2f29bb1c744294c2f0393c72dc3beb9fcbe256cf252677b33bc594b294b3f6a4774ad9e30b771aceed1f4f147 SHA512 3443c75aea91f0fe3712fee576239f1946d2301b8f7390b690e2f5d070fe71af8f9fa7769e42086c2d33d5f84370f80368fa9350b4f10cc0ac3e6c1f6209d8f9
diff --git a/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch b/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch
deleted file mode 100644
index 73879b398c4d..000000000000
--- a/dev-lang/perl/files/perl-5.30.3-darwin-macos11.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-https://github.com/Perl/perl5/pull/17946
-https://bugs.gentoo.org/757249
----
-From b382aafc793fe1007f9058a5145a1d39d56cef70 Mon Sep 17 00:00:00 2001
-From: Adam Hartley <git@ahartley.com>
-Date: Mon, 6 Jul 2020 22:59:42 +0100
-Subject: [PATCH 1/7] Add 11.x support for darwin.sh
-
----
- hints/darwin.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index 0a91bc083c0..c0f06de1cab 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
- # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
- # capturing its value and adding it to the flags.
- case "$MACOSX_DEPLOYMENT_TARGET" in
-- 10.*)
-+ 10.* | 11.*)
- add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
- add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
- ;;
-@@ -327,7 +327,7 @@ EOM
- # "ProductVersion: 10.11" "10.11"
- prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
- case "$prodvers" in
-- 10.*)
-+ 10.* | 11.*)
- add_macosx_version_min ccflags $prodvers
- add_macosx_version_min ldflags $prodvers
- ;;
-
-From 960d1a5c4225d1dd12636a469e10a568464e4e7c Mon Sep 17 00:00:00 2001
-From: Adam Hartley <git@ahartley.com>
-Date: Wed, 8 Jul 2020 19:10:33 +0100
-Subject: [PATCH 3/7] Update error message
-
----
- hints/darwin.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index c0f06de1cab..988b766c4f4 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
-
- *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
- ***
--*** Please either set it to 10.something, or to empty.
-+*** Please either set it to 10.something, 11.something or to empty.
-
- EOM
- exit 1
-
-From d633cced1d5174e19c5f2234a9fb4c7603cfb9db Mon Sep 17 00:00:00 2001
-From: Adam Hartley <git@ahartley.com>
-Date: Sat, 11 Jul 2020 11:41:27 +0100
-Subject: [PATCH 4/7] Update deprecated syscall check for 11.x and greater
-
----
- hints/darwin.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index 988b766c4f4..4f73a9995e7 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -342,11 +342,11 @@ EOM
- exit 1
- esac
-
-- # The X in 10.X
-+ prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
- prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
-
- # macOS (10.12) deprecated syscall().
-- if [ "$prodvers_minor" -ge 12 ]; then
-+ if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
- d_syscall='undef'
- # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
- case "$MACOSX_DEPLOYMENT_TARGET" in
-
-From 9c3890f8521a7db6d9b2aa21561c7d0dae9fb91d Mon Sep 17 00:00:00 2001
-From: Adam Hartley <BytesGuy@users.noreply.github.com>
-Date: Wed, 22 Jul 2020 13:15:30 +0100
-Subject: [PATCH 5/7] Simplify syscall check
-
----
- hints/darwin.sh | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index 4f73a9995e7..40c84cf267a 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -342,11 +342,10 @@ EOM
- exit 1
- esac
-
-- prodvers_major=$(echo $prodvers|awk -F. '{print $1}')
-- prodvers_minor=$(echo $prodvers|awk -F. '{print $2}')
-+ darwin_major=$(echo $osvers|awk -F. '{print $1}')
-
-- # macOS (10.12) deprecated syscall().
-- if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then
-+ # macOS 10.12 (darwin 6.0.0) deprecated syscall().
-+ if [ "$darwin_major" -ge 6 ]; then
- d_syscall='undef'
- # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
- case "$MACOSX_DEPLOYMENT_TARGET" in
-
-From 99ff8934992102a3db63805e8ba9710577de164e Mon Sep 17 00:00:00 2001
-From: Adam Hartley <BytesGuy@users.noreply.github.com>
-Date: Wed, 22 Jul 2020 13:15:53 +0100
-Subject: [PATCH 6/7] Update darwin.sh
-
----
- hints/darwin.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index 40c84cf267a..1709d224f7c 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -344,8 +344,8 @@ EOM
-
- darwin_major=$(echo $osvers|awk -F. '{print $1}')
-
-- # macOS 10.12 (darwin 6.0.0) deprecated syscall().
-- if [ "$darwin_major" -ge 6 ]; then
-+ # macOS 10.12 (darwin 16.0.0) deprecated syscall().
-+ if [ "$darwin_major" -ge 16 ]; then
- d_syscall='undef'
- # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime()
- case "$MACOSX_DEPLOYMENT_TARGET" in
-
-From 1b712e4b359d9508461a0a832d06baa6e589b955 Mon Sep 17 00:00:00 2001
-From: Adam Hartley <BytesGuy@users.noreply.github.com>
-Date: Thu, 23 Jul 2020 19:53:07 +0100
-Subject: [PATCH 7/7] Future proof version check
-
----
- hints/darwin.sh | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/hints/darwin.sh b/hints/darwin.sh
-index 1709d224f7c..fdfbdd4a3b9 100644
---- a/hints/darwin.sh
-+++ b/hints/darwin.sh
-@@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
- # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
- # capturing its value and adding it to the flags.
- case "$MACOSX_DEPLOYMENT_TARGET" in
-- 10.* | 11.*)
-+ [1-9][0-9].*)
- add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
- add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
- ;;
-@@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x
-
- *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
- ***
--*** Please either set it to 10.something, 11.something or to empty.
-+*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty.
-
- EOM
- exit 1
-@@ -327,7 +327,7 @@ EOM
- # "ProductVersion: 10.11" "10.11"
- prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
- case "$prodvers" in
-- 10.* | 11.*)
-+ [1-9][0-9].*)
- add_macosx_version_min ccflags $prodvers
- add_macosx_version_min ldflags $prodvers
- ;;
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
index 8ba460155115..1d54f59a400b 100644
--- a/dev-lang/php/Manifest
+++ b/dev-lang/php/Manifest
@@ -5,13 +5,19 @@ AUX php-freetype-2.9.1.patch 7667 BLAKE2B efc8f829bbad11b3e7b654d0882213ecb9aae7
AUX php-iodbc-header-location.patch 481 BLAKE2B 9ea6a5d529dc7a8c78eeee800900372bc14309a05e352b2838da32e1384b61b507fdb623c9400094aa5b637eb1a87da92c72600eff79b18b8989ef90af56a0fa SHA512 86469f657d8807f005c28fd2149770c881add8f243fdfea087956c7987277597fe400a7af23f624f26da270356604717ed9cd04771154d7cf2ffe7237972372b
AUX php80-firebird-warnings.patch 1949 BLAKE2B ab1b693afe26b6529aab8628f9a614478c388ed23603ad1dd4d17b63154d535a3e4c2db04fe27fb22a3d7e1335e368ffd383ed24647ac53ac05170ec3e1beb75 SHA512 d37815ea529167d4959aef056a3a0be6902ee4cda809a48c24299b05ff6477ee82e8ed8dcf49051b8e74ba5c31e3985454591ea751d4550df3d2e3639ec0d616
DIST php-7.3.29.tar.xz 12139492 BLAKE2B 7e1287e0fd236252f5bc92009e4ff51676eccd197c1c579f0e79a5428fa3920b5d1f95a459cdd77c22699fbe83984a6d726ab4fc0fc1e309da8b34e0e3998071 SHA512 8a495546d575a31f864f85139d8d7931361e6ac421f2cf5ef3b4cb57f59c44568cb9ad0c8793f50169d8d9933abdcec14ab90add2d7fab056e19e7f66d60689f
+DIST php-7.3.30.tar.xz 12142596 BLAKE2B 9d8d60aa2a24465e53d99be05f66c8c65ce738c866af0889cdfcd95d545d6308fce33ca2faaaeb2a298eae13d58b5f5b5c519de6af48230a4d9c4e3d41debb28 SHA512 89eb62ab4284393f33b79ee336c1672613c498adb858b16e1a17d5b2056068c849b96bbf591311ff322c607168d9518ade3bfebedbc4da4f37c34d2c64c671b6
DIST php-7.4.21.tar.xz 10346628 BLAKE2B f758d6bef60f5e0c99bd097533d1663640362c2b752a3bd54389acc3bd7d173c1ba5d4b1c119b6ad50f5029aabe2349bb4646a33212dc3cf34fd294f24def401 SHA512 778ddbfe614fdc6a00bc82c61f4c636bdbe815ce3398415a29bd24a2fd4ca2113b3b804303585d8830242e04b0c202bbc7c725a46c9bad79b070a0e896e5e681
DIST php-7.4.22.tar.xz 10348532 BLAKE2B 20e4bfb0362bb13ca8cacf9fb2500ffdd2db011d69cb82f113dd0c25e8a5fd4a017d77481732930afd24a8e092edbce3eafe9d45f27718ddf7567469f80c5642 SHA512 80587ba613b8a863a666f44a16ebb33cbb5a5d396601d1eaf063c8f7793a98abae903cb76fca4216860f1a043d5ee997464d479d53ffff6a1d6a6cd31da9100d
+DIST php-7.4.23.tar.xz 10371160 BLAKE2B 5e9fc033f856132dd6b7b06fc5aedc72218f083779fd90a8c4c7a23fb4f8c248a7ff769f9d9f46e5143ddf88ce9289f5a8013c194aeaf22eca74d97846868611 SHA512 659b6bbf9be21a09640529bc088dfd7a494081188e37eb1f2dac2cab92a1084062fd06d550dc8c97bdd7dd9b57f4146e357447be2cb86643bda1d8dbc8a0d4a3
+DIST php-8.0.10.tar.xz 10703088 BLAKE2B c1be482bf0a7cd2392b4febccca8d9f7b32b12ff4f5ff0ce417658c52444308e67a1a0e702c0d70dc7cece4f8299b2bc12b6f999be8a758e5390e760ce4809d7 SHA512 25f23822a45eab837645a0259c7dbb999766506de35c1bba53e928e2b5935ba70278b931d5085966178e08013ec69407fc68eb041b3ae2e619b81f20ec8ce736
DIST php-8.0.8.tar.xz 10674548 BLAKE2B d2446ae5b80e692106b89418864e4253e000741addb7526599ec8db96713f91a5ab3bccd5bbd2f536b16cc58afafdf22b19996d424dfdce3218a8083ee2bdf37 SHA512 1f8b94083b64705e24365af57169f8ff08115f31a7471238d9ed7a24b692e46c789f3fc00ff2bef2205243b9cd9c4736831e995a004afc7fc4127f3b74932428
DIST php-8.0.9.tar.xz 10678448 BLAKE2B 7d8684a353ccbcd2aaff4c240563cbd9f94b16ad29223d7e00e3d9ca8b564dabe3f1d0ac676e6499af6b95f24ac2104ed9cc0ce30d05c7c565ccb2067a86b355 SHA512 de9923bfa3ca37cd775ff743beb417152d7380fa5622f3fb0055b49e552c6484561f4f503bb11f535aadd12352c92f673f3e3cc86964c767b1f6cec21265d03c
EBUILD php-7.3.29.ebuild 22683 BLAKE2B c9a62b09e00619d5e9ddfbd20abcb2f424d1e6d6f702fae36854b4a0bb3e5a1ef49f1584aae2d2b5d225c4df763687ff3e319c720b3946766bd57fe07842a185 SHA512 69a574958c2b644a3c14d39dd8068af550547e4a86c685539fe6c82b9d4b9883fd22b03fae5e04d0a7df4970ba82a82e127afd4609cde177165d734fb1ad116e
+EBUILD php-7.3.30.ebuild 22690 BLAKE2B dd350e0df77cc2a4f006b0e4a9e5bd0d5ac9442a27307ff15df78ccd5b9d3bfdeee307dd7bf6bb665cbe63237678270f370c436b62862e9c7da4483b5d488bfe SHA512 59cf4ee0b998240145945190370e41d20c731c37bb7909f75da8b3deff08a6036c7ce24366b0c2ddc6b325ee4564429bb1339b852ef973f1b2c566b19149757f
EBUILD php-7.4.21-r1.ebuild 21394 BLAKE2B fb0dae734fdafad89d17b823c5a4b5e5956f821c73a9cfadd29d3b5fe163ffc412b19d6ba57c53873e7c165fbad1fcc45b8218f9f8a319e1be622aa1256d2eb1 SHA512 ece48ffcc67868e8745e62a207d00967eb47aed140f0ab631b97ec22ace9e3d650b2385da728997a266fa063b33c4f552b840485d6bfde937722064ed393932c
EBUILD php-7.4.22.ebuild 21401 BLAKE2B a0f0b3016c360705f9c3138b3a8eb272d4d12844f65694229b8a7441391a295243af769940bf1c2394df354123ececaa041ee566151a5eb05bcd114c47235510 SHA512 ae81d70ee64cc5aef8f03b0d8598bcca7f75b71e8cb3a8a9161ba73536f41e6252cf587c999b37014c59a331d3c243c431548863c017e2da9949a3602a72dd9c
+EBUILD php-7.4.23.ebuild 21408 BLAKE2B 63e5db498bb01eb86183c7b4a9baa1ed8cf1d07aa9c9e63ff754ed9b4e99874903551e6483a6545e6ff5d68f18aac18f90eaa7f5da85bcc879cd34377d8eb7c6 SHA512 454ea4be3c67ab58568d36097dd85fa985230ebc50d682666d7bddb0ea62fc76d8d7925d3b3e00d7fa46469a12a92a90af37e1e41d65425acfc5b5e4039f6365
+EBUILD php-8.0.10.ebuild 21427 BLAKE2B 4ccde3239994ca37ce53b190432506b35fb471a148207c1746392fb5cbbec68ecf417a7a2860b792d6efc8475ee1412281d5e70b8754f510699d7743126083f5 SHA512 6bac9b9ef70010d414d1e3e1debaeb2566d035511c38b3104429ebe84e8b7ab75bce096891297f4f7606c2fd221c336cdd93dd8e9e23845d9703ca41ae74f805
EBUILD php-8.0.8-r2.ebuild 21420 BLAKE2B e34347417fcf4d27cba8f22b810bdb2adc397621d8977f24dae7e5f6d4e0a1ff618b51f5ff8bb1d2bcaa0598490202d921a6379b9cd0147d4a3d7cd0be9066a1 SHA512 de351dd668a70bfaab8871d1a92e3026227fa5cdda7a78529d7c8a0cfe25c8976fa0b7420f24bd17b69eb4bffd36453c9928125cfed22e37256f6a01e8d0dbf5
EBUILD php-8.0.9.ebuild 21420 BLAKE2B e34347417fcf4d27cba8f22b810bdb2adc397621d8977f24dae7e5f6d4e0a1ff618b51f5ff8bb1d2bcaa0598490202d921a6379b9cd0147d4a3d7cd0be9066a1 SHA512 de351dd668a70bfaab8871d1a92e3026227fa5cdda7a78529d7c8a0cfe25c8976fa0b7420f24bd17b69eb4bffd36453c9928125cfed22e37256f6a01e8d0dbf5
MISC metadata.xml 3377 BLAKE2B c192a67082e05c42b046547d3a126fbbbebee6576ec9b892d9e5240a7ed7ed80830e10a6b35651db9a0b7276c56482cc472f563652077005b3aeaa60d3152b28 SHA512 105448eeb1939694a3bc535b98d644f4ef34cd92524c0a2c678ec795cef414689e071444020da673ea7592493d755747de1e03af5a48552a3aa87c871aa53495
diff --git a/dev-lang/php/php-7.3.30.ebuild b/dev-lang/php/php-7.3.30.ebuild
new file mode 100644
index 000000000000..ca53010503c1
--- /dev/null
+++ b/dev-lang/php/php-7.3.30.ebuild
@@ -0,0 +1,758 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit flag-o-matic systemd autotools
+
+MY_PV=${PV/_rc/RC}
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="https://www.php.net/"
+SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
+ coverage +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ +flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +jit +json kerberos ldap ldap-sasl libedit lmdb
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session session-mm sharedmem
+ +simplexml snmp soap sockets sodium spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre2-10.30[jit?,unicode]
+ fpm? ( acl? ( sys-apps/acl ) )
+ apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
+ argon2? ( app-crypt/argon2:= )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( <app-text/enchant-2.0:0 )
+ firebird? ( dev-db/firebird )
+ gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
+ gmp? ( dev-libs/gmp:0= )
+ iconv? ( virtual/libiconv )
+ imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( dev-libs/libedit )
+ lmdb? ( dev-db/lmdb:= )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode:0= )
+ session-mm? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ sodium? ( dev-libs/libsodium:=[-minimal] )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-1.0.1:0= )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp:0= )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( >=sys-libs/zlib-1.2.0.4:0= )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+BDEPEND="virtual/pkgconfig"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+# The Oracle instant client provides its own incompatible ldap library.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ oci8-instant-client? ( !ldap )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+PHP_MV="$(ver_cut 1)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "../ext/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+
+ # Bug 669566 - necessary so that build tools are updated for commands like pecl
+ # Force rebuilding aclocal.m4
+ rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
+ eautoreconf
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with argon2 password-argon2 "${EPREFIX}/usr")
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sodium sodium "${EPREFIX}/usr")
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zip-encryption libzip "${EPREFIX}/usr")
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm || use lmdb || use tokyocabinet ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ $(use_with lmdb lmdb "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ # --with-pcre-valgrind cannot be enabled with system pcre
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ --without-pcre-valgrind
+ $(use_with jit pcre-jit)
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ local one_sapi
+ local sapi
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ local sapi
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi="", sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ # Install the "phar" archive utility.
+ if use phar ; then
+ emake INSTALL_ROOT="${D}" install-pharcmd
+ dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
+ fi
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ local m
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.4.23.ebuild b/dev-lang/php/php-7.4.23.ebuild
new file mode 100644
index 000000000000..aadecf63e45e
--- /dev/null
+++ b/dev-lang/php/php-7.4.23.ebuild
@@ -0,0 +1,750 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+WANT_AUTOMAKE="none"
+
+inherit flag-o-matic systemd autotools
+
+MY_PV=${PV/_rc/RC}
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="https://www.php.net/"
+SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
+ coverage +ctype curl debug
+ enchant exif ffi +fileinfo +filter firebird
+ +flatfile ftp gd gdbm gmp +iconv imap inifile
+ intl iodbc ipv6 +jit +json kerberos ldap ldap-sasl libedit lmdb
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline selinux +session session-mm sharedmem
+ +simplexml snmp soap sockets sodium spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+# The Oracle instant client provides its own incompatible ldap library.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ !cli? ( ?? ( readline libedit ) )
+ truetype? ( gd zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ xmlrpc? ( xml iconv )
+ xmlreader? ( xml )
+ xmlwriter? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ oci8-instant-client? ( !ldap )
+ qdbm? ( !gdbm )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ firebird? ( pdo )
+ mssql? ( pdo )
+"
+
+RESTRICT="!test? ( test )"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre2-10.30[jit?,unicode]
+ fpm? ( acl? ( sys-apps/acl ) )
+ apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
+ argon2? ( app-crypt/argon2:= )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( <app-text/enchant-2.0:0 )
+ ffi? ( >=dev-libs/libffi-3.0.11:= )
+ firebird? ( dev-db/firebird )
+ gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
+ gmp? ( dev-libs/gmp:0= )
+ iconv? ( virtual/libiconv )
+ imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl )
+ libedit? ( dev-libs/libedit )
+ lmdb? ( dev-db/lmdb:= )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
+ odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ session-mm? ( dev-libs/mm )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ sodium? ( dev-libs/libsodium:=[-minimal] )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-1.0.1:0= )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ webp? ( media-libs/libwebp:0= )
+ xml? ( >=dev-libs/libxml2-2.7.6 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt )
+ zip? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+BDEPEND="virtual/pkgconfig"
+
+PHP_MV="$(ver_cut 1)"
+
+PATCHES=(
+ "${FILESDIR}"/php-iodbc-header-location.patch
+)
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "../ext/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+
+ # Emulate buildconf to support cross-compilation
+ rm -fr aclocal.m4 autom4te.cache config.cache \
+ configure main/php_config.h.in || die
+ eautoconf --force
+ eautoheader
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with argon2 password-argon2 "${EPREFIX}/usr")
+ $(use_enable bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype)
+ $(use_with curl)
+ $(use_enable xml dom)
+ $(use_with enchant)
+ $(use_enable exif)
+ $(use_with ffi)
+ $(use_enable fileinfo)
+ $(use_enable filter)
+ $(use_enable ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
+ $(use_enable intl)
+ $(use_enable ipv6)
+ $(use_enable json)
+ $(use_with kerberos)
+ $(use_with xml libxml)
+ $(use_enable unicode mbstring)
+ $(use_with ssl openssl)
+ $(use_enable pcntl)
+ $(use_enable phar)
+ $(use_enable pdo)
+ $(use_enable opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_enable simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap)
+ $(use_enable sockets)
+ $(use_with sodium)
+ $(use_with sqlite sqlite3)
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer)
+ $(use_enable xml)
+ $(use_enable xmlreader)
+ $(use_enable xmlwriter)
+ $(use_with xmlrpc)
+ $(use_with xslt xsl)
+ $(use_with zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm || use lmdb || use tokyocabinet ; then
+ our_conf+=( "--enable-dba" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ $(use_with tokyocabinet tcadb "${EPREFIX}/usr")
+ $(use_with lmdb lmdb "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype)
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg)
+ $(use_with xpm)
+ $(use_with webp)
+ )
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_enable gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl)
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ if use odbc && use iodbc ; then
+ our_conf+=(
+ --without-unixODBC
+ --with-iodbc
+ $(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
+ )
+ elif use odbc ; then
+ our_conf+=(
+ --with-unixODBC="${EPREFIX}/usr"
+ --without-iodbc
+ $(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
+ )
+ else
+ our_conf+=(
+ --without-unixODBC
+ --without-iodbc
+ --without-pdo-odbc
+ )
+ fi
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite)
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit)
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-external-pcre affects ext/pcre
+ our_conf+=(
+ --with-external-pcre
+ $(use_with jit pcre-jit)
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ local one_sapi
+ local sapi
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ local sapi
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi="", sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ # Install the "phar" archive utility.
+ if use phar ; then
+ emake INSTALL_ROOT="${D}" install-pharcmd
+ dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
+ fi
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ local m
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-8.0.10.ebuild b/dev-lang/php/php-8.0.10.ebuild
new file mode 100644
index 000000000000..79938681cad2
--- /dev/null
+++ b/dev-lang/php/php-8.0.10.ebuild
@@ -0,0 +1,749 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+WANT_AUTOMAKE="none"
+
+inherit flag-o-matic systemd autotools
+
+MY_PV=${PV/_rc/rc}
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="https://www.php.net/"
+SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl apparmor argon2 bcmath berkdb bzip2 calendar cdb cjk
+ coverage +ctype curl debug
+ enchant exif ffi +fileinfo +filter firebird
+ +flatfile ftp gd gdbm gmp +iconv imap inifile
+ intl iodbc ipv6 +jit kerberos ldap ldap-sasl libedit lmdb
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline selinux +session session-mm sharedmem
+ +simplexml snmp soap sockets sodium spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
+ +xml xmlreader xmlwriter xpm xslt zip zlib"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+# The Oracle instant client provides its own incompatible ldap library.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ !cli? ( ?? ( readline libedit ) )
+ truetype? ( gd zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ xmlreader? ( xml )
+ xmlwriter? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ oci8-instant-client? ( !ldap )
+ qdbm? ( !gdbm )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ firebird? ( pdo )
+ mssql? ( pdo )
+"
+
+RESTRICT="!test? ( test )"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.7[apache2?,fpm?]
+ >=dev-libs/libpcre2-10.30[jit?,unicode]
+ fpm? ( acl? ( sys-apps/acl ) apparmor? ( sys-libs/libapparmor ) )
+ apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
+ argon2? ( app-crypt/argon2:= )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ curl? ( >=net-misc/curl-7.29.0 )
+ enchant? ( app-text/enchant:2 )
+ ffi? ( >=dev-libs/libffi-3.0.11:= )
+ firebird? ( dev-db/firebird )
+ gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
+ gmp? ( dev-libs/gmp:0= )
+ iconv? ( virtual/libiconv )
+ imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl )
+ libedit? ( dev-libs/libedit )
+ lmdb? ( dev-db/lmdb:= )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
+ odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
+ postgres? ( >=dev-db/postgresql-9.1:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ session-mm? ( dev-libs/mm )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ sodium? ( dev-libs/libsodium:=[-minimal] )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? ( >=dev-libs/openssl-1.0.1:0= )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ webp? ( media-libs/libwebp:0= )
+ xml? ( >=dev-libs/libxml2-2.9.0 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt )
+ zip? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+BDEPEND="virtual/pkgconfig"
+
+PHP_MV="$(ver_cut 1)"
+
+PATCHES=(
+ "${FILESDIR}/php-iodbc-header-location.patch"
+ "${FILESDIR}/php80-firebird-warnings.patch"
+)
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "../ext/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+
+ # Emulate buildconf to support cross-compilation
+ rm -fr aclocal.m4 autom4te.cache config.cache \
+ configure main/php_config.h.in || die
+ eautoconf --force
+ eautoheader
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads zts)
+ )
+
+ our_conf+=(
+ $(use_with apparmor fpm-apparmor)
+ $(use_with argon2 password-argon2 "${EPREFIX}/usr")
+ $(use_enable bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype)
+ $(use_with curl)
+ $(use_enable xml dom)
+ $(use_with enchant)
+ $(use_enable exif)
+ $(use_with ffi)
+ $(use_enable fileinfo)
+ $(use_enable filter)
+ $(use_enable ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
+ $(use_enable intl)
+ $(use_enable ipv6)
+ $(use_with kerberos)
+ $(use_with xml libxml)
+ $(use_enable unicode mbstring)
+ $(use_with ssl openssl)
+ $(use_enable pcntl)
+ $(use_enable phar)
+ $(use_enable pdo)
+ $(use_enable opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_enable simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap)
+ $(use_enable sockets)
+ $(use_with sodium)
+ $(use_with sqlite sqlite3)
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer)
+ $(use_enable xml)
+ $(use_enable xmlreader)
+ $(use_enable xmlwriter)
+ $(use_with xslt xsl)
+ $(use_with zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm || use lmdb || use tokyocabinet ; then
+ our_conf+=( "--enable-dba" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ $(use_with tokyocabinet tcadb "${EPREFIX}/usr")
+ $(use_with lmdb lmdb "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype)
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg)
+ $(use_with xpm)
+ $(use_with webp)
+ )
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_enable gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl)
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ if use odbc && use iodbc ; then
+ our_conf+=(
+ --without-unixODBC
+ --with-iodbc
+ $(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
+ )
+ elif use odbc ; then
+ our_conf+=(
+ --with-unixODBC="${EPREFIX}/usr"
+ --without-iodbc
+ $(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
+ )
+ else
+ our_conf+=(
+ --without-unixODBC
+ --without-iodbc
+ --without-pdo-odbc
+ )
+ fi
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite)
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit)
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-external-pcre affects ext/pcre
+ our_conf+=(
+ --with-external-pcre
+ $(use_with jit pcre-jit)
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ local one_sapi
+ local sapi
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ local sapi
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index #nowarn
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi="", sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ # Install the "phar" archive utility.
+ if use phar ; then
+ emake INSTALL_ROOT="${D}" install-pharcmd
+ dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
+ fi
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ local m
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 726900d1bfe1..27c953461fc7 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -10,18 +10,30 @@ DIST Python-3.7.11.tar.xz 17393380 BLAKE2B 6394d69935950366da7c4cecd4816d7625417
DIST Python-3.7.11.tar.xz.asc 833 BLAKE2B 8af6b3e58b607a34c91f57af2fbe9c3f3c7cb6fa5e435e963edd7edcf7649e70c3a76bd346ff8ef1b3c890d8a92d3b2fed27ee01b512c579ff8ce80be61274fb SHA512 f19db95e88c9269174a2b4ac4d8c68fa7ed666b6698af26d2da202e30d145686e8679be763eecba9f8a0c34a207639724094463cffce659c3855ed4b133b0a59
DIST Python-3.8.11.tar.xz 18437648 BLAKE2B 957c553ced3387d19c1d1baf2eea7d41e9abfbf398c4514f475eadae29336dc02dbd2cdf7b90ab5fee1e49c083a366c113dcd73149445b663fcdf81a3b2b04f6 SHA512 c8c17491b05d83a9f8940474019034780a6b1ff4148654cd62c8f708c539718a0312cf0665efa2b8c42ed773f4306080bd105701a211ed56e6cab40837d5b2df
DIST Python-3.8.11.tar.xz.asc 833 BLAKE2B 52239149331a6529351714db10b5f6b2a37e9a9ce13470e0ab8ae4bf439544878df095995bdc28a534d55039a539c400f532aec8fb7d9b9ce7132167f0e39529 SHA512 40381e83a1bef996333d5044a361ce441c4631725457f8382588e9a86f586a9539ee139b8398aff3d988a317041fa87476f29cf6fcd2b31fe0e9b4cd21ede68a
+DIST Python-3.8.12.tar.xz 18443568 BLAKE2B 73413aee7a31347ac4342718a54d23d4036220262c4cd41cd50b06c3b1698d52d11cf7ac2c781b919f2cdb0dcb6397d623c463dcdcd1edca99abbbce239a3c6e SHA512 2f93fe5ff83f470c7b6a1b7f29f499a2a010fabd649e9fe65ad3fbfa21b6e1966e77c9b7ac012d978159bc3fe63fec2d64bc6982fc2ee1714d3fa0e47631f279
+DIST Python-3.8.12.tar.xz.asc 833 BLAKE2B 33f59aa667555832ee510d2a7295079f34a3983dfa84beab20b33ec691ea3eecfcc4a62591fe233fc30622d0236ee69a3d41b8922ee2f4c632df3523d565c3ec SHA512 ef552b716a721f410abb14387594c8b0ddc65ce4b8a6ae6bf920c1db2ea9ddf6bbf547e93d3716495ae31848eb1049aae4257016e888393681bbfb6f6529bc12
DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1
DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc
DIST python-gentoo-patches-2.7.18_p11.tar.xz 31340 BLAKE2B bdc097b971ab8ec0b60f944002af34f3fff6b681c43515a4fec2fcac1a2c731bf4fcfae2178463103911e2f8cd6bc84d3b56cd0ad61da5c8276278ec9b85a242 SHA512 2a2388c4543267bfb0167f963a22f5141442c9347d9a8806ad6917843e6958d47c8f1933244651c870101b21408c920408fe056efb7a148117c24ab391151d88
DIST python-gentoo-patches-3.10.0rc1_p1.tar.xz 8496 BLAKE2B b3b771a8894e5bfeabb3bee10cf60c068dca28341784f0914bb2190f67f10007c2e4e3b18dc31ac7dd791e06314cd3f8cda6776261c6e83da380c492bbc53e89 SHA512 bb22cc121d3b915b98de32244926188dd9717054f32437822a59652be001ac3b6309cb1aba79ce158a486d33e761a31861aed56b5a7976bc83aee18174903248
+DIST python-gentoo-patches-3.10.0rc1_p2.tar.xz 10548 BLAKE2B b0a78e3b5e45ead483391c4382c3d6046b4a03e43c1ab5fcd1569f05afc271dde6278078cec852756364663111c38f0ecedca99ef2f2bb233714406505ed8e79 SHA512 1e0129903a3756b6ab087b982269197b64028432f81592b887d8431f429f864918eaa611c7b671e303de7603fd835fb4563219fedd3ee1dbd42e843e66d4fccd
DIST python-gentoo-patches-3.6.14.tar.xz 14744 BLAKE2B b9482f9d2b7ada60eff9a5672ed21556c00b473a7cfdb543dce8253fb0ff1539e635a35569478c496012ecde4eef78a257da28f7a80bff99da10249708262229 SHA512 246f83911c8e52ea83a9bf453faa0bc0ea0c29bbf3b666a938e3790c6147f71e617ff9cb27501c5f0b89172eb9e7819e3f2ef0a5bae271cc938d2c0c2b93f7ae
+DIST python-gentoo-patches-3.6.14_p1.tar.xz 16576 BLAKE2B 902a9073e6d3e40cfba105680d9947b64a4bfa1632381bc71afbd2691350dccb36f498bf17ac7dfc8ce331dfc3fb7e3cdd539cea3f5e9db1c49210ad4d124182 SHA512 4aa354f1ca8d9bb3c30b666ef61cac8380741342102aeb9ea77cc06ae62179f595acc1c2e6321e9c2395abbc3fbc649ecc93b80443d139859924524989539992
DIST python-gentoo-patches-3.7.11.tar.xz 16708 BLAKE2B 4f74b38f400c20b4112f080447021e7140704b282d6369a1479886740d12a17e7818b52a382a4b115238847bb08df0260b092b6ead491623b869c3d3a56f4cc2 SHA512 b96d7af8c9f7fb4b246a8b66e6440336a7d123678d990dd259d7ffb87d79ce74295ff350e220fee38d1b12f1ca94533899c2d2ce700391b3eac907722a79bba6
+DIST python-gentoo-patches-3.7.11_p1.tar.xz 18540 BLAKE2B 717f3b279368faa355e9b306ede5aa3cf750b7a862e50553caf4efe19b6b8d40431974fbb510414291c4c91623addebff54fd6d4f7f7553c686c5382174bc81f SHA512 e403d2364bbe600d7c3dba8f70157b1f243b00848e3826e6f350d7dbbdd0966229fbf9aa11e0e87fb5ab93b8ea69893f389e5b92c22d7315f99657d69695ded2
DIST python-gentoo-patches-3.8.11.tar.xz 16932 BLAKE2B aaa1df33997f4077916fb7cca2ec3a2b2ac1c0ead3db7c638a5152a82cfaaf5fc2768a10ac7235c417e25b2b735c53628ec096878f08eef0d211b03f4747103c SHA512 d2639b95c5a32f7145f92e52a94aec7c63f3ed4a66036ff73f052ff6836742d1e1dd7180f8634b65b4a44a10bf336092695bcc2230a7fd8be35bae870ed64b08
+DIST python-gentoo-patches-3.8.12.tar.xz 14936 BLAKE2B 1cb6cdb0bb659b1bc3f8a4ecd80da74b41a9fa2f4d5646ac4b48ddecd5124677cb24574a425404fedab4fb9c7faba4b1cb54cc3482785559a54fa3e9b3ca13f1 SHA512 86c30622bbf6847efcdf2bc43d916b05ee78ab17f45b93148a01cf4c181592029ecc52e8c4887112d97aeece63a92ee0f685a689287c133443cf51b3f8171fb9
DIST python-gentoo-patches-3.9.6_p1.tar.xz 12764 BLAKE2B 927718f1aadb5d5ef67e647a639a10bffdd48474bf01e50bd37ef1242bce57606b7b54c4823c1da3585ee76e737028163e38e9b4e19037585cc53f925e1c5fa7 SHA512 f06fb55786bd942e72e3225ee9ce218724aeee29f301279743588749007e991851a8f29db5b5dfd85435e3d763c00942947909a6fc60581bd0f3e8a6e913bff8
+DIST python-gentoo-patches-3.9.6_p2.tar.xz 14720 BLAKE2B e14634229b65a29f5294694949c138bfa6146810349d1207a07d84eeca529571eb9c760b58ddbe6e8d96d50d1a3e0d1dfe42328c53c977a9eeb22ecd553317dc SHA512 5d84b8bb4e5584e3ef8e6298af000e772240ad93ed0aaadf1d785db947f1e79aecae7313b8dbeb65849212c9930e683be6e18e42ef6c41a3c27d60f75df08a01
EBUILD python-2.7.18_p11.ebuild 10256 BLAKE2B c52519a9e5c941e6111a52043f10870773c00c78be3e8234ebe750d27e5b472e9623fd2707475277aaef90ddb3498e188a5c875bab3523113ed4a9f8086b4408 SHA512 5c3dbd96e9a27a4f5b57540ab0414c39ada0cac6e17575eddf3b15ea4145fb5cfba9f9a47b2880f0ee2fed2016c467fb8dbdda38b674871fe9a21edb77eeebb2
EBUILD python-3.10.0_rc1_p1.ebuild 10023 BLAKE2B cba56d652815335faec57c8391af8aac7e8817c96994703ae5f82122ffb7c0e5817a57694ceba2e5990ca9e3bf86247d77e560e9e44982b2ac67dee8842c2253 SHA512 a627786f84e10b03b582f1f360f8b55b58594254eb44a4a86432f18a67d2d96f14f873b9b069a49073b283eb6d123ebd3bf3c2bd4ac4ff2debc13564e7645672
+EBUILD python-3.10.0_rc1_p2.ebuild 10023 BLAKE2B cba56d652815335faec57c8391af8aac7e8817c96994703ae5f82122ffb7c0e5817a57694ceba2e5990ca9e3bf86247d77e560e9e44982b2ac67dee8842c2253 SHA512 a627786f84e10b03b582f1f360f8b55b58594254eb44a4a86432f18a67d2d96f14f873b9b069a49073b283eb6d123ebd3bf3c2bd4ac4ff2debc13564e7645672
EBUILD python-3.6.14.ebuild 9798 BLAKE2B 52980170cf4415b48d2d13ed630076d79c21a65d950fd883c07660f5014514ad8da96e9d05029fabb165d6e88a8618601d62f961c68a5037d4a0a26c441bd4cb SHA512 44f4ed1f07cc9332ea9699de4789a33d82ec7c2a0c474dbccdd215695fa02f4facb095ee57d151a734031a35380ff79b33042448f98d8a4f8505aab6aa3caf3b
+EBUILD python-3.6.14_p1.ebuild 9806 BLAKE2B 738055cccd3af0c933ae706bd1e9901e215779049701849a73937b653dbdc11da10abde298a32e8bee0f1a303a43fee2c25c9a5afaacee8d6902076accc3422d SHA512 18fe692c437a86a09361e005bc80d7fdd0057ae21fe0fb81296f3bfe5a06ee52d2dfa673e55d0b7b9f5e613501434d97752793743c28c13f075f55aaf94dbd81
EBUILD python-3.7.11.ebuild 9611 BLAKE2B ebfa5095f7ef7f5550f5f2c148a9c910f280c634f1096c7b63bc3ffed02d6118abfaf74342f2d2e39449de7982eff911b46c542327090d39e8f97a69cb6edf94 SHA512 f432e100d47346e434acdc3eadbec80fe9e25211bf59dc7c50c8a15b7cce3dac6f41bd3529246e3ca1035f66a2815a9ac8893a2dc3f0535f592f84a25c3fbb3e
+EBUILD python-3.7.11_p1.ebuild 9619 BLAKE2B 1d75c012a0895d75cf6bd5a8c9a9cab31400b165c9e3231016dfbbefb7d3064cc1a185a0c76a78a9ab95f11db7d4b71e84d5f9b4c5291d948f3c58f713ce36eb SHA512 0e98d9de53a2d8f91ad6e9c7974d7251d20b79f42e50113ef49062b646f9a07b5b51b03052b151604b89741bfcca3a783c0c51b1a46681aa60acc791e95eff04
EBUILD python-3.8.11.ebuild 9765 BLAKE2B 95aa5d7f2fb61c4663b9f48746c866cddd28552d78ebbc111ff6f476748c48bcb77a8f1a15775a68c791c805cf239c61c12b97a48bad84cd3c943c2c0b009e63 SHA512 3871776a49c1fb058465903962b4ed1475b513f80e92bd91ab5ac61e591a0e6235b0ff78325e66ea09e5231fd1df37ece847b7605a1fd2edd7e7de0383f37bc9
+EBUILD python-3.8.12.ebuild 9773 BLAKE2B ffd306270f98fe613da3cbfe23a75a4937b1f818fcb6ddaa08d9bae363505a509d8d1aa8fd426adf440a9ce688eb3c6fc31b62b6c45f33be3e369f57735660b0 SHA512 e2d11ac55776703acbb67dd951d686d89b6121db1db7587a6da5e075dd2850845c66e8bbeaaa5d3f609e0a9dab6aa15365d564853ebb96991023b106077da8be
EBUILD python-3.9.6_p1.ebuild 9904 BLAKE2B c454574bff806cbee78dcb7442e7742792aba87fb735baf7e9d6a72baa3aa698c78e63278649e083fe1f1b86cabb98a33f722b75344e038505f9f8660d2d50b5 SHA512 f84c7b5c35734b80daced5bf6e103e485271ab257c6d43008019ff68dcbdfe7c8b1898b4c5b6d3d67c5143ba5eab42d5b3c6c45f894d1325b650822f2d65d10e
+EBUILD python-3.9.6_p2.ebuild 9912 BLAKE2B eca50c46134708b9a26995194df39fa36066373246341d5a5bfe57cebbf14688e616bf58cb58c379707f98393b9b8f186c10fd29909e94674250a43853e34724 SHA512 6ff575770724852a52fce73d2dec068ef9b6c4f98f1cf30b6113b4a8e075744052756f920f9ea9718f2808941c85b6b887771535d5731dfb4ec5357801f19872
MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d
diff --git a/dev-lang/python/python-3.10.0_rc1_p2.ebuild b/dev-lang/python/python-3.10.0_rc1_p2.ebuild
new file mode 100644
index 000000000000..7c0200703675
--- /dev/null
+++ b/dev-lang/python/python-3.10.0_rc1_p2.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2021 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 \
+ 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/"
+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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +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-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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:= )
+ !!<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/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+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
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ 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
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # 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.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ 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
+ --without-static-libpython
+ $(use_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
+ )
+
+ OPT="" 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+ # workaround https://bugs.gentoo.org/775416
+ addwrite /usr/lib/python3.10/site-packages
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${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.6.14_p1.ebuild b/dev-lang/python/python-3.6.14_p1.ebuild
new file mode 100644
index 000000000000..c375dd63ae3a
--- /dev/null
+++ b/dev-lang/python/python-3.6.14_p1.ebuild
@@ -0,0 +1,337 @@
+# Copyright 1999-2021 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 \
+ python-utils-r1 toolchain-funcs verify-sig
+
+MY_P="Python-${PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${PV}"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+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}/${PYVER}m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads 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-libs/libffi:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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:= )
+ 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(+)] )"
+BDEPEND="
+ virtual/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ configure.ac \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ 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
+
+ --with-fpectl
+ --enable-shared
+ $(use_enable ipv6)
+ $(use_with threads)
+ --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
+ )
+
+ OPT="" econf "${myeconfargs[@]}"
+
+ if use threads && 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb faulthandler"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${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, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${scriptdir}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${scriptdir}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${scriptdir}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${scriptdir}/idle" || die
+ fi
+}
diff --git a/dev-lang/python/python-3.7.11_p1.ebuild b/dev-lang/python/python-3.7.11_p1.ebuild
new file mode 100644
index 000000000000..c021a50070f4
--- /dev/null
+++ b/dev-lang/python/python-3.7.11_p1.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2021 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 \
+ python-utils-r1 toolchain-funcs verify-sig
+
+MY_P="Python-${PV%_p*}"
+PYVER=$(ver_cut 1-2)
+PATCHSET="python-gentoo-patches-${PV}"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+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}/${PYVER}m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +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-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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(+)] )"
+BDEPEND="
+ virtual/pkgconfig
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ 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
+ $(use_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
+ )
+
+ OPT="" 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${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, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${scriptdir}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${scriptdir}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${scriptdir}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${scriptdir}/idle" || die
+ fi
+}
diff --git a/dev-lang/python/python-3.8.12.ebuild b/dev-lang/python/python-3.8.12.ebuild
new file mode 100644
index 000000000000..427838727282
--- /dev/null
+++ b/dev-lang/python/python-3.8.12.ebuild
@@ -0,0 +1,335 @@
+# Copyright 1999-2021 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 \
+ 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/"
+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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +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-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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(+)] )"
+BDEPEND="
+ virtual/pkgconfig
+ sys-devel/autoconf-archive
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ 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
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # 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.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ 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
+ $(use_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
+ )
+
+ OPT="" 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ local scriptdir=${D}$(python_get_scriptdir)
+ mkdir -p "${scriptdir}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${scriptdir}/python${pymajor}" || die
+ ln -s "python${pymajor}" "${scriptdir}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${scriptdir}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${scriptdir}/python-config" || die
+ # 2to3, pydoc
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${scriptdir}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${scriptdir}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${scriptdir}/idle" || die
+ fi
+}
diff --git a/dev-lang/python/python-3.9.6_p2.ebuild b/dev-lang/python/python-3.9.6_p2.ebuild
new file mode 100644
index 000000000000..682541d34485
--- /dev/null
+++ b/dev-lang/python/python-3.9.6_p2.ebuild
@@ -0,0 +1,344 @@
+# Copyright 1999-2021 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 \
+ 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/"
+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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +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-libs/libffi:=
+ sys-apps/util-linux:=
+ >=sys-libs/zlib-1.1.3:=
+ virtual/libcrypt:=
+ virtual/libintl
+ 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(+)] )"
+BDEPEND="
+ virtual/pkgconfig
+ sys-devel/autoconf-archive
+ verify-sig? ( app-crypt/openpgp-keys-python )
+ !sys-devel/gcc[libffi(-)]"
+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
+
+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, libffi and zlib are not used.
+ rm -fr Modules/expat || die
+ rm -fr Modules/_ctypes/libffi* || die
+ rm -fr Modules/zlib || die
+
+ local PATCHES=(
+ "${WORKDIR}/${PATCHSET}"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # force correct number of jobs
+ # https://bugs.gentoo.org/737660
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+ 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
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # 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.
+ tc-export CXX
+
+ # Fix implicit declarations on cross and prefix builds. Bug #674070.
+ use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+ 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
+ $(use_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
+ )
+
+ OPT="" 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
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ 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
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # bug 660358
+ local -x COLUMNS=80
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+
+ emake test EXTRATESTOPTS="-u-network -j${jobs}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/lib/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ # Remove static library
+ rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # 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
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ dodoc Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ docinto examples
+ find Tools -name __pycache__ -exec rm -fr {} + || die
+ dodoc -r Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/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"
+
+ local -x EPYTHON=python${PYVER}
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
+ else
+ local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${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/rakudo/Manifest b/dev-lang/rakudo/Manifest
index c4e6e2eec0bc..c59df3d36cd8 100644
--- a/dev-lang/rakudo/Manifest
+++ b/dev-lang/rakudo/Manifest
@@ -1,3 +1,5 @@
DIST rakudo-2021.06.tar.gz 5211187 BLAKE2B e6a73ada3bc7550ad9e2415374f8ecd9aeed021faf8bc52697c8d4bd1fc16782036fecf346f1b132f2d50b894f99ebca548e6e4209b1ff643a045679415ae3fd SHA512 1141979c63a5128919d24c4660cff8011fade12487bd7f437dbaeb6d121ab2d93e42022227ad47d6d840ddb12118c9f1cde8285d87677ff88b135c4e9f079ecc
+DIST rakudo-2021.08.tar.gz 5906537 BLAKE2B 73a70ac0524ef41355e835173bccca743db5aa0f7b41ac0b152537da84337f6281c0619b86cd282d8e103bcc37573e0c42e147d2f6cb7d626b5bfaac9c6917d6 SHA512 6b58ddf47742cb8abc7c017ccbc658dac04a7a2e9802e3c656f775f94a97264a92c24f0a88c0f7baae3fa5b531acb407a652eea6c9d9cdc2f00afef00c92a018
EBUILD rakudo-2021.06.ebuild 1600 BLAKE2B 5161bd656fd7fa2788be6db0b622c79c0404212136b69a47fbbde5ae802de441372381439278891f43584847fac5d9e76795c46ae1a1448871c6d233a983bffc SHA512 b96ae07a86c28535e21ee2e2ac98b34626e07bc34d54a3f1a1ec5e8675306b5838203ac7f4b266812c05d4e465a2cd9066558c3226a0c63a86ea0e14c61e1890
+EBUILD rakudo-2021.08.ebuild 1600 BLAKE2B 5161bd656fd7fa2788be6db0b622c79c0404212136b69a47fbbde5ae802de441372381439278891f43584847fac5d9e76795c46ae1a1448871c6d233a983bffc SHA512 b96ae07a86c28535e21ee2e2ac98b34626e07bc34d54a3f1a1ec5e8675306b5838203ac7f4b266812c05d4e465a2cd9066558c3226a0c63a86ea0e14c61e1890
MISC metadata.xml 395 BLAKE2B b9b773f93823cac435589cc51630593affbcbf083f13f87576a56cd1fbc7493cf7513b709d7cfe12d5d323ec205cb10f72eb3ba42685c76631a2773774aeadf3 SHA512 91dc0ea511efb537b854bfccd3df153ec29cb83c6fb6b7cdf186e09193239a7b5aa3fabfb2c4225d991207f33feb0b10a6d29200b3790a4c662a36f47cff9766
diff --git a/dev-lang/rakudo/rakudo-2021.08.ebuild b/dev-lang/rakudo/rakudo-2021.08.ebuild
new file mode 100644
index 000000000000..551b3af73d09
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2021.08.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="https://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://rakudo.org/dl/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ >=dev-lang/perl-5.10"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}