aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-11-13 20:38:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-11-13 20:38:29 +0000
commit6eccd22bb9dee1c34100d4d50e3d03e09f598058 (patch)
tree777d508a7e88f76ae42874b5dddec1b645ce34e1 /x11
parent2a4bff9a06f8be14217e826b993f2ea13d1a6bf0 (diff)
downloadaports-6eccd22bb9dee1c34100d4d50e3d03e09f598058.tar.bz2
aports-6eccd22bb9dee1c34100d4d50e3d03e09f598058.tar.xz
x11/zsnes: new aport
Super Nintendo emulator http://www.zsnes.com/
Diffstat (limited to 'x11')
-rw-r--r--x11/zsnes/APKBUILD49
-rw-r--r--x11/zsnes/zsnes-1.51-CC-quotes.patch20
-rw-r--r--x11/zsnes/zsnes-1.51-depbuild.patch34
-rw-r--r--x11/zsnes/zsnes.desktop9
-rw-r--r--x11/zsnes/zsnes.patch67
-rw-r--r--x11/zsnes/zsnes_icon.pngbin0 -> 7301 bytes
6 files changed, 179 insertions, 0 deletions
diff --git a/x11/zsnes/APKBUILD b/x11/zsnes/APKBUILD
new file mode 100644
index 0000000000..5e7d5d2df8
--- /dev/null
+++ b/x11/zsnes/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=zsnes
+pkgver=1.51
+pkgrel=0
+pkgdesc="Super Nintendo emulator"
+url="http://www.zsnes.com/"
+license="GPL"
+makedepends="sdl-dev libpng-dev ncurses-dev mesa-dev automake autoconf nasm"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/${pkgname}151src.tar.bz2
+ $pkgname.desktop
+ zsnes.patch
+ zsnes-1.51-CC-quotes.patch
+ zsnes-1.51-depbuild.patch
+ zsnes_icon.png"
+
+build ()
+{
+ cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}
+ patch -p1 -i ../zsnes-1.51-CC-quotes.patch || return 1
+ patch -p1 -i ../zsnes-1.51-depbuild.patch || return 1
+ patch -p1 -i ../zsnes.patch || return 1
+ cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}/src
+ aclocal && autoconf || return 1
+ export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ x_libraries=/usr/lib \
+ force_arch=i486 \
+ --enable-release || return 1
+ make makefile.dep
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}/src
+ make DESTDIR="$pkgdir" install
+ 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
+}
+md5sums="7071186bf80632ae88a153239498d8c9 zsnes151src.tar.bz2
+b100b2aa342c551167d7c5dcdcde9dd4 zsnes.desktop
+4df831b3d87a35949bcf3fd5547decb1 zsnes.patch
+69ca17611c0d4a21529a95eb37e05c2f zsnes-1.51-CC-quotes.patch
+994af091cbb8f17f82d78c0ca89ac549 zsnes-1.51-depbuild.patch
+b5260c02adfc3b7ff725041214b00bfd zsnes_icon.png"
diff --git a/x11/zsnes/zsnes-1.51-CC-quotes.patch b/x11/zsnes/zsnes-1.51-CC-quotes.patch
new file mode 100644
index 0000000000..a871b62604
--- /dev/null
+++ b/x11/zsnes/zsnes-1.51-CC-quotes.patch
@@ -0,0 +1,20 @@
+--- a/src/Makefile.in.orig 2009-02-25 18:13:40.000000000 +0100
++++ b/src/Makefile.in 2009-02-25 18:13:16.000000000 +0100
+@@ -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--- zsnes_1_51/src/Makefile.in.orig 2009-02-25 18:02:07.000000000 +0100
+@@ -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 --git a/x11/zsnes/zsnes-1.51-depbuild.patch b/x11/zsnes/zsnes-1.51-depbuild.patch
new file mode 100644
index 0000000000..e2cc0d86f6
--- /dev/null
+++ b/x11/zsnes/zsnes-1.51-depbuild.patch
@@ -0,0 +1,34 @@
+--- a/src/tools/depbuild.cpp Fri Nov 13 18:41:24 2009
++++ b/src/tools/depbuild.cpp Fri Nov 13 19:04:09 2009
+@@ -24,6 +24,9 @@
+ #include <iostream>
+ #include <string>
+ #include <cstdio>
++#include <cstdlib>
++#include <unistd.h>
++
+ using namespace std;
+
+ #include "fileutil.h"
+@@ -130,7 +133,20 @@
+ void dependency_calculate_asm(const char *filename)
+ {
+ string command = nasm + " " + nflags + " -M " + filename;
+- system(command.c_str());
++ FILE *fp = popen(command.c_str(), "r");
++ if (fp)
++ {
++ char line[256];
++ while (fgets(line, sizeof(line), fp)) //Process all lines of output
++ {
++ cout << line;
++ }
++ pclose(fp);
++ }
++ else
++ {
++ cerr << "Failed on: " << filename << "\n";
++ }
+ }
+
+ void dependency_calculate_psr(const char *filename)
diff --git a/x11/zsnes/zsnes.desktop b/x11/zsnes/zsnes.desktop
new file mode 100644
index 0000000000..db13ada4c6
--- /dev/null
+++ b/x11/zsnes/zsnes.desktop
@@ -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
diff --git a/x11/zsnes/zsnes.patch b/x11/zsnes/zsnes.patch
new file mode 100644
index 0000000000..db07403845
--- /dev/null
+++ b/x11/zsnes/zsnes.patch
@@ -0,0 +1,67 @@
+diff -cr zsnes_1_51/src/parsegen.cpp zsnes_1_51-patched/src/parsegen.cpp
+*** zsnes_1_51/src/parsegen.cpp 2007-10-31 01:30:26.000000000 -0300
+--- zsnes_1_51-patched/src/parsegen.cpp 2008-07-13 18:28:53.000000000 -0300
+***************
+*** 19,24 ****
+--- 19,27 ----
+ 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,1828 ****
+ }
+ }
+
+! int main(size_t argc, const char *const *const argv)
+ {
+ const char *cheader_file = 0;
+ bool compile = false;
+--- 1825,1831 ----
+ }
+ }
+
+! int main(int argc, const char *const *const argv)
+ {
+ const char *cheader_file = 0;
+ bool compile = false;
+diff -cr zsnes_1_51/src/tools/depbuild.cpp zsnes_1_51-patched/src/tools/depbuild.cpp
+*** zsnes_1_51/src/tools/depbuild.cpp 2006-12-27 08:04:05.000000000 -0300
+--- zsnes_1_51-patched/src/tools/depbuild.cpp 2008-07-13 18:30:46.000000000 -0300
+***************
+*** 183,189 ****
+ }
+ }
+
+! int main(size_t argc, const char *const *const argv)
+ {
+ if (argc < 5)
+ {
+--- 183,189 ----
+ }
+ }
+
+! int main(int argc, const char *const *const argv)
+ {
+ if (argc < 5)
+ {
+diff -cr zsnes_1_51/src/tools/strutil.h zsnes_1_51-patched/src/tools/strutil.h
+*** zsnes_1_51/src/tools/strutil.h 2006-12-27 08:04:05.000000000 -0300
+--- zsnes_1_51-patched/src/tools/strutil.h 2008-07-13 18:30:27.000000000 -0300
+***************
+*** 15,20 ****
+--- 15,23 ----
+ 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
+ */
diff --git a/x11/zsnes/zsnes_icon.png b/x11/zsnes/zsnes_icon.png
new file mode 100644
index 0000000000..31608ba068
--- /dev/null
+++ b/x11/zsnes/zsnes_icon.png
Binary files differ