games/puNES: Updated for version 0.111, new maintainer.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-08-29 03:05:30 -04:00 committed by Willy Sudiarto Raharjo
parent 1dd4bfbf05
commit 0b68b9a4cb
No known key found for this signature in database
GPG key ID: 3F617144D7238786
7 changed files with 360 additions and 64 deletions

View file

@ -1,6 +1,25 @@
Nintendo Entertaiment System emulator.
puNES (NES emulator)
nvidia-cg-toolkit is an optional dependency.
puNES is a Nintendo Entertaiment System emulator with a Qt user
interface, lots of video effects, and support for compressed ROMs.
For more information see:
http://forums.nesdev.com/viewtopic.php?t=6928
The executable and man page are called punes (lowercase), not puNES.
Optional dependencies: nvidia-cg-toolkit and qt6. Neither is essential
for a full emulation experience.
nvidia-cg-toolkit is autodetected. It's required if you want to
use "*.cgp" shaders, such as the ones designed for libretro,
from https://github.com/libretro/common-shaders. If you have
nvidia-cg-toolkit installed, you can build puNES without it by
exporting CG=no in the environment.
qt6 is NOT autodetected. If you want to build with qt6, install it
first, then export QT6=yes in the environment. Warning: until qt6 is
included in a stable Slackware release, qt6 builds of puNES will not
be thoroughly tested by the SlackBuild maintainer. If it doesn't work
after a qt6 update, let me know (or, preferably, send me a patch that
fixes it).

View file

@ -1,3 +1,5 @@
# 20240829 bkw: this is both the doinst.sh and douninst.sh script!
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
@ -7,3 +9,7 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
if [ -x usr/bin/mandb ]; then
chroot . /usr/bin/mandb -f /usr/man/man6/punes.6.gz &> /dev/null
fi

View file

