mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-23 17:33:34 +08:00
zsnes rebuild against libpng15
This commit is contained in:
parent
5342bb8b8c
commit
c8fa53846f
@ -1,50 +1,51 @@
|
|||||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||||
#
|
|
||||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
# 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
|
pkgname=zsnes
|
||||||
pkgver=1.51
|
pkgver=1.51
|
||||||
pkgrel=2
|
pkgrel=4
|
||||||
pkgdesc="Super Nintendo emulator"
|
pkgdesc="Super Nintendo emulator"
|
||||||
url="http://www.zsnes.com/"
|
url="http://www.zsnes.com/"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
|
depends=('gcc-libs-multilib' 'lib32-sdl' 'lib32-libpng' 'lib32-libgl' 'lib32-ncurses' 'lib32-mesa')
|
||||||
if [ $CARCH == "x86_64" ]; then
|
makedepends=('nasm' 'gcc-multilib')
|
||||||
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
|
|
||||||
|
|
||||||
source=(http://downloads.sourceforge.net/${pkgname}/zsnes151src.tar.bz2
|
source=(http://downloads.sourceforge.net/${pkgname}/zsnes151src.tar.bz2
|
||||||
zsnes.patch
|
zsnes.patch
|
||||||
zsnes.desktop
|
zsnes.desktop
|
||||||
zsnes_icon.png)
|
zsnes_icon.png
|
||||||
|
gcc47-fix.patch
|
||||||
|
libpng15.patch)
|
||||||
md5sums=('7071186bf80632ae88a153239498d8c9'
|
md5sums=('7071186bf80632ae88a153239498d8c9'
|
||||||
'3af40c7d674ebfce1bb1ab6b7e9a8fe4'
|
'3af40c7d674ebfce1bb1ab6b7e9a8fe4'
|
||||||
'b100b2aa342c551167d7c5dcdcde9dd4'
|
'b100b2aa342c551167d7c5dcdcde9dd4'
|
||||||
'b5260c02adfc3b7ff725041214b00bfd')
|
'b5260c02adfc3b7ff725041214b00bfd'
|
||||||
|
'951a54e05e4436fe1114308e4466ad74'
|
||||||
|
'd9a9956bf8b709eaccb0f68132b8693a')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${srcdir}/${pkgname}_1_51/
|
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
|
cd ${srcdir}/${pkgname}_1_51/src
|
||||||
if [ $CARCH == "x86_64" ]; then
|
|
||||||
export CC="gcc -m32"
|
export CC="gcc -m32"
|
||||||
export CXX="g++ -m32"
|
export CXX="g++ -m32"
|
||||||
fi
|
|
||||||
./autogen.sh --prefix=/usr \
|
./autogen.sh --prefix=/usr \
|
||||||
x_libraries=/usr/lib \
|
x_libraries=/usr/lib \
|
||||||
force_arch=i686 \
|
force_arch=i686 \
|
||||||
--enable-release
|
--enable-release
|
||||||
|
|
||||||
make || return 1
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd ${srcdir}/${pkgname}_1_51/src
|
||||||
make DESTDIR=${pkgdir} install
|
make DESTDIR=${pkgdir} install
|
||||||
|
|
||||||
# adding --mandir= to autoconf line fails
|
# adding --mandir= to autoconf line fails
|
||||||
install -dm755 ${pkgdir}/usr/share
|
install -dm755 ${pkgdir}/usr/share
|
||||||
|
|
||||||
|
10
zsnes/gcc47-fix.patch
Normal file
10
zsnes/gcc47-fix.patch
Normal 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
12
zsnes/libpng15.patch
Normal 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));
|
Loading…
Reference in New Issue
Block a user