diff --git a/autotrace-0.31.9-expected-test-failure-no-imagemagick.patch b/autotrace-0.31.9-expected-test-failure-no-imagemagick.patch new file mode 100644 index 0000000..36f6b2d --- /dev/null +++ b/autotrace-0.31.9-expected-test-failure-no-imagemagick.patch @@ -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 diff --git a/autotrace.spec b/autotrace.spec index da28616..a64cb36 100644 --- a/autotrace.spec +++ b/autotrace.spec @@ -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}