Compare commits

...
Sign in to create a new pull request.

39 commits

Author SHA1 Message Date
Sandro Mani
773db4a7db Rebuild (libimagequant) 2025-09-09 22:25:59 +02:00
Fedora Release Engineering
a641c09bbc Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 21:10:43 +00:00
Filip Janus
21929bf17b gcc now uses std=gnu23
Use std=gnu17 to avoid errors
2025-02-02 21:54:39 +00:00
Fedora Release Engineering
fee8c1495e Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 19:35:32 +00:00
Fedora Release Engineering
c47b15e0da Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 00:17:00 +00:00
Software Management Team
28a7ac481e Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:46 +02:00
Richard W.M. Jones
868a48cf0d Bump and rebuild package (for riscv64) 2024-03-06 12:03:19 +00:00
David Abdurachmanov
91aa2f072a Enable -ffp-contract=off for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-16 09:07:15 +00:00
František Zatloukal
d6e08362f4 Rebuilt for libavif 1.0.3 2024-01-31 16:25:44 +01:00
Fedora Release Engineering
ff7dcbb625 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 12:37:27 +00:00
Fedora Release Engineering
85c16c5f54 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 20:22:52 +00:00
Fedora Release Engineering
e6c68b14f1 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 20:54:17 +00:00
Yaakov Selkowitz
fb21de2186 Fix build with -march=x86-64-v3
While it hasn't been necessary for x86_64 baseline, setting
-march=x86-64-v3 (as in ELN) triggers test failures in
gdimagecopyresampled/bug00201 and gdimagegrayscale/basic. Adding
-ffp-contract=off as on most other arches avoids that.
2023-06-28 16:17:43 -04:00
Filip Janus
f6d849bb15 Fix licence to GD https://spdx.org/licenses/GD.html 2023-03-06 10:03:17 +01:00
Filip Janus
3a56a132c6 migrated to SPDX license 2023-03-06 09:39:32 +01:00
Sandro Mani
d5f9f168fc Rebuild (libimagequant) 2023-03-04 06:22:26 +01:00
Fedora Release Engineering
3de2885b1f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 04:28:55 +00:00
Kalev Lember
7218bb5984 Rebuild for new libavif 2022-12-01 18:07:01 +01:00
Robert-André Mauchin
d027ecf8df Rebuild for new libavif 2022-10-23 21:21:59 +02:00
Robert-André Mauchin
7d55f74d25 Rebuild for new libavif 2022-10-23 19:59:25 +02:00
Fedora Release Engineering
9b3b0202ea Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:14:05 +00:00
Robert-André Mauchin
d33cb816a6 Rebuild for new libavif 2022-06-22 16:38:43 +02:00
Fedora Release Engineering
8606558b1a - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 04:01:44 +00:00
Robert-André Mauchin
108109b5e0 Rebuild for libavif soname bump 2021-11-29 17:55:04 +01:00
Remi Collet
b94a8608fa fix date 2021-11-19 09:10:47 +01:00
Remi Collet
0e79f9e82b disable libraqm usage, see #2022957 2021-11-19 09:09:33 +01:00
Paul Howarth
73bca05a7e Explicitly enable gd/gd2 formats, wanted by perl bindings (#2005916) 2021-09-20 14:29:33 +01:00
Remi Collet
e8921493d7 all tests pass now 2021-09-13 15:39:17 +02:00
Remi Collet
d5127de01f Workaround to https://github.com/libgd/libgd/issues/763 2021-09-13 15:28:11 +02:00
Remi Collet
929b9853b0 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
2021-09-13 15:21:00 +02:00
Florian Weimer
d1b1741b85 Rebuild again for libavif soname bump 2021-07-27 19:14:28 +02:00
Robert-André Mauchin
87692e31f6 Rebuild for libavif soname bump 2021-07-22 08:53:28 +02:00
Fedora Release Engineering
9ee1cda69e - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 23:53:31 +00:00
Robert-André Mauchin
36135175c4 Rebuild for libavif soname bump 2021-07-19 22:39:29 +02:00
Robert-André Mauchin
5bdcbb1ca5 Rebuild for libavif soname bump 2021-05-23 20:40:52 +02:00
Robert-André Mauchin
d79d40c918 Rebuild for libavif soname bump 2021-03-29 23:25:31 +02:00
Filip Januš
b81dacf966 Add condition if fedora for packages not available in RHEL 2021-03-18 09:28:31 +01:00
Remi Collet
3147fefdfd enable avif support
use bcond
2021-03-08 15:21:47 +01:00
Ondrej Dubaj
ed50b51c04 rebase to version 2.3.2 2021-03-08 08:46:53 +01:00
5 changed files with 224 additions and 19 deletions

2
.gitignore vendored
View file

@ -11,3 +11,5 @@ gd-2.0.35.tar.bz2
/libgd-2.2.5.tar.xz
/libgd-2.3.0.tar.xz
/libgd-2.3.1.tar.xz
/libgd-2.3.2.tar.xz
/libgd-2.3.3.tar.xz

154
gd.spec
View file

@ -1,12 +1,25 @@
%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 avif
%endif
# disabled as breaks vertical text
# See https://bugzilla.redhat.com/2022957
%bcond_with raqm
# 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}
License: MIT
Version: 2.3.3
Release: 20%{?prever}%{?short}%{?dist}
License: GD
URL: http://libgd.github.io/
%if 0%{?commit:1}
# git clone https://github.com/libgd/libgd.git; cd gd-libgd
@ -15,8 +28,11 @@ 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
BuildRequires: freetype-devel
BuildRequires: fontconfig-devel
@ -25,12 +41,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 +96,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 +117,8 @@ 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/
%patch -P0 -p1
%patch -P1 -p1
: $(perl config/getver.pl)
@ -104,7 +133,7 @@ fi
%build
# Provide a correct default font search path
CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
CFLAGS="-std=gnu17 $RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
/usr/share/fonts/bitstream-vera:\
/usr/share/fonts/dejavu:\
/usr/share/fonts/default/Type1:\
@ -116,12 +145,13 @@ CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
CFLAGS="$CFLAGS -msse -mfpmath=sse"
%endif
%ifarch aarch64 ppc64 ppc64le s390 s390x
%ifarch aarch64 ppc64 ppc64le s390 s390x x86_64 riscv64
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1359680
export CFLAGS="$CFLAGS -ffp-contract=off"
%endif
%configure \
--enable-gd-formats \
--with-tiff=%{_prefix} \
--disable-rpath
make %{?_smp_mflags}
@ -134,10 +164,8 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
%check
# minor diff in size
XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox"
export XFAIL_TESTS
# Workaround to https://github.com/libgd/libgd/issues/763
export TMPDIR=/tmp
: Upstream test suite
make check
@ -164,6 +192,96 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc
%changelog
* Tue Sep 09 2025 Sandro Mani <manisandro@gmail.com> - 2.3.3-20
- Rebuild (libimagequant)
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Mar 06 2024 Richard W.M. Jones <rjones@redhat.com> - 2.3.3-16
- Bump and rebuild package (for riscv64)
* Wed Jan 31 2024 František Zatloukal <fzatlouk@redhat.com> - 2.3.3-15
- Rebuilt for libavif 1.0.3
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Mar 04 2023 Sandro Mani <manisandro@gmail.com> - 2.3.3-11
- Rebuild (libimagequant)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 01 2022 Kalev Lember <klember@redhat.com> - 2.3.3-9
- Rebuild for new libavif
* Sun Oct 23 2022 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.3-8
- Rebuild for new libavif
* Sun Oct 23 2022 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.3-7
- Rebuild for new libavif
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Nov 29 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.3-4
- Rebuild for libavif soname bump
* Fri Nov 19 2021 Remi Collet <remi@remirepo.net> - 2.3.3-3
- disable libraqm usage, see #2022957
* Mon Sep 20 2021 Paul Howarth <paul@city-fan.org> - 2.3.3-2
- Explicitly enable gd/gd2 formats, wanted by perl bindings (#2005916)
* 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
* Tue Jul 27 2021 Florian Weimer <fweimer@redhat.com> - 2.3.2-9
- Rebuild again for libavif soname bump
* Thu Jul 22 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.2-8
- Rebuild for libavif soname bump
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jul 19 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.2-6
- Rebuild for libavif soname bump
* Sun May 23 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.2-5
- Rebuild for libavif soname bump
* Mon Mar 29 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2.3.2-4
- Rebuild for libavif soname bump
* Wed Mar 17 2021 Filip Januš <fjanus@redhat.com> - 2.3.2-3
- Add condition if fedora for packages not available in RHEL
* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 2.3.2-2
- enable avif support
- use bcond
* Mon Mar 08 2021 Ondrej Dubaj <odubaj@redhat.com> - 2.3.2-1
- rebase to version 2.3.2
* 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

50
libgd-flip.patch Normal file
View file

@ -0,0 +1,50 @@
From f4bc1f5c26925548662946ed7cfa473c190a104a Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 13 Sep 2021 14:57:52 +0200
Subject: [PATCH 1/2] Revert "Fix #318, these macros are not used as planed, we
have separate functions for each"
This reverts commit bdc281eadb1d58d5c0c7bbc1125ee4674256df08.
---
src/gd.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gd.h b/src/gd.h
index 30560395..1ad9e637 100644
--- a/src/gd.h
+++ b/src/gd.h
@@ -1604,6 +1604,11 @@ BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im);
BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im);
BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im);
+#define GD_FLIP_HORINZONTAL 1 /* typo, kept for BC */
+#define GD_FLIP_HORIZONTAL 1
+#define GD_FLIP_VERTICAL 2
+#define GD_FLIP_BOTH 3
+
/**
* Group: Crop
*
From e47c619d792455aad23708d2ec2947455394427e Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 13 Sep 2021 14:59:47 +0200
Subject: [PATCH 2/2] add comment to not remove these macros
---
src/gd.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gd.h b/src/gd.h
index 1ad9e637..71f5a89c 100644
--- a/src/gd.h
+++ b/src/gd.h
@@ -1604,6 +1604,8 @@ BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im);
BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im);
BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im);
+/* Macros still used in gd extension up to PHP 8.0
+ so please keep these unused macros for now */
#define GD_FLIP_HORINZONTAL 1 /* typo, kept for BC */
#define GD_FLIP_HORIZONTAL 1
#define GD_FLIP_VERTICAL 2

