From a0517808558ffde93a510cb60d14039ca520cc67 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Jun 2015 09:14:32 +0200 Subject: php-pecl-hprose: allow build against rh-php56 (as more-php56) --- hprose-pr10.patch | 22 ++++++++++++++++++++++ php-pecl-hprose.spec | 22 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 hprose-pr10.patch diff --git a/hprose-pr10.patch b/hprose-pr10.patch new file mode 100644 index 0000000..9f9208a --- /dev/null +++ b/hprose-pr10.patch @@ -0,0 +1,22 @@ +From f275dff446a2c80dedc941e50e330d9eaf427615 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 24 Jun 2015 09:05:56 +0200 +Subject: [PATCH] use zend_ce_throwable introduce in 7.0.0alpha2, fix #9 + +--- + hprose_service.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hprose_service.c b/hprose_service.c +index b7e5924..e6a62d8 100644 +--- a/hprose_service.c ++++ b/hprose_service.c +@@ -30,7 +30,7 @@ + #if PHP_MAJOR_VERSION < 7 + #define zend_exception_ce zend_exception_get_default(TSRMLS_C) + #else +-#define zend_exception_ce zend_exception_get_base() ++#define zend_exception_ce zend_ce_throwable + #endif + + static zend_bool is_magic_method(char *name, int32_t len) { diff --git a/php-pecl-hprose.spec b/php-pecl-hprose.spec index ae8aae6..ddde849 100644 --- a/php-pecl-hprose.spec +++ b/php-pecl-hprose.spec @@ -6,6 +6,14 @@ # # Please, preserve the changelog entries # +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%endif + %{?scl: %scl_package php-pecl-hprose} %{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} %{!?__pecl: %global __pecl %{_bindir}/pecl} @@ -21,14 +29,17 @@ %endif Summary: Hprose for PHP -Name: %{?scl_prefix}php-pecl-%{pecl_name} +Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.5.4 -Release: 1%{?dist}%{!?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: MIT Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# https://github.com/hprose/hprose-pecl/pull/10 +Patch0: %{pecl_name}-pr10.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear @@ -84,7 +95,7 @@ languages. This project is the implementation of Hprose for PHP. -Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}. %prep @@ -96,6 +107,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr10 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_HPROSE_VERSION/{s/.* "//;s/".*$//;p}' php_hprose.h) if test "x${extver}" != "x%{version}"; then @@ -239,6 +252,9 @@ rm -rf %{buildroot} %changelog +* Wed Jun 24 2015 Remi Collet - 1.5.4-2 +- allow build against rh-php56 (as more-php56) + * Sun May 24 2015 Remi Collet - 1.5.4-1 - Update to 1.5.4 -- cgit