summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-12-19 13:11:30 +0100
committerRemi Collet <remi@remirepo.net>2018-12-19 13:11:30 +0100
commit66a4e0127b5ea52528e1edd466db2757a52b419d (patch)
treecc934e27bbe9973f01caff3c6802f3c971fa8b6f
parent6e530ba2d6182fe50c180ae226592036012166fa (diff)
Sync with IM6: Prefer pkg-config for locating required libraries
-rw-r--r--ImageMagick7.spec51
1 files changed, 41 insertions, 10 deletions
diff --git a/ImageMagick7.spec b/ImageMagick7.spec
index a88ab33..4fe1262 100644
--- a/ImageMagick7.spec
+++ b/ImageMagick7.spec
@@ -71,37 +71,68 @@ Source0: ftp://ftp.imagemagick.org/pub/ImageMagick/releases/ImageMagick-%
BuildRequires: gcc
BuildRequires: gcc-c++
-BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
-BuildRequires: libtiff-devel, giflib-devel, zlib-devel
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: pkgconfig(bzip2)
+%else
+BuildRequires: bzip2-devel
+%endif
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(libpng)
+%if 0%{?fedora} || 0%{?rhel} >= 7
+BuildRequires: pkgconfig(libtiff-4)
+BuildRequires: pkgconfig(libjpeg)
+%else
+BuildRequires: libtiff-devel
+BuildRequires: libjpeg-turbo-devel
+%endif
+BuildRequires: giflib-devel
+BuildRequires: pkgconfig(zlib)
BuildRequires: perl-devel
BuildRequires: ghostscript-devel
%if %{with_djvu}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: pkgconfig(ddjvuapi)
+%else
BuildRequires: djvulibre-devel
%endif
-BuildRequires: libwmf-devel, jasper-devel, libtool-ltdl-devel
-BuildRequires: libX11-devel, libXext-devel, libXt-devel
-BuildRequires: libxml2-devel, librsvg2-devel
-BuildRequires: fftw-devel
-BuildRequires: OpenEXR-devel
-BuildRequires: lcms2-devel
+%endif
+BuildRequires: libwmf-devel
+BuildRequires: pkgconfig(jasper)
+BuildRequires: libtool-ltdl-devel
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(xt)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(librsvg-2.0)
+BuildRequires: pkgconfig(fftw3)
+BuildRequires: pkgconfig(OpenEXR)
+BuildRequires: pkgconfig(lcms2)
%if %{with_raw}
-BuildRequires: LibRaw-devel >= 0.14.8
+BuildRequires: pkgconfig(libraw) >= 0.14.8
%endif
%if %{with_webp}
-BuildRequires: libwebp-devel
+BuildRequires: pkgconfig(libwebp)
%endif
%if %{with_jbig}
BuildRequires: jbigkit-devel
%endif
%if %{with_jp2}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: pkgconfig(libopenjp2)
+%else
BuildRequires: openjpeg2-devel >= 2.1.0
%endif
+%endif
%if %{with_gvc}
BuildRequires: graphviz-devel >= 2.9.0
%endif
%if %{with_raqm}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: pkgconfig(raqm)
+%else
BuildRequires: libraqm-devel
%endif
+%endif
%if %{with_lqr}
BuildRequires: liblqr-1-devel
%endif