]> git.pld-linux.org Git - packages/php-pecl-mongodb.git/commitdiff
Handle static ext-json on php 8
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 27 Dec 2021 20:07:07 +0000 (22:07 +0200)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 27 Dec 2021 20:07:07 +0000 (22:07 +0200)
php-pecl-mongodb.spec

index e00039fde284f148918f86671b908946f8b03273..f20b21643452f27142f7acbd2b52cd582efd506c 100644 (file)
@@ -105,16 +105,18 @@ phpize
 %{__make}
 
 # simple module load test, always enabled
 %{__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
        -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 \
        -d extension=%{php_extensiondir}/json.so \
+%endif
        -d extension=%{modname}.so \
        -m > modules.log
        -d extension=%{modname}.so \
        -m > modules.log
-grep %{modname} modules.log
+grep "^%{modname}$" modules.log
 
 %if %{with tests}
 cat <<'EOF' > run-tests.sh
 
 %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} \
 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"
 %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
 %endif
+       " \
        RUN_TESTS_SETTINGS="-q $*"
 EOF
 chmod +x run-tests.sh
        RUN_TESTS_SETTINGS="-q $*"
 EOF
 chmod +x run-tests.sh
This page took 0.066044 seconds and 4 git commands to generate.