summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--53.patch24
-rw-r--r--php-pecl-handlebars.spec10
2 files changed, 33 insertions, 1 deletions
diff --git a/53.patch b/53.patch
new file mode 100644
index 0000000..576a39d
--- /dev/null
+++ b/53.patch
@@ -0,0 +1,24 @@
+From b7e8e93b8fe5dab20757e23e5c33577e6a545304 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 26 Jun 2018 09:35:53 +0200
+Subject: [PATCH] switch to zend_register_class_alias, fix for PHP 7.3
+
+---
+ registry.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/registry.c b/registry.c
+index 1749989..77da738 100644
+--- a/registry.c
++++ b/registry.c
+@@ -31,8 +31,8 @@ PHP_MINIT_FUNCTION(handlebars_registry)
+ zend_class_implements(HandlebarsDefaultRegistry_ce_ptr TSRMLS_CC, 1, HandlebarsRegistry_ce_ptr);
+
+ // Add aliases for old class names
+- zend_register_class_alias_ex(ZEND_STRL("Handlebars\\Registry\\Registry"), HandlebarsRegistry_ce_ptr TSRMLS_CC);
+- zend_register_class_alias_ex(ZEND_STRL("Handlebars\\Registry\\DefaultRegistry"), HandlebarsDefaultRegistry_ce_ptr TSRMLS_CC);
++ zend_register_class_alias("Handlebars\\Registry\\Registry", HandlebarsRegistry_ce_ptr TSRMLS_CC);
++ zend_register_class_alias("Handlebars\\Registry\\DefaultRegistry", HandlebarsDefaultRegistry_ce_ptr TSRMLS_CC);
+
+ return SUCCESS;
+ }
diff --git a/php-pecl-handlebars.spec b/php-pecl-handlebars.spec
index 721d84c..db2673a 100644
--- a/php-pecl-handlebars.spec
+++ b/php-pecl-handlebars.spec
@@ -27,11 +27,14 @@
Summary: Handlebars templating language
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-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}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/jbboehr/php-handlebars/pull/53.patch
+
+BuildRequires: %{?dtsprefix}gcc
# package.xml state 5.6, but upstream is ok with ignoring it
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -109,6 +112,7 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
cd NTS
+%patch0 -p1 -b .pr53
# Sanity check, really often broken
extver=$(sed -n '/PHP_HANDLEBARS_VERSION/{s/.* "//;s/".*$//;p}' php_handlebars.h)
@@ -272,6 +276,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Jun 26 2018 Remi Collet <remi@remirepo.net> - 0.8.2-2
+- add patch for PHP 7.3 from
+ https://github.com/jbboehr/php-handlebars/pull/53
+
* Tue Mar 6 2018 Remi Collet <remi@remirepo.net> - 0.8.2-1
- update to 0.8.2 (stable)
- add optional dependency on psr extension