summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--10.patch27
-rw-r--r--REFLECTION38
-rw-r--r--php-pecl-sync.spec127
3 files changed, 94 insertions, 98 deletions
diff --git a/10.patch b/10.patch
new file mode 100644
index 0000000..34d3244
--- /dev/null
+++ b/10.patch
@@ -0,0 +1,27 @@
+From b2251ec9fdf0af1c898ec8e0b0b03099c9f246af Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 17 Jul 2025 15:49:40 +0200
+Subject: [PATCH] copy zend_exception_get_default for 8.5
+
+---
+ sync.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/sync.c b/sync.c
+index f235088..52aa4be 100644
+--- a/sync.c
++++ b/sync.c
+@@ -42,6 +42,13 @@
+ #define TSRMLS_FETCH()
+ #endif
+
++#if PHP_VERSION_ID >= 80500
++static zend_class_entry *zend_exception_get_default(void)
++{
++ return zend_ce_exception;
++}
++#endif
++
+ /* {{{ sync_module_entry
+ */
+ zend_module_entry sync_module_entry = {
diff --git a/REFLECTION b/REFLECTION
index 07e9aba..bd5d212 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #119 sync version 1.1.2 ] {
+Extension [ <persistent> extension #123 sync version 1.1.3 ] {
- Classes [5] {
Class [ <internal:sync> class SyncMutex ] {
@@ -19,21 +19,21 @@ Extension [ <persistent> extension #119 sync version 1.1.2 ] {
Method [ <internal:sync, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $name ]
+ Parameter #0 [ <optional> $name = <default> ]
}
}
Method [ <internal:sync> public method lock ] {
- Parameters [1] {
- Parameter #0 [ <optional> $wait ]
+ Parameter #0 [ <optional> $wait = <default> ]
}
}
Method [ <internal:sync> public method unlock ] {
- Parameters [1] {
- Parameter #0 [ <optional> $all ]
+ Parameter #0 [ <optional> $all = <default> ]
}
}
}
@@ -57,23 +57,23 @@ Extension [ <persistent> extension #119 sync version 1.1.2 ] {
Method [ <internal:sync, ctor> public method __construct ] {
- Parameters [3] {
- Parameter #0 [ <optional> $name ]
- Parameter #1 [ <optional> $initialval ]
- Parameter #2 [ <optional> $autounlock ]
+ Parameter #0 [ <optional> $name = <default> ]
+ Parameter #1 [ <optional> $initialval = <default> ]
+ Parameter #2 [ <optional> $autounlock = <default> ]
}
}
Method [ <internal:sync> public method lock ] {
- Parameters [1] {
- Parameter #0 [ <optional> $wait ]
+ Parameter #0 [ <optional> $wait = <default> ]
}
}
Method [ <internal:sync> public method unlock ] {
- Parameters [1] {
- Parameter #0 [ <optional> &$prevcount ]
+ Parameter #0 [ <optional> &$prevcount = <default> ]
}
}
}
@@ -97,15 +97,15 @@ Extension [ <persistent> extension #119 sync version 1.1.2 ] {
Method [ <internal:sync, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <optional> $name ]
- Parameter #1 [ <optional> $manual ]
+ Parameter #0 [ <optional> $name = <default> ]
+ Parameter #1 [ <optional> $manual = <default> ]
}
}
Method [ <internal:sync> public method wait ] {
- Parameters [1] {
- Parameter #0 [ <optional> $wait ]
+ Parameter #0 [ <optional> $wait = <default> ]
}
}
@@ -141,22 +141,22 @@ Extension [ <persistent> extension #119 sync version 1.1.2 ] {
Method [ <internal:sync, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <optional> $name ]
- Parameter #1 [ <optional> $autounlock ]
+ Parameter #0 [ <optional> $name = <default> ]
+ Parameter #1 [ <optional> $autounlock = <default> ]
}
}
Method [ <internal:sync> public method readlock ] {
- Parameters [1] {
- Parameter #0 [ <optional> $wait ]
+ Parameter #0 [ <optional> $wait = <default> ]
}
}
Method [ <internal:sync> public method writelock ] {
- Parameters [1] {
- Parameter #0 [ <optional> $wait ]
+ Parameter #0 [ <optional> $wait = <default> ]
}
}
@@ -213,15 +213,15 @@ Extension [ <persistent> extension #119 sync version 1.1.2 ] {
- Parameters [2] {
Parameter #0 [ <required> $string ]
- Parameter #1 [ <optional> $start ]
+ Parameter #1 [ <optional> $start = <default> ]
}
}
Method [ <internal:sync> public method read ] {
- Parameters [2] {
- Parameter #0 [ <optional> $start ]
- Parameter #1 [ <optional> $length ]
+ Parameter #0 [ <optional> $start = <default> ]
+ Parameter #1 [ <optional> $length = <default> ]
}
}
}
diff --git a/php-pecl-sync.spec b/php-pecl-sync.spec
index c11b6fe..55ccafe 100644
--- a/php-pecl-sync.spec
+++ b/php-pecl-sync.spec
@@ -1,32 +1,31 @@
# remirepo spec file for php-pecl-sync
#
-# Copyright (c) 2014-2021 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2014-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-sync
-%endif
+%{?scl:%scl_package php-pecl-sync}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name sync
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
-%global ini_name 40-%{pecl_name}.ini
-%endif
+%bcond_without tests
+
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name sync
+%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Named and unnamed synchronization objects
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.1.2
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.1.3
Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: MIT
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+
+Patch0: 10.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -35,32 +34,11 @@ BuildRequires: %{?scl_prefix}php-pear
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}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
%description
@@ -74,14 +52,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
# 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 NTS
+cd %{sources}
+%patch -P0 -p1
+
# 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
@@ -90,9 +69,9 @@ if test "x${extver}" != "x%{version}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -105,17 +84,18 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -139,65 +119,43 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# 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
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%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
-
-
%check
-%if "%{php_version}" > "8.1"
-# ignore deprecated calls
-rm ?TS/tests/005.phpt
-rm ?TS/tests/010.phpt
-%endif
+cd %{sources}
-cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for NTS extension
export TEST_PHP_EXECUTABLE=%{__php}
export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so"
export 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 \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for ZTS extension
-export TEST_PHP_EXECUTABLE=%{_bindir}/zts-php
+export TEST_PHP_EXECUTABLE=%{__ztsphp}
export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so"
-%{_bindir}/zts-php -n run-tests.php -q --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
+%endif
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -211,6 +169,17 @@ export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.
%changelog
+* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 1.1.3-3
+- add fix for PHP 8.5.0alpha2 using patch from
+ https://github.com/php/pecl-system-sync/pull/10
+- re-license spec file to CECILL-2.1
+
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.1.3-2
+- build out of sources tree
+
+* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.1.3-1
+- update to 1.1.3
+
* Fri Sep 10 2021 Remi Collet <remi@remirepo.net> - 1.1.2-2
- ignore 2 tests using deprecated calls on 8.1