added zsnes

This commit is contained in:
Giuseppe 2011-01-16 12:24:47 +00:00
parent 0dd5bd78fd
commit bcfedbe6c9
4 changed files with 132 additions and 0 deletions

55
zsnes/PKGBUILD Normal file
View File

@ -0,0 +1,55 @@
# 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>
pkgname=zsnes
pkgver=1.51
pkgrel=1
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
source=(http://downloads.sourceforge.net/${pkgname}/zsnes151src.tar.bz2
zsnes.patch
zsnes.desktop
zsnes_icon.png)
md5sums=('7071186bf80632ae88a153239498d8c9'
'3af40c7d674ebfce1bb1ab6b7e9a8fe4'
'b100b2aa342c551167d7c5dcdcde9dd4'
'b5260c02adfc3b7ff725041214b00bfd')
build() {
cd ${srcdir}/${pkgname}_1_51/
patch -p1 -i ../zsnes.patch || return 1
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 DESTDIR=${pkgdir} install
# adding --mandir= to autoconf line fails
install -dm755 ${pkgdir}/usr/share
install -Dm644 ${srcdir}/zsnes.desktop ${pkgdir}/usr/share/applications/zsnes.desktop
install -Dm644 ${srcdir}/zsnes_icon.png ${pkgdir}/usr/share/pixmaps/zsnes_icon.png
mv ${pkgdir}/usr/man ${pkgdir}/usr/share
}

9
zsnes/zsnes.desktop Normal file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Zsnes
Comment=Super Nintendo emulator
Exec=/usr/bin/zsnes
Icon=/usr/share/pixmaps/zsnes_icon.png
Terminal=false
Type=Application
Categories=Application;Game
StartupNotify=false

68
zsnes/zsnes.patch Normal file
View File

@ -0,0 +1,68 @@
diff -aur zsnes_1_51//src/Makefile.in zsnes_1_51_new//src/Makefile.in
--- zsnes_1_51//src/Makefile.in 2007-01-24 21:54:12.000000000 +0100
+++ zsnes_1_51_new//src/Makefile.in 2010-09-06 00:03:04.715810431 +0200
@@ -95,7 +95,7 @@
%.o: %.cpp
@CXX@ @CXXFLAGS@ -o $@ -c $<
%.o %.h: %.psr $(PSR)
- ./$(PSR) @PSRFLAGS@ -gcc @CC@ -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $<
+ ./$(PSR) @PSRFLAGS@ -gcc "@CC@" -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $<
default: main
all: main tools
@@ -133,7 +133,7 @@
include makefile.dep
makefile.dep: $(TOOL_D)/depbuild Makefile
- $(TOOL_D)/depbuild @CC@ "@CFLAGS@" @NASMPATH@ "@NFLAGS@" $(Z_OBJS) > makefile.dep
+ $(TOOL_D)/depbuild "@CC@" "@CFLAGS@" "@NASMPATH@" "@NFLAGS@" $(Z_OBJS) > makefile.dep
Makefile: Makefile.in config.status
./config.status
diff -aur zsnes_1_51//src/parsegen.cpp zsnes_1_51_new//src/parsegen.cpp
--- zsnes_1_51//src/parsegen.cpp 2007-10-31 05:30:26.000000000 +0100
+++ zsnes_1_51_new//src/parsegen.cpp 2010-09-05 15:48:36.903333444 +0200
@@ -19,6 +19,9 @@
Config file handler creator by Nach (C) 2005-2007
*/
+#include <cstring>
+#include <cstdlib>
+
#if !defined(__GNUC__) && !defined(_MSC_VER)
#error You are using an unsupported compiler
#endif
@@ -1822,7 +1825,7 @@
}
}
-int main(size_t argc, const char *const *const argv)
+int main(int argc, const char *const *const argv)
{
const char *cheader_file = 0;
bool compile = false;
diff -aur zsnes_1_51//src/tools/depbuild.cpp zsnes_1_51_new//src/tools/depbuild.cpp
--- zsnes_1_51//src/tools/depbuild.cpp 2006-12-27 12:04:05.000000000 +0100
+++ zsnes_1_51_new//src/tools/depbuild.cpp 2010-09-05 15:48:36.903333444 +0200
@@ -183,7 +183,7 @@
}
}
-int main(size_t argc, const char *const *const argv)
+int main(int argc, const char *const *const argv)
{
if (argc < 5)
{
diff -aur zsnes_1_51//src/tools/strutil.h zsnes_1_51_new//src/tools/strutil.h
--- zsnes_1_51//src/tools/strutil.h 2006-12-27 12:04:05.000000000 +0100
+++ zsnes_1_51_new//src/tools/strutil.h 2010-09-05 15:48:36.903333444 +0200
@@ -15,6 +15,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <cstring>
+#include <cstdlib>
+
/*
This is part of a toolkit used to assist in ZSNES development
*/

BIN
zsnes/zsnes_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB