diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 54f0eb6..7e0967d 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -28,7 +28,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.32 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz @@ -59,9 +59,11 @@ BuildRequires: libxml2-devel BuildRequires: libX11-devel libXext-devel libXt-devel BuildRequires: lpr BuildRequires: p7zip +%if ! 0%{?flatpak} BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(ExtUtils::MakeMaker) +%endif BuildRequires: xdg-utils BuildRequires: xz-devel BuildRequires: zlib-devel @@ -109,6 +111,7 @@ Obsoletes: GraphicsMagick < 1.3.19-4 %description doc Documentation for GraphicsMagick. +%if ! 0%{?flatpak} %package perl Summary: GraphicsMagick perl bindings Requires: %{name}%{?_isa} = %{version}-%{release} @@ -119,6 +122,7 @@ Perl bindings to GraphicsMagick. Install GraphicsMagick-perl if you want to use any perl scripts that use GraphicsMagick. +%endif %package c++ Summary: GraphicsMagick Magick++ library (C++ bindings) @@ -178,8 +182,12 @@ CFLAGS="$RPM_OPT_FLAGS -DFT_ENCODING_PRC=FT_ENCODING_GB2312" --with-lcms2 \ --with-magick_plus_plus \ --with-modules \ +%if 0%{?flatpak} + --without-perl \ +%else --with-perl \ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix}" \ +%endif %{?_with_quantum_depth} \ %{?_enable_quantum_library_names} \ --with-threads \ @@ -191,11 +199,15 @@ CFLAGS="$RPM_OPT_FLAGS -DFT_ENCODING_PRC=FT_ENCODING_GB2312" --with-gs-font-dir=%{_datadir}/fonts/default/Type1 %make_build +%if ! 0%{?flatpak} %make_build perl-build +%endif %install %make_install + +%if ! 0%{?flatpak} %make_install -C PerlMagick # perlmagick: fix perl path of demo files @@ -219,6 +231,7 @@ if [ -z perl-pkg-files ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi +%endif rm -rf %{buildroot}%{_datadir}/GraphicsMagick # Keep config @@ -250,7 +263,9 @@ EOF %check +%if ! 0%{?flatpak} make test -C PerlMagick ||: +%endif time \ %make_build check ||: # multilib hack only supports 32/64 bits for now @@ -306,12 +321,17 @@ exit 1 %{_libdir}/pkgconfig/GraphicsMagick++.pc %{_mandir}/man1/GraphicsMagick++-config.* +%if ! 0%{?flatpak} %files perl -f perl-pkg-files %{_mandir}/man3/* %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt +%endif %changelog +* Wed Jul 17 2019 Kalev Lember - 1.3.32-2 +- Disable perl support for flatpak builds + * Mon Jun 17 2019 Rex Dieter - 1.3.32-1 - 1.3.32