diff options
| -rw-r--r-- | PHPINFO | 2 | ||||
| -rw-r--r-- | REFLECTION | 2 | ||||
| -rw-r--r-- | event-build.patch | 119 | ||||
| -rw-r--r-- | php-pecl-event.spec | 11 | 
4 files changed, 7 insertions, 127 deletions
@@ -7,5 +7,5 @@ Debug support => disabled  Extra functionality support including HTTP, DNS, and RPC => enabled  OpenSSL support => enabled  Thread safety support => disabled -Extension version => 3.1.0 +Extension version => 3.1.1  libevent2 headers version => 2.1.12-stable @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #63 event version 3.1.0 ] { +Extension [ <persistent> extension #63 event version 3.1.1 ] {    - Dependencies {      Dependency [ sockets (Required) ] diff --git a/event-build.patch b/event-build.patch deleted file mode 100644 index 90e7a63..0000000 --- a/event-build.patch +++ /dev/null @@ -1,119 +0,0 @@ -From cec64c28a80b2644cce2e9cd6c1fbfecb6439957 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Mon, 16 Oct 2023 08:39:26 +0200 -Subject: [PATCH] Fix build with libevent < 2.1.10 - ---- - php7/classes/dns.c                          | 12 +++++++----- - php7/php_event.c                            |  2 ++ - php8/classes/dns.c                          | 12 +++++++----- - php8/php_event.c                            |  2 ++ - tests/36-dns-base-construct-init-flags.phpt |  2 +- - 5 files changed, 19 insertions(+), 11 deletions(-) - -diff --git a/php7/classes/dns.c b/php7/classes/dns.c -index 3a7bb37..3286efa 100644 ---- a/php7/classes/dns.c -+++ b/php7/classes/dns.c -@@ -55,11 +55,11 @@ PHP_METHOD(EventDnsBase, __construct) - 	PHP_EVENT_ASSERT(dnsb); - 	PHP_EVENT_ASSERT(base->base != NULL); -  --	if (Z_TYPE_P(zinitialize) == IS_TRUE) { --		flags = EVDNS_BASE_INITIALIZE_NAMESERVERS; --	} else if (Z_TYPE_P(zinitialize) == IS_FALSE) { -+	if (Z_TYPE_P(zinitialize) == IS_FALSE) { - 		flags = 0; - #if LIBEVENT_VERSION_NUMBER >= 0x02010000 -+	} else if (Z_TYPE_P(zinitialize) == IS_TRUE) { -+		flags = EVDNS_BASE_INITIALIZE_NAMESERVERS; - 	} else if (Z_TYPE_P(zinitialize) == IS_LONG) { - 		long lflags = Z_LVAL_P(zinitialize); -  -@@ -70,8 +70,10 @@ PHP_METHOD(EventDnsBase, __construct) - 		flags = lflags; -  - 		if (flags & ~(EVDNS_BASE_DISABLE_WHEN_INACTIVE --					| EVDNS_BASE_INITIALIZE_NAMESERVERS --					| EVDNS_BASE_NAMESERVERS_NO_DEFAULT)) { -+#if LIBEVENT_VERSION_NUMBER >= 0x02010a00 -+					| EVDNS_BASE_NAMESERVERS_NO_DEFAULT -+#endif -+					| EVDNS_BASE_INITIALIZE_NAMESERVERS)) { - 			zend_throw_exception_ex(php_event_get_exception(), 0, "Invalid initialization flags"); - 			goto fail; - 		} -diff --git a/php7/php_event.c b/php7/php_event.c -index a903020..6676cad 100644 ---- a/php7/php_event.c -+++ b/php7/php_event.c -@@ -1254,6 +1254,8 @@ PHP_MINIT_FUNCTION(event) - 	/* Constructor initialization flags */ - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, DISABLE_WHEN_INACTIVE, EVDNS_BASE_DISABLE_WHEN_INACTIVE); - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, INITIALIZE_NAMESERVERS, EVDNS_BASE_INITIALIZE_NAMESERVERS); -+#endif -+#if LIBEVENT_VERSION_NUMBER >= 0x02010a00 - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, NAMESERVERS_NO_DEFAULT, EVDNS_BASE_NAMESERVERS_NO_DEFAULT); - #endif -  -diff --git a/php8/classes/dns.c b/php8/classes/dns.c -index 075b24b..1c08c1e 100644 ---- a/php8/classes/dns.c -+++ b/php8/classes/dns.c -@@ -55,11 +55,11 @@ PHP_EVENT_METHOD(EventDnsBase, __construct) - 	PHP_EVENT_ASSERT(dnsb); - 	PHP_EVENT_ASSERT(base->base != NULL); -  --	if (Z_TYPE_P(zinitialize) == IS_TRUE) { --		flags = EVDNS_BASE_INITIALIZE_NAMESERVERS; --	} else if (Z_TYPE_P(zinitialize) == IS_FALSE) { -+	if (Z_TYPE_P(zinitialize) == IS_FALSE) { - 		flags = 0; - #if LIBEVENT_VERSION_NUMBER >= 0x02010000 -+	} else if (Z_TYPE_P(zinitialize) == IS_TRUE) { -+		flags = EVDNS_BASE_INITIALIZE_NAMESERVERS; - 	} else if (Z_TYPE_P(zinitialize) == IS_LONG) { - 		long lflags = Z_LVAL_P(zinitialize); -  -@@ -70,8 +70,10 @@ PHP_EVENT_METHOD(EventDnsBase, __construct) - 		flags = lflags; -  - 		if (flags & ~(EVDNS_BASE_DISABLE_WHEN_INACTIVE --					| EVDNS_BASE_INITIALIZE_NAMESERVERS --					| EVDNS_BASE_NAMESERVERS_NO_DEFAULT)) { -+#if LIBEVENT_VERSION_NUMBER >= 0x02010a00 -+					| EVDNS_BASE_NAMESERVERS_NO_DEFAULT -+#endif -+					| EVDNS_BASE_INITIALIZE_NAMESERVERS)) { - 			zend_throw_exception_ex(php_event_get_exception(), 0, "Invalid initialization flags"); - 			goto fail; - 		} -diff --git a/php8/php_event.c b/php8/php_event.c -index e593b80..17b66f3 100644 ---- a/php8/php_event.c -+++ b/php8/php_event.c -@@ -1200,6 +1200,8 @@ PHP_MINIT_FUNCTION(event) - 	/* Constructor initialization flags */ - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, DISABLE_WHEN_INACTIVE, EVDNS_BASE_DISABLE_WHEN_INACTIVE); - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, INITIALIZE_NAMESERVERS, EVDNS_BASE_INITIALIZE_NAMESERVERS); -+#endif -+#if LIBEVENT_VERSION_NUMBER >= 0x02010a00 - 	PHP_EVENT_REG_CLASS_CONST_LONG(php_event_dns_base_ce, NAMESERVERS_NO_DEFAULT, EVDNS_BASE_NAMESERVERS_NO_DEFAULT); - #endif -  -diff --git a/tests/36-dns-base-construct-init-flags.phpt b/tests/36-dns-base-construct-init-flags.phpt -index c0e8e7d..07cf7fc 100644 ---- a/tests/36-dns-base-construct-init-flags.phpt -+++ b/tests/36-dns-base-construct-init-flags.phpt -@@ -7,7 +7,7 @@ if (!class_exists(EVENT_NS . "\\EventDnsBase")) { - } -  - $eventUtilClass = EVENT_NS . '\\EventUtil'; --if ($eventUtilClass::LIBEVENT_VERSION_NUMBER < 0x02010000) { -+if ($eventUtilClass::LIBEVENT_VERSION_NUMBER < 0x02010a00) { -     die('skip this test is for libevent version >= 2.1'); - } - ?> ---  -2.41.0 - diff --git a/php-pecl-event.spec b/php-pecl-event.spec index aaa7165..603ba11 100644 --- a/php-pecl-event.spec +++ b/php-pecl-event.spec @@ -33,7 +33,7 @@  # After 20-sockets.so  %global ini_name  40-%{pecl_name}.ini  %endif -%global upstream_version 3.1.0 +%global upstream_version 3.1.1  #global upstream_prever  RC1  #global upstream_postver r1  %global sources          %{pecl_name}-%{upstream_version}%{?upstream_prever} @@ -47,9 +47,6 @@ 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 -# For libevent < 2.1.10 -Patch0:        %{pecl_name}-build.patch -  BuildRequires: make  BuildRequires: %{?dtsprefix}gcc  BuildRequires: %{?scl_prefix}php-devel @@ -96,8 +93,6 @@ sed -e 's/role="test"/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 @@ -255,6 +250,10 @@ fi  %changelog +* Sat Dec 30 2023 Remi Collet <remi@remirepo.net> - 3.1.1-1 +- update to 3.1.1 +- drop patch merged upstream +  * Thu Dec 28 2023 Remi Collet <remi@remirepo.net> - 3.1.0-1  - update to 3.1.0  | 
