]> git.pld-linux.org Git - packages/php-pecl-solr.git/blobdiff - php-pecl-solr.spec
patch to build under php 7.2
[packages/php-pecl-solr.git] / php-pecl-solr.spec
index 0b988c6d432a6f60f4b5fb36a239e443cec69adb..e320a09f73ef7ee87d85ec28ec60b8ecb1b8b559 100644 (file)
@@ -9,27 +9,31 @@ Summary:      Object oriented API to Apache Solr
 Summary(fr.UTF-8):     API orientée objet pour Apache Solr
 Name:          %{php_name}-pecl-solr
 Version:       2.4.0
-Release:       1
+Release:       3
 License:       PHP v3.01
 Group:         Development/Languages
 Source0:       https://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: 2c9accf66681a3daaaf371bc07e44902
 Patch0:                tests-online.patch
+Patch2:                https://github.com/php/pecl-search_engine-solr/commit/744e32915d5989101267ed2c84a407c582dc6f31.patch
+# Patch2-md5:  3536677810c1123e4be00a9da56cff5a
 URL:           https://pecl.php.net/package/solr
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-curl
 BuildRequires: %{php_name}-devel >= 4:5.3.0
+BuildRequires: %{php_name}-json
 BuildRequires: curl-devel
 BuildRequires: libxml2-devel >= 1:2.6.16
 BuildRequires: php-packagexml2cl
 BuildRequires: rpmbuild(macros) >= 1.666
 %if %{with tests}
-BuildRequires: %{php_name}-cli
-BuildRequires: %{php_name}-curl
-BuildRequires: %{php_name}-json
+BuildRequires: %{php_name}-pcre
 BuildRequires: %{php_name}-xml
 %endif
 %{?requires_php_extension}
 Requires:      %{php_name}-cli
 Requires:      %{php_name}-json
+Requires:      %{php_name}-pcre
 Requires:      %{php_name}-xml
 Provides:      php(solr) = %{version}
 Obsoletes:     php-pecl-solr < 1.0.2-6
@@ -80,6 +84,17 @@ possible de se connecter à des serveurs via SSL.
 %setup -qc
 mv %{modname}-%{version}/* .
 %{!?with_network_tests:%patch0 -p1}
+%patch2 -p1
+
+cat <<'EOF' > run-tests.sh
+#!/bin/sh
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+exec %{__make} test \
+       PHP_EXECUTABLE=%{__php} \
+       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json pcre" \
+       RUN_TESTS_SETTINGS="-q $*"
+EOF
+chmod +x run-tests.sh
 
 %build
 packagexml2cl package.xml > ChangeLog
@@ -95,7 +110,6 @@ phpize
 %configure
 %{__make}
 
-%if %{with tests}
 %{__php} -n -q \
        -d extension_dir=modules \
        -d extension=%{php_extensiondir}/curl.so \
@@ -104,10 +118,8 @@ phpize
        -m > modules.log
 grep %{modname} modules.log
 
-export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
-%{__make} test \
-       PHP_EXECUTABLE=%{__php} \
-       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json" \
+%if %{with tests}
+./run-tests.sh --show-diff
 %endif
 
 %install
This page took 0.06884 seconds and 4 git commands to generate.