summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-14 13:26:23 +0200
committerRemi Collet <remi@php.net>2023-09-14 13:26:23 +0200
commit240a86a475f18bdf63570c0d5b829106bb3d7114 (patch)
tree04af1f1640260a2d2e9cef36f7a0d08515880c8c
parent196df1efa6431dabfef408d31259b7a0c828d76e (diff)
add patch for PHP 8.3 from
https://github.com/laruence/yaf/pull/579 build out of sources tree
-rw-r--r--REFLECTION57
-rw-r--r--php-pecl-yaf.spec67
-rw-r--r--yaf-php83.patch28
3 files changed, 100 insertions, 52 deletions
diff --git a/REFLECTION b/REFLECTION
index 8f156d8..a7c4f0c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
+Extension [ <persistent> extension #125 yaf version 3.3.5 ] {
- Dependencies {
Dependency [ spl (Required) ]
@@ -3327,30 +3327,35 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:Core, inherits Iterator> abstract public method next ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Iterator> abstract public method key ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:Core, inherits Iterator> abstract public method valid ] {
- Parameters [0] {
}
+ - Tentative return [ bool ]
}
Method [ <internal:Core, inherits Iterator> abstract public method rewind ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
}
}
@@ -3367,8 +3372,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3388,6 +3393,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3459,8 +3465,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3480,6 +3486,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3551,8 +3558,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3572,6 +3579,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3643,8 +3651,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3664,6 +3672,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3735,8 +3744,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3756,6 +3765,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3827,8 +3837,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3848,6 +3858,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -3919,8 +3930,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -3940,6 +3951,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -4011,8 +4023,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -4032,6 +4044,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -4103,8 +4116,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -4124,6 +4137,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
@@ -4195,8 +4209,8 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
}
- Properties [5] {
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
Property [ protected $message = NULL ]
Property [ protected $code = 0 ]
Property [ protected $previous = NULL ]
@@ -4216,6 +4230,7 @@ Extension [ <persistent> extension #120 yaf version 3.3.5 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec
index 54b86e1..2ba46d6 100644
--- a/php-pecl-yaf.spec
+++ b/php-pecl-yaf.spec
@@ -7,12 +7,7 @@
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%scl_package php-pecl-yaf
-%endif
+%{?scl:%scl_package php-pecl-yaf}
%bcond_without tests
@@ -24,22 +19,29 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name yaf
%global ini_name 40-%{pecl_name}.ini
+%if 0%{?gh_date:1}
+%global sources %{gh_project}-%{gh_commit}
+%else
+%global sources %{pecl_name}-%{version}
+%endif
+%global _configure ../%{sources}/configure
Summary: Yet Another Framework
Name: %{?scl_prefix}php-pecl-yaf
Version: 3.3.5
%if 0%{?gh_date:1}
Release: 0.13.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{sources}-%{gh_short}.tar.gz
%else
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz
%endif
License: PHP
URL: https://pecl.php.net/package/yaf
Source1: %{pecl_name}.ini
Patch0: %{pecl_name}-php82.patch
+Patch1: %{pecl_name}-php83.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -51,7 +53,6 @@ BuildRequires: %{?scl_prefix}php-json
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -69,10 +70,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version} NTS
+mv %{sources}/package.xml .
%endif
# Don't install/register tests
@@ -80,8 +78,9 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%patch0 -p1 -b .pr579
+cd %{sources}
+%patch -P0 -p1 -b .php82
+%patch -P1 -p1 -b .php83
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h )
@@ -91,24 +90,25 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
-%configure --with-php-config=%{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+%configure --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-%configure --with-php-config=%{_bindir}/zts-php-config
+%configure --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -130,16 +130,18 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{php_ztsinidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+cd %{sources}
+for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
+do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
+cd %{sources}
+
OPTS="-n"
[ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so"
-cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
@@ -148,14 +150,12 @@ cd NTS
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d %{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
%endif
%if %{with_zts}
-cd ../ZTS
-
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -164,7 +164,7 @@ cd ../ZTS
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d %{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q --show-diff
%endif
@@ -192,7 +192,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -206,6 +206,11 @@ fi
%changelog
+* Thu Sep 14 2023 Remi Collet <remi@remirepo.net> - 3.3.5-3
+- add patch for PHP 8.3 from
+ https://github.com/laruence/yaf/pull/579
+- build out of sources tree
+
* Mon Sep 19 2022 Remi Collet <remi@remirepo.net> - 3.3.5-2
- add patch for PHP 8.2 from
https://github.com/laruence/yaf/pull/579
diff --git a/yaf-php83.patch b/yaf-php83.patch
new file mode 100644
index 0000000..fc12b81
--- /dev/null
+++ b/yaf-php83.patch
@@ -0,0 +1,28 @@
+From 866f31e4916214dcafacbf2bb5035b6c046095aa Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 14 Sep 2023 13:15:59 +0200
+Subject: [PATCH] ZEND_HOT removed in 8.3
+
+---
+ php_yaf.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/php_yaf.h b/php_yaf.h
+index 3585421..9cd6e3a 100644
+--- a/php_yaf.h
++++ b/php_yaf.h
+@@ -260,6 +260,11 @@ static zend_always_inline uint32_t yaf_compose_2_pathes(char *buf, zend_string *
+ }
+ #endif
+
++/* removed in 8.3 */
++#ifndef ZEND_HOT
++#define ZEND_HOT
++#endif
++
+ /*
+ * Local variables:
+ * tab-width: 4
+--
+2.41.0
+