summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDugan Chen <thedoogster [t] gmail [dot] com>2018-04-05 16:12:20 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-04-07 08:13:11 +0700
commitf37d3c73993edd40d3da1b4cc5f6b577c95af628 (patch)
tree68928914b504d56d2620f219774303f76a9b5492 /games
parent540ae9e733a4fab597a9b020bbd97ed97b4d04ba (diff)
downloadslackbuilds-f37d3c73993edd40d3da1b4cc5f6b577c95af628.tar.gz
games/nestopia: Add libretro core build.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/nestopia/README9
-rw-r--r--games/nestopia/doinst.sh6
-rw-r--r--games/nestopia/nestopia.SlackBuild15
-rw-r--r--games/nestopia/nestopia.info6
4 files changed, 27 insertions, 9 deletions
diff --git a/games/nestopia/README b/games/nestopia/README
index 0fecefdaef..bb96bf131f 100644
--- a/games/nestopia/README
+++ b/games/nestopia/README
@@ -7,9 +7,10 @@ A 1Ghz CPU and 128MB RAM are required to get the best performance.
A Disk System BIOS (disksys.rom) is optional and, of course, not included. If
you have one, put it in ~/.nestopia
-Note 1: parallel building is supported with a max of 2 jobs.
+This builds both the standalone application and the Libretro core (for use
+with RetroArch). To use the Libretro core, one step is to copy the following
+file to your RetroArch BIOS directory:
-Note 2: To play NES games, consider using RetroArch with the Nestopia core
-instead. SlackBuilds can be found here:
+ /usr/share/nestopia/NstDatabase.xml
- https://github.com/duganchen/slackware-libretro
+Note: parallel building is supported with a max of 2 jobs.
diff --git a/games/nestopia/doinst.sh b/games/nestopia/doinst.sh
index 5fb28930db..65c7e2eeb9 100644
--- a/games/nestopia/doinst.sh
+++ b/games/nestopia/doinst.sh
@@ -1,3 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/nestopia/nestopia.SlackBuild b/games/nestopia/nestopia.SlackBuild
index 9b148e1052..97acd4c796 100644
--- a/games/nestopia/nestopia.SlackBuild
+++ b/games/nestopia/nestopia.SlackBuild
@@ -5,8 +5,9 @@
# Written by Dugan Chen (thedoogster@gmail.com)
PRGNAM=nestopia
+LIBNAM=${PRGNAM}_libretro
VERSION=${VERSION:-1.48}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -22,8 +23,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O3 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O3 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O3 -march=i686 -mtune=i686"
@@ -67,8 +68,16 @@ cd build
make install DESTDIR=$PKG
cd ..
+make -C libretro
+
+install -Dm0644 libretro/$LIBNAM.so \
+ $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so
+install -Dm0644 $CWD/$LIBNAM.info \
+ $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info
+
mkdir -p $PKG/usr/doc
mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
+rmdir $PKG/usr/share/doc
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/games/nestopia/nestopia.info b/games/nestopia/nestopia.info
index e6c57ca436..8e43f1107e 100644
--- a/games/nestopia/nestopia.info
+++ b/games/nestopia/nestopia.info
@@ -1,8 +1,10 @@
PRGNAM="nestopia"
VERSION="1.48"
HOMEPAGE="http://0ldsk00l.ca/nestopia/"
-DOWNLOAD="http://downloads.sourceforge.net/project/nestopiaue/1.48/nestopia-1.48.tgz"
-MD5SUM="028172125a16625f51d470293babacb2"
+DOWNLOAD="http://downloads.sourceforge.net/project/nestopiaue/1.48/nestopia-1.48.tgz \
+ https://raw.githubusercontent.com/libretro/libretro-super/392247c/dist/info/nestopia_libretro.info"
+MD5SUM="028172125a16625f51d470293babacb2 \
+ 167b9a50a7e6eb0b272bec7e9dd6cc6b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SDL2"