diff options
author | Remi Collet <remi@remirepo.net> | 2024-01-30 11:01:53 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-01-30 11:01:53 +0100 |
commit | 8d71fc18dc2920951dbce6c9109db24f9f0e60e1 (patch) | |
tree | 8a22822619b1e227782dcb30dcd30f7f85397e31 | |
parent | 0ecddffc7d6799705a3ebe59f838032b023cf905 (diff) |
https://github.com/vitoc/gmagick/pull/59
run tests in parallel
-rw-r--r-- | gmagick-build.patch | 36 | ||||
-rw-r--r-- | php-pecl-gmagick.spec | 21 |
2 files changed, 53 insertions, 4 deletions
diff --git a/gmagick-build.patch b/gmagick-build.patch new file mode 100644 index 0000000..3362331 --- /dev/null +++ b/gmagick-build.patch @@ -0,0 +1,36 @@ +From 135e00737095b01b0becfb8ef7410654ef1937fe Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 30 Jan 2024 10:30:19 +0100 +Subject: [PATCH] Fix incompatible pointer types + +--- + gmagick_methods.c | 2 +- + gmagickdraw_methods.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gmagick_methods.c b/gmagick_methods.c +index 2f60add..270d5fa 100644 +--- a/gmagick_methods.c ++++ b/gmagick_methods.c +@@ -4975,7 +4975,7 @@ PHP_METHOD(Gmagick, getimagechannelextrema) + { + php_gmagick_object *intern; + long channel_type; +- size_t minima, maxima; ++ unsigned long minima, maxima; + unsigned int status; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &channel_type) == FAILURE) { +diff --git a/gmagickdraw_methods.c b/gmagickdraw_methods.c +index b6f4f4f..eb18913 100644 +--- a/gmagickdraw_methods.c ++++ b/gmagickdraw_methods.c +@@ -1409,7 +1409,7 @@ static zend_bool php_gmagick_check_font(char *font, int font_len TSRMLS_DC) + zend_bool retval = 0; + char **fonts; + unsigned long i = 0; +- size_t num_fonts = 0; ++ unsigned long num_fonts = 0; + + /* Check that user is only able to set a proper font */ + fonts = MagickQueryFonts("*", &num_fonts); diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec index e72bdfb..b31d578 100644 --- a/php-pecl-gmagick.spec +++ b/php-pecl-gmagick.spec @@ -1,6 +1,6 @@ # spec file for php-pecl-gmagick # -# Copyright (c) 2010-2023 Remi Collet +# Copyright (c) 2010-2024 Remi Collet # Copyright (c) 2009-2010 Pavel Alexeev # License: MIT # http://opensource.org/licenses/MIT @@ -26,12 +26,13 @@ Summary: Provides a wrapper to the GraphicsMagick library Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 12%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{sources}.tgz Patch0: %{pecl_name}-php81.patch +Patch1: %{pecl_name}-build.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -68,6 +69,7 @@ sed -e 's/role="test"/role="src"/' \ cd %{sources} %patch -P0 -p1 +%patch -P1 -p1 extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -154,6 +156,7 @@ export OMP_NUM_THREADS=1 rm tests/gmagick-056-set_getsamplingfactors.phpt rm tests/gmagickdraw_036_pushPattern_basic.phpt +rm tests/gmagick-121_deconstructGif_basic.phpt : simple module load test for NTS extension %{__php} --no-php-ini \ @@ -161,11 +164,16 @@ rm tests/gmagickdraw_036_pushPattern_basic.phpt --modules | grep '^%{pecl_name}$' %if %{with tests} +OPTS="-q --show-diff" +%if "%{php_version}" >= "8" +OPTS="$OPTS %{?_smp_mflags}" +%endif + : upstream test suite for NTS extension export TEST_PHP_EXECUTABLE=%{__php} export REPORT_EXIT_STATUS=1 export TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" -%{__php} -n run-tests.php -q --show-diff +%{__php} -n run-tests.php $OPTS %endif %if %{with_zts} @@ -178,7 +186,7 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" : upstream test suite for ZTS extension export TEST_PHP_EXECUTABLE=%{__ztsphp} export TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" -%{__ztsphp} -n run-tests.php -q --show-diff +%{__ztsphp} -n run-tests.php $OPTS %endif %endif @@ -198,6 +206,11 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" %changelog +* Tue Jan 30 2024 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-12 +- fix incompatible pointer types using patch from + https://github.com/vitoc/gmagick/pull/59 +- run tests in parallel + * Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 2.0.6~RC1-4 - build out of sources tree - ignore 1 test failing with recent GM |