summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-yaf.spec14
-rw-r--r--yaf-php74.patch45
2 files changed, 55 insertions, 4 deletions
diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec
index 2ba46d6..b03a56f 100644
--- a/php-pecl-yaf.spec
+++ b/php-pecl-yaf.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-yaf
#
-# Copyright (c) 2012-2022 Remi Collet
+# Copyright (c) 2012-2024 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -33,7 +33,7 @@ Version: 3.3.5
Release: 0.13.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{sources}-%{gh_short}.tar.gz
%else
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz
%endif
License: PHP
@@ -42,6 +42,7 @@ Source1: %{pecl_name}.ini
Patch0: %{pecl_name}-php82.patch
Patch1: %{pecl_name}-php83.patch
+Patch2: %{pecl_name}-php74.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -81,6 +82,7 @@ sed -e 's/role="test"/role="src"/' \
cd %{sources}
%patch -P0 -p1 -b .php82
%patch -P1 -p1 -b .php83
+%patch -P2 -p1 -b .php74
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h )
@@ -150,7 +152,7 @@ OPTS="-n"
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPTS -d %{buildroot}%{php_extdir}/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
%endif
@@ -164,7 +166,7 @@ REPORT_EXIT_STATUS=1 \
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPTS -d %{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q --show-diff
%endif
@@ -206,6 +208,10 @@ fi
%changelog
+* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 3.3.5-4
+- add patch for PHP 7.4 from
+ https://github.com/laruence/yaf/pull/579
+
* Thu Sep 14 2023 Remi Collet <remi@remirepo.net> - 3.3.5-3
- add patch for PHP 8.3 from
https://github.com/laruence/yaf/pull/579
diff --git a/yaf-php74.patch b/yaf-php74.patch
new file mode 100644
index 0000000..863ed0a
--- /dev/null
+++ b/yaf-php74.patch
@@ -0,0 +1,45 @@
+From cd933d806d0016c8cadcc0c2f0996ebdc2e5d4b8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 19 Feb 2024 11:01:23 +0100
+Subject: [PATCH] Fix [-Wincompatible-pointer-types] with 7.4
+
+---
+ php_yaf.h | 4 ++++
+ yaf.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/php_yaf.h b/php_yaf.h
+index 9cd6e3a..6c1174e 100644
+--- a/php_yaf.h
++++ b/php_yaf.h
+@@ -74,7 +74,11 @@ extern zend_module_entry yaf_module_entry;
+ #else
+ #define YAF_WRITE_HANDLER zval *
+ #define YAF_WHANDLER_RET(zv) return zv
++#if PHP_VERSION_ID >= 80000
+ HashTable *yaf_fake_get_gc(zend_object *zobj, zval **table, int *n);
++#else
++HashTable *yaf_fake_get_gc(zval *zobj, zval **table, int *n);
++#endif
+ #endif
+
+ #if PHP_VERSION_ID < 80000
+diff --git a/yaf.c b/yaf.c
+index d59cdfe..e7e1b9d 100644
+--- a/yaf.c
++++ b/yaf.c
+@@ -72,7 +72,11 @@ void yaf_iterator_dtor(zend_object_iterator *iter) /* {{{ */ {
+ /* }}} */
+
+ #if PHP_VERSION_ID >= 70400
++#if PHP_VERSION_ID >= 80000
+ HashTable *yaf_fake_get_gc(zend_object *zobj, zval **table, int *n) /* {{{ */ {
++#else
++HashTable *yaf_fake_get_gc(zval *zobj, zval **table, int *n) /* {{{ */ {
++#endif
+ *n = 0;
+ *table = NULL;
+ return NULL;
+--
+2.43.2
+