aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/bsnes/Makefile-qt.patch17
-rw-r--r--games/bsnes/README17
-rw-r--r--games/bsnes/bsnes.SlackBuild92
-rw-r--r--games/bsnes/bsnes.info10
-rw-r--r--games/bsnes/doinst.sh4
-rw-r--r--games/bsnes/slack-desc19
6 files changed, 159 insertions, 0 deletions
diff --git a/games/bsnes/Makefile-qt.patch b/games/bsnes/Makefile-qt.patch
new file mode 100644
index 0000000000000..7c37b026f534a
--- /dev/null
+++ b/games/bsnes/Makefile-qt.patch
@@ -0,0 +1,17 @@
+diff -Naur src.orig/lib/nall/Makefile-qt src/lib/nall/Makefile-qt
+--- src.orig/lib/nall/Makefile-qt 2009-06-21 13:25:40.000000000 +0000
++++ src/lib/nall/Makefile-qt 2009-07-14 20:45:25.000000000 +0000
+@@ -7,11 +7,11 @@
+ # $(qtlib) -- libraries for linking
+
+ ifeq ($(moc),)
+-moc := moc
++moc := moc-qt4
+ endif
+
+ ifeq ($(rcc),)
+-rcc := rcc
++rcc := rcc-qt4
+ endif
+
+ ifeq ($(platform),x)
diff --git a/games/bsnes/README b/games/bsnes/README
new file mode 100644
index 0000000000000..0e0f35a4fc9e0
--- /dev/null
+++ b/games/bsnes/README
@@ -0,0 +1,17 @@
+bsnes is an emulator that began development on 2004-10-14. The
+purpose of this emulator is a bit different from others: it
+focuses on accuracy, debugging functionality, and clean code.
+
+The emulator does not focus on things that would hinder accuracy.
+This includes speed and game-specific hacks for compatibility. As
+a result, the minimum system requirements for bsnes are very high.
+
+bsnes requires OpenAL.
+
+Optional build requirement is pulseaudio. By default pulseaudio
+is turned off. To build bsnes with pulseaudio support pass
+USE_PULSE="yes" to the slackbuild.
+
+If you happen to use a version of Slackware that is less then 13.0
+and you have Qt >= 4.5.0 then you need to pass OLD_SLACK="yes" to
+the slackbuild.
diff --git a/games/bsnes/bsnes.SlackBuild b/games/bsnes/bsnes.SlackBuild
new file mode 100644
index 0000000000000..636c34d358e37
--- /dev/null
+++ b/games/bsnes/bsnes.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for bsnes
+
+# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
+
+PRGNAM=bsnes
+VERSION=${VERSION:-0.058}
+SRCVER=${VERSION:2}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Determine if we use pulseaudio with build. Default is no.
+# Also backport bsnes for Slackware <= 13.0.
+USE_PULSE=${USE_PULSE:-no}
+OLD_SLACK=${OLD_SLACK:-no}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}_v${SRCVER}.tar.bz2
+cd src
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Use custom SLKCFLAGS.
+sed -i "s|-O3|${SLKCFLAGS}|" Makefile
+
+# For older Slackware versions that have *-qt4 extension.
+if [ "$OLD_SLACK" == "yes" ]; then
+ patch -p1 < $CWD/Makefile-qt.patch
+fi
+
+# Determine if we get rid of pulseaudio support.
+if [ "$USE_PULSE" == "no" ]; then
+ sed -i \
+ -e 's|audio\.pulseaudio ||' \
+ -e '/pulse/d' Makefile
+fi
+
+make \
+ platform=x \
+ compiler=gcc \
+ enable_gzip=true \
+ enable_jma=true \
+ prefix=/usr
+
+make install DESTDIR=$PKG prefix=/usr
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ data/*.html \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc -type f -exec chmod 0644 {} \;
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/bsnes/bsnes.info b/games/bsnes/bsnes.info
new file mode 100644
index 0000000000000..f71692cf8fee7
--- /dev/null
+++ b/games/bsnes/bsnes.info
@@ -0,0 +1,10 @@
+PRGNAM="bsnes"
+VERSION="0.058"
+HOMEPAGE="http://byuu.org/bsnes/"
+DOWNLOAD="http://byuusan.kuro-hitsuji.net/bsnes_v058.tar.bz2"
+MD5SUM="dfd42e658455f4470715b8cc32cceb3c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Larry Hajali"
+EMAIL="larryhaja[at]gmail[dot]com"
+APPROVED="Erik Hanson"
diff --git a/games/bsnes/doinst.sh b/games/bsnes/doinst.sh
new file mode 100644
index 0000000000000..4e8ba7071dea7
--- /dev/null
+++ b/games/bsnes/doinst.sh
@@ -0,0 +1,4 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/games/bsnes/slack-desc b/games/bsnes/slack-desc
new file mode 100644
index 0000000000000..a9d0917896c72
--- /dev/null
+++ b/games/bsnes/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+bsnes: bsnes
+bsnes:
+bsnes: bsnes is an emulator that began development on 2004-10-14. The purpose
+bsnes: of this emulator is a bit different from others: it focuses on
+bsnes: accuracy, debugging functionality, and clean code. The emulator does
+bsnes: not focus on things that would hinder accuracy. This includes speed
+bsnes: and game-specific hacks for compatibility. As a result, the minimum
+bsnes: system requirements for bsnes are very high.
+bsnes:
+bsnes: Homepage: http://byuu.org/bsnes/
+bsnes: