From c03c6189614e4ad4f52ccbc57901a7d464008eab Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 11 May 2023 11:07:01 +0200
Subject: define %__phpize and %__phpconfig

---
 macros.php |  5 +++++
 php80.spec | 51 +++++++++++++++++++++++++--------------------------
 2 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/macros.php b/macros.php
index 0c750a7..989e8b3 100644
--- a/macros.php
+++ b/macros.php
@@ -18,4 +18,9 @@
 %__php         %{_bindir}/php
 %__ztsphp      %{_bindir}/zts-php
 
+%__phpize      %{_bindir}/phpize
+%__ztsphpize   %{_bindir}/zts-phpize
+
+%__phpconfig    %{_bindir}/php-config
+%__ztsphpconfig %{_bindir}/zts-php-config
 
diff --git a/php80.spec b/php80.spec
index 0969713..63163e7 100644
--- a/php80.spec
+++ b/php80.spec
@@ -107,7 +107,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: %{upver}%{?rcver:~%{rcver}}
-Release: 3%{?dist}
+Release: 4%{?dist}
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
 # TSRM is licensed under BSD
@@ -1168,42 +1168,38 @@ in pure PHP.
 
 %setup -q -n php-%{upver}%{?rcver}
 
-%patch1 -p1 -b .mpmcheck
-%patch5 -p1 -b .includedir
-%patch6 -p1 -b .embed
-%patch8 -p1 -b .libdb
-%patch9 -p1 -b .deprecated
-%if 0%{?rhel}
-%patch10 -p1 -b .curltls
+%patch -P1 -p1 -b .mpmcheck
+%patch -P5 -p1 -b .includedir
+%patch -P6 -p1 -b .embed
+%patch -P8 -p1 -b .libdb
+%patch -P9 -p1 -b .deprecated
+%if 0%{?rhel} == 7
+%patch -P10 -p1 -b .curltls
 %endif
 
-%patch41 -p1 -b .syslib
-%if 0%{?fedora} >= 31 || 0%{?rhel} >= 6
-%patch42 -p1 -b .systzdata
-%endif
-%patch43 -p1 -b .headers
-%patch45 -p1 -b .ldap_r
-%patch46 -p1 -b .argon2
-%patch47 -p1 -b .phpinfo
-%patch48 -p1 -b .sha
-%patch49 -p1 -b .pharsha
+%patch -P41 -p1 -b .syslib
+%patch -P42 -p1 -b .systzdata
+%patch -P43 -p1 -b .headers
+%patch -P45 -p1 -b .ldap_r
+%patch -P46 -p1 -b .argon2
+%patch -P47 -p1 -b .phpinfo
+%patch -P48 -p1 -b .sha
+%patch -P49 -p1 -b .pharsha
 %if 0%{?fedora} >= 36 || 0%{?rhel} >= 9
-%patch50 -p1 -b .openssl3
+%patch -P50 -p1 -b .openssl3
 rm ext/openssl/tests/p12_with_extra_certs.p12
 %endif
-%patch51 -p1 -b .libxcrypt
-%patch52 -p1 -b .intlinfo
+%patch -P51 -p1 -b .libxcrypt
+%patch -P52 -p1 -b .intlinfo
 
-%patch91 -p1 -b .remi-oci8
+%patch -P91 -p1 -b .remi-oci8
 
 # upstream patches
 
 # security patches
 
 # Fixes for tests related to tzdata
-%if 0%{?fedora} >= 29 || 0%{?rhel} >= 6
-%patch300 -p1 -b .datetests
-%endif
+%patch -P300 -p1 -b .datetests
 
 # WIP patch
 
@@ -1960,7 +1956,7 @@ sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \
 %endif
     < %{SOURCE3} > macros.php
 %if 0%{?fedora} >= 24 || 0%{?rhel} >= 8
-echo '%%pecl_xmldir   %{_localstatedir}/lib/php/peclxml' >>macros.php
+echo '%%pecl_xmldir   %%{_localstatedir}/lib/php/peclxml' >>macros.php
 %endif
 install -m 644 -D macros.php \
            $RPM_BUILD_ROOT%{macrosdir}/macros.php
@@ -2202,6 +2198,9 @@ fi
 
 
 %changelog
+* Thu May 11 2023 Remi Collet <remi@remirepo.net> - 8.0.28-4
+- define %%__phpize and %%__phpconfig
+
 * Fri Apr 21 2023 Remi Collet <remi@remirepo.net> - 8.0.28-3
 - use ICU 72.1
 - use oracle client library version 21.10
-- 
cgit