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
This commit is contained in:
Remi Collet 2021-09-13 15:21:00 +02:00
parent d1b1741b85
commit 929b9853b0
5 changed files with 101 additions and 3 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ gd-2.0.35.tar.bz2
/libgd-2.3.0.tar.xz
/libgd-2.3.1.tar.xz
/libgd-2.3.2.tar.xz
/libgd-2.3.3.tar.xz

16
gd.spec
View File

@ -15,8 +15,8 @@
Summary: A graphics library for quick creation of PNG or JPEG images
Name: gd
Version: 2.3.2
Release: 9%{?prever}%{?short}%{?dist}
Version: 2.3.3
Release: 1%{?prever}%{?short}%{?dist}
License: MIT
URL: http://libgd.github.io/
%if 0%{?commit:1}
@ -27,6 +27,11 @@ Source0: libgd-%{version}-%{commit}.tgz
Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz
%endif
# 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
BuildRequires: gettext-devel
@ -110,6 +115,8 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%prep
%setup -q -n libgd-%{version}%{?prever:-%{prever}}
%patch0 -p1
%patch1 -p1
: $(perl config/getver.pl)
@ -185,6 +192,11 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc
%changelog
* 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

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.2.tar.xz) = a31c6dbb64e7b725b63f3b400f7bebc289e2d776bdca0595af23006841660dc93a56c2247b98f8a584438a826f9e9ff0bea17d0b3900e48e281580b1308794d2
SHA512 (libgd-2.3.3.tar.xz) = aa49d4381d604a4360d556419d603df2ffd689a6dcc10f8e5e1d158ddaa3ab89912f6077ca77da4e370055074007971cf6d356ec9bf26dcf39bcff3208bc7e6c