summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--5ba2256141c7f724920bde9eddfd4f666c309d61.patch24
-rw-r--r--php-pecl-druid.spec20
3 files changed, 43 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/5ba2256141c7f724920bde9eddfd4f666c309d61.patch b/5ba2256141c7f724920bde9eddfd4f666c309d61.patch
new file mode 100644
index 0000000..00ce016
--- /dev/null
+++ b/5ba2256141c7f724920bde9eddfd4f666c309d61.patch
@@ -0,0 +1,24 @@
+From 5ba2256141c7f724920bde9eddfd4f666c309d61 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sat, 24 Jun 2017 07:44:35 +0200
+Subject: [PATCH] Fix for PHP 7.2
+
+ZEND_ACC_CLONE have been removed in 7.2
+but was not used in previous version (7.0, 7.1)
+---
+ druid.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/druid.c b/druid.c
+index 1faf4c9..1c415f9 100644
+--- a/druid.c
++++ b/druid.c
+@@ -137,7 +137,7 @@ ZEND_END_ARG_INFO()
+ const zend_function_entry druid_methods[] =
+ {
+ PHP_ME(DRUID_NAME, __construct, druid_void_arginfo, ZEND_ACC_CTOR|ZEND_ACC_PRIVATE)
+- PHP_ME(DRUID_NAME, __clone, NULL, ZEND_ACC_CLONE|ZEND_ACC_PRIVATE)
++ PHP_ME(DRUID_NAME, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(DRUID_NAME, __sleep, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(DRUID_NAME, __wakeup, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(DRUID_NAME, __destruct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_DTOR)
diff --git a/php-pecl-druid.spec b/php-pecl-druid.spec
index b162f89..ee44cc9 100644
--- a/php-pecl-druid.spec
+++ b/php-pecl-druid.spec
@@ -25,13 +25,14 @@
Summary: A Druid driver for PHP
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 0.9.2
-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: ASL 2.0
Group: Development/Languages
URL: http://pecl.php.net/package/%{proj_name}
Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: 5ba2256141c7f724920bde9eddfd4f666c309d61.patch
+
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
@@ -75,6 +76,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
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -102,6 +107,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{proj_name}-%{version} NTS
cd NTS
+%patch0 -p1 -b .pr8
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DRUID_VERSION/{s/.* "//;s/".*$//;p}' php_druid.h)
@@ -158,7 +164,6 @@ make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
%{?dtsenable}
make -C NTS install INSTALL_ROOT=%{buildroot}
@@ -219,12 +224,7 @@ cd ../ZTS
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -239,6 +239,10 @@ rm -rf %{buildroot}
%changelog
+* Sat Jun 24 2017 Remi Collet <remi@fedoraproject.org> - 0.9.2-2
+- add patch for PHP 7.2 from
+ https://github.com/Neeke/PHP-Druid/pull/8
+
* Mon Jan 09 2017 Remi Collet <remi@fedoraproject.org> - 0.9.2-1
- Update to 0.9.2