aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/fltk
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-12-22 18:04:38 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2012-12-23 09:32:57 +0100
commitf7b703f4af4bbadb48e26ea93e54a91f00cb1a57 (patch)
treec7d9735d544bba37aaaf77cf7a7660fc810aa352 /meta-oe/recipes-support/fltk
parent28c25eb268b4f40a2c16a249d7a9fb7d8a94909a (diff)
downloadmeta-openembedded-contrib-f7b703f4af4bbadb48e26ea93e54a91f00cb1a57.tar.gz
fltk: fix build with libpng-1.5 from oe-core
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/fltk')
-rw-r--r--meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch61
-rw-r--r--meta-oe/recipes-support/fltk/fltk_1.1.10.bb3
2 files changed, 64 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch b/meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch
new file mode 100644
index 0000000000..b2eb8d6fd8
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch
@@ -0,0 +1,61 @@
+Imported from gentoo
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/fltk/files/fltk-1.1.10-libpng15.patch
+
+--- a/src/Fl_PNG_Image.cxx
++++ b/src/Fl_PNG_Image.cxx
+@@ -66,7 +66,8 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
+ png_structp pp; // PNG read pointer
+ png_infop info; // PNG info pointers
+ png_bytep *rows; // PNG row pointers
+-
++ png_byte color_type; // PNG color type
++ png_byte bit_depth; // PNG bit depth
+
+ // Open the PNG file...
+ if ((fp = fopen(png, "rb")) == NULL) return;
+@@ -75,7 +76,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
+ pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ info = png_create_info_struct(pp);
+
+- if (setjmp(pp->jmpbuf))
++ if (setjmp(png_jmpbuf(pp)))
+ {
+ Fl::warning("PNG file \"%s\" contains errors!\n", png);
+ return;
+@@ -86,28 +87,24 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read
+
+ // Get the image dimensions and convert to grayscale or RGB...
+ png_read_info(pp, info);
++ color_type = png_get_color_type(pp, info);
+
+- if (info->color_type == PNG_COLOR_TYPE_PALETTE)
++ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ png_set_expand(pp);
+
+- if (info->color_type & PNG_COLOR_MASK_COLOR)
+- channels = 3;
+- else
+- channels = 1;
+-
+- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
+- channels ++;
++ channels = png_get_channels(pp, info);
+
+- w((int)(info->width));
+- h((int)(info->height));
++ w((int)(png_get_image_width(pp, info)));
++ h((int)(png_get_image_height(pp, info)));
+ d(channels);
+
+- if (info->bit_depth < 8)
++ bit_depth = png_get_bit_depth(pp, info);
++ if (bit_depth < 8)
+ {
+ png_set_packing(pp);
+ png_set_expand(pp);
+ }
+- else if (info->bit_depth == 16)
++ else if (bit_depth == 16)
+ png_set_strip_16(pp);
+
+ # if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)
diff --git a/meta-oe/recipes-support/fltk/fltk_1.1.10.bb b/meta-oe/recipes-support/fltk/fltk_1.1.10.bb
index ad8768db5a..bf218ee6e5 100644
--- a/meta-oe/recipes-support/fltk/fltk_1.1.10.bb
+++ b/meta-oe/recipes-support/fltk/fltk_1.1.10.bb
@@ -6,9 +6,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1c0b73db66884b6a925e727400315130"
DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
+PR = "r1"
+
SRC_URI = "ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${PV}/fltk-${PV}-source.tar.bz2 \
file://disable_test.patch \
file://dso-fix.patch \
+ file://libpng15.patch \
"
S = "${WORKDIR}/fltk-${PV}"