@ -2,30 +2,23 @@
# Slackware build script for puNES
# Copyright 2018-2020 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Originally written by Hunter Sezen.
# Modified and now maintained by B. Watson <urchlay@slackware.uk>.
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20240828 bkw:
# - new maintainer.
# - relicense as WTFPL.
# - update for v0.111.
# - expand README and slack-desc.
# - include a man page.
# - add CG=no and QT6=yes options, document in README.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=puNES
VERSION=${VERSION:-0.106}
VERSION=${VERSION:-0.111}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -38,9 +31,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -52,19 +42,34 @@ 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 -eu
set -e
if [ -x /usr/bin/cgc -a "${CG:-yes}" = "yes" ]; then
WITHCG=WITH
CGOPT="-DENABLE_OPENGL_CG=ON"
else
WITHCG=without
CGOPT=""
fi
# 20240829 bkw: Qt6 is supported, but the user has to ask for it
# specifically. I don't see much difference in the UI either way.
# This may break horribly any time qt6 is updated, and I don't much care.
if [ -x /usr/bin/qmake-qt6 -a "${QT6:-no}" = "yes" ]; then
QTVER=6
QTOPT="-DENABLE_QT6_LIBS=ON"
else
QTVER=5
QTOPT=""
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@ -73,38 +78,52 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
autoreconf -fi
# 20240828 bkw: make .desktop file validate properly.
sed -i -e '/^Encoding/d' \
-e '/^Comment/d' \
misc/*.desktop.in
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--bindir=/usr/games \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux
# 20240828 bkw: upstream switched from autocrap to cmake.
mkdir -p build
cd build
cmake \
$CGOPT \
$QTOPT \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \
-DCMAKE_INSTALL_BINDIR=/usr/games \
-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
cd ..
make
make install DESTDIR=$PKG
# 20240828 bkw: install/strip creates this empty dir...
rmdir $PKG/usr/bin
# Don't overwrite the existing mimeinfo.cache file.
rm -f -- $PKG/usr/share/applications/mimeinfo.cache
# 20240829 bkw: wrote a man page. Wasn't going to, but the --help
# option is too annoying to use (prints output in an X window instead
# of stdout).
mkdir -p $PKG/usr/man/man6
gzip -9c < $CWD/punes.6 > $PKG/usr/man/man6/punes.6.gz
ln -s punes.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ChangeLog COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a COPYING $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
sed -e "s,@WITHCG@,$WITHCG," \
-e "s,@QTVER@,$QTVER," \
< $CWD/slack-desc \
> $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/doinst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View file

@ -1,10 +1,10 @@
PRGNAM="puNES"
VERSION="0.106"
VERSION="0.111"
HOMEPAGE="https://github.com/punesemu/puNES"
DOWNLOAD="https://github.com/punesemu/puNES/archive/v0.106/puNES-0.106.tar.gz"
MD5SUM="e85ba4a99e933abee5df72f98bbbc7a9"
DOWNLOAD="https://github.com/punesemu/puNES/archive/v0.111/puNES-0.111.tar.gz"
MD5SUM="068ca02786c102afe1507c689696f0fd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Hunter Sezen"
EMAIL="orbea@riseup.net"
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

135
games/puNES/punes.6 Normal file
View file

@ -0,0 +1,135 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "PUNES" 6 "2024-08-29" "0.111" "SlackBuilds.org"
.SH NAME
punes \- Nintendo Entertainment System emulator
.\" RST source for punes(1) man page. Convert with:
.
.\" rst2man.py punes.rst > punes.6
.
.SH SYNOPSIS
.sp
punes [\fIoptions\fP] [file ...]
.SH DESCRIPTION
.sp
\fBpunes\fP is a Nintendo Entertaiment System emulator with a Qt user
interface, lots of video effects, and support for compressed ROMs.
.SH OPTIONS
.sp
Normally, these options are not used, since \fBpunes\fP is a GUI
application with a Settings menu where you can configure everything.
These options will override what\(aqs in the config file, and will be
saved to the config file when the "Save Settings" option is used.
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
Display built\-in help (in an X window, not on stdout).
.TP
.B \-V\fP,\fB \-\-version
Print the version number on standard output.
.TP
.B \-\-portable
Start in portable mode: use the directory the executable is in
for configuration and NVRAM saved data.
.UNINDENT
.INDENT 0.0
.TP
.B \-m, \-\-mode \fImode\fP
Preferred video mode: pal, ntsc, dendy, auto.
.TP
.B \-s, \-\-size \fIsize\fP
Window size: 1x, 2x, 3x, 4x, 5x, 6x.
.TP
.B \-e, \-\-pixel\-aspect\-ratio \fIratio\fP
Change the aspect ratio. Choices: 1:1, 5:4, 8:7, 11:8.
.TP
.B \-\-par\-soft\-stretch \fIyes|no\fP
Improves the stretched image. Choices: yes, no.
.TP
.B \-\-overscan\-blk\-brd \fIyes|no\fP
Enable black borders in windowed mode. Choices: yes, no.
.TP
.B \-\-overscan\-blk\-brd\-f \fIyes|no\fP
Enable black borders in fullscreen mode. Choices: yes, no.
.TP
.B \-o, \-\-overscan \fIon|off\fP
Default overscan. Choices: on, off.
.UNINDENT
.INDENT 0.0
.TP
.B \-i\fP,\fB \-\-filter
Filter to apply. Choices: nofilter, scale2x, scale3x, scale4x,
hq2x, hq3x, hq4x, xbrz2x, xbrz3x, xbrz4x, xbrz5x, xbrz6x, xbrz2xmt,
xbrz3xmt, xbrz4xmt, xbrz5xmt, xbrz6xmt, ntsc, 2xsai, super2xsai,
supereagle, tv2x, tv3x, tv4x, dotmatrix, paltv1x, paltv2x, paltv3x.
.UNINDENT
.SH FILES
.INDENT 0.0
.TP
.B \fB~/.config/puNES/\fP
Default location for config files. \fBinput.cfg\fP, \fBpuNES.cfg\fP, and
\fBrecent.cfg\fP are human\-readable and editable, though it\(aqs usually
easier to use the Settings menus in the GUI.
.TP
.B \fB~/.local/share/puNES/\fP
Saved data is stored here, including save\-states and screenshots.
.UNINDENT
.\" ENVIRONMENT
.
.\" ===========
.
.\" EXIT STATUS
.
.\" ===========
.
.\" BUGS
.
.\" ====
.
.\" EXAMPLES
.
.\" ========
.
.SH COPYRIGHT
.sp
See the file /usr/doc/puNES\-0.111/COPYING for license information.
.SH AUTHORS
.sp
puNES was written by FHorse.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
The puNES homepage: \fI\%https://github.com/punesemu/puNES\fP
.sp
The puNES forum thread: \fI\%https://github.com/punesemu/puNES\fP
.\" Generated by docutils manpage writer.
.

117
games/puNES/punes.rst Normal file
View file

@ -0,0 +1,117 @@
.. RST source for punes(1) man page. Convert with:
.. rst2man.py punes.rst > punes.6
.. |version| replace:: 0.111
.. |date| date::
=====
punes
=====
--------------------------------------
Nintendo Entertainment System emulator
--------------------------------------
:Manual section: 6
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
SYNOPSIS
========
punes [*options*] [file ...]
DESCRIPTION
===========
**punes** is a Nintendo Entertaiment System emulator with a Qt user
interface, lots of video effects, and support for compressed ROMs.
OPTIONS
=======
Normally, these options are not used, since **punes** is a GUI
application with a Settings menu where you can configure everything.
These options will override what's in the config file, and will be
saved to the config file when the "Save Settings" option is used.
-h, --help
Display built-in help (in an X window, not on stdout).
-V, --version
Print the version number on standard output.
--portable
Start in portable mode: use the directory the executable is in
for configuration and NVRAM saved data.
-m, --mode *mode*
Preferred video mode: pal, ntsc, dendy, auto.
-s, --size *size*
Window size: 1x, 2x, 3x, 4x, 5x, 6x.
-e, --pixel-aspect-ratio *ratio*
Change the aspect ratio. Choices: 1:1, 5:4, 8:7, 11:8.
--par-soft-stretch *yes|no*
Improves the stretched image. Choices: yes, no.
--overscan-blk-brd *yes|no*
Enable black borders in windowed mode. Choices: yes, no.
--overscan-blk-brd-f *yes|no*
Enable black borders in fullscreen mode. Choices: yes, no.
-o, --overscan *on|off*
Default overscan. Choices: on, off.
-i, --filter
Filter to apply. Choices: nofilter, scale2x, scale3x, scale4x,
hq2x, hq3x, hq4x, xbrz2x, xbrz3x, xbrz4x, xbrz5x, xbrz6x, xbrz2xmt,
xbrz3xmt, xbrz4xmt, xbrz5xmt, xbrz6xmt, ntsc, 2xsai, super2xsai,
supereagle, tv2x, tv3x, tv4x, dotmatrix, paltv1x, paltv2x, paltv3x.
FILES
=====
**~/.config/puNES/**
Default location for config files. **input.cfg**, **puNES.cfg**, and
**recent.cfg** are human-readable and editable, though it's usually
easier to use the Settings menus in the GUI.
**~/.local/share/puNES/**
Saved data is stored here, including save-states and screenshots.
.. ENVIRONMENT
.. ===========
.. EXIT STATUS
.. ===========
.. BUGS
.. ====
.. EXAMPLES
.. ========
COPYRIGHT
=========
See the file /usr/doc/puNES-|version|/COPYING for license information.
AUTHORS
=======
puNES was written by FHorse.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
The puNES homepage: https://github.com/punesemu/puNES
The puNES forum thread: https://github.com/punesemu/puNES

View file

@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
puNES: puNES (NES emulator)
puNES:
puNES: Nintendo Entertaiment System emulator.
puNES: puNES is a Nintendo Entertaiment System emulator with a Qt user
puNES: interface, lots of video effects, and support for compressed ROMs.
puNES:
puNES: This package built @WITHCG@ nvidia-cg-toolkit support, and
puNES: with the Qt@QTVER@ user interface.
puNES:
puNES: Homepage: https://github.com/punesemu/puNES
puNES:
puNES:
puNES:
puNES:
puNES:
puNES: