Commit d0a13821 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

package: add gd package

parent 47ee3051
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -376,6 +376,7 @@ source "package/cairo/Config.in"
source "package/fltk/Config.in"
source "package/fontconfig/Config.in"
source "package/freetype/Config.in"
source "package/gd/Config.in"
source "package/giblib/Config.in"
source "package/gtk2-engines/Config.in"
source "package/gtk2-themes/Config.in"

package/gd/Config.in

0 → 100644
+62 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_GD
	bool "gd"
	help
	  GD is a graphics library. It allows your code to quickly
	  draw images complete with lines, arcs, text, multiple
	  colours, cut and paste from other images, flood fills, and
	  write out the result as a PNG file. This is particularly
	  useful in World Wide Web applications, where PNG is one of
	  the formats accepted for inline images by most browsers.

	  http://www.boutell.com/gd/

if BR2_PACKAGE_GD

menu "gd tools"

config BR2_PACKAGE_GD_ANNOTATE
       bool "annotate"

config BR2_PACKAGE_GD_BDFTOGD
       bool "bdftogd"
       depends on BR2_PACKAGE_PERL

config BR2_PACKAGE_GD_GD2COPYPAL
       bool "gd2copypal"

config BR2_PACKAGE_GD_GD2TOGIF
       bool "gd2togif"

config BR2_PACKAGE_GD_GD2TOPNG
       bool "gd2topng"
       select BR2_PACKAGE_LIBPNG

config BR2_PACKAGE_GD_GDCMPGIF
       bool "gdcmpgif"

config BR2_PACKAGE_GD_GDPARTTOPNG
       bool "gdparttopng"
       select BR2_PACKAGE_LIBPNG

config BR2_PACKAGE_GD_GDTOPNG
       bool "gdtopng"
       select BR2_PACKAGE_LIBPNG

config BR2_PACKAGE_GD_GIFTOGD2
       bool "giftogd2"

config BR2_PACKAGE_GD_PNGTOGD
       bool "pngtogd"
       select BR2_PACKAGE_LIBPNG

config BR2_PACKAGE_GD_PNGTOGD2
       bool "pngtogd2"
       select BR2_PACKAGE_LIBPNG

config BR2_PACKAGE_GD_WEBPNG
       bool "webpng"
       select BR2_PACKAGE_LIBPNG

endmenu

endif
+28 −0
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;
+20 −0
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-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))
+51 −0
Original line number Diff line number Diff line
[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 <jacmet@sunsite.dk>
---
 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 */
Loading