diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-01 09:29:29 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-01 09:29:29 +0200 |
commit | e1b5e5b7d25eae58284f70b4339d98ebe9afc4eb (patch) | |
tree | 41dae5b792c304e09273ee2f0561e72da41f03c1 | |
parent | 319e03bd9e21389844999dbadac2a066446dfa56 (diff) |
https://github.com/awesomized/ext-ion/pull/10
-rw-r--r-- | ion-php84.patch | 101 | ||||
-rw-r--r-- | php-pecl-ion.spec | 54 |
2 files changed, 115 insertions, 40 deletions
diff --git a/ion-php84.patch b/ion-php84.patch new file mode 100644 index 0000000..fef1c36 --- /dev/null +++ b/ion-php84.patch @@ -0,0 +1,101 @@ +From fc5e95874bc8c56c398399b85f17663919c8e904 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 1 Oct 2024 09:18:00 +0200 +Subject: [PATCH] Relax test for 8.4 "refcount" vs "packed refcount" + +--- + tests/serialize/backref.phpt | 18 +++++++++--------- + tests/serialize/serializable.phpt | 2 +- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/tests/serialize/backref.phpt b/tests/serialize/backref.phpt +index 4538ab5..44ce077 100644 +--- a/tests/serialize/backref.phpt ++++ b/tests/serialize/backref.phpt +@@ -30,16 +30,16 @@ array(1) { + *RECURSION* + } + [[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6] +-array(6) refcount(2){ ++array(6) %srefcount(2){ + [0]=> +- array(1) refcount(2){ ++ array(1) %srefcount(2){ + [0]=> + reference refcount(1) { + *RECURSION* + } + } + [1]=> +- array(6) refcount(2){ ++ array(6) %srefcount(2){ + [0]=> + string(1) "a" refcount(3) + [1]=> +@@ -51,7 +51,7 @@ array(6) refcount(2){ + object(stdClass)#%d (0) refcount(3){ + } + [4]=> +- array(3) refcount(3){ ++ array(3) %srefcount(3){ + [0]=> + int(1) + [1]=> +@@ -60,7 +60,7 @@ array(6) refcount(2){ + int(3) + } + [5]=> +- array(3) refcount(3){ ++ array(3) %srefcount(3){ + [0]=> + int(1) + [1]=> +@@ -70,7 +70,7 @@ array(6) refcount(2){ + } + } + [2]=> +- array(6) refcount(2){ ++ array(6) %srefcount(2){ + [0]=> + string(1) "a" refcount(3) + [1]=> +@@ -82,7 +82,7 @@ array(6) refcount(2){ + object(stdClass)#%d (0) refcount(3){ + } + [4]=> +- array(3) refcount(3){ ++ array(3) %srefcount(3){ + [0]=> + int(1) + [1]=> +@@ -91,7 +91,7 @@ array(6) refcount(2){ + int(3) + } + [5]=> +- array(3) refcount(3){ ++ array(3) %srefcount(3){ + [0]=> + int(1) + [1]=> +@@ -106,7 +106,7 @@ array(6) refcount(2){ + object(stdClass)#%d (0) refcount(3){ + } + [5]=> +- array(3) refcount(3){ ++ array(3) %srefcount(3){ + [0]=> + int(1) + [1]=> +diff --git a/tests/serialize/serializable.phpt b/tests/serialize/serializable.phpt +index 5f66227..aa93347 100644 +--- a/tests/serialize/serializable.phpt ++++ b/tests/serialize/serializable.phpt +@@ -85,7 +85,7 @@ Deprecated: recursive implements the Serializable interface, which is deprecated + Deprecated: except implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %sserialize/serializable.php on line %d + + [S::test::{{"foobar"}},r::1] +-array(2) refcount(2){ ++array(2) %srefcount(2){ + [0]=> + object(test)#%d (1) refcount(2){ + ["data":protected]=> diff --git a/php-pecl-ion.spec b/php-pecl-ion.spec index 7c3b64a..1a469aa 100644 --- a/php-pecl-ion.spec +++ b/php-pecl-ion.spec @@ -37,7 +37,7 @@ Summary: Amazon ION support Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} @@ -45,13 +45,10 @@ Source0: https://pecl.php.net/get/%{sources}.tgz Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_version}-%{gh_short}.tar.gz Patch0: %{pecl_name}-php82.patch +Patch1: %{pecl_name}-php84.patch BuildRequires: make -%if 0%{?rhel} == 7 -BuildRequires: cmake3 >= 3.6 -%else BuildRequires: cmake >= 3.6 -%endif BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 8.1 BuildRequires: %{?scl_prefix}php-pear @@ -66,11 +63,6 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} # Bundled library Provides: bundled(ion-c) = %{gh_version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif - %description This PHP extension provides support for the Amazon ION serialization format. @@ -85,11 +77,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} %patch -P0 -p1 -b .php82 +%patch -P1 -p1 -b .php84 # use bundled library ln -s ../%{gh_project}-%{gh_commit} ion-c @@ -123,10 +116,6 @@ EOF %build %{?dtsenable} -%if 0%{?rhel} == 7 -export CMAKE=%{_root_bindir}/cmake3 -%endif - # See https://github.com/awesomized/ext-ion/issues/9 export CFLAGS="%{optflags} -Wno-incompatible-pointer-types" @@ -138,15 +127,16 @@ peclconf() { cd %{sources} %{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global cd ../NTS peclconf %{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS peclconf %{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif @@ -154,7 +144,7 @@ make %{?_smp_mflags} %{?dtsenable} # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description @@ -162,7 +152,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Install the ZTS stuff %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -194,28 +184,8 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ %endif -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -229,6 +199,10 @@ fi %changelog +* Tue Oct 1 2024 Remi Collet <remi@remirepo.net> - 0.2.1-5 +- fix test suite with 8.4 using patch from + https://github.com/awesomized/ext-ion/pull/10 + * Fri Feb 16 2024 Remi Collet <remi@remirepo.net> - 0.2.1-4 - F40: ignore [-Wincompatible-pointer-types] reported as https://github.com/awesomized/ext-ion/issues/9 |