From d57f15b743b223f7f0eaf4488f9315bbd3b97efe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Jul 2024 15:54:01 +0200 Subject: update to 3.1.3 --- 0001-fix-tests-expectation-for-8.4.0alpha1.patch | 53 ++++++++++++++++++++++++ php-pecl-event.spec | 36 ++++------------ 2 files changed, 60 insertions(+), 29 deletions(-) create mode 100644 0001-fix-tests-expectation-for-8.4.0alpha1.patch diff --git a/0001-fix-tests-expectation-for-8.4.0alpha1.patch b/0001-fix-tests-expectation-for-8.4.0alpha1.patch new file mode 100644 index 0000000..74e2473 --- /dev/null +++ b/0001-fix-tests-expectation-for-8.4.0alpha1.patch @@ -0,0 +1,53 @@ +From b70cd8c7ecdec41092c504ad3dba820d389c2928 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 15 Jul 2024 15:50:31 +0200 +Subject: [PATCH] fix tests expectation for 8.4.0alpha1 + +--- + tests/33-bevent-read-cb-exception.phpt | 2 +- + tests/33-bevent-write-cb-exception.phpt | 2 +- + tests/61-issue.phpt | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/33-bevent-read-cb-exception.phpt b/tests/33-bevent-read-cb-exception.phpt +index 2b0c4b3..cbf07d2 100644 +--- a/tests/33-bevent-read-cb-exception.phpt ++++ b/tests/33-bevent-read-cb-exception.phpt +@@ -34,7 +34,7 @@ Warning: EventBase::loop(): Breaking the loop due to exception RuntimeException + + Fatal error: Uncaught RuntimeException: from EventBufferEvent callback in %s/33-bevent-read-cb-exception.php:%d + Stack trace: +-#0 [internal function]: {closure}(Object(EventBufferEvent), NULL) ++#0 [internal function]: {closur%s}(Object(EventBufferEvent), NULL) + #1 %s/33-bevent-read-cb-exception.php(%d): %SEventBase->loop() + #2 {main} + %wthrown in %s/33-bevent-read-cb-exception.php on line %d +diff --git a/tests/33-bevent-write-cb-exception.phpt b/tests/33-bevent-write-cb-exception.phpt +index a84d074..b326282 100644 +--- a/tests/33-bevent-write-cb-exception.phpt ++++ b/tests/33-bevent-write-cb-exception.phpt +@@ -34,7 +34,7 @@ Warning: EventBase::loop(): Breaking the loop due to exception RuntimeException + + Fatal error: Uncaught RuntimeException: from EventBufferEvent callback in %s/33-bevent-write-cb-exception.php:%d + Stack trace: +-#0 [internal function]: {closure}(Object(EventBufferEvent), NULL) ++#0 [internal function]: {closur%s}(Object(EventBufferEvent), NULL) + #1 %s/33-bevent-write-cb-exception.php(%d): %SEventBase->loop() + #2 {main} + %wthrown in %s/33-bevent-write-cb-exception.php on line %d +diff --git a/tests/61-issue.phpt b/tests/61-issue.phpt +index 812e52f..bb29012 100644 +--- a/tests/61-issue.phpt ++++ b/tests/61-issue.phpt +@@ -24,7 +24,7 @@ Warning: EventBase::loop(): Breaking the loop due to exception Exception in %s o + + Fatal error: Uncaught Exception: issue61 in %s/61-issue.php:%d + Stack trace: +-#0 [internal function]: {closure}(-1, 1, NULL) ++#0 [internal function]: {closur%s}(-1, 1, NULL) + #1 %s/61-issue.php(%d): %SEventBase->loop() + #2 {main} + thrown in %s/61-issue.php on line %d +-- +2.45.2 + diff --git a/php-pecl-event.spec b/php-pecl-event.spec index 381c6e2..1cfc1b6 100644 --- a/php-pecl-event.spec +++ b/php-pecl-event.spec @@ -16,12 +16,6 @@ %global _root_prefix %{_prefix} %endif -# For PHP < 5.6 and EPEL-9 -%{!?__phpize: %global __phpize %{_bindir}/phpize} -%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize} -%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config} -%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config} - %bcond_without tests %global pecl_name event @@ -42,11 +36,13 @@ Summary: Provides interface to libevent library Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}%{?upstream_postver:+%{upstream_postver}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP-3.01 URL: https://pecl.php.net/package/event Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}%{?upstream_postver}.tgz +Patch0: 0001-fix-tests-expectation-for-8.4.0alpha1.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -89,10 +85,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 + # Sanity check, really often broken DIR=$(%{__php} -r 'echo "php" . PHP_MAJOR_VERSION;') #sed -e '/PHP_EVENT_VERSION/s/2.4.2/2.4.3/' -i $DIR/php_event.h @@ -215,28 +213,8 @@ REPORT_EXIT_STATUS=1 \ %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 -- cgit