summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-varnish.spec16
-rw-r--r--varnish-upstream.patch28
4 files changed, 48 insertions, 5 deletions
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..4d04619
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,7 @@
+
+varnish
+
+varnish support => enabled
+Extension version => 1.2.3
+Revision => $Id: varnish.c 344445 2018-03-04 19:35:20Z ab $
+Varnish version => Varnish 5.1.3 05c5ac6b9
diff --git a/REFLECTION b/REFLECTION
index 76e5e49..295b856 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #160 varnish version 1.2.3 ] {
+Extension [ <persistent> extension #162 varnish version 1.2.3 ] {
- Dependencies {
Dependency [ hash (Required) ]
diff --git a/php-pecl-varnish.spec b/php-pecl-varnish.spec
index a436ca7..8821500 100644
--- a/php-pecl-varnish.spec
+++ b/php-pecl-varnish.spec
@@ -13,9 +13,11 @@
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-varnish
+%else
+%global _root_sbindir %{_sbindir}
%endif
-%global with_zts 0%{?__ztsphp:1}
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name varnish
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
%if "%{php_version}" < "5.6"
@@ -27,13 +29,15 @@
Summary: Varnish Cache bindings
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.2.3
-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: BSD
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-upstream.patch
+
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 5.3
+BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-hash
BuildRequires: varnish-libs-devel > 3
@@ -101,6 +105,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p3 -b .upstream
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_VARNISH_VERSION/{s/.* "//;s/".*$//;p}' php_varnish.h)
@@ -213,7 +218,7 @@ else
PORTUSR=6081
PORTADM=6082
fi
-%{_sbindir}/varnishd \
+%{_root_sbindir}/varnishd \
-b 127.0.0.1:80 \
-P /tmp/varnish.pid \
-S /tmp/secret \
@@ -280,6 +285,9 @@ exit $ret
%changelog
+* Wed Jun 27 2018 Remi Collet <remi@remirepo.net> - 1.2.3-2
+- add upstream patch for PHP 7.3
+
* Mon Mar 5 2018 Remi Collet <remi@remirepo.net> - 1.2.3-1
- Update to 1.2.3
diff --git a/varnish-upstream.patch b/varnish-upstream.patch
new file mode 100644
index 0000000..a1fd02a
--- /dev/null
+++ b/varnish-upstream.patch
@@ -0,0 +1,28 @@
+--- pecl/varnish/trunk/exception.c 2018/06/27 11:47:15 345221
++++ pecl/varnish/trunk/exception.c 2018/06/27 13:34:24 345222
+@@ -86,6 +86,7 @@
+ zend_throw_exception_ex(
+ VarnishException_ce,
+ PHP_VARNISH_UNIMPL_EXCEPTION TSRMLS_CC,
++ "%s",
+ (NULL != msg) ? msg : "The functionality you're trying to use is not available on windows"
+ );
+ }
+--- pecl/varnish/trunk/varnish_lib.c 2018/06/27 11:47:15 345221
++++ pecl/varnish/trunk/varnish_lib.c 2018/06/27 13:34:24 345222
+@@ -373,6 +373,7 @@
+ zend_throw_exception_ex(
+ VarnishException_ce,
+ PHP_VARNISH_SHM_EXCEPTION TSRMLS_CC,
++ "%s",
+ #if HAVE_VARNISHAPILIB >= 40
+ VSM_Error(vsd)
+ #else
+@@ -394,6 +395,7 @@
+ zend_throw_exception_ex(
+ VarnishException_ce,
+ PHP_VARNISH_SHM_EXCEPTION TSRMLS_CC,
++ "%s",
+ #if HAVE_VARNISHAPILIB >= 40
+ VSM_Error(vsd)
+ #else