From e26179588bfb045120060316d2fc20a4380b99f0 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Tue, 1 Sep 2015 11:55:41 +0100 Subject: games/zsnes: Patched SlackBuild. Fixes build failure with libpng16 on -current. Signed-off-by: David Spencer --- games/zsnes/zsnes-1.51-libpng15.patch | 12 ++++++++++++ games/zsnes/zsnes.SlackBuild | 10 +++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 games/zsnes/zsnes-1.51-libpng15.patch (limited to 'games/zsnes') diff --git a/games/zsnes/zsnes-1.51-libpng15.patch b/games/zsnes/zsnes-1.51-libpng15.patch new file mode 100644 index 0000000000..b32c309675 --- /dev/null +++ b/games/zsnes/zsnes-1.51-libpng15.patch @@ -0,0 +1,12 @@ +Use existing png_set_IHDR() and stop accessing PNG structure members directly + +--- src/zip/zpng.c ++++ src/zip/zpng.c +@@ -129,7 +129,6 @@ + png_set_IHDR(png_ptr, info_ptr, width, height, 8, + PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); +- info_ptr->color_type = PNG_COLOR_TYPE_RGB; + + //Allocate an array of scanline pointers + row_pointers = (png_bytep*)malloc(height*sizeof(png_bytep)); diff --git a/games/zsnes/zsnes.SlackBuild b/games/zsnes/zsnes.SlackBuild index bdad578a74..171d487562 100644 --- a/games/zsnes/zsnes.SlackBuild +++ b/games/zsnes/zsnes.SlackBuild @@ -64,9 +64,6 @@ mv $PRGNAM$ZSNESDIR $PRGNAM-$VERSION mv $PRGNAM-$VERSION/src/* $PRGNAM-$VERSION cd $PRGNAM-$VERSION -# GCC 4.7 fixes from Debian -cat $CWD/0012-Fix-build-with-gcc-4.7.patch | patch -p2 --verbose - chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -74,6 +71,13 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# GCC 4.7 fixes from Debian +cat $CWD/0012-Fix-build-with-gcc-4.7.patch | patch -p2 --verbose + +# Fix for libpng16 (thanks to Arch Linux) +# https://projects.archlinux.org/svntogit/community.git/plain/trunk/zsnes-1.51-libpng15.patch?h=packages/zsnes +patch -p1 < $CWD/zsnes-1.51-libpng15.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ force_arch="$ARCH" \ -- cgit v1.2.3