ImageMagick is not part of RHEL 8+, add back conditionals
The ImageMagick and RHEL related conditionals were dropped in commit
d0508a7
, but they have to stay, because only RHEL 7 had ImageMagick and
not any newer versions of RHEL. Currently it's only autotrace that is
pulling ImageMagick into ELN/RHEL 10.
Also update the github-#70 test so it's expected to fail when compiled
without ImageMagick support (due to lack of XPM support).
This commit is contained in:
parent
4196743633
commit
ddac0e5a7c
31
autotrace-0.31.9-expected-test-failure-no-imagemagick.patch
Normal file
31
autotrace-0.31.9-expected-test-failure-no-imagemagick.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff -up autotrace-0.31.9/tests/github-#70/run.expected-failure-no-imagemagick autotrace-0.31.9/tests/github-#70/run
|
||||
--- autotrace-0.31.9/tests/github-#70/run.expected-failure-no-imagemagick 2023-01-24 14:53:57.278820241 +0100
|
||||
+++ autotrace-0.31.9/tests/github-#70/run 2023-01-24 14:54:05.026741994 +0100
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
DIR=$1
|
||||
|
||||
+# Check whether ImageMagick support is enabled and hence we support XPM
|
||||
+autotrace -list-input-formats 2>&1 | grep xpm
|
||||
+RESULT=$?
|
||||
+
|
||||
+if [ $RESULT -ne 0 ] ; then
|
||||
+ XPM=0
|
||||
+else
|
||||
+ XPM=1
|
||||
+fi
|
||||
+
|
||||
autotrace -report-progress -centerline -input-format XPM $DIR/lego_5.xpm -output-format svg -output-file $DIR/lego_5.svg
|
||||
RESULT=$?
|
||||
|
||||
@@ -11,5 +21,9 @@ if [ $RESULT -eq 0 ] && [ -s $DIR/lego_5
|
||||
rm -f $DIR/lego_5.svg
|
||||
ok
|
||||
else
|
||||
- fail
|
||||
+ if [ $XPM -eq 0 ] ; then
|
||||
+ expected_fail
|
||||
+ else
|
||||
+ fail
|
||||
+ fi
|
||||
fi
|
@ -7,7 +7,11 @@ URL: http://autotrace.sourceforge.net/
|
||||
Source0: https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
# https://github.com/autotrace/autotrace/pull/105
|
||||
Patch0: autotrace-0.31.9-pr105-ImageMagick7.patch
|
||||
Patch1: autotrace-0.31.9-expected-test-failure-no-imagemagick.patch
|
||||
# No ImageMagick in RHEL 8 and future releases
|
||||
%if !(0%{?rhel} >= 8)
|
||||
BuildRequires: ImageMagick-devel
|
||||
%endif
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc
|
||||
@ -36,7 +40,9 @@ Postscript, SVG, xfig, SWF, and others.
|
||||
Summary: Header files for autotrace
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
%if !(0%{?rhel} >= 8)
|
||||
Requires: ImageMagick-devel
|
||||
%endif
|
||||
Requires: pstoedit-devel
|
||||
|
||||
|
||||
@ -50,7 +56,11 @@ This package contains header files and development libraries for autotrace.
|
||||
|
||||
%build
|
||||
autoreconf -ivf
|
||||
%if ! ( 0%{?rhel} >= 8 )
|
||||
%configure --without-magick --disable-static
|
||||
%else
|
||||
%configure --enable-magick-readers --disable-static
|
||||
%endif
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user