summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch')
-rw-r--r--meta-oe/recipes-support/fltk/fltk-1.1.10/libpng15.patch61
1 files changed, 61 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 @@
1Imported from gentoo
2http://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)