diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-12-22 18:04:38 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-12-23 09:32:57 +0100 |
commit | f7b703f4af4bbadb48e26ea93e54a91f00cb1a57 (patch) | |
tree | c7d9735d544bba37aaaf77cf7a7660fc810aa352 /meta-oe | |
parent | 28c25eb268b4f40a2c16a249d7a9fb7d8a94909a (diff) | |
download | meta-openembedded-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')
-rw-r--r-- | meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch | 61 | ||||
-rw-r--r-- | meta-oe/recipes-support/fltk/fltk_1.1.10.bb | 3 |
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 000000000..b2eb8d6fd --- /dev/null +++ b/meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | Imported from gentoo | ||
2 | http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/fltk/files/fltk-1.1.10-libpng15.patch | ||
3 | |||
4 | --- a/src/Fl_PNG_Image.cxx | ||
5 | +++ b/src/Fl_PNG_Image.cxx | ||
6 | @@ -66,7 +66,8 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read | ||
7 | png_structp pp; // PNG read pointer | ||
8 | png_infop info; // PNG info pointers | ||
9 | png_bytep *rows; // PNG row pointers | ||
10 | - | ||
11 | + png_byte color_type; // PNG color type | ||
12 | + png_byte bit_depth; // PNG bit depth | ||
13 | |||
14 | // Open the PNG file... | ||
15 | if ((fp = fopen(png, "rb")) == NULL) return; | ||
16 | @@ -75,7 +76,7 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read | ||
17 | pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); | ||
18 | info = png_create_info_struct(pp); | ||
19 | |||
20 | - if (setjmp(pp->jmpbuf)) | ||
21 | + if (setjmp(png_jmpbuf(pp))) | ||
22 | { | ||
23 | Fl::warning("PNG file \"%s\" contains errors!\n", png); | ||
24 | return; | ||
25 | @@ -86,28 +87,24 @@ Fl_PNG_Image::Fl_PNG_Image(const char *png) // I - File to read | ||
26 | |||
27 | // Get the image dimensions and convert to grayscale or RGB... | ||
28 | png_read_info(pp, info); | ||
29 | + color_type = png_get_color_type(pp, info); | ||
30 | |||
31 | - if (info->color_type == PNG_COLOR_TYPE_PALETTE) | ||
32 | + if (color_type == PNG_COLOR_TYPE_PALETTE) | ||
33 | png_set_expand(pp); | ||
34 | |||
35 | - if (info->color_type & PNG_COLOR_MASK_COLOR) | ||
36 | - channels = 3; | ||
37 | - else | ||
38 | - channels = 1; | ||
39 | - | ||
40 | - if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans) | ||
41 | - channels ++; | ||
42 | + channels = png_get_channels(pp, info); | ||
43 | |||
44 | - w((int)(info->width)); | ||
45 | - h((int)(info->height)); | ||
46 | + w((int)(png_get_image_width(pp, info))); | ||
47 | + h((int)(png_get_image_height(pp, info))); | ||
48 | d(channels); | ||
49 | |||
50 | - if (info->bit_depth < 8) | ||
51 | + bit_depth = png_get_bit_depth(pp, info); | ||
52 | + if (bit_depth < 8) | ||
53 | { | ||
54 | png_set_packing(pp); | ||
55 | png_set_expand(pp); | ||
56 | } | ||
57 | - else if (info->bit_depth == 16) | ||
58 | + else if (bit_depth == 16) | ||
59 | png_set_strip_16(pp); | ||
60 | |||
61 | # 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 ad8768db5..bf218ee6e 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" | |||
6 | 6 | ||
7 | DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft" | 7 | DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft" |
8 | 8 | ||
9 | PR = "r1" | ||
10 | |||
9 | SRC_URI = "ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${PV}/fltk-${PV}-source.tar.bz2 \ | 11 | SRC_URI = "ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${PV}/fltk-${PV}-source.tar.bz2 \ |
10 | file://disable_test.patch \ | 12 | file://disable_test.patch \ |
11 | file://dso-fix.patch \ | 13 | file://dso-fix.patch \ |
14 | file://libpng15.patch \ | ||
12 | " | 15 | " |
13 | 16 | ||
14 | S = "${WORKDIR}/fltk-${PV}" | 17 | S = "${WORKDIR}/fltk-${PV}" |