35
libgd-iostream.patch Normal file
View file

@ -0,0 +1,35 @@
From 01bcbdcae35b90de082012e639094c711a7aa2b3 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 13 Sep 2021 15:05:18 +0200
Subject: [PATCH] install missing header, used by gdpp.h
---
src/CMakeLists.txt | 1 +
src/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3839bc78..c1eea100 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -194,6 +194,7 @@ install(FILES
gdfontt.h
gdfx.h
gdpp.h
+ gd_io_stream.h
DESTINATION include)
CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY)
diff --git a/src/Makefile.am b/src/Makefile.am
index dbe9243c..c8c779f1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,7 +52,7 @@ EXTRA_DIST = \
msinttypes/inttypes.h \
msinttypes/stdint.h
-include_HEADERS = gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h gd_color_map.h gd_errors.h gdpp.h
+include_HEADERS = gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h gd_color_map.h gd_errors.h gdpp.h gd_io_stream.h
lib_LTLIBRARIES = libgd.la

View file

@ -1 +1 @@
SHA512 (libgd-2.3.1.tar.xz) = 0b96406a1d62129d7d63f78fc4558062c223a3bfbf9719be86362fd922b72b5dac294524dd1b0a996a4a7a709ee9d2dfc790ee32564add70adad41d044a0ed80
SHA512 (libgd-2.3.3.tar.xz) = aa49d4381d604a4360d556419d603df2ffd689a6dcc10f8e5e1d158ddaa3ab89912f6077ca77da4e370055074007971cf6d356ec9bf26dcf39bcff3208bc7e6c