summaryrefslogtreecommitdiff
path: root/community/widelands
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-25 00:02:31 +0000
committerroot <root@rshg054.dnsready.net>2012-03-25 00:02:31 +0000
commit891f44722456b693d99b397f7e332a9ed68a47a2 (patch)
tree84b486efdd046bf1ac54f9288d13a443874be342 /community/widelands
parentadac5afd500d4ee3a65035e1cf5353ae236b4a61 (diff)
Sun Mar 25 00:02:31 UTC 2012
Diffstat (limited to 'community/widelands')
-rw-r--r--community/widelands/6233_6232.diff59
-rw-r--r--community/widelands/PKGBUILD7
2 files changed, 64 insertions, 2 deletions
diff --git a/community/widelands/6233_6232.diff b/community/widelands/6233_6232.diff
new file mode 100644
index 000000000..f82477607
--- /dev/null
+++ b/community/widelands/6233_6232.diff
@@ -0,0 +1,59 @@
+=== modified file 'src/graphic/graphic.cc'
+--- src/graphic/graphic.cc 2011-11-30 21:38:37 +0000
++++ src/graphic/graphic.cc 2012-02-19 17:10:12 +0000
+@@ -725,6 +725,18 @@
+ if (!png_ptr)
+ throw wexception("Graphic::save_png: could not create png struct");
+
++ png_infop info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr) {
++ png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
++ throw wexception("Graphic::save_png: could not create png info struct");
++ }
++
++ // Set jump for error
++ if (setjmp(png_jmpbuf(png_ptr))) {
++ png_destroy_write_struct(&png_ptr, &info_ptr);
++ throw wexception("Graphic::save_png: Error writing PNG!");
++ }
++
+ // Set another write function. This is potentially dangerouse because the
+ // flush function is internally called by png_write_end(), this will crash
+ // on newer libpngs. See here:
+@@ -736,35 +748,14 @@
+ sw,
+ &Graphic::m_png_write_function, &Graphic::m_png_flush_function);
+
+- png_infop info_ptr = png_create_info_struct(png_ptr);
+-
+- if (!info_ptr) {
+- png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
+- throw wexception("Graphic::save_png: could not create png info struct");
+- }
+-
+- // Set jump for error
+- if (setjmp(png_jmpbuf(png_ptr))) {
+- png_destroy_write_struct(&png_ptr, &info_ptr);
+- throw wexception("Graphic::save_png: could not set png setjmp");
+- }
+-
+ // Fill info struct
+ png_set_IHDR
+ (png_ptr, info_ptr, pix.get_w(), pix.get_h(),
+ 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+- // png_set_strip_16(png_ptr) ;
+-
+ // Start writing
+ png_write_info(png_ptr, info_ptr);
+-
+- // Strip data down
+- png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
+-
+- png_set_packing(png_ptr);
+-
+ {
+ uint32_t surf_w = pix.get_w();
+ uint32_t surf_h = pix.get_h();
+
diff --git a/community/widelands/PKGBUILD b/community/widelands/PKGBUILD
index 6f540efaa..80885f298 100644
--- a/community/widelands/PKGBUILD
+++ b/community/widelands/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 63777 2012-02-05 12:14:08Z ibiru $
+# $Id: PKGBUILD 68367 2012-03-23 06:59:41Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <rabyte*gmail>
@@ -6,7 +6,7 @@
pkgname=widelands
pkgver=16
_realver=build16
-pkgrel=5
+pkgrel=6
pkgdesc="A realtime strategy game with emphasis on economy and transport"
arch=('i686' 'x86_64')
url="http://widelands.org/"
@@ -14,11 +14,13 @@ license=('GPL')
makedepends=('cmake' 'boost' 'sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'ggz-client-libs' 'lua' 'glew' 'python2')
source=(http://launchpad.net/$pkgname/build16/$_realver/+download/$pkgname-$_realver-src.tar.bz2
widelands-0.16-libpng15.patch
+ 6233_6232.diff
$pkgname.desktop
$pkgname.png
$pkgname.sh)
md5sums=('3d8c28e145b73c64d8ed1625319d25a2'
'e492620b071cbd1db04280173653a67c'
+ '9f91bff91a6867cc3ecdea407007d781'
'15820bf099fd6f16251fe70a75c534bb'
'3dfda7e9ca76ca00dd98d745d0ceb328'
'7cae50aba5ed0cd2cfeea79124637b46')
@@ -27,6 +29,7 @@ build() {
cd $srcdir/$pkgname-$_realver-src
patch -Np0 < $srcdir/widelands-0.16-libpng15.patch
+ patch -Np0 < $srcdir/6233_6232.diff
mkdir -p build/compile && cd build/compile