summaryrefslogtreecommitdiffstats
path: root/php-pecl-solr2.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-solr2.spec')
-rw-r--r--php-pecl-solr2.spec20
1 files changed, 18 insertions, 2 deletions
diff --git a/php-pecl-solr2.spec b/php-pecl-solr2.spec
index 50dc99d..649aabc 100644
--- a/php-pecl-solr2.spec
+++ b/php-pecl-solr2.spec
@@ -30,13 +30,17 @@ Summary: Object oriented API to Apache Solr
Summary(fr): API orientée objet pour Apache Solr
Name: %{?sub_prefix}php-pecl-solr2
Version: 2.5.1
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/solr
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+# compat with 8.1 from upstream
+# compat with older from https://github.com/php/pecl-search_engine-solr/pull/32
+Patch0: %{pecl_name}-build.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -108,6 +112,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1 -b .up
: Check version
DIR=src/php7
@@ -199,7 +204,13 @@ sed -e '/SOLR_SERVER_CONFIGURED/s/true/false/' \
-i ?TS/tests/test.config.inc
%endif
-OPT="-n -d error_reporting=24575"
+
+OPT="-n"
+# temporarily disable deprecated
+%if "%{php_version}" > "8.1"
+OPT="$OPT -d error_reporting=24575"
+%endif
+
[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl.so"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -245,6 +256,11 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
%changelog
+* Thu Mar 17 2022 Remi Collet <remi@remirepo.net> - 2.5.1-4
+- add upstream to fix deprecation on return type
+- fix compatiblity with older PHP verison from
+ https://github.com/php/pecl-search_engine-solr/pull/32
+
* Thu Mar 17 2022 Remi Collet <remi@remirepo.net> - 2.5.1-3
- build for PHP 8.1 ignoring deprecation