diff options
Diffstat (limited to 'gd.spec')
-rw-r--r-- | gd.spec | 227 |
1 files changed, 173 insertions, 54 deletions
@@ -1,4 +1,4 @@ -# remirepo spec file for gd-last +# remirepo spec file for gd3php # renamed for parallel installation, from: # # Fedora spec file for gd @@ -12,32 +12,55 @@ #global commit 725ba9de4005144d137d2a7a70f760068fc3d306 #global short %%(c=%%{commit}; echo ${c:0:7}) -%global with_webp 1 +%bcond_without tests + +%if 0%{?rhel} >= 7 && 0%{?rhel} <= 9 +%bcond_without bump +%else +%bcond_with bump +%endif + +%bcond_without webp +%if 0%{?fedora} >= 35 +# disabled as breaks vertical text with freetype >= 2.11 +# See https://bugzilla.redhat.com/2022957 +# https://github.com/libgd/libgd/issues/790 +%bcond_with raqm +%else +%bcond_without raqm +%endif + +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 +%bcond_without avif +%else +# Not available or too old +# See https://github.com/libgd/libgd/issues/677 - avif test failure +%bcond_with avif +%endif + +# Disabled as only in rpmfusion +# Also see https://github.com/libgd/libgd/issues/678 - heif segfault +%bcond_with heif %if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 -%global with_liq 1 +%bcond_without liq %else # requested by https://bugzilla.redhat.com/1468338 # this break gdimagefile/gdnametest: # gdimagefile/gdnametest.c:122: 255 pixels different on /tmp/gdtest.CrpdIb/img.gif # gdimagefile/gdnametest.c:122: 255 pixels different on /tmp/gdtest.CrpdIb/img.GIF # FAIL gdimagefile/gdnametest (exit status: 2) -%global with_liq 0 -%endif -%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 -%global with_raqm 1 -%else -%global with_raqm 0 +%bcond_with liq %endif Summary: A graphics library for quick creation of PNG or JPEG images -%if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 -Name: gd +%if %{with bump} +Name: gd3php %else -Name: gd-last +Name: gd %endif -Version: 2.3.0 -Release: 1%{?prever}%{?short}%{?dist} +Version: 2.3.3 +Release: 9%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -47,8 +70,14 @@ Source0: libgd-%{version}-%{commit}.tgz %else Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz %endif -# Missing, temporary workaround, fixed upstream for next version -Source1: https://raw.githubusercontent.com/libgd/libgd/gd-%{version}/config/getlib.sh + +# Needed by PHP see https://github.com/libgd/libgd/pull/766 +Patch0: libgd-flip.patch +# Missing header see https://github.com/libgd/libgd/pull/766 +Patch1: libgd-iostream.patch +# But soname for PHP usage +Patch2: libgd-bumpsoname.patch + BuildRequires: freetype-devel BuildRequires: fontconfig-devel @@ -56,19 +85,25 @@ BuildRequires: gettext-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel -%if %{with_webp} +%if %{with webp} %if 0%{?rhel} == 7 BuildRequires: libwebp7-devel %else BuildRequires: libwebp-devel %endif %endif -%if %{with_liq} +%if %{with liq} BuildRequires: libimagequant-devel %endif -%if %{with_raqm} +%if %{with raqm} BuildRequires: libraqm-devel %endif +%if %{with avif} +BuildRequires: libavif-devel >= 0.8.2 +%endif +%if %{with heif} +BuildRequires: libheif-devel >= 1.7.0 +%endif BuildRequires: libX11-devel BuildRequires: libXpm-devel BuildRequires: zlib-devel @@ -76,16 +111,11 @@ BuildRequires: pkgconfig BuildRequires: libtool BuildRequires: perl BuildRequires: perl-generators +BuildRequires: perl(FindBin) # for fontconfig/basic test BuildRequires: liberation-sans-fonts -%if 0%{?fedora} >= 29 -BuildRequires: libimagequant-devel -%endif - -%if "%{name}" != "gd-last" -Obsoletes: gd-last <= %{version} -%endif +Obsoletes: gd-last < %{version}-%{release} %description The gd graphics library allows your code to quickly draw images @@ -99,12 +129,11 @@ browsers. Note that gd is not a paint program. %package progs Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Utility programs that use libgd -%if "%{name}" == "gd-last" +%if %{with bump} Conflicts: gd-progs < %{version} Provides: gd-progs = %{version}-%{release} -%else -Obsoletes: gd-last-progs <= %{version} %endif +Obsoletes: gd-last-progs < %{version}-%{release} %description progs The gd-progs package includes utility programs supplied with gd, a @@ -119,25 +148,34 @@ Requires: fontconfig-devel%{?_isa} Requires: libjpeg-devel%{?_isa} Requires: libpng-devel%{?_isa} Requires: libtiff-devel%{?_isa} -%if %{with_webp} +%if %{with webp} +%if 0%{?rhel} == 7 +Requires: libwebp7-devel%{?_isa} +%else Requires: libwebp-devel%{?_isa} %endif +%endif Requires: libX11-devel%{?_isa} Requires: libXpm-devel%{?_isa} Requires: zlib-devel%{?_isa} -%if %{with_liq} +%if %{with liq} Requires: libimagequant-devel%{?_isa} %endif -%if %{with_raqm} +%if %{with raqm} Requires: libraqm-devel %endif +%if %{with avif} +Requires: libavif-devel +%endif +%if %{with heif} +Requires: libheif-devel +%endif -%if "%{name}" == "gd-last" +%if %{with bump} Conflicts: gd-devel < %{version} Provides: gd-devel = %{version}-%{release} -%else -Obsoletes: gd-last-devel <= %{version} %endif +Obsoletes: gd-last-devel < %{version}-%{release} %description devel @@ -147,15 +185,14 @@ files for gd, a graphics library for creating PNG and JPEG graphics. %prep %setup -q -n libgd-%{version}%{?prever:-%{prever}} -install -m 0755 %{SOURCE1} config/ +%patch0 -p1 +%patch1 -p1 +%if %{with bump} +%patch2 -p1 +%endif : $(perl config/getver.pl) -# RHEL-6 auto* are too old -%if 0%{?rhel} == 6 -sed -e 's/-Werror//' -i configure -touch tests/Makefile.in -%else : regenerate autotool stuff if [ -f configure ]; then libtoolize --copy --force @@ -163,7 +200,6 @@ if [ -f configure ]; then else ./bootstrap.sh fi -%endif %build @@ -187,7 +223,33 @@ export CFLAGS="$CFLAGS -ffp-contract=off" %configure \ + --enable-gd-formats \ --with-tiff=%{_prefix} \ +%if %{with raqm} + --with-raqm \ +%else + --without-raqm \ +%endif +%if %{with liq} + --with-liq \ +%else + --without-liq \ +%endif +%if %{with webp} + --with-webp \ +%else + --without-webp \ +%endif +%if %{with avif} + --with-avif \ +%else + --without-avif \ +%endif +%if %{with heif} + --with-heif \ +%else + --without-heif \ +%endif --disable-rpath make %{?_smp_mflags} @@ -198,30 +260,25 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.la rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a +%if %{with tests} %check -# minor diff in size -XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox" -%ifarch s390x -XFAIL_TESTS="gdimagestring16/gdimagestring16 gdimagestringup16/gdimagestringup16 $XFAIL_TESTS" -%endif +XFAIL_TESTS="" %if 0%{?fedora} <= 28 && 0%{?rhel} <= 7 %ifarch %{ix86} # See https://github.com/libgd/libgd/issues/359 XFAIL_TESTS="gdimagegrayscale/basic $XFAIL_TESTS" %endif %endif -%if 0%{?rhel} > 0 && 0%{?rhel} <= 6 -# See https://github.com/libgd/libgd/issues/363 -XFAIL_TESTS="freetype/bug00132 $XFAIL_TESTS" -%endif - export XFAIL_TESTS +# Workaround to https://github.com/libgd/libgd/issues/763 +export TMPDIR=/tmp : Upstream test suite -make check +make check %{?_smp_mflags} : Check content of pkgconfig grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc +%endif %if 0%{?fedora} < 28 && 0%{?rhel} < 8 @@ -233,7 +290,11 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %files %{!?_licensedir:%global license %%doc} %license COPYING -%{_libdir}/*.so.* +%if %{with bump} +%{_libdir}/*.so.103* +%else +%{_libdir}/*.so.3* +%endif %files progs %{_bindir}/* @@ -245,6 +306,64 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %changelog +* Thu Nov 17 2022 Remi Collet <remi@remirepo.net> - 2.3.3-9 +- EL-9 rebuild for new libavif + +* Tue Jul 19 2022 Remi Collet <remi@remirepo.net> - 2.3.3-8 +- enable avif support in EL-8 and EL-9 + +* Thu Jun 23 2022 Remi Collet <remi@remirepo.net> - 2.3.3-7 +- obsolete old gd-last packages + +* Wed Jun 22 2022 Remi Collet <remi@remirepo.net> - 2.3.3-6 +- EL-7: devel requires libwebp7-devel (not libwebp-devel) + +* Tue Mar 29 2022 Remi Collet <remi@remirepo.net> - 2.3.3-5 +- rename to gd3php on EL-9 + +* Thu Dec 2 2021 Remi Collet <remi@remirepo.net> - 2.3.3-4 +- rename to gd3php on EL-7 and EL-8 + https://github.com/remicollet/remirepo/issues/194 + +* Fri Nov 19 2021 Remi Collet <remi@remirepo.net> - 2.3.3-3 +- disable libraqm usage on F35+ + +* Mon Sep 20 2021 Remi Collet <remi@remirepo.net> - 2.3.3-2 +- Explicitly enable gd/gd2 formats, wanted by perl bindings (#2005916) +- open https://github.com/libgd/libgd/pull/776 + +* Mon Sep 13 2021 Remi Collet <remi@remirepo.net> - 2.3.3-1 +- update to 2.3.3 +- open https://github.com/libgd/libgd/pull/766 missing macros +- open https://github.com/libgd/libgd/pull/767 missing headers + +* Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 2.3.2-4 +- rebuild for libavif new soname on Fedora 34 + +* Wed Mar 17 2021 Remi Collet <remi@remirepo.net> - 2.3.2-3 +- enable avif support on Fedora 33+ + +* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 2.3.2-2 +- enable avif support on Fedora 34 + +* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 2.3.2-1 +- update to 2.3.2 +- open https://github.com/libgd/libgd/issues/677 avif test failure +- open https://github.com/libgd/libgd/issues/678 heif segfault + +* Thu Feb 4 2021 Remi Collet <remi@remirepo.net> - 2.3.1-1 +- update to 2.3.1 in sync with Fedora + +* Wed Feb 3 2021 Filip Januš <fjanus@redhat.com> - 2.3.1-1 +- Upstream released new version 2.3.1 +- patch bug615 is no more needed - fixed by upstream in release +- gdimagestring16/gdimagestring16 gdimagestringup16/gdimagestringup16 passed on + x390s - XFAIL_TEST definition for x390s is no more necessary + +* Wed Jul 15 2020 Remi Collet <remi@remirepo.net> - 2.3.0-2 +- fix gdImageStringFT() fails for empty strings + https://github.com/libgd/libgd/issues/615 + * Tue Mar 24 2020 Remi Collet <remi@remirepo.net> - 2.3.0-1 - update to 2.3.0 - add dependency on libraqm |