From a052de8261792bfff7ad7a38d068fdd91dfdf0ec Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Apr 2021 16:03:25 +0200 Subject: more build options (im6, im7 or gm) --- vips.spec | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/vips.spec b/vips.spec index dd45670..781dd2f 100644 --- a/vips.spec +++ b/vips.spec @@ -32,6 +32,10 @@ %bcond_with libspng %endif +%bcond_without im6 +%bcond_with im7 +%bcond_with gm + # from mock config, when rpmfusion enabled %if 0%{?_with_rpmfusion:1} %bcond_without libheif @@ -57,12 +61,20 @@ Source0: https://github.com/libvips/libvips/releases/download/v%{vips_version}%{ BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(fftw3) +%if %{with im6} %if 0%{?fedora} >= 99 || 0%{?rhel} >= 99 BuildRequires: ImageMagick-devel %else # Ensure we use version 6 (same as imagick ext). BuildRequires: ImageMagick6-devel %endif +%endif +%if %{with im7} +BuildRequires: ImageMagick7-devel +%endif +%if %{with gm} +BuildRequires: GraphicsMagick-devel +%endif BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(orc-0.4) BuildRequires: pkgconfig(lcms2) @@ -122,12 +134,20 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Conflicts: vips-devel < %{version}-%{release} %endif # for consistency, same version at buildtime and runtime +%if %{with im6} %if 0%{?fedora} >= 99 || 0%{?rhel} >= 99 Requires: ImageMagick-devel %else # Ensure we use version 6 (same as imagick ext). Requires: ImageMagick6-devel %endif +%endif +%if %{with im7} +Requires: ImageMagick7-devel +%endif +%if %{with gm} +Requires: GraphicsMagick-devel +%endif %description devel The %{name}-devel package contains the header files and @@ -198,6 +218,9 @@ export CXXFLAGS="%{optflags} -ftree-vectorize" %endif %if %{with doc} --enable-gtk-doc \ +%endif +%if %{with gm} + --with-magickpackage=GraphicsMagick \ %endif --disable-static make %{?_smp_mflags} -- cgit