From 4882c26f421f24dda3f0ef2aeda650b533ff1602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Thu, 18 Mar 2021 10:05:47 +0100 Subject: [PATCH 1/4] Add condition if fedora for packages not available in RHEL --- gd.spec | 55 +++++++++++++++++++++++++++++++++++++++++++------------ getlib.sh | 42 ------------------------------------------ 2 files changed, 43 insertions(+), 54 deletions(-) delete mode 100644 getlib.sh diff --git a/gd.spec b/gd.spec index b19861e..a144825 100644 --- a/gd.spec +++ b/gd.spec @@ -1,11 +1,22 @@ -%global with_liq 1 -%global with_raqm 1 +%if 0%{?rhel} +%bcond_with liq +%bcond_with raqm +%bcond_with avif +%else +# Enabled by default +%bcond_without liq +%bcond_without raqm +%bcond_without avif +%endif +# Not available in Fedora, only in rpmfusion +# Also see https://github.com/libgd/libgd/issues/678 segfault +%bcond_with heif Summary: A graphics library for quick creation of PNG or JPEG images Name: gd -Version: 2.3.1 -Release: 1%{?prever}%{?short}%{?dist} +Version: 2.3.2 +Release: 3%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -15,8 +26,6 @@ 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 BuildRequires: freetype-devel BuildRequires: fontconfig-devel @@ -25,12 +34,18 @@ BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: libwebp-devel -%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 +%endif +%if %{with heif} +BuildRequires: libheif-devel +%endif BuildRequires: libX11-devel BuildRequires: libXpm-devel BuildRequires: zlib-devel @@ -74,12 +89,18 @@ Requires: libwebp-devel%{?_isa} 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 %description devel @@ -89,7 +110,6 @@ 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/ : $(perl config/getver.pl) @@ -135,9 +155,10 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a %check # minor diff in size +%if %{with raqm} XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox" - export XFAIL_TESTS +%endif : Upstream test suite make check @@ -164,6 +185,16 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %changelog +* Wed Mar 17 2021 Filip Januš - 2.3.2-3 +- Add condition if fedora for packages not available in RHEL + +* Mon Mar 8 2021 Remi Collet - 2.3.2-2 +- enable avif support +- use bcond + +* Mon Mar 08 2021 Ondrej Dubaj - 2.3.2-1 +- rebase to version 2.3.2 + * Wed Feb 3 2021 Filip Januš - 2.3.1-1 - Upstream released new version 2.3.1 - patch bug615 is no more needed - fixed by upstream in release diff --git a/getlib.sh b/getlib.sh deleted file mode 100644 index 4835cf6..0000000 --- a/getlib.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -GETVER="${0%/*}/getver.pl" -GDLIB_MAJOR=$("${GETVER}" MAJOR) -GDLIB_MINOR=$("${GETVER}" MINOR) -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 -# 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). -GDLIB_PREV_MAJOR=2 -GDLIB_PREV_MINOR=2 -# This isn't 100% correct, but it tends to be a close enough approximation -# for how we manage the codebase. It's rare to do a release that doesn't -# modify the library since this project is centered around the library. -GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION )) -GDLIB_LT_AGE=0 - -# The first three fields we feed into libtool and the OS target determines how -# they get used. The last two fields we feed into cmake. We use the same rules -# as Linux SONAME versioning in libtool, but cmake should handle it for us. -case $1 in -CURRENT) - printf '%s' "${GDLIB_LT_CURRENT}" - ;; -REVISION) - printf '%s' "${GDLIB_LT_REVISION}" - ;; -AGE) - printf '%s' "${GDLIB_LT_AGE}" - ;; -VERSION) - printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}" - ;; -SONAME) - printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))" - ;; -esac From 774e110c1bf88f356fc12a5240a8a24edd7b7a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Thu, 18 Mar 2021 10:11:08 +0100 Subject: [PATCH 2/4] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index d9cd306..a6d5c0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgd-2.3.1.tar.xz) = 0b96406a1d62129d7d63f78fc4558062c223a3bfbf9719be86362fd922b72b5dac294524dd1b0a996a4a7a709ee9d2dfc790ee32564add70adad41d044a0ed80 +SHA512 (libgd-2.3.2.tar.xz) = a31c6dbb64e7b725b63f3b400f7bebc289e2d776bdca0595af23006841660dc93a56c2247b98f8a584438a826f9e9ff0bea17d0b3900e48e281580b1308794d2 From 3f8f4f35986b02f6d91ca5eb828313a33d498584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Janu=C5=A1?= Date: Thu, 18 Mar 2021 10:30:39 +0100 Subject: [PATCH 3/4] Fix mistaken release number and changelog --- gd.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gd.spec b/gd.spec index a144825..5c26021 100644 --- a/gd.spec +++ b/gd.spec @@ -16,7 +16,7 @@ Summary: A graphics library for quick creation of PNG or JPEG images Name: gd Version: 2.3.2 -Release: 3%{?prever}%{?short}%{?dist} +Release: 1%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -185,14 +185,10 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %changelog -* Wed Mar 17 2021 Filip Januš - 2.3.2-3 +* Wed Mar 17 2021 Filip Januš - 2.3.2-1 - Add condition if fedora for packages not available in RHEL - -* Mon Mar 8 2021 Remi Collet - 2.3.2-2 - enable avif support - use bcond - -* Mon Mar 08 2021 Ondrej Dubaj - 2.3.2-1 - rebase to version 2.3.2 * Wed Feb 3 2021 Filip Januš - 2.3.1-1 From 0423c7884fbe0705b778864a7f384a07a702a448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Mon, 29 Mar 2021 23:27:27 +0200 Subject: [PATCH 4/4] Rebuild for libavif soname bump --- gd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gd.spec b/gd.spec index 5c26021..e8ed8ee 100644 --- a/gd.spec +++ b/gd.spec @@ -16,7 +16,7 @@ Summary: A graphics library for quick creation of PNG or JPEG images Name: gd Version: 2.3.2 -Release: 1%{?prever}%{?short}%{?dist} +Release: 2%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -185,6 +185,9 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %changelog +* Mon Mar 29 2021 Robert-André Mauchin - 2.3.2-2 +- Rebuild for libavif soname bump + * Wed Mar 17 2021 Filip Januš - 2.3.2-1 - Add condition if fedora for packages not available in RHEL - enable avif support