summaryrefslogtreecommitdiffstats
path: root/games/jollygood
diff options
context:
space:
mode:
Diffstat (limited to 'games/jollygood')
-rw-r--r--games/jollygood/GUIDELINES.txt44
-rw-r--r--games/jollygood/README25
-rw-r--r--games/jollygood/doinst.sh9
-rw-r--r--games/jollygood/jollygood-all-cores-32bit.sqf14
-rw-r--r--games/jollygood/jollygood-all-cores.sqf16
-rw-r--r--games/jollygood/jollygood.SlackBuild156
-rw-r--r--games/jollygood/jollygood.info12
-rw-r--r--games/jollygood/more_extensions.diff21
-rw-r--r--games/jollygood/slack-desc19
9 files changed, 316 insertions, 0 deletions
diff --git a/games/jollygood/GUIDELINES.txt b/games/jollygood/GUIDELINES.txt
new file mode 100644
index 0000000000..bd24afaac8
--- /dev/null
+++ b/games/jollygood/GUIDELINES.txt
@@ -0,0 +1,44 @@
+If you're going to submit a SlackBuild for a Jolly Good Emulation
+core, please consider following this set of guidelines, for
+consistency's sake:
+
+- The SlackBuild name should be the name of the core (the actual
+ whatever.so file), all lowercase, with "jg-" prefixed to it.
+ Use this for PRGNAM. The actual tarballs tend to be named after the
+ git repo name (e.g. "mednafen"), so use SRCNAM in the SlackBuild for
+ this. The reason for this is partly to make them easy to find in
+ a search or directory listing, and partly because some of the cores
+ have the same name as the standalone emulators they were ported from
+ (again, "mednafen" is an example: SBo already has a mednafen build).
+
+- The .info file should have "jollygood" in REQUIRES, along with whatever
+ else it happens to need.
+
+- Use either jg-jollycv or jg-mednafen for a template. For cores that
+ have a jg.c in their top-level directory, use jolly-cv. For those
+ that have a "jollygood/jg.c", use jg-mednafen.
+
+- The README should include the note at the bottom ("By default,
+ no controls are mapped..."). If the core requires ROM images such
+ as a system BIOS, the README should give the location where the core
+ will look (e.g. jg-jollycv has ~/.local/share/jollygood/bios/coleco.rom)
+
+- The README should also list the filename extensions jgrf will recognize
+ as being ROMs for that core. Currently, the list is hard-coded in
+ src/jgrf.c in the jgrf source directory. If the core isn't automatically
+ used, mention that fact in the README (example: jg-sameboy).
+
+- The top line of the README and slack-desc should read:
+ jg-<whatever> (<system> emulation core for for Jolly Good Emulation)
+ If the system name is too long (e.g. Super Nintendo Entertainment
+ System), abbreviate it.
+
+- The next bit of the README should be copy/pasted from the README or
+ jollygood/README from the source.
+
+- When you submit the build, include the keywords "jollygood,jgemu", plus
+ the name(s) of the system(s) your core emulates. Example:
+ jollygood,jgemu,sega,genesis,megadrive
+
+- As always, use sbolint and sbopkglint on your build and package before
+ submitting the build. Install system/sbo-maintainer-tools to get them.
diff --git a/games/jollygood/README b/games/jollygood/README
new file mode 100644
index 0000000000..3f410592d8
--- /dev/null
+++ b/games/jollygood/README
@@ -0,0 +1,25 @@
+jollygood (the Jolly Good Emulation API and Reference Frontend)
+
+Jolly Good Emulation is an education and preservation oriented
+emulation project. As a side effect, it offers emulation technology
+that extreme minimalists may find tolerable.
+
+This package includes "jg" (the API headers) and "jgrf". jgrf is the
+simplest possible frontend for The Jolly Good API. The executable and
+man page are called "jollygood".
+
+After installing jollygood, you'll want to install "cores" (plugins)
+for the systems you want to emulate. Search for "jgemu" to find them
+on SBo. Also, if you want to install all the cores at once, use sbopkg
+or sbotools and either "jollygood-all-cores.sqf" (for 64-bit) or
+"jollygood-all-cores-32bit.sqf" from the SlackBuild directory.
+
+Ideally, once a core is installed, you can run games for that system
+with "jollygood <filename>", where <filename> is either a ROM or disk
+image, or a .zip file containing the image. This only works if the
+filename extension is known to jollygood. If you get "Cannot detect
+default core", you'll have to use the -c option to tell it what core
+to use. See also the jollygood(6) man page.
+
+If you're considering submitting a SlackBuild for a jollygood core,
+please read GUIDELINES.txt.
diff --git a/games/jollygood/doinst.sh b/games/jollygood/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/games/jollygood/doinst.sh
@@ -0,0 +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/jollygood/jollygood-all-cores-32bit.sqf b/games/jollygood/jollygood-all-cores-32bit.sqf
new file mode 100644
index 0000000000..9d9a72f244
--- /dev/null
+++ b/games/jollygood/jollygood-all-cores-32bit.sqf
@@ -0,0 +1,14 @@
+jollygood
+jg-bsnes
+jg-cega
+jg-gambatte
+jg-genplus
+jg-jollycv
+jg-mednafen
+jg-melonds
+jg-mgba
+jg-nestopia
+jg-picodrive
+jg-prosystem
+jg-vecx
+jg-geolith
diff --git a/games/jollygood/jollygood-all-cores.sqf b/games/jollygood/jollygood-all-cores.sqf
new file mode 100644
index 0000000000..c94481b711
--- /dev/null
+++ b/games/jollygood/jollygood-all-cores.sqf
@@ -0,0 +1,16 @@
+jollygood
+jg-bsnes
+jg-cega
+jg-gambatte
+jg-genplus
+jg-jollycv
+jg-mednafen
+jg-melonds
+jg-mgba
+jg-nestopia
+jg-picodrive
+jg-prosystem
+rgbds
+jg-sameboy
+jg-vecx
+jg-geolith
diff --git a/games/jollygood/jollygood.SlackBuild b/games/jollygood/jollygood.SlackBuild
new file mode 100644
index 0000000000..5e3ae5e39a
--- /dev/null
+++ b/games/jollygood/jollygood.SlackBuild
@@ -0,0 +1,156 @@
+#!/bin/bash
+
+# Slackware build script for jgrf
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Note: The Jolly Good stuff is a *joy* to package. Simple
+# human-readable Makefile, with sane defaults which can easily be
+# overridden (even CFLAGS). No need for patching[*] or sedding anything.
+# My hat is off to Rupert Carmichael (the jgemu author).
+
+# [*] OK, yes, I did include a patch in this build. It adds a few
+# filename extensions to the list, e.g. .smd for Sega Genesis, since
+# such files exist aplenty in the wild. Still, I didn't have to patch
+# the code just to get it to build and install as desired, which is
+# nice.
+
+# I don't see any reason to package jg and jgrf separately; the one
+# is useless without the other. So this build is for both of them.
+# Right now the only existing frontend is jgrf; someday if there are
+# other frontends, they can list REQUIRES="jollygood".
+
+# I packaged all but one of the available cores: the gngeo core's
+# README says it's pre-alpha quality, unsuitable for packaging.
+
+# VERSION is the jgrf version. The jg version will be the latest
+# at the time jgrf is updated. Possibly it will always be the same
+# version number, but there's a separate APIVER in case that turns out
+# to be wrong.
+
+# 20230902 bkw: updated for v1.0.2 (APIVER still 1.0.0).
+# 20230404 bkw: updated for v1.0.1 (APIVER still 1.0.0).
+# 20230121 bkw: submitted v1.0.0.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jollygood
+SRCNAM=jgrf
+VERSION=${VERSION:-1.0.2}
+APINAM=jg
+APIVER=${APIVER:-1.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+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
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+TOPDIR=$(pwd)
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+tar xvf $CWD/$APINAM-$APIVER.tar.gz
+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 {} \+
+
+LIBDIR=/usr/lib$LIBDIRSUFFIX
+PKGLIB=$PKG/$LIBDIR
+DOCDIR=/usr/doc/$PRGNAM-$VERSION
+PKGDOC=$PKG/$DOCDIR
+
+# First, jg (the API, which is just a bunch of headers):
+cd $APINAM-$APIVER
+make install \
+ DESTDIR=$PKG \
+ PREFIX=/usr \
+ DATAROOTDIR=/usr/share \
+ DOCDIR=$DOCDIR/$APINAM-$APIVER \
+ INCLUDEDIR=/usr/include
+
+# Now, build jgrf:
+cd $TOPDIR/$SRCNAM-$VERSION
+
+# USE_EXTERNAL_MD5=1 makes it link with Slackware's libcrypto (from
+# openssl) instead of its own bundled copy. Can't see why this would
+# be a problem.
+
+# Do not use USE_EXTERNAL_MINIZ=1, we don't have a miniz package (we
+# do have minizip, but it's not the same thing apparently). Plus, who
+# needs an extra dependency?
+
+# Add .smd .sra for Genesis/Megadrive, add .fig .swc for SNES. Ideally
+# in some future version of jgrf, these will be found in a config file
+# instead of hardcoded in the executable.
+patch -p1 < $CWD/more_extensions.diff
+
+make install-strip \
+ CFLAGS="$SLKCFLAGS" \
+ CFLAGS_JG="-I $PKG/usr/include" \
+ USE_EXTERNAL_MD5=1 \
+ DESTDIR=$PKG \
+ PREFIX=/usr \
+ BINDIR=/usr/games \
+ DATAROOTDIR=/usr/share \
+ DOCDIR=$DOCDIR/$SRCNAM-$VERSION \
+ LIBDIR=$LIBDIR \
+ MANDIR=/usr/man
+
+gzip -9 $PKG/usr/man/man*/*.?
+
+# Don't want a svg icon in pixmaps, it should be a PNG.
+rm -f $PKG/usr/share/pixmaps/jollygood.svg
+ln -s ../icons/hicolor/48x48/apps/jollygood.png $PKG/usr/share/pixmaps/jollygood.png
+
+# Not sure if these duplicate icons are used, replace with symlinks.
+for i in 96 1024; do
+ f=$PKG/usr/share/$PRGNAM/jgrf/${PRGNAM}$i.png
+ rm $f
+ ln -s ../../icons/hicolor/${i}x${i}/apps/$PRGNAM.png $f
+done
+
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+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
diff --git a/games/jollygood/jollygood.info b/games/jollygood/jollygood.info
new file mode 100644
index 0000000000..75f31354ab
--- /dev/null
+++ b/games/jollygood/jollygood.info
@@ -0,0 +1,12 @@
+PRGNAM="jollygood"
+VERSION="1.0.2"
+HOMEPAGE="https://jgemu.gitlab.io/"
+DOWNLOAD="https://gitlab.com/jgemu/jg/-/archive/1.0.0/jg-1.0.0.tar.gz \
+ https://gitlab.com/jgemu/jgrf/-/archive/1.0.2/jgrf-1.0.2.tar.gz"
+MD5SUM="90d3b5fcfdd86a0f7cd17ba31bbf793c \
+ 8dadd1fb849b15d77431e80853880939"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/jollygood/more_extensions.diff b/games/jollygood/more_extensions.diff
new file mode 100644
index 0000000000..66d3f496b1
--- /dev/null
+++ b/games/jollygood/more_extensions.diff
@@ -0,0 +1,21 @@
+diff -Naur jgrf-1.0.0/src/jgrf.c jgrf-1.0.0.patched/src/jgrf.c
+--- jgrf-1.0.0/src/jgrf.c 2022-12-27 18:23:42.000000000 -0500
++++ jgrf-1.0.0.patched/src/jgrf.c 2023-01-20 22:48:24.225103350 -0500
+@@ -807,7 +807,8 @@
+ else if (!strcasecmp(ext, "lnx"))
+ snprintf(gdata.sys, sizeof(gdata.sys), "lynx");
+
+- else if (!strcasecmp(ext, "md"))
++ else if (!strcasecmp(ext, "md") || !strcasecmp(ext, "smd") ||
++ !strcasecmp(ext, "sra"))
+ snprintf(gdata.sys, sizeof(gdata.sys), "md");
+
+ else if (!strcasecmp(ext, "nds") || !strcasecmp(ext, "dsi"))
+@@ -823,6 +824,7 @@
+ snprintf(gdata.sys, sizeof(gdata.sys), "pce");
+
+ else if (!strcasecmp(ext, "sfc") || !strcasecmp(ext, "smc") ||
++ !strcasecmp(ext, "fig") || !strcasecmp(ext, "swc") ||
+ !strcasecmp(ext, "bs") || !strcasecmp(ext, "st"))
+ snprintf(gdata.sys, sizeof(gdata.sys), "snes");
+
diff --git a/games/jollygood/slack-desc b/games/jollygood/slack-desc
new file mode 100644
index 0000000000..885aad81a9
--- /dev/null
+++ b/games/jollygood/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+jollygood: jollygood (the Jolly Good Emulation API and Reference Frontend)
+jollygood:
+jollygood: Jolly Good Emulation is an education and preservation oriented
+jollygood: emulation project. As a side effect, it offers emulation technology
+jollygood: that extreme minimalists may find tolerable.
+jollygood:
+jollygood: This package includes "jg" (the API headers) and "jgrf". jgrf is the
+jollygood: simplest possible frontend for The Jolly Good API. The executable and
+jollygood: man page are called "jollygood".
+jollygood:
+jollygood: