summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2011-09-26 15:34:41 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2011-09-26 15:34:41 +0000
commit80f7a4e0f63cd453e2ee8114acc862ffedb062f8 (patch)
tree5b04bb22894b4f01c5dcddd53063a4cde46a1f01 /sys-apps/tuxonice-userui
parentVersion bump (diff)
downloadgentoo-2-80f7a4e0f63cd453e2ee8114acc862ffedb062f8.tar.gz
gentoo-2-80f7a4e0f63cd453e2ee8114acc862ffedb062f8.tar.bz2
gentoo-2-80f7a4e0f63cd453e2ee8114acc862ffedb062f8.zip
Add libpng-1.5 patch. Thanks to Samuli Suominen <ssuominen@gentoo.org>. Bug #384481
(Portage version: 2.2.0_alpha55/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/tuxonice-userui')
-rw-r--r--sys-apps/tuxonice-userui/ChangeLog7
-rw-r--r--sys-apps/tuxonice-userui/files/tuxonice-userui-1.0-libpng15.patch88
-rw-r--r--sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild8
3 files changed, 98 insertions, 5 deletions
diff --git a/sys-apps/tuxonice-userui/ChangeLog b/sys-apps/tuxonice-userui/ChangeLog
index 23419e9d502d..cabfef79a1f8 100644
--- a/sys-apps/tuxonice-userui/ChangeLog
+++ b/sys-apps/tuxonice-userui/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/tuxonice-userui
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/tuxonice-userui/ChangeLog,v 1.21 2011/08/15 11:33:07 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/tuxonice-userui/ChangeLog,v 1.22 2011/09/26 15:34:41 hwoarang Exp $
+
+ 26 Sep 2011; Markos Chandras <hwoarang@gentoo.org>
+ tuxonice-userui-1.0.ebuild, +files/tuxonice-userui-1.0-libpng15.patch:
+ Add libpng-1.5 patch. Thanks to Samuli Suominen <ssuominen@gentoo.org>. Bug
+ #384481
15 Aug 2011; Krzysztof Pawlik <nelchael@gentoo.org>
tuxonice-userui-1.0.ebuild:
diff --git a/sys-apps/tuxonice-userui/files/tuxonice-userui-1.0-libpng15.patch b/sys-apps/tuxonice-userui/files/tuxonice-userui-1.0-libpng15.patch
new file mode 100644
index 000000000000..bfe6d0a5e50e
--- /dev/null
+++ b/sys-apps/tuxonice-userui/files/tuxonice-userui-1.0-libpng15.patch
@@ -0,0 +1,88 @@
+--- fbsplash/image.c
++++ fbsplash/image.c
+@@ -112,29 +112,29 @@
+ png_init_io(png_ptr, fp);
+ png_read_info(png_ptr, info_ptr);
+
+- if (cmap && info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) {
++ if (cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_PALETTE) {
+ printerr("Could not read file %s. Not a palette-based image.\n", filename);
+ goto failed;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
++ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_gray_to_rgb(png_ptr);
+
+- if (info_ptr->bit_depth == 16)
++ if (png_get_bit_depth(png_ptr, info_ptr) == 16)
+ png_set_strip_16(png_ptr);
+
+- if (!want_alpha && info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
++ if (!want_alpha && png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA)
+ png_set_strip_alpha(png_ptr);
+
+ #ifndef TARGET_KERNEL
+- if (!(info_ptr->color_type & PNG_COLOR_MASK_ALPHA) & want_alpha) {
++ if (!(png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) & want_alpha) {
+ png_set_add_alpha(png_ptr, 0xff, PNG_FILLER_AFTER);
+ }
+ #endif
+ png_read_update_info(png_ptr, info_ptr);
+
+- if (!cmap && info_ptr->color_type != PNG_COLOR_TYPE_RGB && info_ptr->color_type != PNG_COLOR_TYPE_RGBA) {
++ if (!cmap && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGB && png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_RGBA) {
+ printerr("Could not read file %s. Not an RGB image.\n", filename);
+ goto failed;
+ }
+@@ -150,12 +150,12 @@
+
+ rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
+- if ((width && *width && info_ptr->width != *width) || (height && *height && info_ptr->height != *height)) {
++ if ((width && *width && png_get_image_width(png_ptr, info_ptr) != *width) || (height && *height && png_get_image_height(png_ptr, info_ptr) != *height)) {
+ printerr("Image size mismatch: %s.\n", filename);
+ goto failed;
+ } else {
+- *width = info_ptr->width;
+- *height = info_ptr->height;
++ *width = png_get_image_width(png_ptr, info_ptr);
++ *height = png_get_image_height(png_ptr, info_ptr);
+ }
+
+ *data = malloc(fb_var.xres * fb_var.yres * bytespp);
+@@ -171,11 +171,11 @@
+ goto failed;
+ }
+
+- for (i = 0; i < info_ptr->height; i++) {
++ for (i = 0; i < png_get_image_height(png_ptr, info_ptr); i++) {
+ if (cmap) {
+- row_pointer = *data + info_ptr->width * i;
++ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i;
+ } else if (want_alpha) {
+- row_pointer = *data + info_ptr->width * i * 4;
++ row_pointer = *data + png_get_image_width(png_ptr, info_ptr) * i * 4;
+ } else {
+ row_pointer = buf;
+ }
+@@ -184,7 +184,7 @@
+
+ if (cmap) {
+ int h = 256 - cmap->len;
+- t = *data + info_ptr->width * i;
++ t = *data + png_get_image_width(png_ptr, info_ptr) * i;
+
+ if (h) {
+ /* Move the colors up by 'h' offset. This is used because fbcon
+@@ -196,7 +196,7 @@
+
+ /* We only need to convert the image if we the alpha channel is not required */
+ } else if (!want_alpha) {
+- truecolor2fb((truecolor*)buf, *data + info_ptr->width * bytespp * i, info_ptr->width, i, 0);
++ truecolor2fb((truecolor*)buf, *data + png_get_image_width(png_ptr, info_ptr) * bytespp * i, png_get_image_width(png_ptr, info_ptr), i, 0);
+ }
+ }
+
diff --git a/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild b/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild
index ff854f4d2c5c..9d3f9c116adc 100644
--- a/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild
+++ b/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild,v 1.8 2011/08/15 11:33:07 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/tuxonice-userui/tuxonice-userui-1.0.ebuild,v 1.9 2011/09/26 15:34:41 hwoarang Exp $
EAPI="2"
@@ -17,15 +17,15 @@ KEYWORDS="amd64 x86"
IUSE="fbsplash"
DEPEND="fbsplash? ( >=media-gfx/splashutils-1.5.2.1
media-libs/libmng[lcms]
- || ( >=media-libs/libpng-1.4.4[static-libs]
- <media-libs/libpng-1.4.4:0 )
+ >=media-libs/libpng-1.4.8[static-libs]
media-libs/freetype[static-libs]
app-arch/bzip2[static]
media-libs/lcms:0[static-libs] )"
RDEPEND="${DEPEND}"
src_prepare() {
- epatch "${FILESDIR}/${P}-Makefiles.patch"
+ epatch "${FILESDIR}/${P}-Makefiles.patch" \
+ "${FILESDIR}"/${P}-libpng15.patch
sed -i -e 's/-lfreetype/-lfreetype -lbz2/' "${S}/Makefile" || die
}