From de59eb4554f5fe0d506a66bb96630a35f99c09f7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 23 Sep 2024 01:25:12 +0100 Subject: gentoo auto-resync : 23:09:2024 - 01:25:12 --- dev-lang/Manifest.gz | Bin 21663 -> 21661 bytes dev-lang/dafny-bin/Manifest | 4 +- dev-lang/dafny-bin/dafny-bin-4.6.0.ebuild | 56 -- dev-lang/dafny-bin/dafny-bin-4.8.1.ebuild | 56 ++ dev-lang/perl/Manifest | 2 +- dev-lang/perl/perl-5.40.0.ebuild | 2 +- dev-lang/php/Manifest | 2 + dev-lang/php/files/php-8.1.29-gcc14-intl.patch | 21 + dev-lang/php/php-8.1.29-r1.ebuild | 783 ++++++++++++++++++++++++ dev-lang/swig/Manifest | 3 +- dev-lang/swig/files/swig-4.2.1-tests-fpic.patch | 115 ++++ dev-lang/swig/swig-4.2.1.ebuild | 13 +- 12 files changed, 995 insertions(+), 62 deletions(-) delete mode 100644 dev-lang/dafny-bin/dafny-bin-4.6.0.ebuild create mode 100644 dev-lang/dafny-bin/dafny-bin-4.8.1.ebuild create mode 100644 dev-lang/php/files/php-8.1.29-gcc14-intl.patch create mode 100644 dev-lang/php/php-8.1.29-r1.ebuild create mode 100644 dev-lang/swig/files/swig-4.2.1-tests-fpic.patch (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 52217255f22a..9094aabcf4de 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/dafny-bin/Manifest b/dev-lang/dafny-bin/Manifest index 6b3d01a527a4..5a35fd2f5365 100644 --- a/dev-lang/dafny-bin/Manifest +++ b/dev-lang/dafny-bin/Manifest @@ -1,5 +1,5 @@ -DIST dafny-4.6.0-x64-ubuntu-20.04.zip 63265253 BLAKE2B ebba4490857fb9860289ccad5ea03251366ec5d745588e43a74529c3500f5f02c516bef70f4c661b3138b935e340102ea2537e0c22daf64b88941fec1ff90b4b SHA512 2537cc9d2b2a5514d5ff83988856bac4100bb381eef540870867e47d4557e54bf0889a60ad329f961366558be30590cb5c611bcc7a15305c27a1c38da629746f DIST dafny-4.7.0-x64-ubuntu-20.04.zip 63382915 BLAKE2B dfda2ceccabd2c223e7ab8ae6c8b02e7f34b42d4c115c2b8013941220246817536313d35927cca68f1427332b937434ec8e9a5dc6347b56eac0f907366c123d2 SHA512 89ef8ebda46b99cebd22f9721fc7af74c8e265a73db4530c571bd37b58d6741f15064d77ee5035be2b2039565b4bc826251dd29d6752557dfb9044fe40b07775 -EBUILD dafny-bin-4.6.0.ebuild 1266 BLAKE2B d468b3d62b76525ac092d6ea0c4db6a20d30b883d9c66dca490172ff548e7d27d546e9cf93acbaa8d3b2c6bdc600fcb455f04085971943b413faefcda7b7b56e SHA512 f2eb9d0e966a164ce03c37b46b9e64d5ffb957a03491d931504656d6f918f641329a95f08281e026c9e080ed55e7efd9e7d17ec1b67ec9a2197c2b854e3f50a8 +DIST dafny-4.8.1-x64-ubuntu-20.04.zip 60728434 BLAKE2B 0cdf877fb018cff9ef6f1805ce9fdb3de506fbc76352a0d6ebc5e47b79e35483fe72853ff6ade32c31f1584d209445cbf2de195fc43a3c24314ebdc830d45daf SHA512 24b1f9028b509ccdc938fd1de97fbb72af101603422194ec47b21f421c45e17b96c07ecdd8c12057e97e0a16cbe4993fc7a498456a737bc5f2940b4a69d55ced EBUILD dafny-bin-4.7.0.ebuild 1266 BLAKE2B d468b3d62b76525ac092d6ea0c4db6a20d30b883d9c66dca490172ff548e7d27d546e9cf93acbaa8d3b2c6bdc600fcb455f04085971943b413faefcda7b7b56e SHA512 f2eb9d0e966a164ce03c37b46b9e64d5ffb957a03491d931504656d6f918f641329a95f08281e026c9e080ed55e7efd9e7d17ec1b67ec9a2197c2b854e3f50a8 +EBUILD dafny-bin-4.8.1.ebuild 1267 BLAKE2B a43474ee492a32e6dc5287dccf7f3e2b5bef765c120e710194285803c2d8341a89c0bf4cc374e85b753984ac80c4227cc55e5f6440fad7091e65f53d22f0af97 SHA512 dd56c0f34b37a65bae3fc4f54e78c727b39b7efd421b74530c33d60a45a2906edd21c369485ffede7bf158a0b84c85473fa4f320cab2292d923c3c4a84efa3e8 MISC metadata.xml 1826 BLAKE2B 66f000cee8fbf3bcae05da9249d5bc3388f9c05f32c45e96dd51b035aea220a9d49af25cb89b8b8a64a691408373c1ea02d0f345f9a4a554565f708a894664d5 SHA512 0cc12d9c49360bbc08bb8eccd3f7139ec149a9b731f0283b0f95a8506dd93458eb93f3347a978e55a86279ad85ee3233c1b87bfee36f22c9e40bdd14c0aef6c5 diff --git a/dev-lang/dafny-bin/dafny-bin-4.6.0.ebuild b/dev-lang/dafny-bin/dafny-bin-4.6.0.ebuild deleted file mode 100644 index 66b2bf3d4f1b..000000000000 --- a/dev-lang/dafny-bin/dafny-bin-4.6.0.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Verification-aware programming language" -HOMEPAGE="https://dafny.org/ - https://github.com/dafny-lang/dafny/" -SRC_URI="https://github.com/dafny-lang/dafny/releases/download/v${PV}/dafny-${PV}-x64-ubuntu-20.04.zip" -S="${WORKDIR}/dafny" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="-* amd64" -REQUIRED_USE="elibc_glibc" -RESTRICT="strip" - -RDEPEND=" - !dev-lang/dafny - dev-libs/userspace-rcu - dev-util/lttng-ust:0/2.12 - sci-mathematics/z3 -" -BDEPEND=" - app-arch/unzip -" - -QA_PREBUILT="*" - -src_prepare() { - default - - # Remove bundled z3. - # NOTICE: New versions do not need the bundled one but older versions - # hardcoded the path relative to "dafny" binary. - # While bumping make sure to verify that system's "z3" is used - # by, for example, compiling/verifying a simple dafny program. - rm -r z3 || die -} - -src_install() { - local dest=/opt/dafny - - insinto ${dest} - # Maybe too general, but this installation mode matched how it arrives. - insopts -m0755 - doins "${S}"/* - - local bin - for bin in DafnyServer dafny ; do - dosym ../../${dest}/${bin} /usr/bin/${bin} - done - - # Make "dafny-server" clients happy. - dosym -r /${dest}/DafnyServer /usr/bin/dafny-server -} diff --git a/dev-lang/dafny-bin/dafny-bin-4.8.1.ebuild b/dev-lang/dafny-bin/dafny-bin-4.8.1.ebuild new file mode 100644 index 000000000000..8ed638b01e1e --- /dev/null +++ b/dev-lang/dafny-bin/dafny-bin-4.8.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Verification-aware programming language" +HOMEPAGE="https://dafny.org/ + https://github.com/dafny-lang/dafny/" +SRC_URI="https://github.com/dafny-lang/dafny/releases/download/v${PV}/dafny-${PV}-x64-ubuntu-20.04.zip" +S="${WORKDIR}/dafny" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="-* ~amd64" +REQUIRED_USE="elibc_glibc" +RESTRICT="strip" + +RDEPEND=" + !dev-lang/dafny + dev-libs/userspace-rcu + dev-util/lttng-ust:0/2.12 + sci-mathematics/z3 +" +BDEPEND=" + app-arch/unzip +" + +QA_PREBUILT="*" + +src_prepare() { + default + + # Remove bundled z3. + # NOTICE: New versions do not need the bundled one but older versions + # hardcoded the path relative to "dafny" binary. + # While bumping make sure to verify that system's "z3" is used + # by, for example, compiling/verifying a simple dafny program. + rm -r z3 || die +} + +src_install() { + local dest=/opt/dafny + + insinto ${dest} + # Maybe too general, but this installation mode matched how it arrives. + insopts -m0755 + doins "${S}"/* + + local bin + for bin in DafnyServer dafny ; do + dosym ../../${dest}/${bin} /usr/bin/${bin} + done + + # Make "dafny-server" clients happy. + dosym -r /${dest}/DafnyServer /usr/bin/dafny-server +} diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest index c3cf77215657..e95af31fea19 100644 --- a/dev-lang/perl/Manifest +++ b/dev-lang/perl/Manifest @@ -10,5 +10,5 @@ DIST perl-cross-1.6.tar.gz 121973 BLAKE2B b3a17d92dd7621a3bc253a6c4e56eccd3adec2 EBUILD perl-5.38.2-r3.ebuild 28310 BLAKE2B a965f1319fe6ad9b1c383ef19b8b04e06b9cf1db9debd2e05e24ff82ef872c147fda8cc2ae0bf1c0adc240d52ce170c8ebfeca037617fb2dd8c3f1629ad13a4b SHA512 1464730aa236d8c48553f11c634e1e4bf69d9914251d41e6f78c6fbfbc434178d5fd28e04e87888b0b6da89f5e984ec20312a8c798e2b8722a7eb8f9948b23c3 EBUILD perl-5.38.2-r5.ebuild 28293 BLAKE2B b34f678e6822fd7ab508b54385b55588b5d8a2e15bf11ad21057efc02aad969460f890ae35094d6d4b22985408ae4cb32d40eb723548b7c3c65936b274f99b6c SHA512 8db7c1e34041da91bac96a366e00d6de30e652ffbe84a1d8dd19f5b08f163ed6c4741d94a61841a8c8c08af5a1d73596f6651200ff431d2d58873fbae722e06d EBUILD perl-5.38.2-r6.ebuild 28292 BLAKE2B a697809342b0c32854924f54ca61f1c44639f4379cd21dd8a2795d7af8e4bba9a27e13b6a6fe141c0874943bc470783513410f76d338043dcc2eceb1b7e88d53 SHA512 a02103c0cbb584b96e84c52216a83063b90474ed278c5a5702c0ecbeba9ca34ec67c29561d34397c324db3bf1fcce2f67e393fe826177fa6a89364b8ebf8cefc -EBUILD perl-5.40.0.ebuild 28193 BLAKE2B ad1927cc6674becbe31a88f13fd56e31a257c3025b79c615c56019f482ac07cfcf5deaec3f60ce31467598f22e749837df1cad8044f247bce45b5ef4097a09b2 SHA512 eccb37e35a9970de3191f6b5cb19732515edf831d1458bfbb29c559ce7b39a77ea9da6402d598a6f0bee5f1b10ebbd8b23658d813b3472ec60f82977d1eb7605 +EBUILD perl-5.40.0.ebuild 28190 BLAKE2B 69f185c504db14e70534e0ac5ee2bb03e632591219741d4502806143d2d8f5ebc80c7a5d5136e4f65c683ae880c2d270cd376991efbe57085e697f37da2d09c6 SHA512 59bdac5bf0391f117fe753be97e0e385bd74d1854e1ea0afd4f99796d92a693ad7bfa17e39c2043d5b8f67c851d8e88a573b3dab30dfad4770d5987d7fbd4b7c MISC metadata.xml 435 BLAKE2B 9a9dfd2dc8274c402dde0c3be13053b28361603c4fd230d841b169843e397bd6e16537034495178dfd443246c1621b34d849455147e8556a12806d973293a855 SHA512 1cb3197cf3c6f3031bdbc95c2686fcd2585f6e457d0661ed986cf7fa91b4ca564f793c2f141bfe5b9b8c54d2b05dd200c3e32bf073061872e08bd7c501bedc83 diff --git a/dev-lang/perl/perl-5.40.0.ebuild b/dev-lang/perl/perl-5.40.0.ebuild index f3383adc212f..d96ec3ecfea0 100644 --- a/dev-lang/perl/perl-5.40.0.ebuild +++ b/dev-lang/perl/perl-5.40.0.ebuild @@ -55,7 +55,7 @@ LICENSE="|| ( Artistic GPL-1+ )" SLOT="0/${SUBSLOT}" if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then - KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi IUSE="berkdb perl_features_debug doc gdbm perl_features_ithreads minimal perl_features_quadmath" diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 7448480badf5..eaf0e8e4b108 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -2,6 +2,7 @@ AUX 20php5-envd 208 BLAKE2B 7d876903c7f58ab148e1d6bb2b0d86cb9f5ecd241bc00e92138d AUX fix-musl-llvm.patch 1195 BLAKE2B d2f3dffcae9cf82da44d0424bda6a15430a48a8def71373aa038b5f19ecb6e19e2efc4243e7c4fb1e376eccff4740476b66b41db4ae3fae38dc1d6e08c0c8b8f SHA512 a22156eafa738326657ca5cb4bad01658bcbc9409d91f0f8fc2809931dab3945064a0f031a4aa922a484768705c0b72e87d1ba634f13ae4bda613a01826aa0fb AUX php-8.1.27-gcc14-libxml.patch 1982 BLAKE2B dcb329e5bae787aa0d47f70e7d60f5a187568b10f2e3a1dd33b5fc422df7b5774e9f4093b728d3621bcdfa2d3d96da98272e80be553cce5ea61151b362347c0a SHA512 f68cb97cc3b0b8da5eb62d7217fcbe1652579771ed19aba0b52740cb056c85710a1b1bff3286dbefa72bc22885dd4b4df8c5f5b1f089c977106251d9daa2065d AUX php-8.1.27-implicit-decls.patch 2163 BLAKE2B 0164d973ae9b6851014bcccd0deb92add72fa92d9a7c830695841768fb1998c2b49d649503ca324d9735f893974884438b922deab5a4c6c46275057a139ee3ea SHA512 f02d9668ceea39be7b4a6a9c3026d3d0e5230e74aadab09a454a2447a93ea1a4098982d714353c64ec1beb69fe387e9b3575c60fc14e4749298ea674f81401c2 +AUX php-8.1.29-gcc14-intl.patch 810 BLAKE2B 3a16770c4ccdf0c0b2089700043c9d46a142102400399f75c5c0603f61fad329108ee93b49e594bf67b9f38c1417c12c7e0e2a693c04eb2696f54848a99a6f67 SHA512 bc47c725bc617de993a2aaa29a15d32e0221c160cc0f4420dfbc2886024389a590710bc1281a156bcab3849eee7d19595c43f7b77c36793e095f66b858bd2390 AUX php-8.2.20-implicit-printf.patch 2226 BLAKE2B 859cd38c6687b517a372973a8d282494f43bc5739ffa00c829de4a43ad72a752195657ededc7d4705699c0bd1ab249e588a74f6be85e1937c55de00d2844213d SHA512 95e4f535066b72e1497673dd633aa33beaf49c5a967ca2ad04e837ddea546f935717b3095d61cef8310138d77a3d18372139af3f979030b25b9ec2dc38318fb0 AUX php-8.2.23-fix-ub.patch 1141 BLAKE2B d9b3a0cf7bbcf9778dab55e5480b78d9e694f9818819ebc406fdebb6113802c1b90667bdd2db911038c5e235560b7448c65dc995b861835552aea1e59fd4d42b SHA512 0b7736967997611f7b14595186d55bd24cc81b23add26ed4a800b63e5ace087c22c9a32946d76b7a896fae988d64125ed10091bd079359c8c4a83b34fc1a372b AUX php-8.2.8-openssl-tests.patch 790 BLAKE2B fcfa6f361470f2baa65d2bbbde7c9629841546a560aa6f88d85b68727004e24949f9516340eba0339e575dcf06077d08540a7a6d58a0cda42d5cd26bf48d9e46 SHA512 d29b5334abee8bcbef62c88c01c9eaf887f25901763db75e754f6690e24138c9e45783943d32402f693bd7e4564d737521a8b0b8034d5401bac73ff30f453050 @@ -15,6 +16,7 @@ DIST php-8.1.29.tar.xz 11826292 BLAKE2B 471f85504531c61e534c857a854de2ce9935b263 DIST php-8.2.20.tar.xz 12097568 BLAKE2B 1e38e48ea9c28abfe2c3bd860bc5d959fbe327669c007f2e2a665ae14f5a045f6ad8a0a972f32618f88ea1ff3636c2692504478b5b094b48404d6c4a214f863b SHA512 c659ed4809b6507aa428b483c85c7322815ac9d7d8e4bfe575513a5e69c5a680b8d089fd98a19f83d3a00df3de61468809f21408455913aa24d519776e44abc5 DIST php-8.2.23.tar.xz 12118028 BLAKE2B a845b3280f51c15201d2606f399cd4ca98791f0584e18680de87476e665bc707b0e1c35f14f4bd5d2bb8eda43f422cc1088ceb11fc2d958dd36bd33290aa21a3 SHA512 ed1b26042ee9f059bd90140b5ce3f5f524441b22f2c5f96997e08455121acbf71072fd1f905fa1d477e9608c7827641b6e81f94e04701966e7ecd912ff99f99f DIST php-8.3.11.tar.xz 12481420 BLAKE2B a6cc0ec033aef240f11aa4e06133503cf554f18cfb54655b08c4a4d3c845f45e39e94b4069b862bddba09c0f501aeacc6e1afc8f94a5a58e3c6fa49df3488681 SHA512 69df9347643c33a41be4f98aebf13f29f8a22eb7120ae5192a1b2d7a9f487889efe98f273e18f7219b4c7ddff72eb42df05c76baeb36b2f63f32a9276c872a58 +EBUILD php-8.1.29-r1.ebuild 22591 BLAKE2B ed0b5218b7da350bdb02d02454d78f9ee7ddcc96051caf03f474b5db724ae565ae7361a63e3d30a3b16106370c59c5cea8e44278767454b6870e40b48c0541d3 SHA512 5dc548960991aefec5350c32d8085610b5b7affd2876d70d77079262a5fad3dcc12d7a6747fea333b4c92d5b8db0482721315e509840fd1e3b66c05b1a0ffdc6 EBUILD php-8.1.29.ebuild 22541 BLAKE2B 056c280b51a91b694ad0998acb10a2fe32ee2a8b66cef5f0f4e2ef91a191272e911d088f2e58f8714af70cdadc35af480c5e7ba273c07fd615785f3141157cf2 SHA512 554734d09b14721d8113dae5dc8b28b284c11f8d11498bcbf741fb431ccdb9ae83da10b7885c87aa508fd6b0e5444762238f5d565638a76e50a27845ccfcb6cc EBUILD php-8.2.20.ebuild 26556 BLAKE2B 2c0d09bad6c8d64bb1784dcf45c1464f9089665b578b4f5418614adb0cbcde484aa1546f8b519585439b636b592d63970728c85bf46013e2227ed53eddce2e89 SHA512 11225f8f7747da9d51c3e54d1a80cb13bcdad814b4066677d3a8455d7fda2229a2136e1263d7bbd1c2bd91a5a51db2176e69bc790711000b0368c02664d45e3b EBUILD php-8.2.23.ebuild 26602 BLAKE2B d739c854e909e16865647d0fc1723961645e1a2e64aff766b642a3ff7f504e5de0f7590baf17f03e92b320e7074895f16d9a13b1f4812b3e928c5490ac590e7a SHA512 0a27625db1b31640df9d19f8dc6d1ae446518929378f168647b8f4859efab10ef01c9c45c694acdcd70c348f9d12fa08eff59b27e7fd30bac37036df4d5fbdfe diff --git a/dev-lang/php/files/php-8.1.29-gcc14-intl.patch b/dev-lang/php/files/php-8.1.29-gcc14-intl.patch new file mode 100644 index 000000000000..c951f48e8ba3 --- /dev/null +++ b/dev-lang/php/files/php-8.1.29-gcc14-intl.patch @@ -0,0 +1,21 @@ +diff '--color=auto' -aurN a/ext/intl/config.m4 b/ext/intl/config.m4 +--- a/ext/intl/config.m4 2024-07-17 18:54:08.645892664 -0400 ++++ b/ext/intl/config.m4 2024-07-17 18:54:29.506419432 -0400 +@@ -85,7 +85,16 @@ + breakiterator/codepointiterator_methods.cpp" + + PHP_REQUIRE_CXX() +- PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX) ++ ++ AC_MSG_CHECKING([if intl requires -std=gnu++17]) ++ AS_IF([$PKG_CONFIG icu-uc --atleast-version=74],[ ++ AC_MSG_RESULT([yes]) ++ PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX) ++ ],[ ++ AC_MSG_RESULT([no]) ++ PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX) ++ ]) ++ + PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS" + case $host_alias in + *cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L" diff --git a/dev-lang/php/php-8.1.29-r1.ebuild b/dev-lang/php/php-8.1.29-r1.ebuild new file mode 100644 index 000000000000..a25c395a3cfd --- /dev/null +++ b/dev-lang/php/php-8.1.29-r1.ebuild @@ -0,0 +1,783 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WANT_AUTOMAKE="none" + +inherit flag-o-matic multilib systemd autotools + +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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + +# 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 avif 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 ) + avif? ( gd zlib ) + 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] + virtual/libcrypt:= + fpm? ( acl? ( sys-apps/acl ) apparmor? ( sys-libs/libapparmor ) ) + apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) + argon2? ( app-crypt/argon2:= ) + avif? ( media-libs/libavif:= ) + berkdb? ( || ( sys-libs/db:5.3 sys-libs/db:4.8 ) ) + 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? ( media-libs/libjpeg-turbo:0= media-libs/libpng:0= ) + gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) + gmp? ( dev-libs/gmp:0= ) + iconv? ( virtual/libiconv ) + imap? ( net-libs/c-client[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.2:0= ) + tidy? ( 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= ) +" + +IDEPEND=">=app-eselect/eselect-php-0.9.7[apache2?,fpm?]" + +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}/php-capstone-optional.patch" + "${FILESDIR}/php-8.1.27-gcc14-libxml.patch" + "${FILESDIR}/php-8.1.27-implicit-decls.patch" + "${FILESDIR}/fix-musl-llvm.patch" + "${FILESDIR}/php-8.1.29-gcc14-intl.patch" +) + +# ARM/Windows functions that are expected to be undefined. +QA_CONFIG_IMPL_DECL_SKIP=( + __crc32d + _controlfp + _controlfp_s +) + +# Functions from alternate iconv implementations (bug 925268) +QA_CONFIG_IMPL_DECL_SKIP+=( + iconv_ccs_init + cstoccsid +) + +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 + + # Remove false positive test failures + # stream_isatty fails due to portage redirects + # curl tests here fail for network sandbox issues + # session tests here fail because we set the session directory to $T + rm tests/output/stream_isatty_err.phpt \ + tests/output/stream_isatty_out-err.phpt \ + tests/output/stream_isatty_out.phpt \ + ext/curl/tests/bug76675.phpt \ + ext/curl/tests/bug77535.phpt \ + ext/curl/tests/curl_error_basic.phpt \ + ext/session/tests/bug74514.phpt \ + ext/session/tests/bug74936.phpt \ + ext/fileinfo/tests/bug78987.phpt || die +} + +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}" + + # https://bugs.gentoo.org/866683, https://bugs.gentoo.org/913527 + filter-lto + + # 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 + --without-valgrind + $(use_enable threads zts) + ) + + # The slotted man/info pages will be missed by the default list of + # docompress paths. + docompress "${PHP_DESTDIR}/man" "${PHP_DESTDIR}/info" + + our_conf+=( + $(use_with apparmor fpm-apparmor) + $(use_with argon2 password-argon2 "${EPREFIX}/usr") + $(use_with avif) + $(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 || 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 + our_conf+=( $(use_with mysqli mysqli "mysqlnd") ) + + 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 "mysqlnd") + $(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 + + SKIP_ONLINE_TESTS=1 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/swig/Manifest b/dev-lang/swig/Manifest index 1a8cd4ef1dd1..e1a9190f118d 100644 --- a/dev-lang/swig/Manifest +++ b/dev-lang/swig/Manifest @@ -1,8 +1,9 @@ AUX swig-4.1.1-ccache-configure-clang16.patch 1162 BLAKE2B 28889128bfd9a6cd883d575f1cae8dd0f3e02b7ebfc8818b761154a60a79757d2f13c26f43119a0288c9731c56c5bbacfb1606222d5697e0fc04e6b3e2ebf265 SHA512 aa7fc3bc4da18dcdfa2c6dec55c6c80174878ee05883ed4eab6bf35c75c88edd165977cc1ea4e1d503f40f99bd7b40688357ec7283c20542e87c961efcd71526 +AUX swig-4.2.1-tests-fpic.patch 4653 BLAKE2B e8bb2867005693cb4254194535451f49192db1c6a01bd9df1dd0d0cd04e366424bf39494ba9681406d27de5cb6ed9cbe02ba11591fcd7f2c0e82b8d6f34eed8d SHA512 5d0ef7725c898a9ab4162871577653acf5d2e5f375c16c4f0695960c2dd4e7c4767411de343f278290981cdc0dc6612af032d62e8b4f20f43bfdb42880e9023a DIST swig-4.1.1.tar.gz 8600805 BLAKE2B 898d3405f20c3e49626fb808b568e77c69b81ec2401c0a0c406f9e7a3d7d218353dc8b8ae88a3d485ddfc3be659971b961ee2c89d5b0c75aed0688e0952fd208 SHA512 1cea1918455a75ebc9b2653dd1715bd5dcd974554955f324295c6a6f14c0a715651b221b85fad4a8af5197e0c75bfe7b590bc6ba7178c26245fbbd9a7e110100 DIST swig-4.2.0.tar.gz 8339586 BLAKE2B 4f1c3c7d4b1e218b67a2d796d2171df73971036a433e5fb80233b3050f022d578efdff28fc44d98a6d176ec6270b4942f5f56e9a74bbd8b30d6836c76c620a04 SHA512 b7f508b25bc6e882ed6123f6c7ad12b02a7b74de09ac6e5789968e9c2f51407d1e3dafd5ea495087b4fb0f447ecce17e6070471479c67c4265166d8342a10862 DIST swig-4.2.1.tar.gz 8364050 BLAKE2B 0acffd4794d09f2347d669d1460a794c03f136ab3ddc6623741e182ff52b6bf5f639c736e38540918ebb1abbe36c2ce1957aef8a429f1a716d9c5361175569bf SHA512 019dee5a46d57e1030eef47cd5d007ccaadbdcd4e53cd30d7c795f0118ecf4406a78185534502c81c5f6d7bac0713256e7e19b20b5a2d14e2c552219edbaf5cf EBUILD swig-4.1.1-r1.ebuild 1292 BLAKE2B 603fef592558fff9c76f4d17608ebcbedf2e6b1c0c42470ae4e8cf288074c124a6a941fb9e33729d4ca40793c5f2130c2f2ab1a15a39eec6be69f37db705741f SHA512 f473e31803d2a1e9cec9319fb18a7d32c7a9e176c41ce4efdba56bfc195a62da6978a563ec3db2786efcc053d4135848c8d2df3d4e115a1a3f94ff4afad8b7af EBUILD swig-4.2.0.ebuild 1084 BLAKE2B 964b843af3a661f59840043b67c3153a2c7c5f6021a44e9f8c302249bc60d02ddb7bbd92fdaad50d0d8a59fbc3e956322744db1fccbdd42e6b970b615568f012 SHA512 af5771e09b5a819611729b93ed66e5eb6ad3c59824185650265510451e913334134e293df01610fb952bb0de2a91a27c1487faf104be6dff1fa2e3d8ea10ceaa -EBUILD swig-4.2.1.ebuild 1236 BLAKE2B 3e127de8b21822ee73a346234c31d4ca50fa66f6aa12beef84565611890cd82c6b230eaa960cd45db3f319ca8e0bec851e124eb24f899815c18f5e802ae8ab99 SHA512 be1a5b9f10f54f0b25626ae5d3897728be0e4bb1acfb2ef175fa68a704ae2c709af5818972ef3c0448c07fc3dd1ef103db85c8e767d8c03331bf11c3d93eef7b +EBUILD swig-4.2.1.ebuild 1418 BLAKE2B 88776b6b292a273c0db74514572399fcdbcafe17a5a7da05e15b5c52700052538cd06274c7fd7794fd0ebbfe99fcccaf4d0b0c376f43d4df49a767366bcd7908 SHA512 4ebc5afc7688cdf902926a485f5591551c869cd94ff09bcd93dcf659d6efe706584fa4eacf7722ba7d1be216869d97128f85ea04a058ab16cbd54e2d763c7f0a MISC metadata.xml 1019 BLAKE2B 1f6a79945d3bb92bd9b5c06f7b4e96c8c9f8f6e68d5c13890247d2c08adf46409a194e3198fb3df19f699a176fe92bebc1e7ba6eb0944a0db12c5e3271043552 SHA512 5ba26e3670ba852648a243f14efe096e52781418eb4d07cabc1bcf46efcd098d099ecbb3d504862540db796279fd855a581d60dd3b1de2f60e9d542e3ccb9b00 diff --git a/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch b/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch new file mode 100644 index 000000000000..8f873937bd99 --- /dev/null +++ b/dev-lang/swig/files/swig-4.2.1-tests-fpic.patch @@ -0,0 +1,115 @@ +From e89960a53f6e10550f86588be705b3c6eb09d159 Mon Sep 17 00:00:00 2001 +From: matoro +Date: Mon, 22 Jul 2024 17:40:20 -0400 +Subject: [PATCH 1/2] Use -fPIC on Linux instead of -fpic + +On most platforms, these are identical. However, on a small list of +platforms, the small -fpic will enforce a limit on GOT size. However, +if -fPIC is used instead, then the GOT on these platforms will have no +limits. The affected platforms and the respective GOT limits with -fpic +are: 8k on sparc, 28k on aarch64, and 32k on m68k and powerpc. + +See: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fpic +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 25cdee1457..8561d27b35 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -230,7 +230,7 @@ then + fi;; + s390x*-*-*) CCSHARED="-fpic" ;; + s390*-*-*) CCSHARED="-fPIC" ;; +- *-*-linux*) CCSHARED="-fpic";; ++ *-*-linux*) CCSHARED="-fPIC";; + *-*-freebsd* | *-*-openbsd*) CCSHARED="-fpic";; + *-*-netbsd*) CCSHARED="-fPIC";; + *-sco-sysv*) CCSHARED="-KPIC -dy -Bdynamic";; + +From 16129d98041586af75f4c4cb71758e0eb3b49e6a Mon Sep 17 00:00:00 2001 +From: matoro +Date: Mon, 22 Jul 2024 17:46:29 -0400 +Subject: [PATCH 2/2] Update examples to recommend compiling with -fPIC instead + of -fpic + +To reflect previous change to swig defaults. +--- + Examples/go/simple/index.html | 6 +++--- + Examples/perl5/index.html | 2 +- + Examples/python/index.html | 2 +- + Examples/ruby/index.html | 2 +- + Examples/tcl/index.html | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/Examples/go/simple/index.html b/Examples/go/simple/index.html +index 21dfc239ed..45ec980cda 100644 +--- a/Examples/go/simple/index.html ++++ b/Examples/go/simple/index.html +@@ -72,10 +72,10 @@

Compilation

+ named example.a; e.g., gopack grc example.a example.6 + example_gc.6. +
  • Compile the example_wrap.c +- file using your standard C compiler with the -fpic option; +- e.g., gcc -c -O -fpic example_wrap.c. ++ file using your standard C compiler with the -fPIC option; ++ e.g., gcc -c -O -fPIC example_wrap.c. +
  • Also compile the actual code, not generated by SWIG; e.g., gcc +- -c -O -fpic example.c. ++ -c -O -fPIC example.c. +
  • Put the gcc compiled object files into a shared library; + e.g., gcc -shared -o example.so example_wrap.o example.o. +
  • Compile the program which demonstrates how to use the library; +diff --git a/Examples/perl5/index.html b/Examples/perl5/index.html +index 2daabaaf9c..122923bdc9 100644 +--- a/Examples/perl5/index.html ++++ b/Examples/perl5/index.html +@@ -42,7 +42,7 @@

    Compilation Issues

    +
    +
    + % swig -perl5 interface.i
    +-% gcc -fpic -c -Dbool=char -I/usr/lib/perl5/5.00503/i386-linux/CORE interface_wrap.c
    ++% gcc -fPIC -c -Dbool=char -I/usr/lib/perl5/5.00503/i386-linux/CORE interface_wrap.c
    + % gcc -shared interface_wrap.o $(OBJS) -o interface.so 
    + % perl
    + use interface;
    +diff --git a/Examples/python/index.html b/Examples/python/index.html
    +index fcb7eace8b..97c2036330 100644
    +--- a/Examples/python/index.html
    ++++ b/Examples/python/index.html
    +@@ -44,7 +44,7 @@ 

    Compilation Issues

    +
    +
    + % swig -python interface.i
    +-% gcc -fpic -c interface_wrap.c -I/usr/local/include/python1.5
    ++% gcc -fPIC -c interface_wrap.c -I/usr/local/include/python1.5
    + % gcc -shared interface_wrap.o $(OBJS) -o interfacemodule.so 
    + % python
    + Python 1.5.2 (#3, Oct  9 1999, 22:09:34)  [GCC 2.95.1 19990816 (release)] on linux2
    +diff --git a/Examples/ruby/index.html b/Examples/ruby/index.html
    +index ceb6c925d4..dee00c1d14 100644
    +--- a/Examples/ruby/index.html
    ++++ b/Examples/ruby/index.html
    +@@ -45,7 +45,7 @@ 

    Compilation Issues

    +
    +
    + % swig -ruby interface.i
    +-% gcc -fpic -c interface_wrap.c -I/usr/local/lib/ruby/1.4/i686-linux
    ++% gcc -fPIC -c interface_wrap.c -I/usr/local/lib/ruby/1.4/i686-linux
    + % gcc -shared interface_wrap.o $(OBJS) -o interface.so 
    + % ruby
    + require 'interface'
    +diff --git a/Examples/tcl/index.html b/Examples/tcl/index.html
    +index acd90029f3..5048186c67 100644
    +--- a/Examples/tcl/index.html
    ++++ b/Examples/tcl/index.html
    +@@ -44,7 +44,7 @@ 

    Compilation Issues

    +
    +
    + unix % swig -tcl interface.i
    +-unix % gcc -fpic -c interface_wrap.c -I/usr/local/include
    ++unix % gcc -fPIC -c interface_wrap.c -I/usr/local/include
    + unix % gcc -shared interface_wrap.o $(OBJS) -o interface.so
    + unix % tclsh8.3
    + % load ./interface.so
    diff --git a/dev-lang/swig/swig-4.2.1.ebuild b/dev-lang/swig/swig-4.2.1.ebuild
    index 1375557b544c..c6599cf0d3b2 100644
    --- a/dev-lang/swig/swig-4.2.1.ebuild
    +++ b/dev-lang/swig/swig-4.2.1.ebuild
    @@ -11,7 +11,7 @@ SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
     
     LICENSE="GPL-3+ BSD BSD-2"
     SLOT="0"
    -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
    +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
     IUSE="ccache doc pcre test"
     RESTRICT="!test? ( test )"
     
    @@ -27,6 +27,17 @@ BDEPEND="virtual/pkgconfig"
     
     DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
     
    +PATCHES=(
    +	"${FILESDIR}"/${P}-tests-fpic.patch
    +)
    +
    +src_prepare() {
    +	default
    +
    +	# Delete after 4.2.1 (bug #900769, bug #935318)
    +	sed -i -e 's:fpic:fPIC:' configure.ac configure || die
    +}
    +
     src_configure() {
     	# TODO: add USE for various langs? (https://bugs.gentoo.org/921504#c3)
     	econf \
    -- 
    cgit v1.2.3