summaryrefslogtreecommitdiff
path: root/community-testing/nestopia
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-31 23:14:57 +0000
committerroot <root@rshg054.dnsready.net>2012-01-31 23:14:57 +0000
commitc34f78dd37c2a2015d43de5d89748a2f8147ba1b (patch)
tree2e3912930db02e8f8cbfa8a58eae203b886fa2d9 /community-testing/nestopia
parent902eddd7e029eda6fc1c668b31e696c6ca3edbc7 (diff)
Tue Jan 31 23:14:56 UTC 2012
Diffstat (limited to 'community-testing/nestopia')
-rw-r--r--community-testing/nestopia/ChangeLog12
-rw-r--r--community-testing/nestopia/PKGBUILD46
-rw-r--r--community-testing/nestopia/nestopia10
-rw-r--r--community-testing/nestopia/nestopia_bogus_error_on_save_settings.patch11
4 files changed, 79 insertions, 0 deletions
diff --git a/community-testing/nestopia/ChangeLog b/community-testing/nestopia/ChangeLog
new file mode 100644
index 000000000..5077d00b2
--- /dev/null
+++ b/community-testing/nestopia/ChangeLog
@@ -0,0 +1,12 @@
+2008-12-16 Tiago Pierezan Camargo <tcamargo@gmail.com>
+
+ * PKGBUILD: Minor corrections.
+
+2008-12-04 Tiago Pierezan Camargo <tcamargo@gmail.com>
+
+ * PKGBUILD (source): Package adopted.
+ Variable/version cleanup.
+ Patch to remove bogus error messages on program exit.
+ New dependency: mesa.
+ Renamed executable to nestopia.
+
diff --git a/community-testing/nestopia/PKGBUILD b/community-testing/nestopia/PKGBUILD
new file mode 100644
index 000000000..11e7db6a3
--- /dev/null
+++ b/community-testing/nestopia/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 63214 2012-01-30 19:03:20Z ibiru $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Tiago Pierezan Camargo <tcamargo@gmail.com>
+# Contributor: robb_force <robb_force@holybuffalo.net>
+
+pkgname=nestopia
+pkgver=1.40h
+pkgrel=5
+pkgdesc='An NES emulator featuring cycle exact emulation, a ridiculous number of mappers, and lots of custom sound chips.'
+url='http://rbelmont.mameworld.info/?page_id=200'
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('sdl>=1.2.12' 'alsa-lib' 'gtk2>=2.4' 'mesa')
+makedepends=('unzip')
+# rbelmont.mameworld.info blocks some user-agents
+DLAGENTS=('http::/usr/bin/wget -c -t 3 --waitretry=3 --user-agent=Mozilla/5.0 -O %o %u'
+ 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u')
+source=("https://downloads.sourceforge.net/project/nestopia/Nestopia/v${pkgver//[a-z]/}/Nestopia${pkgver//[.a-z]/}src.zip"
+ "http://rbelmont.mameworld.info/nst${pkgver//[a.a-z]/}_lnx_release_${pkgver:${#pkgver}-1:1}.zip"
+ "nestopia"
+ "nestopia_bogus_error_on_save_settings.patch")
+md5sums=('526c99a06d2b257135e7047b0ed95ae0'
+ 'f9a9a905bada67e11dac1364612d0b35'
+ 'abc2f030dd291f58d65c9095ef024225'
+ '0160078c9afcbb1a6ac389c3989929f7')
+
+build() {
+ cd ${srcdir}
+ # remove a bogus error message on exit
+ patch -p0 < nestopia_bogus_error_on_save_settings.patch
+ make -j1
+
+ # Install the nestopia script that copies required files to ~/.nestopia
+ install -Dm755 ${srcdir}/${pkgname} ${pkgdir}/usr/bin/${pkgname}
+
+ # Older releases used a .sh file. Make a symlink to make everyone happy
+ cd ${pkgdir}/usr/bin
+ ln -s ${pkgname} ${pkgname}.sh
+
+ # Install the required files and executable in /usr/share
+ cd ${srcdir}
+ install -Dm755 nst ${pkgdir}/usr/bin/${pkgname}-bin
+ install -dm775 ${pkgdir}/usr/share/${pkgname}/
+ install -m644 nstcontrols ${pkgdir}/usr/share/${pkgname}/
+ install -m644 NstDatabase.xml ${pkgdir}/usr/share/${pkgname}/
+}
diff --git a/community-testing/nestopia/nestopia b/community-testing/nestopia/nestopia
new file mode 100644
index 000000000..52bd2b2b3
--- /dev/null
+++ b/community-testing/nestopia/nestopia
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ ! -e $HOME/.nestopia ]; then
+ echo "Running NEStopia for the first time..."
+ echo "Copying required files to ~/.nestopia..."
+ mkdir $HOME/.nestopia
+ cp /usr/share/nestopia/{nstcontrols,NstDatabase.xml} $HOME/.nestopia/
+fi
+
+nestopia-bin "$@"
diff --git a/community-testing/nestopia/nestopia_bogus_error_on_save_settings.patch b/community-testing/nestopia/nestopia_bogus_error_on_save_settings.patch
new file mode 100644
index 000000000..63f33bc72
--- /dev/null
+++ b/community-testing/nestopia/nestopia_bogus_error_on_save_settings.patch
@@ -0,0 +1,11 @@
+--- source/linux/settings.cpp.old 2008-10-23 05:45:58.000000000 +0200
++++ source/linux/settings.cpp 2008-12-04 23:17:59.000000000 +0100
+@@ -16,7 +16,7 @@
+ using namespace LinuxNst;
+
+ #define READ_SETTING(x) fread(&x, sizeof(x), 1, f)
+-#define WRITE_SETTING(x) if (fwrite(&x, sizeof(x), 1, f) != sizeof(x)) std::cout << "Error writing setting!\n"
++#define WRITE_SETTING(x) if (fwrite(&x, sizeof(x), 1, f) != 1) std::cout << "Error writing setting!\n"
+
+ static int rates[4] = { 11025, 22050, 44100, 48000 };
+