diff options
author | Remi Collet <remi@remirepo.net> | 2025-10-01 16:18:41 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-10-01 16:18:41 +0200 |
commit | 690343bb81739d4fa786225f694e5c57ead08b7d (patch) | |
tree | 0496a00f1e403ed6c087bab15561749a4e9f28b4 | |
parent | feda8ae4df18350130e861b43217972c8334f325 (diff) |
-rw-r--r-- | couchbase-openssl.patch | 12 | ||||
-rw-r--r-- | php-pecl-couchbase4.spec | 27 |
2 files changed, 36 insertions, 3 deletions
diff --git a/couchbase-openssl.patch b/couchbase-openssl.patch new file mode 100644 index 0000000..5c5c7a5 --- /dev/null +++ b/couchbase-openssl.patch @@ -0,0 +1,12 @@ +diff -up couchbase-4.4.0/src/CMakeLists.txt.old couchbase-4.4.0/src/CMakeLists.txt +--- couchbase-4.4.0/src/CMakeLists.txt.old 2025-10-01 15:56:00.692762273 +0200 ++++ couchbase-4.4.0/src/CMakeLists.txt 2025-10-01 15:56:08.322608586 +0200 +@@ -40,7 +40,7 @@ set(COUCHBASE_CXX_CLIENT_BUILD_SHARED + OFF + CACHE BOOL "" FORCE) + set(COUCHBASE_CXX_CLIENT_STATIC_BORINGSSL +- ON ++ OFF + CACHE BOOL "" FORCE) + set(COUCHBASE_CXX_CLIENT_INSTALL + OFF diff --git a/php-pecl-couchbase4.spec b/php-pecl-couchbase4.spec index 95717fd..377070a 100644 --- a/php-pecl-couchbase4.spec +++ b/php-pecl-couchbase4.spec @@ -10,6 +10,9 @@ # NOTICE: mock requires: --enable-network # may help: --cleanup-after +# use system OpenSSL instead of bundled BoringSSL +%bcond_without openssl + # Disable RPATH check (no more needed) #global __arch_install_post /bin/true #global __brp_check_rpaths /bin/true @@ -28,7 +31,7 @@ Summary: Couchbase Server PHP extension Name: %{?scl_prefix}php-pecl-couchbase4 Version: 4.4.0 -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;')}} # Apache-2.0 # src # src/deps/cache/json/LICENSE.ryu @@ -53,6 +56,8 @@ License: Apache-2.0 AND BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: https://pecl.php.net/package/couchbase Source0: https://pecl.php.net/get/%{sources}.tgz +Patch0: %{pecl_name}-openssl.patch + BuildRequires: git BuildRequires: make BuildRequires: cmake >= 3.19 @@ -63,6 +68,12 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-tokenizer 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} @@ -95,8 +106,10 @@ Provides: bundled(fmt) Provides: bundled(gsl) Provides: bundled(http_parser) Provides: bundled(json) -Provides: bundled(boringssl) Provides: bundled(spdlog) +%if %{without openssl} +Provides: bundled(boringssl) +%endif %description @@ -118,6 +131,12 @@ sed -e '/LICENSE/s/role="doc"/role="src"/;/COPYING/s/role="doc"/role="src"/' -i : Collect license files mkdir lic cd %{sources} +%if %{with openssl} +%patch -P0 -p1 +rm -rf src/deps/cache/boringssl +%else +cp src/deps/cache/boringssl/*/boringssl/LICENSE ../lic/boringssl_LICENSE +%endif cp src/deps/cache/hdr_histogram/*/hdr_histogram/COPYING.txt ../lic/hdr_histogram_c_COPYING.txt cp src/deps/cache/hdr_histogram/*/hdr_histogram/LICENSE.txt ../lic/hdr_histogram_c_LICENSE.txt cp src/deps/cache/snappy/*/snappy/COPYING ../lic/snappy_COPYING @@ -129,7 +148,6 @@ cp src/deps/cache/json/*/json/LICENSE.double-conversion ../lic/json_LICENSE. cp src/deps/cache/json/*/json/LICENSE.itoa ../lic/json_LICENSE.itoa cp src/deps/cache/json/*/json/LICENSE.ryu ../lic/json_LICENSE.ryu cp src/deps/cache/spdlog/*/spdlog/LICENSE ../lic/spdlog_LICENSE -cp src/deps/cache/boringssl/*/boringssl/LICENSE ../lic/boringssl_LICENSE cp src/deps/couchbase-cxx-client/LICENSE.txt ../lic/LICENSE.txt : Parallel build @@ -231,6 +249,9 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %changelog +* Wed Oct 1 2025 Remi Collet <remi@remirepo.net> - 4.4.0-2 +- build using system OpenSSL + * Wed Oct 1 2025 Remi Collet <remi@remirepo.net> - 4.4.0-1 - update to 4.4.0 |