[arch-commits] Commit in gd/repos (6 files)

Felix Yan felixonmars at archlinux.org
Thu Apr 27 00:51:52 UTC 2017


    Date: Thursday, April 27, 2017 @ 00:51:51
  Author: felixonmars
Revision: 294852

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  gd/repos/staging-i686/
  gd/repos/staging-i686/PKGBUILD
    (from rev 294851, gd/trunk/PKGBUILD)
  gd/repos/staging-i686/gd-2.2.4-upstream.patch
    (from rev 294851, gd/trunk/gd-2.2.4-upstream.patch)
  gd/repos/staging-x86_64/
  gd/repos/staging-x86_64/PKGBUILD
    (from rev 294851, gd/trunk/PKGBUILD)
  gd/repos/staging-x86_64/gd-2.2.4-upstream.patch
    (from rev 294851, gd/trunk/gd-2.2.4-upstream.patch)

----------------------------------------+
 staging-i686/PKGBUILD                  |   42 ++++++++++++++++++++++++++
 staging-i686/gd-2.2.4-upstream.patch   |   50 +++++++++++++++++++++++++++++++
 staging-x86_64/PKGBUILD                |   42 ++++++++++++++++++++++++++
 staging-x86_64/gd-2.2.4-upstream.patch |   50 +++++++++++++++++++++++++++++++
 4 files changed, 184 insertions(+)

Copied: gd/repos/staging-i686/PKGBUILD (from rev 294851, gd/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2017-04-27 00:51:51 UTC (rev 294852)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=gd
+pkgver=2.2.4
+pkgrel=2
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('fontconfig' 'libxpm' 'libwebp')
+optdepends=('perl: bdftogd script')
+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 \
+    --prefix=/usr \
+    --disable-rpath
+  make
+}
+
+check() {
+  cd libgd-${pkgver}
+  # see https://github.com/libgd/libgd/issues/302
+  [[ ${CARCH} == 'i686' ]] || FREETYPE_PROPERTIES='truetype:interpreter-version=35' make check
+}
+
+package() {
+  cd libgd-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Copied: gd/repos/staging-i686/gd-2.2.4-upstream.patch (from rev 294851, gd/trunk/gd-2.2.4-upstream.patch)
===================================================================
--- staging-i686/gd-2.2.4-upstream.patch	                        (rev 0)
+++ staging-i686/gd-2.2.4-upstream.patch	2017-04-27 00:51:51 UTC (rev 294852)
@@ -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;
+ 

Copied: gd/repos/staging-x86_64/PKGBUILD (from rev 294851, gd/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2017-04-27 00:51:51 UTC (rev 294852)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=gd
+pkgver=2.2.4
+pkgrel=2
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('fontconfig' 'libxpm' 'libwebp')
+optdepends=('perl: bdftogd script')
+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 \
+    --prefix=/usr \
+    --disable-rpath
+  make
+}
+
+check() {
+  cd libgd-${pkgver}
+  # see https://github.com/libgd/libgd/issues/302
+  [[ ${CARCH} == 'i686' ]] || FREETYPE_PROPERTIES='truetype:interpreter-version=35' make check
+}
+
+package() {
+  cd libgd-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}

Copied: gd/repos/staging-x86_64/gd-2.2.4-upstream.patch (from rev 294851, gd/trunk/gd-2.2.4-upstream.patch)
===================================================================
--- staging-x86_64/gd-2.2.4-upstream.patch	                        (rev 0)
+++ staging-x86_64/gd-2.2.4-upstream.patch	2017-04-27 00:51:51 UTC (rev 294852)
@@ -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