diff options
author | Remi Collet <remi@remirepo.net> | 2025-03-15 08:22:19 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-03-15 08:22:19 +0100 |
commit | 0534308e983a4984e37979de28e9c95ecd253788 (patch) | |
tree | 5f051b5a0fcc34408b6874e322140dd828ebf045 | |
parent | d14bb9b8e36b547098a7da672215a14d52588c3b (diff) |
test build for https://github.com/ImageMagick/ImageMagick/pull/8034
-rw-r--r-- | ImageMagick7.spec | 15 | ||||
-rw-r--r-- | gs-check.patch | 36 |
2 files changed, 46 insertions, 5 deletions
diff --git a/ImageMagick7.spec b/ImageMagick7.spec index dcf3840..113d8ff 100644 --- a/ImageMagick7.spec +++ b/ImageMagick7.spec @@ -52,7 +52,7 @@ Name: %{libname}7 %endif Epoch: 1 Version: %{VER}.%{Patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} Summary: An X application for displaying and manipulating images License: ImageMagick Url: https://imagemagick.org/ @@ -63,6 +63,8 @@ Source0: https://imagemagick.org/archive/releases/%{libname}-%{VER}-%{Pat Source1: https://imagemagick.org/archive/releases/%{libname}-%{VER}-%{Patchlevel}.tar.xz.asc Source2: ImageMagick.keyring +Patch0: gs-check.patch + BuildRequires: gnupg2 BuildRequires: autoconf automake make BuildRequires: gcc @@ -79,6 +81,8 @@ BuildRequires: perl-devel BuildRequires: perl-generators %if %{with_gslib} BuildRequires: libgs-devel +# for check in configure +BuildRequires: ghostscript %endif BuildRequires: libwmf-devel BuildRequires: pkgconfig(jasper) @@ -348,14 +352,12 @@ however. %{?gpgverify: %{gpgverify} --keyring=%{SOURCE2} --signature=%{SOURCE1} --data=%{SOURCE0}} %setup -q -n %{libname}-%{VER}-%{Patchlevel} +%patch -P0 -p1 -b .pr8034 + # for %%doc mkdir Magick++/examples cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples -%if 0%{?rhel} == 8 || 0%{?rhel} == 9 -sed -e '/GSAlphaDevice/s/png16malpha/pngalpha/' -i configure.ac configure -%endif - %build export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE" @@ -601,6 +603,9 @@ fi %changelog +* Sat Mar 15 2025 Remi Collet <remi@remirepo.net> - 7.1.1.45-2 +- test build for https://github.com/ImageMagick/ImageMagick/pull/8034 + * Mon Mar 10 2025 Remi Collet <remi@remirepo.net> - 7.1.1.45-1 - update to version 7.1.1 patch level 45 - add workaround for old libgs diff --git a/gs-check.patch b/gs-check.patch new file mode 100644 index 0000000..8c3c952 --- /dev/null +++ b/gs-check.patch @@ -0,0 +1,36 @@ +From b98315e78285d04c7e6332319782042a9d3f1c53 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Sat, 15 Mar 2025 07:32:11 +0100 +Subject: [PATCH] try pngalpha if png16malpha not available + +--- + configure | 6 ++++-- + configure.ac | 2 ++ + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 226fac1eca4..5ade160a93a 100755 +--- a/configure ++++ b/configure +@@ -38796,6 +38796,8 @@ printf "%s\n" "$GSColorDevice" >&6; } + printf %s "checking for gs alpha device... " >&6; } + if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&5 2>&5; then + : ++ elif $PSDelegate -q -dBATCH -sDEVICE=pngalpha -sOutputFile=/dev/null < /dev/null 1>&5 2>&5; then ++ GSAlphaDevice=pngalpha + else + GSAlphaDevice=$GSColorDevice + fi +diff --git a/configure.ac b/configure.ac +index a748b11d150..d672943e1eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3864,6 +3864,8 @@ if test $have_gs = 'yes'; then + AC_MSG_CHECKING([for gs alpha device]) + if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + : ++ elif $PSDelegate -q -dBATCH -sDEVICE=pngalpha -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then ++ GSAlphaDevice=pngalpha + else + GSAlphaDevice=$GSColorDevice + fi |