zsnes rebuild against libpng15

This commit is contained in:
Neophytos 2012-12-06 11:46:34 +00:00
parent 5342bb8b8c
commit c8fa53846f
3 changed files with 43 additions and 20 deletions

View File

@ -1,50 +1,51 @@
# Lib32 Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
# Contributions from Arch: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/zsnes
pkgname=zsnes
pkgver=1.51
pkgrel=2
pkgrel=4
pkgdesc="Super Nintendo emulator"
url="http://www.zsnes.com/"
arch=('i686' 'x86_64')
license=('GPL')
if [ $CARCH == "x86_64" ]; then
depends=('gcc-libs-multilib' 'lib32-sdl' 'lib32-libpng>=1.4.0' 'lib32-libgl' 'lib32-ncurses' 'lib32-mesa')
makedepends=('nasm' 'gcc-multilib')
else
depends=('gcc-libs' 'sdl' 'libpng>=1.4.0' 'libgl' 'ncurses' 'mesa')
makedepends=('nasm' 'gcc')
fi
depends=('gcc-libs-multilib' 'lib32-sdl' 'lib32-libpng' 'lib32-libgl' 'lib32-ncurses' 'lib32-mesa')
makedepends=('nasm' 'gcc-multilib')
source=(http://downloads.sourceforge.net/${pkgname}/zsnes151src.tar.bz2
zsnes.patch
zsnes.desktop
zsnes_icon.png)
zsnes_icon.png
gcc47-fix.patch
libpng15.patch)
md5sums=('7071186bf80632ae88a153239498d8c9'
'3af40c7d674ebfce1bb1ab6b7e9a8fe4'
'b100b2aa342c551167d7c5dcdcde9dd4'
'b5260c02adfc3b7ff725041214b00bfd')
'b5260c02adfc3b7ff725041214b00bfd'
'951a54e05e4436fe1114308e4466ad74'
'd9a9956bf8b709eaccb0f68132b8693a')
build() {
cd ${srcdir}/${pkgname}_1_51/
patch -p1 -i ../zsnes.patch || return 1
patch -p1 -i ../zsnes.patch
patch -p1 -i ../gcc47-fix.patch
patch -p0 -i ../libpng15.patch
cd ${srcdir}/${pkgname}_1_51/src
if [ $CARCH == "x86_64" ]; then
export CC="gcc -m32"
export CXX="g++ -m32"
fi
./autogen.sh --prefix=/usr \
x_libraries=/usr/lib \
force_arch=i686 \
--enable-release
make || return 1
make
}
package() {
cd ${srcdir}/${pkgname}_1_51/src
make DESTDIR=${pkgdir} install
# adding --mandir= to autoconf line fails
install -dm755 ${pkgdir}/usr/share

10
zsnes/gcc47-fix.patch Normal file
View File

@ -0,0 +1,10 @@
--- /src/tools/depbuild.cpp 2012-05-27 23:33:13.681858365 +0300
+++ /src/tools/depbuild.cpp 2012-05-27 23:36:37.105674828 +0300
@@ -28,6 +28,7 @@
#include "fileutil.h"
#include "strutil.h"
+#include "unistd.h"
string cc;
string nasm;

12
zsnes/libpng15.patch Normal file
View File

@ -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));