games/mednaffe: Added (frontend for mednafen).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2018-12-17 08:11:03 +07:00 committed by Willy Sudiarto Raharjo
parent 804cfec1d4
commit 663c2a90ff
5 changed files with 139 additions and 0 deletions

15
games/mednaffe/README Normal file
View file

@ -0,0 +1,15 @@
mednaffe (frontend for mednafen)
Mednaffe is a GUI front-end for the mednafen emulator.
Its main features are:
* It is written in C.
* Available for Linux and Windows.
* The only dependency is GTK+2 (or GTK+3).
* GPLv3 licensed.
Note: Mednaffe only works with 1.21.1 or higher versions of mednafen.
By default, mednaffe is built with GTK+2. If you prefer GTK+3, export
GTK3=yes in the script's environment.

10
games/mednaffe/doinst.sh Normal file
View file

@ -0,0 +1,10 @@
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 usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View file

@ -0,0 +1,85 @@
#!/bin/sh
# Slackware build script for mednaffe
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=mednaffe
VERSION=${VERSION:-0.8.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
if [ "${GTK3:-no}" = "yes" ]; then
GTKOPT="--enable-gtk3"
GTKVER=3
else
GTKOPT="--disable-gtk3"
GTKVER=2
fi
# --docdir is ignored, have to use nonstandard docsdir in make install.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
$GTKOPT \
--bindir=/usr/games \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG docsdir="/usr/doc/$PRGNAM-$VERSION"
# docs already installed, just add this:
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
sed "s,@GTKVER@,$GTKVER," $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}

View file

@ -0,0 +1,10 @@
PRGNAM="mednaffe"
VERSION="0.8.8"
HOMEPAGE="https://github.com/AmatCoder/mednaffe"
DOWNLOAD="https://github.com/AmatCoder/mednaffe/releases/download/0.8.8/mednaffe-0.8.8.tar.gz"
MD5SUM="8beab613db597d53bcc8cd4e62f281eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

19
games/mednaffe/slack-desc Normal file
View file

@ -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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
mednaffe: mednaffe (frontend for mednafen)
mednaffe:
mednaffe: Mednaffe is a GUI front-end for the mednafen emulator.
mednaffe:
mednaffe: This package was built with GTK+@GTKVER@.
mednaffe:
mednaffe:
mednaffe:
mednaffe:
mednaffe:
mednaffe: