Commit c6f86d59 authored by Baruch Siach's avatar Baruch Siach Committed by Thomas Petazzoni
Browse files

gd: bump to version 2.1.0



Drop obsolete/applied patches. Refresh the rest, and add sequence numbers.

Add a patch fixing build against uClibc when UCLIBC_HAS_LONG_DOUBLE_MATH is
missing.

Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent b6e3ada8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 	echo @LDFLAGS@
 	;;
     --libs)
-	echo @LIBS@ @LIBICONV@
+	echo @LIBS@
-	echo -lgd @LIBS@ @LIBICONV@
+	echo -lgd @LIBS@
 	;;
     --cflags|--includes)
 	echo -I@includedir@
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Index: gd-2.0.35/gd_gd2.c
===================================================================
--- gd-2.0.35.orig/gd_gd2.c
+++ gd-2.0.35/gd_gd2.c
--- gd-2.0.35.orig/src/gd_gd2.c
+++ gd-2.0.35/src/gd_gd2.c
@@ -1068,4 +1068,34 @@
   fprintf (stderr, "GD2 support is not available - no libz\n");
   return NULL;
+50 −0
Original line number Diff line number Diff line
From ea2a03e983acf34a1320b460dcad43b7e0b0b14f Mon Sep 17 00:00:00 2001
Message-Id: <ea2a03e983acf34a1320b460dcad43b7e0b0b14f.1397134306.git.baruch@tkos.co.il>
From: Baruch Siach <baruch@tkos.co.il>
Date: Thu, 10 Apr 2014 15:49:13 +0300
Subject: [PATCH] gd_bmp: fix build with uClibc

Some architectures (like ARM) don't have the long double variants of math
functions under uClibc. Add a local ceill definition in this case.

Patch status: reported upstream, 
https://bitbucket.org/libgd/gd-libgd/issue/123/build-failure-agains-uclibc-arm

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 src/gd_bmp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/gd_bmp.c b/src/gd_bmp.c
index 0fc021909f1b..11b3ec1baa01 100644
--- a/src/gd_bmp.c
+++ b/src/gd_bmp.c
@@ -25,6 +25,11 @@
 #include "gdhelpers.h"
 #include "bmp.h"
 
+#include <features.h>
+#if defined (__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__)
+#define NO_LONG_DOUBLE
+#endif
+
 static int compress_row(unsigned char *uncompressed_row, int length);
 static int build_rle_packet(unsigned char *row, int packet_type, int length, unsigned char *data);
 
@@ -42,6 +47,13 @@ static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info);
 
 #define BMP_DEBUG(s)
 
+#ifdef NO_LONG_DOUBLE
+long double ceill(long double x)
+{
+	return (long double) ceil((double) x);
+}
+#endif
+
 static int gdBMPPutWord(gdIOCtx *out, int w)
 {
 	/* Byte order is little-endian */
-- 
1.9.1

package/gd/gd-fontconfig.patch

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
Patch from Gentoo:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.0.35-fontconfig.patch?view=log

fix from upstream

http://bugs.gentoo.org/363367

# HG changeset patch
# User tabe
# Date 1239812355 0
# Node ID 3ea283efcdafcb2acc1dd0ace1d3d48da6d8cec8
# Parent  4f29a877875f63cee5a64e7bea406a61882a565e
fixed FS#199

199, Fixed useFontConfig() to work as documented (Ethan Merritt)
 
diff -r 4f29a877875f -r 3ea283efcdaf gdft.c
--- a/gdft.c	Sat Apr 04 12:00:37 2009 +0000
+++ b/gdft.c	Wed Apr 15 16:19:15 2009 +0000
@@ -1659,7 +1659,7 @@
 BGD_DECLARE(int) gdFTUseFontConfig(int flag)
 {
 #ifdef HAVE_LIBFONTCONFIG
-	fontConfigFlag = 1;
+	fontConfigFlag = flag;
 	return 1;
 #else
 	return 0;

package/gd/gd-iconv.patch

deleted100644 → 0
+0 −17
Original line number Diff line number Diff line
Seems gd is using an ancient gettext for m4 sources which has issues.
Idea from OpenWRT patch and general knowledge on the internetweb.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

diff -Nura gd-2.0.35.orig/configure.ac gd-2.0.35/configure.ac
--- gd-2.0.35.orig/configure.ac	2012-12-15 08:36:07.165683957 -0300
+++ gd-2.0.35/configure.ac	2012-12-15 08:42:59.354213570 -0300
@@ -61,7 +61,7 @@
 AC_HEADER_STDC
 AC_CHECK_HEADERS([errno.h limits.h stddef.h stdlib.h string.h unistd.h])
 
-AM_ICONV
+m4_pattern_allow([AM_ICONV])
 # if test -n "$LIBICONV" ; then
 #   LIBS="$LIBS $LIBICONV"
 # fi
Loading