summaryrefslogtreecommitdiffstats
path: root/php-pecl-grpc.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-grpc.spec')
-rw-r--r--php-pecl-grpc.spec26
1 files changed, 23 insertions, 3 deletions
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index e43a4e7..66256eb 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -7,11 +7,18 @@
# Please, preserve the changelog entries
#
-%{?scl:%scl_package php-pecl-grpc}
+%if 0%{?scl:1}
+%scl_package php-pecl-grpc
+%else
+%global _root_prefix %{_prefix}
+%endif
## TODO: not suitable for Fedora, tons of bundled libraries
## use mock with --cleanup-after
+## TODO: cleanup --with-openssl-dir, needed for PHP < 7.4
+%bcond_without openssl
+
%global pecl_name grpc
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
@@ -25,7 +32,7 @@
Summary: General RPC framework
Name: %{?scl_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: Apache-2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
@@ -33,6 +40,7 @@ Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-build.patch
Patch1: %{pecl_name}-noatfork.patch
Patch2: %{pecl_name}-workaround.patch
+Patch3: %{pecl_name}-openssl.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc >= 7.0
@@ -40,6 +48,9 @@ BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: zlib-devel
+%if %{with openssl}
+BuildRequires: openssl-devel
+%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -74,9 +85,13 @@ cd %{sources}
%patch -P1 -p1 -b .noatfork
%endif
%patch -P2 -p1 -b .nolog
+%if %{with openssl}
+%patch -P3 -p1 -b .openssl
+sed -e '/boringssl-with-bazel/d' -i config.m4
+rm -r third_party/boringssl-with-bazel
+%endif
#sed -e '/PHP_GRPC_VERSION/s/RC3/RC2/' -i src/php/ext/grpc/version.h
-
# Sanity check, really often broken
extver=$(sed -n '/PHP_GRPC_VERSION/{s/.* "//;s/".*$//;p}' src/php/ext/grpc/version.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -112,6 +127,7 @@ cd %{sources}
cd ../NTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
@@ -121,6 +137,7 @@ make %{?_smp_mflags}
cd ../ZTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
@@ -181,6 +198,9 @@ cd ../ZTS
%changelog
+* Tue Aug 13 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC3-2
+- use system openssl
+
* Tue Aug 13 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC3-1
- update to 1.66.0RC3