From 48f34db8043d7d1c8ced61c046bcd74c73431d19 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Dec 2020 11:05:24 +0100 Subject: add patch for PHP 8 from https://github.com/php/pecl-system-sync/pull/1 --- .gitignore | 2 ++ 1.patch | 29 +++++++++++++++++++++++++++++ PHPINFO | 4 ++++ REFLECTION | 2 +- php-pecl-sync.spec | 48 ++++++++++++++++++------------------------------ 5 files changed, 54 insertions(+), 31 deletions(-) create mode 100644 1.patch create mode 100644 PHPINFO diff --git a/.gitignore b/.gitignore index 1ab5c4f..01f0400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/1.patch b/1.patch new file mode 100644 index 0000000..36c509e --- /dev/null +++ b/1.patch @@ -0,0 +1,29 @@ +From 65bfe3f660587b4fbac6f5fdef6051a42ccc8b26 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 10 Dec 2020 10:56:16 +0100 +Subject: [PATCH] Fix for PHP 8 + +--- + sync.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/sync.c b/sync.c +index a9157fb..ca66792 100644 +--- a/sync.c ++++ b/sync.c +@@ -33,6 +33,15 @@ + #define PHP_FE_END {NULL, NULL, NULL} + #endif + ++/* for PHP 8 */ ++#ifndef TSRMLS_D ++#define TSRMLS_D void ++#define TSRMLS_DC ++#define TSRMLS_C ++#define TSRMLS_CC ++#define TSRMLS_FETCH() ++#endif ++ + /* {{{ sync_module_entry + */ + zend_module_entry sync_module_entry = { diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..ba4dee1 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,4 @@ + +sync + +sync support => enabled diff --git a/REFLECTION b/REFLECTION index 504b16b..caf5f53 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #133 sync version 1.1.1 ] { +Extension [ extension #117 sync version 1.1.1 ] { - Classes [5] { Class [ class SyncMutex ] { diff --git a/php-pecl-sync.spec b/php-pecl-sync.spec index b4d0408..820ede6 100644 --- a/php-pecl-sync.spec +++ b/php-pecl-sync.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-sync # -# Copyright (c) 2014-2018 Remi Collet +# Copyright (c) 2014-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -22,12 +22,15 @@ Summary: Named and unnamed synchronization objects Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.1.1 -Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 7%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: MIT Group: Development/Languages -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-system-sync/pull/1.patch + +BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear @@ -45,38 +48,17 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} %endif @@ -99,6 +81,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr1 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_SYNC_VERSION/{s/.* "//;s/".*$//;p}' php_sync.h) if test "x${extver}" != "x%{version}"; then @@ -185,7 +169,7 @@ cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' : Upstream test suite for NTS extension export TEST_PHP_EXECUTABLE=%{__php} @@ -199,7 +183,7 @@ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' : Upstream test suite for ZTS extension export TEST_PHP_EXECUTABLE=%{_bindir}/zts-php @@ -223,6 +207,10 @@ export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}. %changelog +* Thu Dec 10 2020 Remi Collet - 1.1.1-7 +- add patch for PHP 8 from + https://github.com/php/pecl-system-sync/pull/1 + * Tue Sep 03 2019 Remi Collet - 1.1.1-6 - rebuild for 7.4.0RC1 -- cgit