summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakib Sajal <sakib.sajal@windriver.com>2021-09-21 15:38:48 -0400
committerKhem Raj <raj.khem@gmail.com>2021-09-24 08:12:35 -0700
commit4229789eba9ff7700aff7013db5ee4b6498af1c4 (patch)
treed804dfcf055a18266a881f3aee788b4c1e90042d
parent965e292a3dbc72f8f0cd8b961e3241ae4b0d1548 (diff)
downloadmeta-openembedded-4229789eba9ff7700aff7013db5ee4b6498af1c4.tar.gz
gd: upgrade 2.3.2 -> 2.3.3
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/gd/gd/0001-fix-read-out-of-bands-in-reading-tga-header-file.patch29
-rw-r--r--meta-oe/recipes-support/gd/gd/0001-replace-uint32-with-uint32_t-and-uint16-with-uint16_.patch170
-rw-r--r--meta-oe/recipes-support/gd/gd_2.3.3.bb (renamed from meta-oe/recipes-support/gd/gd_2.3.2.bb)8
3 files changed, 3 insertions, 204 deletions
diff --git a/meta-oe/recipes-support/gd/gd/0001-fix-read-out-of-bands-in-reading-tga-header-file.patch b/meta-oe/recipes-support/gd/gd/0001-fix-read-out-of-bands-in-reading-tga-header-file.patch
deleted file mode 100644
index 6152a1184..000000000
--- a/meta-oe/recipes-support/gd/gd/0001-fix-read-out-of-bands-in-reading-tga-header-file.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 8b111b2b4a4842179be66db68d84dda91a246032 Mon Sep 17 00:00:00 2001
2From: maryam ebrahimzadeh <maryam.ebr@student.sharif.edu>
3Date: Mon, 19 Jul 2021 10:07:13 +0430
4Subject: [PATCH] fix read out-of-bands in reading tga header file
5
6---
7 src/gd_tga.c | 6 +++++-
8 1 file changed, 5 insertions(+), 1 deletion(-)
9
10diff --git a/src/gd_tga.c b/src/gd_tga.c
11index cae9428..286febb 100644
12--- a/src/gd_tga.c
13+++ b/src/gd_tga.c
14@@ -191,7 +191,11 @@ int read_header_tga(gdIOCtx *ctx, oTga *tga)
15 return -1;
16 }
17
18- gdGetBuf(tga->ident, tga->identsize, ctx);
19+
20+ if (gdGetBuf(tga->ident, tga->identsize, ctx) != tga->identsize) {
21+ gd_error("fail to read header ident");
22+ return -1;
23+ }
24 }
25
26 return 1;
27--
282.25.1
29
diff --git a/meta-oe/recipes-support/gd/gd/0001-replace-uint32-with-uint32_t-and-uint16-with-uint16_.patch b/meta-oe/recipes-support/gd/gd/0001-replace-uint32-with-uint32_t-and-uint16-with-uint16_.patch
deleted file mode 100644
index faf349b0b..000000000
--- a/meta-oe/recipes-support/gd/gd/0001-replace-uint32-with-uint32_t-and-uint16-with-uint16_.patch
+++ /dev/null
@@ -1,170 +0,0 @@
1From 4ae9904a10f61ed60f4d4ee02eb1994a95664d7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 22 Apr 2021 22:48:59 -0700
4Subject: [PATCH] replace uint32 with uint32_t and uint16 with uint16_6
5
6uint16 and uint32 are now deprecated in libtiff and suggestion is to use
7standard C99 types
8
9Upstream-Status: Submitted [https://github.com/libgd/libgd/pull/694]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/gd_tiff.c | 52 +++++++++++++++++++++++++--------------------------
13 1 file changed, 26 insertions(+), 26 deletions(-)
14
15diff --git a/src/gd_tiff.c b/src/gd_tiff.c
16index b22ee6c..699d719 100644
17--- a/src/gd_tiff.c
18+++ b/src/gd_tiff.c
19@@ -237,10 +237,10 @@ void tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
20 int transparentColorR = -1;
21 int transparentColorG = -1;
22 int transparentColorB = -1;
23- uint16 extraSamples[1];
24- uint16 *colorMapRed = NULL;
25- uint16 *colorMapGreen = NULL;
26- uint16 *colorMapBlue = NULL;
27+ uint16_t extraSamples[1];
28+ uint16_t *colorMapRed = NULL;
29+ uint16_t *colorMapGreen = NULL;
30+ uint16_t *colorMapBlue = NULL;
31
32 tiff_handle *th;
33
34@@ -292,18 +292,18 @@ void tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
35
36 /* build the color map for 8 bit images */
37 if(bitDepth != 24) {
38- colorMapRed = (uint16 *) gdMalloc(3 * (1 << bitsPerSample));
39+ colorMapRed = (uint16_t *) gdMalloc(3 * (1 << bitsPerSample));
40 if (!colorMapRed) {
41 gdFree(th);
42 return;
43 }
44- colorMapGreen = (uint16 *) gdMalloc(3 * (1 << bitsPerSample));
45+ colorMapGreen = (uint16_t *) gdMalloc(3 * (1 << bitsPerSample));
46 if (!colorMapGreen) {
47 gdFree(colorMapRed);
48 gdFree(th);
49 return;
50 }
51- colorMapBlue = (uint16 *) gdMalloc(3 * (1 << bitsPerSample));
52+ colorMapBlue = (uint16_t *) gdMalloc(3 * (1 << bitsPerSample));
53 if (!colorMapBlue) {
54 gdFree(colorMapRed);
55 gdFree(colorMapGreen);
56@@ -448,7 +448,7 @@ BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out)
57 /* Check if we are really in 8bit mode */
58 static int checkColorMap(n, r, g, b)
59 int n;
60-uint16 *r, *g, *b;
61+uint16_t *r, *g, *b;
62 {
63 while (n-- > 0)
64 if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
65@@ -460,8 +460,8 @@ uint16 *r, *g, *b;
66 /* Read and convert a TIFF colormap */
67 static int readTiffColorMap(gdImagePtr im, TIFF *tif, char is_bw, int photometric)
68 {
69- uint16 *redcmap, *greencmap, *bluecmap;
70- uint16 bps;
71+ uint16_t *redcmap, *greencmap, *bluecmap;
72+ uint16_t bps;
73 int i;
74
75 if (is_bw) {
76@@ -473,7 +473,7 @@ static int readTiffColorMap(gdImagePtr im, TIFF *tif, char is_bw, int photometri
77 gdImageColorAllocate(im, 255,255,255);
78 }
79 } else {
80- uint16 min_sample_val, max_sample_val;
81+ uint16_t min_sample_val, max_sample_val;
82
83 if (!TIFFGetField(tif, TIFFTAG_MINSAMPLEVALUE, &min_sample_val)) {
84 min_sample_val = 0;
85@@ -515,7 +515,7 @@ static int readTiffColorMap(gdImagePtr im, TIFF *tif, char is_bw, int photometri
86
87 static void readTiffBw (const unsigned char *src,
88 gdImagePtr im,
89- uint16 photometric,
90+ uint16_t photometric,
91 int startx,
92 int starty,
93 int width,
94@@ -547,7 +547,7 @@ static void readTiffBw (const unsigned char *src,
95
96 static void readTiff8bit (const unsigned char *src,
97 gdImagePtr im,
98- uint16 photometric,
99+ uint16_t photometric,
100 int startx,
101 int starty,
102 int width,
103@@ -634,10 +634,10 @@ static void readTiff8bit (const unsigned char *src,
104 }
105 }
106
107-static int createFromTiffTiles(TIFF *tif, gdImagePtr im, uint16 bps, uint16 photometric,
108+static int createFromTiffTiles(TIFF *tif, gdImagePtr im, uint16_t bps, uint16_t photometric,
109 char has_alpha, char is_bw, int extra)
110 {
111- uint16 planar;
112+ uint16_t planar;
113 int im_width, im_height;
114 int tile_width, tile_height;
115 int x, y, height, width;
116@@ -682,11 +682,11 @@ end:
117 return success;
118 }
119
120-static int createFromTiffLines(TIFF *tif, gdImagePtr im, uint16 bps, uint16 photometric,
121+static int createFromTiffLines(TIFF *tif, gdImagePtr im, uint16_t bps, uint16_t photometric,
122 char has_alpha, char is_bw, int extra)
123 {
124- uint16 planar;
125- uint32 im_height, im_width, y;
126+ uint16_t planar;
127+ uint32_t im_height, im_width, y;
128
129 unsigned char *buffer;
130 int success = GD_SUCCESS;
131@@ -761,11 +761,11 @@ static int createFromTiffRgba(TIFF * tif, gdImagePtr im)
132 int color;
133 int width = im->sx;
134 int height = im->sy;
135- uint32 *buffer;
136- uint32 rgba;
137+ uint32_t *buffer;
138+ uint32_t rgba;
139 int success;
140
141- buffer = (uint32 *) gdCalloc(sizeof(uint32), width * height);
142+ buffer = (uint32_t *) gdCalloc(sizeof(uint32_t), width * height);
143 if (!buffer) {
144 return GD_FAILURE;
145 }
146@@ -810,11 +810,11 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile)
147 TIFF *tif;
148 tiff_handle *th;
149
150- uint16 bps, spp, photometric;
151- uint16 orientation;
152+ uint16_t bps, spp, photometric;
153+ uint16_t orientation;
154 int width, height;
155- uint16 extra, *extra_types;
156- uint16 planar;
157+ uint16_t extra, *extra_types;
158+ uint16_t planar;
159 char has_alpha, is_bw, is_gray;
160 char force_rgba = FALSE;
161 char save_transparent;
162@@ -867,7 +867,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile)
163 }
164
165 if (!TIFFGetField (tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
166- uint16 compression;
167+ uint16_t compression;
168 if (TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression) &&
169 (compression == COMPRESSION_CCITTFAX3 ||
170 compression == COMPRESSION_CCITTFAX4 ||
diff --git a/meta-oe/recipes-support/gd/gd_2.3.2.bb b/meta-oe/recipes-support/gd/gd_2.3.3.bb
index 32484ce79..cbd45c088 100644
--- a/meta-oe/recipes-support/gd/gd_2.3.2.bb
+++ b/meta-oe/recipes-support/gd/gd_2.3.3.bb
@@ -9,16 +9,14 @@ HOMEPAGE = "http://libgd.github.io/"
9 9
10SECTION = "libs" 10SECTION = "libs"
11LICENSE = "GD" 11LICENSE = "GD"
12LIC_FILES_CHKSUM = "file://COPYING;md5=8e5bc8627b9494741c905d65238c66b7" 12LIC_FILES_CHKSUM = "file://COPYING;md5=ace63adfdac78400fc30fa22ee9c1bb1"
13 13
14DEPENDS = "freetype libpng jpeg zlib tiff" 14DEPENDS = "freetype libpng jpeg zlib tiff"
15 15
16SRC_URI = "git://github.com/libgd/libgd.git;branch=master \ 16SRC_URI = "git://github.com/libgd/libgd.git;nobranch=1 \
17 file://0001-replace-uint32-with-uint32_t-and-uint16-with-uint16_.patch \
18 file://0001-fix-read-out-of-bands-in-reading-tga-header-file.patch \
19 " 17 "
20 18
21SRCREV = "2e40f55bfb460fc9d8cbcd290a0c9eb908d5af7e" 19SRCREV = "b5319a41286107b53daa0e08e402aa1819764bdc"
22 20
23S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
24 22