summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2011-12-21 18:46:00 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2011-12-21 18:46:00 +0000
commit1ca8a76068da7861b3e8bb6876f7a0c19351c25c (patch)
tree1353248d0d67c847f913041ba3dcb78725464aa3 /games-strategy/wargus
parentStable for AMD64, wrt bug #395449 (diff)
downloadgentoo-2-1ca8a76068da7861b3e8bb6876f7a0c19351c25c.tar.gz
gentoo-2-1ca8a76068da7861b3e8bb6876f7a0c19351c25c.tar.bz2
gentoo-2-1ca8a76068da7861b3e8bb6876f7a0c19351c25c.zip
patch to build against newer libpng from jannis (bug #395501)
(Portage version: 2.1.10.41/cvs/Linux i686)
Diffstat (limited to 'games-strategy/wargus')
-rw-r--r--games-strategy/wargus/ChangeLog8
-rw-r--r--games-strategy/wargus/files/wargus-2.2.5.5-libpng.patch36
-rw-r--r--games-strategy/wargus/wargus-2.2.5.5.ebuild5
3 files changed, 45 insertions, 4 deletions
diff --git a/games-strategy/wargus/ChangeLog b/games-strategy/wargus/ChangeLog
index 995d31afead5..0c2348236bbd 100644
--- a/games-strategy/wargus/ChangeLog
+++ b/games-strategy/wargus/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-strategy/wargus
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/wargus/ChangeLog,v 1.12 2010/11/29 07:05:41 mr_bones_ Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/wargus/ChangeLog,v 1.13 2011/12/21 18:46:00 mr_bones_ Exp $
+
+ 21 Dec 2011; Michael Sterrett <mr_bones_@gentoo.org> wargus-2.2.5.5.ebuild,
+ +files/wargus-2.2.5.5-libpng.patch:
+ patch to build against newer libpng from jannis (bug #395501)
*wargus-2.2.5.5 (29 Nov 2010)
diff --git a/games-strategy/wargus/files/wargus-2.2.5.5-libpng.patch b/games-strategy/wargus/files/wargus-2.2.5.5-libpng.patch
new file mode 100644
index 000000000000..65ebc12ce8e9
--- /dev/null
+++ b/games-strategy/wargus/files/wargus-2.2.5.5-libpng.patch
@@ -0,0 +1,36 @@
+--- wartool.orig.c
++++ wartool.c
+@@ -61,6 +61,7 @@
+ #include <unistd.h>
+ #endif
+ #include <ctype.h>
++#include <zlib.h>
+ #include <png.h>
+
+ #include "endian.h"
+@@ -1876,7 +1877,7 @@
+ return 1;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ // FIXME: must free buffers!!
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
+@@ -1888,14 +1889,8 @@
+ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
+
+ // prepare the file information
+- info_ptr->width = w;
+- info_ptr->height = h;
+- info_ptr->bit_depth = 8;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- info_ptr->interlace_type = 0;
+- info_ptr->valid |= PNG_INFO_PLTE;
+- info_ptr->palette = (png_colorp)pal;
+- info_ptr->num_palette = 256;
++ png_set_IHDR(png_ptr, info_ptr, w, h, 8, PNG_COLOR_TYPE_PALETTE, 0, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
++ png_set_PLTE(png_ptr, info_ptr, (png_colorp)pal, 256);
+
+ if (transparent) {
+ unsigned char* p;
diff --git a/games-strategy/wargus/wargus-2.2.5.5.ebuild b/games-strategy/wargus/wargus-2.2.5.5.ebuild
index 11cc402e4038..fbb3a85cc553 100644
--- a/games-strategy/wargus/wargus-2.2.5.5.ebuild
+++ b/games-strategy/wargus/wargus-2.2.5.5.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/wargus/wargus-2.2.5.5.ebuild,v 1.4 2011/03/09 22:55:07 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/wargus/wargus-2.2.5.5.ebuild,v 1.5 2011/12/21 18:46:00 mr_bones_ Exp $
EAPI=2
inherit eutils games
@@ -20,6 +20,7 @@ RDEPEND="=games-engines/stratagus-${PV}*"
src_prepare() {
cdrom_get_cds data/rezdat.war
+ epatch "${FILESDIR}/${P}-libpng.patch"
edos2unix build.sh
}