summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2011-09-16 12:16:41 +0000
committerAlfredo Tupone <tupone@gentoo.org>2011-09-16 12:16:41 +0000
commita7a0b3a143d10ae7c46b2202fad2c4a7b25feaa1 (patch)
treeb83ea3ba0abba805154c6a916bcaa5a9439a6c7c /games-fps/doomsday
parentMarked stable on AMD64 based on arch testing by Agostino "ago" Sarubbo in sec... (diff)
downloadgentoo-2-a7a0b3a143d10ae7c46b2202fad2c4a7b25feaa1.tar.gz
gentoo-2-a7a0b3a143d10ae7c46b2202fad2c4a7b25feaa1.tar.bz2
gentoo-2-a7a0b3a143d10ae7c46b2202fad2c4a7b25feaa1.zip
Build with png-1.5 Bug #383219
(Portage version: 2.1.10.15/cvs/Linux i686)
Diffstat (limited to 'games-fps/doomsday')
-rw-r--r--games-fps/doomsday/ChangeLog6
-rw-r--r--games-fps/doomsday/doomsday-1.9.0_beta69.ebuild6
-rw-r--r--games-fps/doomsday/files/doomsday-1.9.0_beta69-png15.patch86
3 files changed, 95 insertions, 3 deletions
diff --git a/games-fps/doomsday/ChangeLog b/games-fps/doomsday/ChangeLog
index a8fee4a66192..906c068b119b 100644
--- a/games-fps/doomsday/ChangeLog
+++ b/games-fps/doomsday/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-fps/doomsday
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/doomsday/ChangeLog,v 1.38 2011/05/16 14:40:29 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/doomsday/ChangeLog,v 1.39 2011/09/16 12:16:41 tupone Exp $
+
+ 16 Sep 2011; Tupone Alfredo <tupone@gentoo.org> doomsday-1.9.0_beta69.ebuild,
+ +files/doomsday-1.9.0_beta69-png15.patch:
+ Build with png-1.5 Bug #383219 by Diego Elio Pettenò
16 May 2011; Tupone Alfredo <tupone@gentoo.org> doomsday-1.9.0_beta69.ebuild,
+files/doomsday-1.9.0_beta69-underlink.patch:
diff --git a/games-fps/doomsday/doomsday-1.9.0_beta69.ebuild b/games-fps/doomsday/doomsday-1.9.0_beta69.ebuild
index 0d66e4d59954..3ac42e2cba22 100644
--- a/games-fps/doomsday/doomsday-1.9.0_beta69.ebuild
+++ b/games-fps/doomsday/doomsday-1.9.0_beta69.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/games-fps/doomsday/doomsday-1.9.0_beta69.ebuild,v 1.5 2011/05/16 14:40:29 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/doomsday/doomsday-1.9.0_beta69.ebuild,v 1.6 2011/09/16 12:16:41 tupone Exp $
EAPI=2
inherit cmake-utils games
@@ -28,7 +28,9 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${MY_P}/${PN}
-PATCHES=( "${FILESDIR}"/${P}-underlink.patch )
+PATCHES=( "${FILESDIR}"/${P}-underlink.patch
+ "${FILESDIR}"/${P}-png15.patch
+)
src_configure() {
mycmakeargs=(
diff --git a/games-fps/doomsday/files/doomsday-1.9.0_beta69-png15.patch b/games-fps/doomsday/files/doomsday-1.9.0_beta69-png15.patch
new file mode 100644
index 000000000000..ace2adf6c086
--- /dev/null
+++ b/games-fps/doomsday/files/doomsday-1.9.0_beta69-png15.patch
@@ -0,0 +1,86 @@
+--- engine/portable/src/gl_png.c.old 2011-09-16 13:42:35.684991097 +0200
++++ engine/portable/src/gl_png.c 2011-09-16 13:55:18.835900517 +0200
+@@ -119,18 +119,18 @@
+
+ // Check if it can be used.
+ canLoad = true;
+- if(png_info->bit_depth != 8)
++ if(png_get_bit_depth(png_ptr, png_info) != 8)
+ {
+ Con_Message("PNG_Load: \"%s\": Bit depth must be 8.\n", fileName);
+ canLoad = false;
+ }
+- else if(!png_info->width || !png_info->height)
++ else if(!png_get_image_width(png_ptr, png_info) || !png_get_image_height(png_ptr, png_info))
+ {
+ Con_Message("PNG_Load: \"%s\": Bad file? Size is zero.\n", fileName);
+ canLoad = false;
+ }
+- else if(png_info->channels <= 2 &&
+- png_info->color_type == PNG_COLOR_TYPE_PALETTE &&
++ else if(png_get_channels(png_ptr, png_info) <= 2 &&
++ png_get_color_type(png_ptr, png_info) == PNG_COLOR_TYPE_PALETTE &&
+ !png_get_valid(png_ptr, png_info, PNG_INFO_PLTE))
+ {
+ Con_Message("PNG_Load: \"%s\": Palette is invalid.\n", fileName);
+@@ -140,9 +140,9 @@
+ if(canLoad)
+ {
+ // Information about the image.
+- *width = png_info->width;
+- *height = png_info->height;
+- *pixelSize = png_info->channels;
++ *width = png_get_image_width(png_ptr, png_info);
++ *height = png_get_image_height(png_ptr, png_info);
++ *pixelSize = png_get_channels(png_ptr, png_info);
+
+ // Paletted images have three color components
+ // per pixel.
+@@ -154,33 +154,36 @@
+ // OK, let's copy it into Doomsday's buffer.
+ // \fixme Why not load directly into it?
+ retbuf =
+- M_Malloc(4 * png_info->width * png_info->height);
++ M_Malloc(4 * (*width) * (*height));
+ rows = png_get_rows(png_ptr, png_info);
+ for(i = 0; i < *height; ++i)
+ {
+- if(png_info->channels >= 3)
++ if(png_get_channels(png_ptr, png_info) >= 3)
+ {
+- memcpy(retbuf + i * (*pixelSize) * png_info->width,
+- rows[i], (*pixelSize) * png_info->width);
++ memcpy(retbuf + i * (*pixelSize) * (*width),
++ rows[i], (*pixelSize) * (*width));
+ }
+ else // Paletted image.
+ {
+ for(k = 0; k < *width; ++k)
+ {
+- pixel = retbuf + ((*pixelSize) * (i * png_info->width + k));
+- off = k * png_info->channels;
+- if(png_info->color_type == PNG_COLOR_TYPE_PALETTE)
++ pixel = retbuf + ((*pixelSize) * (i * (*width) + k));
++ off = k * png_get_channels(png_ptr, png_info);
++ if(png_get_color_type(png_ptr, png_info) == PNG_COLOR_TYPE_PALETTE)
+ {
+- pixel[0] = png_info->palette[rows[i][off]].red;
+- pixel[1] = png_info->palette[rows[i][off]].green;
+- pixel[2] = png_info->palette[rows[i][off]].blue;
++ png_colorp palette;
++ int num_palette;
++ png_get_PLTE(png_ptr, png_info, &palette, &num_palette);
++ pixel[0] = palette[rows[i][off]].red;
++ pixel[1] = palette[rows[i][off]].green;
++ pixel[2] = palette[rows[i][off]].blue;
+ }
+ else
+ {
+ // Grayscale.
+ pixel[0] = pixel[1] = pixel[2] = rows[i][off];
+ }
+- if(png_info->channels == 2) // Alpha data.
++ if(png_get_channels(png_ptr, png_info) == 2) // Alpha data.
+ {
+ pixel[3] = rows[i][off + 1];
+ }