From 4075801cb5b19893b80c8b7c510db686eb1ddf0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Mon, 31 Mar 2025 21:40:45 +0200 Subject: [PATCH] [dev-lang/php] update to inode64 version --- dev-lang/php/Manifest | 2 +- dev-lang/php/files/bug81656-gcc-11.patch | 53 ---------------- .../php/files/intl-icu-76.1-php7.4-8.1.patch | 34 ---------- dev-lang/php/files/php-fpm_at.service | 1 - .../php/files/php-iodbc-header-location.patch | 14 ----- ...-r7.ebuild => php-7.4.33_p20241216.ebuild} | 62 +++++++++++-------- 6 files changed, 38 insertions(+), 128 deletions(-) delete mode 100644 dev-lang/php/files/bug81656-gcc-11.patch delete mode 100644 dev-lang/php/files/intl-icu-76.1-php7.4-8.1.patch delete mode 100644 dev-lang/php/files/php-iodbc-header-location.patch rename dev-lang/php/{php-7.4.33-r7.ebuild => php-7.4.33_p20241216.ebuild} (95%) diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 8cb85d5..31909bf 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -1 +1 @@ -DIST php-7.4.33.tar.gz 14944911 BLAKE2B 50cbffca9447ada22666059b085a93e86cf773c8bf1ddacf44984e7bf011d8efe64a4c5241f8381efddaba98ed1046d1290190dedd8e91e0b8ccfd4b4189f4d6 SHA512 3ec757439fe373abc20532fe362c6eebb80d2355bae9a58fb15e76ab2aea6e99d7e1d182d7e2c9d0f12a92fd083c874fe77d1469d81f4e4a7c8ef615868a1073 +DIST php-7.4.33-patches-1.tar.xz 25524 BLAKE2B 4bd6e7391a32e8ab309f330f626d228e363c09ea04b5b3989735cfd2beafba52c474087e1806e17431193495156064aee05d4c2414b7abd40f2452d40af8001c SHA512 626658678a1f81b9ca07c0d7aafd013e08b854365e2d595ae60f29caa5f2465e85e188ff26745810789ead154442e134197f8dc0be2f5ee8fb1ed740772cb41a diff --git a/dev-lang/php/files/bug81656-gcc-11.patch b/dev-lang/php/files/bug81656-gcc-11.patch deleted file mode 100644 index 8dfe1de..0000000 --- a/dev-lang/php/files/bug81656-gcc-11.patch +++ /dev/null @@ -1,53 +0,0 @@ -From bb00a649e0c1ac57718cd9971e7e6f933cb2dadd Mon Sep 17 00:00:00 2001 -From: Michael Wallner -Date: Thu, 25 Nov 2021 07:43:14 +0100 -Subject: [PATCH] fix #81656: GCC-11 silently ignores -R - ---- - build/php.m4 | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/build/php.m4 b/build/php.m4 -index 3af2b8b72d47..4697c5df9274 100644 ---- a/build/php.m4 -+++ b/build/php.m4 -@@ -279,25 +279,25 @@ dnl - dnl Checks for -R, etc. switch. - dnl - AC_DEFUN([PHP_RUNPATH_SWITCH],[ --AC_MSG_CHECKING([if compiler supports -R]) --AC_CACHE_VAL(php_cv_cc_dashr,[ -+AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) -+AC_CACHE_VAL(php_cv_cc_rpath,[ - SAVE_LIBS=$LIBS -- LIBS="-R /usr/$PHP_LIBDIR $LIBS" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no]) -+ LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no]) - LIBS=$SAVE_LIBS]) --AC_MSG_RESULT([$php_cv_cc_dashr]) --if test $php_cv_cc_dashr = "yes"; then -- ld_runpath_switch=-R -+AC_MSG_RESULT([$php_cv_cc_rpath]) -+if test $php_cv_cc_rpath = "yes"; then -+ ld_runpath_switch=-Wl,-rpath, - else -- AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) -- AC_CACHE_VAL(php_cv_cc_rpath,[ -+ AC_MSG_CHECKING([if compiler supports -R]) -+ AC_CACHE_VAL(php_cv_cc_dashr,[ - SAVE_LIBS=$LIBS -- LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no]) -+ LIBS="-R /usr/$PHP_LIBDIR $LIBS" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no]) - LIBS=$SAVE_LIBS]) -- AC_MSG_RESULT([$php_cv_cc_rpath]) -- if test $php_cv_cc_rpath = "yes"; then -- ld_runpath_switch=-Wl,-rpath, -+ AC_MSG_RESULT([$php_cv_cc_dashr]) -+ if test $php_cv_cc_dashr = "yes"; then -+ ld_runpath_switch=-R - else - dnl Something innocuous. - ld_runpath_switch=-L diff --git a/dev-lang/php/files/intl-icu-76.1-php7.4-8.1.patch b/dev-lang/php/files/intl-icu-76.1-php7.4-8.1.patch deleted file mode 100644 index fb48d80..0000000 --- a/dev-lang/php/files/intl-icu-76.1-php7.4-8.1.patch +++ /dev/null @@ -1,34 +0,0 @@ -From cc46a4e6b5a413bab3e264c1dcaaf7052f54fbc4 Mon Sep 17 00:00:00 2001 -From: David Carlier -Date: Sat, 17 Feb 2024 21:38:21 +0000 -Subject: [PATCH] ext/intl: level up c++ runtime std for icu 74 and onwards. - -to align with what is required to build icu 74 itself. - -Close GH-14002 ---- - ext/intl/config.m4 | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 -index dd687bcd97de3..48f5147ca7bbf 100644 ---- a/ext/intl/config.m4 -+++ b/ext/intl/config.m4 -@@ -80,7 +80,16 @@ if test "$PHP_INTL" != "no"; then - 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([test "$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/files/php-fpm_at.service b/dev-lang/php/files/php-fpm_at.service index 152c1ab..0b9f2e9 100644 --- a/dev-lang/php/files/php-fpm_at.service +++ b/dev-lang/php/files/php-fpm_at.service @@ -11,4 +11,3 @@ PrivateTmp=true [Install] WantedBy=multi-user.target - diff --git a/dev-lang/php/files/php-iodbc-header-location.patch b/dev-lang/php/files/php-iodbc-header-location.patch deleted file mode 100644 index e34f09b..0000000 --- a/dev-lang/php/files/php-iodbc-header-location.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -aurN a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4 ---- a/ext/pdo_odbc/config.m4 2019-11-26 15:13:39.000000000 -0500 -+++ b/ext/pdo_odbc/config.m4 2019-12-06 10:39:56.296658492 -0500 -@@ -85,6 +85,10 @@ - PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" - fi - -+ if test "$pdo_odbc_def_lib" = "iodbc" ; then -+ PDO_ODBC_INCDIR="$PDO_ODBC_INCDIR/iodbc" -+ fi -+ - AC_MSG_RESULT([$pdo_odbc_flavour - libs $PDO_ODBC_LIBDIR, - headers $PDO_ODBC_INCDIR]) diff --git a/dev-lang/php/php-7.4.33-r7.ebuild b/dev-lang/php/php-7.4.33_p20241216.ebuild similarity index 95% rename from dev-lang/php/php-7.4.33-r7.ebuild rename to dev-lang/php/php-7.4.33_p20241216.ebuild index cdc3572..982dcde 100644 --- a/dev-lang/php/php-7.4.33-r7.ebuild +++ b/dev-lang/php/php-7.4.33_p20241216.ebuild @@ -1,16 +1,24 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -WANT_AUTOMAKE="none" +inherit flag-o-matic git-r3 systemd autotools multilib -inherit flag-o-matic systemd autotools +# Extra fixes +## https://github.com/zboszor/meta-parallel-php/tree/main/recipes-php/php/php74 + +PHP_MV="$(ver_cut 1)" +PHP_PATCH="php-$(ver_cut 1-3)-patches-1.tar.xz" DESCRIPTION="The PHP language runtime engine" HOMEPAGE="https://www.php.net/" -SRC_URI="https://github.com/shivammathur/php-src-backports/archive/refs/tags/7.4.33.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/php-src-backports-7.4.33" +SRC_URI="https://raw.githubusercontent.com/inode64/inode64-overlay/main/dist/${PHP_PATCH}" +EGIT_REPO_URI="https://github.com/shivammathur/php-src-backports" +# Alternative +#EGIT_REPO_URI="https://github.com/remicollet/php-src-security" +EGIT_BRANCH="PHP-7.4-security-backports" +EGIT_COMMIT="9d5dc7ec3c99d9463d9086d37bdfa00f4978595c" LICENSE="PHP-3.01 BSD @@ -19,9 +27,9 @@ LICENSE="PHP-3.01 fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )" - SLOT="$(ver_cut 1-2)" -KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~mips ~ppc ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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" @@ -29,10 +37,10 @@ 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 + +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 @@ -64,7 +72,7 @@ REQUIRED_USE=" ldap-sasl? ( ldap ) oci8-instant-client? ( !ldap ) qdbm? ( !gdbm ) - session-mm? ( session !threads ) + session-mm? ( session ) mysql? ( || ( mysqli pdo ) ) firebird? ( pdo ) mssql? ( pdo ) @@ -80,14 +88,13 @@ COMMON_DEPEND=" >=dev-libs/libpcre2-10.30[jit?,unicode] virtual/libcrypt:= fpm? ( acl? ( sys-apps/acl ) ) - apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) + apache2? ( www-servers/apache[apache2_modules_unixd(+)] ) argon2? ( app-crypt/argon2:= ) 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.10.5 ) - enchant? ( =dev-libs/libffi-3.0.11:= ) firebird? ( dev-db/firebird ) gd? ( media-libs/libjpeg-turbo:0= media-libs/libpng:0= ) @@ -110,10 +117,10 @@ COMMON_DEPEND=" readline? ( sys-libs/readline:0= ) session-mm? ( dev-libs/mm ) snmp? ( >=net-analyzer/net-snmp-5.2 ) - sodium? ( dev-libs/libsodium:=[-minimal(-)] ) + sodium? ( dev-libs/libsodium ) spell? ( >=app-text/aspell-0.50 ) sqlite? ( >=dev-db/sqlite-3.7.6.3 ) - ssl? ( >=dev-libs/openssl-1.0.2:0= ) + ssl? ( dev-libs/openssl:= ) tidy? ( app-text/htmltidy ) tokyocabinet? ( dev-db/tokyocabinet ) truetype? ( =media-libs/freetype-2* ) @@ -141,14 +148,6 @@ DEPEND="${COMMON_DEPEND} BDEPEND="virtual/pkgconfig" -PHP_MV="$(ver_cut 1)" - -PATCHES=( - "${FILESDIR}"/php-iodbc-header-location.patch - "${FILESDIR}"/bug81656-gcc-11.patch - "${FILESDIR}"/intl-icu-76.1-php7.4-8.1.patch -) - php_install_ini() { local phpsapi="${1}" @@ -204,9 +203,18 @@ php_set_ini_dir() { PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" } +src_unpack() { + git-r3_src_unpack + unpack "${PHP_PATCH}" +} + src_prepare() { default + local patchdir="${WORKDIR}/patches" + + eapply "${patchdir}/" + # 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 @@ -220,6 +228,7 @@ src_prepare() { # Emulate buildconf to support cross-compilation rm -fr aclocal.m4 autom4te.cache config.cache \ configure main/php_config.h.in || die + eautoconf --force eautoheader } @@ -243,7 +252,11 @@ src_configure() { --localstatedir="${EPREFIX}/var" --without-pear --without-valgrind - $(use_enable threads maintainer-zts) + ) + + # remove obsolete gcov support + our_conf+=( + --disable-gcov ) our_conf+=( @@ -251,7 +264,6 @@ src_configure() { $(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)