From: Baruch Siach Date: Sun, 13 Apr 2014 06:12:56 +0000 (+0300) Subject: gd: bump to version 2.1.0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6f86d593c6875ab99057030a3b27c5490b8eac6;p=buildroot.git 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: Baruch Siach Signed-off-by: Thomas Petazzoni --- diff --git a/package/gd/gd-01-gdlib-config.patch b/package/gd/gd-01-gdlib-config.patch new file mode 100644 index 0000000000..7756bf1240 --- /dev/null +++ b/package/gd/gd-01-gdlib-config.patch @@ -0,0 +1,32 @@ +Fix gdlib-config + +Since the @LIBICONV@ macro doesn't get replaced at compile time, we +end up installing an invalid gdlib-config: the gdlib-config --libs +says that one should link against @LIBICONV@ which obviously doesn't +work. + +Use the OpenWRT patch from +https://dev.openwrt.org/browser/packages/libs/gd/patches/101-gdlib-config.patch + +Signed-off-by: Thomas Petazzoni + +--- a/config/gdlib-config.in ++++ b/config/gdlib-config.in +@@ -71,7 +71,7 @@ while test $# -gt 0; do + echo @LDFLAGS@ + ;; + --libs) +- echo -lgd @LIBS@ @LIBICONV@ ++ echo -lgd @LIBS@ + ;; + --cflags|--includes) + echo -I@includedir@ +@@ -84,7 +84,7 @@ while test $# -gt 0; do + echo "includedir: $includedir" + echo "cflags: -I@includedir@" + echo "ldflags: @LDFLAGS@" +- echo "libs: @LIBS@ @LIBICONV@" ++ echo "libs: @LIBS@" + echo "libdir: $libdir" + echo "features: @FEATURES@" + ;; diff --git a/package/gd/gd-02-no-zlib.patch b/package/gd/gd-02-no-zlib.patch new file mode 100644 index 0000000000..65cf7f8f19 --- /dev/null +++ b/package/gd/gd-02-no-zlib.patch @@ -0,0 +1,51 @@ +[PATCH] gd_gd2: provide dummy implementations for all public symbols when !zlib + +gd_gd2.c only provides dummy implementations for some of it's public symbols +when zlib isn't found, causing build failures in several of the tools. + +Fix it by providing dummy implementations for all of them. + +Signed-off-by: Peter Korsgaard +--- + gd_gd2.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +Index: 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; + } ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, ++ int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++} ++ ++BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} + #endif /* HAVE_LIBZ */ diff --git a/package/gd/gd-03-gd_bmp-fix-build-with-uClibc.patch b/package/gd/gd-03-gd_bmp-fix-build-with-uClibc.patch new file mode 100644 index 0000000000..89bc39186e --- /dev/null +++ b/package/gd/gd-03-gd_bmp-fix-build-with-uClibc.patch @@ -0,0 +1,50 @@ +From ea2a03e983acf34a1320b460dcad43b7e0b0b14f Mon Sep 17 00:00:00 2001 +Message-Id: +From: Baruch Siach +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 +--- + 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 ++#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 + diff --git a/package/gd/gd-fontconfig.patch b/package/gd/gd-fontconfig.patch deleted file mode 100644 index 651fbec8a0..0000000000 --- a/package/gd/gd-fontconfig.patch +++ /dev/null @@ -1,28 +0,0 @@ -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; diff --git a/package/gd/gd-gdlib-config.patch b/package/gd/gd-gdlib-config.patch deleted file mode 100644 index bfff88bbc5..0000000000 --- a/package/gd/gd-gdlib-config.patch +++ /dev/null @@ -1,32 +0,0 @@ -Fix gdlib-config - -Since the @LIBICONV@ macro doesn't get replaced at compile time, we -end up installing an invalid gdlib-config: the gdlib-config --libs -says that one should link against @LIBICONV@ which obviously doesn't -work. - -Use the OpenWRT patch from -https://dev.openwrt.org/browser/packages/libs/gd/patches/101-gdlib-config.patch - -Signed-off-by: Thomas Petazzoni - ---- a/config/gdlib-config.in -+++ b/config/gdlib-config.in -@@ -71,7 +71,7 @@ while test $# -gt 0; do - echo @LDFLAGS@ - ;; - --libs) -- echo @LIBS@ @LIBICONV@ -+ echo @LIBS@ - ;; - --cflags|--includes) - echo -I@includedir@ -@@ -84,7 +84,7 @@ while test $# -gt 0; do - echo "includedir: $includedir" - echo "cflags: -I@includedir@" - echo "ldflags: @LDFLAGS@" -- echo "libs: @LIBS@ @LIBICONV@" -+ echo "libs: @LIBS@" - echo "libdir: $libdir" - echo "features: @FEATURES@" - ;; diff --git a/package/gd/gd-iconv.patch b/package/gd/gd-iconv.patch deleted file mode 100644 index 821f5cbdb2..0000000000 --- a/package/gd/gd-iconv.patch +++ /dev/null @@ -1,17 +0,0 @@ -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 - -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 diff --git a/package/gd/gd-libpng-config.patch b/package/gd/gd-libpng-config.patch deleted file mode 100644 index cf8b92e445..0000000000 --- a/package/gd/gd-libpng-config.patch +++ /dev/null @@ -1,30 +0,0 @@ -Call the libpng12-confg and libpng-config specified by -$LIBPNG12_CONFIG and $LIBPNG_CONFIG variables that are set by -ac_cv_path_LIBPNG12_CONFIG and ac_cv_path_LIBPNG_CONFIG. This is -important for cross compiler that need to get the staging settings -instead of the host settings. - -Signed-off-by: Jean-Christian de Rivaz - -diff -Nura gd-2.0.35.orig/configure.ac gd-2.0.35/configure.ac ---- gd-2.0.35.orig/configure.ac 2013-01-18 02:00:59.000000000 +0100 -+++ gd-2.0.35/configure.ac 2013-01-18 02:01:44.000000000 +0100 -@@ -353,14 +353,14 @@ - AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config]) - AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config]) - if test -n "$LIBPNG12_CONFIG"; then -- libpng_CPPFLAGS=`libpng12-config --cflags` -+ libpng_CPPFLAGS=`$LIBPNG12_CONFIG --cflags` - # should be --ldopts, but it's currently broken -- libpng_LDFLAGS=`libpng12-config --ldflags` -+ libpng_LDFLAGS=`$LIBPNG12_CONFIG --ldflags` - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` - elif test -n "$LIBPNG_CONFIG"; then -- libpng_CPPFLAGS=`libpng-config --cflags` -+ libpng_CPPFLAGS=`$LIBPNG_CONFIG --cflags` - # should be --ldopts, but it's currently broken -- libpng_LDFLAGS=`libpng-config --ldflags` -+ libpng_LDFLAGS=`$LIBPNG_CONFIG --ldflags` - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` - elif test -d "$withval"; then - libpng_CPPFLAGS="-I$withval/include" diff --git a/package/gd/gd-maxcolors.patch b/package/gd/gd-maxcolors.patch deleted file mode 100644 index 161cf19935..0000000000 --- a/package/gd/gd-maxcolors.patch +++ /dev/null @@ -1,20 +0,0 @@ -Patch from Gentoo: -http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.0.35-maxcolors.patch?view=log - -http://bugs.gentoo.org/292130 - -fix in usptream repo already - ---- gd-2.0.35/gd_gd.c -+++ gd-2.0.35/gd_gd.c -@@ -44,6 +44,10 @@ - { - goto fail1; - } -+ if (im->colorsTotal > gdMaxColors) -+ { -+ goto fail1; -+ } - } - /* Int to accommodate truecolor single-color transparency */ - if (!gdGetInt (&im->transparent, in)) diff --git a/package/gd/gd-no-zlib.patch b/package/gd/gd-no-zlib.patch deleted file mode 100644 index cb265b2a3b..0000000000 --- a/package/gd/gd-no-zlib.patch +++ /dev/null @@ -1,51 +0,0 @@ -[PATCH] gd_gd2: provide dummy implementations for all public symbols when !zlib - -gd_gd2.c only provides dummy implementations for some of it's public symbols -when zlib isn't found, causing build failures in several of the tools. - -Fix it by providing dummy implementations for all of them. - -Signed-off-by: Peter Korsgaard ---- - gd_gd2.c | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - -Index: gd-2.0.35/gd_gd2.c -=================================================================== ---- gd-2.0.35.orig/gd_gd2.c -+++ gd-2.0.35/gd_gd2.c -@@ -1068,4 +1068,34 @@ - fprintf (stderr, "GD2 support is not available - no libz\n"); - return NULL; - } -+ -+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h) -+{ -+ fprintf (stderr, "GD2 support is not available - no libz\n"); -+ return NULL; -+} -+ -+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, -+ int h) -+{ -+ fprintf (stderr, "GD2 support is not available - no libz\n"); -+ return NULL; -+} -+ -+BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h) -+{ -+ fprintf (stderr, "GD2 support is not available - no libz\n"); -+ return NULL; -+} -+ -+BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) -+{ -+ fprintf (stderr, "GD2 support is not available - no libz\n"); -+} -+ -+BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) -+{ -+ fprintf (stderr, "GD2 support is not available - no libz\n"); -+ return NULL; -+} - #endif /* HAVE_LIBZ */ diff --git a/package/gd/gd.mk b/package/gd/gd.mk index 146ad6f9fd..f4d54abf53 100644 --- a/package/gd/gd.mk +++ b/package/gd/gd.mk @@ -4,11 +4,9 @@ # ################################################################################ -GD_VERSION = 2.0.35 -GD_SOURCE = gd-$(GD_VERSION).tar.bz2 -GD_SITE = http://distfiles.gentoo.org/distfiles -# needed because of configure.ac timestamp -GD_AUTORECONF = YES +GD_VERSION = 2.1.0 +GD_SOURCE = libgd-$(GD_VERSION).tar.xz +GD_SITE = https://bitbucket.org/libgd/gd-libgd/downloads/ GD_INSTALL_STAGING = YES GD_LICENSE = GD license GD_LICENSE_FILES = COPYING @@ -16,11 +14,6 @@ GD_LICENSE_FILES = COPYING GD_CONFIG_SCRIPTS = gdlib-config GD_CONF_OPT = --without-x --disable-rpath -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_PREFER_STATIC_LIB),yy) -# add -pthread when linking executables statically -GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread" -endif - ifeq ($(BR2_PACKAGE_FONTCONFIG),y) GD_DEPENDENCIES += fontconfig GD_CONF_OPT += --with-fontconfig @@ -28,7 +21,7 @@ endif ifeq ($(BR2_PACKAGE_FREETYPE),y) GD_DEPENDENCIES += freetype -GD_CONF_ENV += ac_cv_path_FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config +GD_CONF_OPT += --with-freetype=$(STAGING_DIR)/usr else GD_CONF_OPT += --without-freetype endif @@ -40,9 +33,7 @@ endif ifeq ($(BR2_PACKAGE_LIBPNG),y) GD_DEPENDENCIES += libpng -GD_CONF_OPT += --with-png -GD_CONF_ENV += ac_cv_path_LIBPNG12_CONFIG="" -GD_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +GD_CONF_OPT += --with-png=$(STAGING_DIR)/usr else GD_CONF_OPT += --without-png endif @@ -56,22 +47,6 @@ ifeq ($(BR2_PACKAGE_ZLIB),y) GD_DEPENDENCIES += zlib endif -ifeq ($(BR2_PACKAGE_GETTEXT),y) -GD_DEPENDENCIES += gettext -else -# configure.ac has newer timestamp than aclocal.m4 / configure, so we need -# to autoreconf to regenerate them (or set configure.ac timestamp to older -# than them) to make the Makefile happy. -# configure.ac refers to AM_ICONV which we only have if gettext is enabled, -# so add a dummy definition elsewise -define GD_FIXUP_ICONV - echo 'm4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[:])])' \ - >> $(@D)/acinclude.m4 -endef - -GD_PRE_CONFIGURE_HOOKS += GD_FIXUP_ICONV -endif - GD_TOOLS_$(BR2_PACKAGE_GD_ANNOTATE) += annotate GD_TOOLS_$(BR2_PACKAGE_GD_BDFTOGD) += bdftogd GD_TOOLS_$(BR2_PACKAGE_GD_GD2COPYPAL) += gd2copypal