diff options
-rw-r--r-- | gd.spec | 75 | ||||
-rw-r--r-- | libgd-bumpsoname.patch | 12 |
2 files changed, 69 insertions, 18 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,16 +12,25 @@ #global commit 725ba9de4005144d137d2a7a70f760068fc3d306 #global short %%(c=%%{commit}; echo ${c:0:7}) +%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 +# 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 +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 %bcond_without avif %else # Not available or too old @@ -45,13 +54,13 @@ %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.3 -Release: 3%{?prever}%{?short}%{?dist} +Release: 9%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -66,6 +75,9 @@ Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/li 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 @@ -103,10 +115,7 @@ BuildRequires: perl(FindBin) # for fontconfig/basic test BuildRequires: liberation-sans-fonts -%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 @@ -120,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 @@ -141,8 +149,12 @@ Requires: libjpeg-devel%{?_isa} Requires: libpng-devel%{?_isa} Requires: libtiff-devel%{?_isa} %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} @@ -159,12 +171,11 @@ Requires: libavif-devel 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 @@ -176,6 +187,9 @@ files for gd, a graphics library for creating PNG and JPEG graphics. %setup -q -n libgd-%{version}%{?prever:-%{prever}} %patch0 -p1 %patch1 -p1 +%if %{with bump} +%patch2 -p1 +%endif : $(perl config/getver.pl) @@ -246,6 +260,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.la rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a +%if %{with tests} %check XFAIL_TESTS="" %if 0%{?fedora} <= 28 && 0%{?rhel} <= 7 @@ -263,6 +278,7 @@ 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 @@ -274,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}/* @@ -286,6 +306,25 @@ 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+ diff --git a/libgd-bumpsoname.patch b/libgd-bumpsoname.patch new file mode 100644 index 0000000..dadcc5d --- /dev/null +++ b/libgd-bumpsoname.patch @@ -0,0 +1,12 @@ +diff -up ./config/getlib.sh.old ./config/getlib.sh +--- ./config/getlib.sh.old 2021-12-02 10:39:08.156110846 +0100 ++++ ./config/getlib.sh 2021-12-02 10:39:11.003100629 +0100 +@@ -8,7 +8,7 @@ GDLIB_REVISION=$("${GETVER}" RELEASE) + # Dynamic library version information + # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info + +-GDLIB_LT_CURRENT=3 ++GDLIB_LT_CURRENT=103 + # This is the version where the soname (current above) changes. We use it + # to reset the revision base back to zero. It's a bit of a pain, but some + # systems restrict the revision range below to [0..255] (like OS X). |