summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-22 16:34:44 +0200
committerRemi Collet <remi@remirepo.net>2017-08-22 16:34:44 +0200
commit4a7c20eb8a5734c6c409fc4a0d15a27eee8e8275 (patch)
tree5965403b27b7681b887bcf713f1a8c72c1a1719f
parent9153f92e2e0a7ec3b298aefebcc1701aa579736d (diff)
honour default RPM build options
-rw-r--r--grpc-build.patch14
-rw-r--r--php-pecl-grpc.spec8
2 files changed, 21 insertions, 1 deletions
diff --git a/grpc-build.patch b/grpc-build.patch
new file mode 100644
index 0000000..9c935c5
--- /dev/null
+++ b/grpc-build.patch
@@ -0,0 +1,14 @@
+diff -up ./config.m4.rpm ./config.m4
+--- ./config.m4.rpm 2017-08-22 16:28:30.000000000 +0200
++++ ./config.m4 2017-08-22 16:28:56.000000000 +0200
+@@ -11,8 +11,8 @@ if test "$PHP_GRPC" != "no"; then
+
+ LIBS="-lpthread $LIBS"
+
+- CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11"
+- CXXFLAGS="-std=c++11"
++ CFLAGS="$CFLAGS -Wno-parentheses-equality -Wno-unused-value -std=c11"
++ CXXFLAGS="$CXXFLAGS -std=c++11"
+ GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
+ PHP_REQUIRE_CXX()
+ PHP_ADD_LIBRARY(pthread)
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index dde8322..89d6caf 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -27,12 +27,14 @@
Summary: General RPC framework
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: MIT
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: %{pecl_name}-build.patch
+
BuildRequires: %{?scl_prefix}php-devel > 5.5
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: zlib-devel
@@ -99,6 +101,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .rpm
# Sanity check, really often broken
extver=$(sed -n '/PHP_GRPC_VERSION/{s/.* "//;s/".*$//;p}' src/php/ext/grpc/version.h)
@@ -218,6 +221,9 @@ cd ../ZTS
%changelog
+* Tue Aug 22 2017 Remi Collet <remi@remirepo.net> - 1.4.6-2
+- honour default RPM build options
+
* Thu Aug 17 2017 Remi Collet <remi@remirepo.net> - 1.4.6-1
- Update to 1.4.6 (stable)