[packages/php-pecl-mongodb] Handle static ext-json on php 8

glen glen at pld-linux.org
Mon Dec 27 21:11:23 CET 2021


commit 7d8f11586b5416ce2c915c183311e79e4bafe649
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Dec 27 22:07:07 2021 +0200

    Handle static ext-json on php 8

 php-pecl-mongodb.spec | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec
index e00039f..f20b216 100644
--- a/php-pecl-mongodb.spec
+++ b/php-pecl-mongodb.spec
@@ -105,16 +105,18 @@ phpize
 %{__make}
 
 # simple module load test, always enabled
-%{__php} -n -q \
+%{__php} -n -q -d display_errors=off \
 	-d extension_dir=modules \
 %if "%php_major_version.%php_minor_version" < "7.4"
 	-d extension=%{php_extensiondir}/pcre.so \
 	-d extension=%{php_extensiondir}/spl.so \
 %endif
+%if "%php_major_version.%php_minor_version" < "8.0"
 	-d extension=%{php_extensiondir}/json.so \
+%endif
 	-d extension=%{modname}.so \
 	-m > modules.log
-grep %{modname} modules.log
+grep "^%{modname}$" modules.log
 
 %if %{with tests}
 cat <<'EOF' > run-tests.sh
@@ -122,11 +124,14 @@ cat <<'EOF' > run-tests.sh
 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
 exec %{__make} test \
 	PHP_EXECUTABLE=%{__php} \
+	PHP_TEST_SHARED_SYSTEM_EXTENSIONS="\
 %if "%php_major_version.%php_minor_version" < "7.4"
-	PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl json" \
-%else
-	PHP_TEST_SHARED_SYSTEM_EXTENSIONS="json" \
+	pcre spl \
+%endif
+%if "%php_major_version.%php_minor_version" < "8.0"
+	json \
 %endif
+	" \
 	RUN_TESTS_SETTINGS="-q $*"
 EOF
 chmod +x run-tests.sh
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-mongodb.git/commitdiff/211057f9c7e752339f35768dd65c82741798e62b



More information about the pld-cvs-commit mailing list