[arch-commits] Commit in gd/trunk (PKGBUILD gd-2.2.4-upstream.patch)
Pierre Schmitz
pierre at archlinux.org
Sun Mar 26 08:10:14 UTC 2017
Date: Sunday, March 26, 2017 @ 08:10:13
Author: pierre
Revision: 291643
upgpkg: gd 2.2.4-1
Added:
gd/trunk/gd-2.2.4-upstream.patch
Modified:
gd/trunk/PKGBUILD
-------------------------+
PKGBUILD | 19 ++++++++++++-----
gd-2.2.4-upstream.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-26 08:08:44 UTC (rev 291642)
+++ PKGBUILD 2017-03-26 08:10:13 UTC (rev 291643)
@@ -2,8 +2,8 @@
# Maintainer: Pierre Schmitz <pierre at archlinux.de>
pkgname=gd
-pkgver=2.2.3
-pkgrel=3
+pkgver=2.2.4
+pkgrel=1
pkgdesc="Library for the dynamic creation of images by programmers"
arch=('i686' 'x86_64')
url="http://www.libgd.org/"
@@ -10,9 +10,17 @@
license=('custom')
depends=('fontconfig' 'libxpm' 'libwebp')
optdepends=('perl: bdftogd script')
-source=("https://github.com/libgd/libgd/releases/download/gd-${pkgver}/libgd-${pkgver}.tar.xz")
-md5sums=('14e4134c129b4c166c3a0549a32ef340')
+checkdepends=('ttf-liberation')
+source=("https://github.com/libgd/libgd/releases/download/gd-${pkgver}/libgd-${pkgver}.tar.xz"
+ 'gd-2.2.4-upstream.patch')
+md5sums=('a244855a323a3ea1975d708eb1e12b7a'
+ '7db6743a61b30471d0b466e6a6c54a49')
+prepare() {
+ cd libgd-${pkgver}
+ patch -p1 -i ${srcdir}/gd-2.2.4-upstream.patch
+}
+
build() {
cd libgd-${pkgver}
./configure \
@@ -23,7 +31,8 @@
check() {
cd libgd-${pkgver}
- [[ ${CARCH} == 'i686' ]] || make check
+ # see https://github.com/libgd/libgd/issues/302
+ [[ ${CARCH} == 'i686' ]] || FREETYPE_PROPERTIES='truetype:interpreter-version=35' make check
}
package() {
Added: gd-2.2.4-upstream.patch
===================================================================
--- gd-2.2.4-upstream.patch (rev 0)
+++ gd-2.2.4-upstream.patch 2017-03-26 08:10:13 UTC (rev 291643)
@@ -0,0 +1,50 @@
+From c9b601a658a79e6ea2aad29fbf60ca6e24ccef1e Mon Sep 17 00:00:00 2001
+From: "Christoph M. Becker" <cmbecker69 at gmx.de>
+Date: Wed, 18 Jan 2017 13:59:02 +0100
+Subject: [PATCH] Fix build issue regarding INT_MAX
+
+For portability gd_gd2.c needs to include <limits.h>.
+---
+ src/gd_gd2.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gd_gd2.c b/src/gd_gd2.c
+index c2904ca..049c4c5 100644
+--- a/src/gd_gd2.c
++++ b/src/gd_gd2.c
+@@ -74,6 +74,7 @@
+
+ /* 2.0.29: no more errno.h, makes windows happy */
+ #include <math.h>
++#include <limits.h>
+ #include <string.h>
+ #include "gd.h"
+ #include "gd_errors.h"
+
+
+From 55ac28a293eaa8c531870c8bb8ecc04b333975f4 Mon Sep 17 00:00:00 2001
+From: "Christoph M. Becker" <cmbecker69 at gmx.de>
+Date: Thu, 19 Jan 2017 01:02:58 +0100
+Subject: [PATCH] Fix #357: 2.2.4: Segfault in test suite.
+
+We make sure to never pass a negative `int` as argument to a `size_t`
+parameter.
+---
+ src/gd_io_dp.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gd_io_dp.c b/src/gd_io_dp.c
+index eda2eeb..cb38794 100644
+--- a/src/gd_io_dp.c
++++ b/src/gd_io_dp.c
+@@ -292,6 +292,10 @@ static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len)
+ rlen = dp->realSize - dp->pos;
+ }
+
++ if (rlen < 0) {
++ return 0;
++ }
++
+ memcpy(buf, (void *) ((char *)dp->data + dp->pos), rlen);
+ dp->pos += rlen;
+
More information about the arch-commits
mailing list