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.spec114
1 files changed, 72 insertions, 42 deletions
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index c0ac9e4..7af2422 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -7,43 +7,53 @@
# 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
-%global upstream_version 1.64.0
-%global upstream_prever RC2
+%global upstream_version 1.67.0
+#global upstream_prever RC5
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
+# Disable LTO (erratic crash during build)
+%define _lto_cflags %{nil}
Summary: General RPC framework
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?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
Patch0: %{pecl_name}-build.patch
Patch1: %{pecl_name}-noatfork.patch
-Patch2: %{pecl_name}-gcc14.patch
+Patch2: %{pecl_name}-workaround.patch
+Patch3: %{pecl_name}-openssl.patch
-%if 0%{?rhel} == 7 && 0%{?dtsversion} < 7
-BuildRequires: devtoolset-7-toolchain
-%global dtsversion 7
-%global dtsenable source /opt/rh/devtoolset-7/enable
-%global dtsprefix devtoolset-7-
-%endif
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc >= 7.0
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
+%if 0%{?fedora} >= 41
+BuildRequires: openssl-devel-engine
+%endif
+%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -69,7 +79,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
@@ -77,12 +87,14 @@ cd %{sources}
%ifarch %{arm}
%patch -P1 -p1 -b .noatfork
%endif
-pushd third_party/boringssl-with-bazel/src
-%patch -P2 -p1 -b .gcc14
-popd
+%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
@@ -106,7 +118,6 @@ extension=%{pecl_name}.so
;grpc.poll_strategy = ''
;grpc.grpc_verbosity = ''
;grpc.grpc_trace = ''
-;grpc.log_filename = ''
EOF
@@ -115,30 +126,34 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -147,7 +162,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -158,26 +173,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
: Minimal load test for NTS extension
cd NTS
@@ -195,7 +190,6 @@ cd ../ZTS
%files
-%{!?_licensedir:%global license %%doc}
%license %{sources}/LICENSE
%{pecl_xmldir}/%{name}.xml
@@ -209,6 +203,42 @@ cd ../ZTS
%changelog
+* Thu Oct 17 2024 Remi Collet <remi@remirepo.net> - 1.67.0-1
+- update to 1.67.0
+
+* Mon Aug 26 2024 Remi Collet <remi@remirepo.net> - 1.66.0-1
+- update to 1.66.0
+
+* Mon Aug 19 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC5-1
+- update to 1.66.0RC5
+
+* 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
+
+* Mon Jul 29 2024 Remi Collet <remi@remirepo.net> - 1.65.2-1
+- update to 1.65.2
+
+* Wed Jul 17 2024 Remi Collet <remi@remirepo.net> - 1.65.1-2
+- better fix for https://github.com/grpc/grpc/issues/37178
+ from https://github.com/abseil/abseil-cpp/pull/1718
+
+* Wed Jul 17 2024 Remi Collet <remi@remirepo.net> - 1.65.1-1
+- update to 1.65.1
+- add patch to workaround to https://github.com/grpc/grpc/issues/37178
+
+* Tue Jul 9 2024 Remi Collet <remi@remirepo.net> - 1.65.0-1
+- update to 1.65.0
+
+* Mon Jul 8 2024 Remi Collet <remi@remirepo.net> - 1.65.0~RC2-1
+- update to 1.65.0RC2
+- report https://github.com/grpc/grpc/issues/37178 unwanted log output
+
+* Mon Jun 3 2024 Remi Collet <remi@remirepo.net> - 1.64.1-1
+- update to 1.64.1
+
* Thu May 30 2024 Remi Collet <remi@remirepo.net> - 1.64.0~RC2-1
- update to 1.64.0RC2