summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-06-25 08:18:06 +0200
committerRemi Collet <remi@remirepo.net>2017-06-25 08:18:06 +0200
commitc6104e71fbc6dbde60cc4593dba4ee3ea03d73cf (patch)
treeff4938f958cccab6ffb25f957ecc9c58ad9329a9
parentfb06df7edd56ce4c88462063cd7b51f9dd2e9df9 (diff)
add patch for 7.2
-rw-r--r--31.patch25
-rw-r--r--php-pecl-yaconf.spec18
2 files changed, 42 insertions, 1 deletions
diff --git a/31.patch b/31.patch
new file mode 100644
index 0000000..b9e4f72
--- /dev/null
+++ b/31.patch
@@ -0,0 +1,25 @@
+From f08ca66aa96c75658ba1eb1e8918189f925553c1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sun, 25 Jun 2017 07:28:55 +0200
+Subject: [PATCH] IS_TYPE_IMMUTABLE is dropped in 7.2
+
+---
+ yaconf.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/yaconf.c b/yaconf.c
+index 8faa0b6..55b6731 100644
+--- a/yaconf.c
++++ b/yaconf.c
+@@ -92,7 +92,11 @@ static void php_yaconf_hash_init(zval *zv, size_t size) /* {{{ */ {
+ GC_FLAGS(ht) |= IS_ARRAY_IMMUTABLE;
+ GC_REFCOUNT(ht) = 2;
+ ZVAL_ARR(zv, ht);
++#if PHP_VERSION_ID < 70200
+ Z_TYPE_FLAGS_P(zv) = IS_TYPE_IMMUTABLE;
++#else
++ Z_TYPE_FLAGS_P(zv) = IS_TYPE_COPYABLE;
++#endif
+ }
+ /* }}} */
+
diff --git a/php-pecl-yaconf.spec b/php-pecl-yaconf.spec
index be4a9d8..a1a9cda 100644
--- a/php-pecl-yaconf.spec
+++ b/php-pecl-yaconf.spec
@@ -24,13 +24,15 @@ Version: 1.0.5
Release: 0.8.%{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}/%{gh_project}-%{version}-%{gh_short}.tar.gz
%else
-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;')}}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
License: PHP
Group: Development/Languages
URL: https://github.com/%{gh_owner}/%{gh_project}
+Patch0: 31.patch
+
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -45,6 +47,10 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
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
%endif
# Package have be renamed
@@ -93,6 +99,8 @@ mv %{pecl_name}-%{version} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .pr31
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YACONF_VERSION/{s/.* "//;s/".*$//;p}' php_yaconf.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
@@ -118,6 +126,8 @@ EOF
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure \
@@ -136,6 +146,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
# Install the NTS stuff
make -C NTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -233,6 +245,10 @@ fi
%changelog
+* Sun Jun 25 2017 Remi Collet <remi@remirepo.net> - 1.0.5-2
+- add patch for PHP 7.2 from
+ https://github.com/laruence/yaconf/pull/31
+
* Thu Apr 27 2017 Remi Collet <remi@remirepo.net> - 1.0.5-1
- Update to 1.0.5