From d209568d5ce4c75cb0a05fb993feb4bce07fa1e4 Mon Sep 17 00:00:00 2001 From: Carl George Date: Tue, 3 Jan 2023 21:48:08 -0600 Subject: [PATCH] Build against GraphicsMagick instead of ImageMagick on F38+ Resolves: rhbz#2158052 --- inkscape.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/inkscape.spec b/inkscape.spec index 559f0b8..69d3e38 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -1,8 +1,16 @@ %define debug_package %{nil} +%if %{undefined flatpak} && %{undefined rhel} +%if 0%{?fedora} >= 38 +%bcond_without graphicsmagick +%else +%bcond_without imagemagick +%endif +%endif + Name: inkscape Version: 1.2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Vector-based drawing program using SVG # Inkscape tags their releases with underscores and in ALLCAPS @@ -36,8 +44,11 @@ BuildRequires: libgdl-devel BuildRequires: gettext BuildRequires: gsl-devel BuildRequires: gtkmm30-devel -%if ! 0%{?flatpak} && ! (0%{?rhel} >= 8) -BuildRequires: ImageMagick-c++-devel +%if %{with imagemagick} +BuildRequires: pkgconfig(ImageMagick++) < 7 +%endif +%if %{with graphicsmagick} +BuildRequires: pkgconfig(GraphicsMagick++) %endif BuildRequires: intltool BuildRequires: lcms2-devel @@ -131,6 +142,8 @@ dos2unix -k -q share/extensions/*.py %build %cmake3 \ + -DWITH_GRAPHICS_MAGICK=%{?with_graphicsmagick:ON}%{!?with_graphicsmagick:OFF} \ + -DWITH_IMAGE_MAGICK=%{?with_imagemagick:ON}%{!?with_imagemagick:OFF} \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=OFF %cmake_build @@ -212,6 +225,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.inkscape.Inksc %changelog +* Tue Jan 03 2023 Carl George - 1.2.2-2 +- Build against GraphicsMagick instead of ImageMagick on F38+, resolves rhbz#2158052 + * Tue Dec 06 2022 Gwyn Ciesla - 1.2.2-1 - 1.2.2