diff options
author | B. Watson <yalhcru@gmail.com> | 2020-08-02 00:15:20 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-08-29 10:08:35 +0700 |
commit | b2a034dc13ac0d5f21f909de88bb7e785b34d4d0 (patch) | |
tree | be97592848373877b7ab010ec60661ee9aaa5007 | |
parent | c13070d596f24c3dc1de0f64bcfe3c2e2460b800 (diff) | |
download | slackbuilds-b2a034dc13ac0d5f21f909de88bb7e785b34d4d0.tar.gz |
system/vice: New maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/vice/README | 16 | ||||
-rw-r--r-- | system/vice/README_SBo.txt | 21 | ||||
-rw-r--r-- | system/vice/config/x64.desktop | 9 | ||||
-rw-r--r-- | system/vice/doinst.sh | 3 | ||||
-rw-r--r-- | system/vice/psiddrv.h.prebuilt.3.4 | 28 | ||||
-rw-r--r-- | system/vice/slack-desc | 16 | ||||
-rw-r--r-- | system/vice/vice.SlackBuild | 149 | ||||
-rw-r--r-- | system/vice/vice.info | 6 |
8 files changed, 179 insertions, 69 deletions
diff --git a/system/vice/README b/system/vice/README index 695f7c927c..cf93780f1a 100644 --- a/system/vice/README +++ b/system/vice/README @@ -1,16 +1,8 @@ +vice (Commodore 8-bit emulator) + VICE is the one and only Versatile Commodore Emulator. It provides emulation of the Commodore C64, C128, VIC20, PET, PLUS4 and CBM-II computers. -NOTE: To use the standard application menu instead of the in-emulator -PETSCII menu, GTK3 v3.22 is required. Slackware 14.2 ships with 3.18 -and there is no upgrade package for this. Slackware Current has 3.22. -So to use the normal application menus, you either need to use Slackware -Current or find a way to upgrade your Slackware 14.2's GTK3 to v3.22. - -Optional Dependency - -To enable recording of videos, you need ffmpeg. Enable this by passing -to the script the parameter: - - FFMPEG=yes ./vice.SlackBuild +See README_SBo.txt for build options. The defaults should be fine for +most users. diff --git a/system/vice/README_SBo.txt b/system/vice/README_SBo.txt new file mode 100644 index 0000000000..e8fd15f8de --- /dev/null +++ b/system/vice/README_SBo.txt @@ -0,0 +1,21 @@ +Optional dependencies: ffmpeg and SDL2. + +Vice can use ffmpeg to record videos of the emulated machine. If +ffmpeg is installed, it will be autodetected. If you have ffmpeg +installed but don't want ffmpeg support, you'll have to removepkg +ffmpeg before building (there's no way to override the autodetection). + +By default, vice will be built with SDL2 if it's installed, otherwise +SDL1. You can set SDL=1 to force building with SDL1 even if SDL2 is +installed. + +If you want to build without PulseAudio, set PULSE=no in the environment. + +Note: To use the standard application menu instead of the in-emulator +PETSCII menu, GTK3 v3.22 is required. Slackware 14.2 ships with 3.18 +and there is no upgrade package for this. Slackware -current has +3.22. So to use the normal application menus, either use Slackware +-current or find a way to upgrade your Slackware 14.2's GTK3 to +v3.22. The SlackBuild maintainer has NOT tested this build with +Slackware -current, you're on your own if it doesn't work (fix it and +send me a patch if you can). diff --git a/system/vice/config/x64.desktop b/system/vice/config/x64.desktop new file mode 100644 index 0000000000..7991b5ecd9 --- /dev/null +++ b/system/vice/config/x64.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=VICE C64 emulator +Comment=A fast Commodore 64 emulator +StartupNotify=true +Exec=x64 +Icon=vice +Terminal=false +Type=Application +Categories=System diff --git a/system/vice/doinst.sh b/system/vice/doinst.sh index 8095c47d9b..2dde7a5cb4 100644 --- a/system/vice/doinst.sh +++ b/system/vice/doinst.sh @@ -1,9 +1,7 @@ -# Update desktop icons if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi -# Update the X font indexes: if [ -x /usr/bin/mkfontdir ]; then ( cd /usr/share/fonts/TTF mkfontscale . @@ -14,3 +12,4 @@ if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache -f fi +chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/vice.info.gz diff --git a/system/vice/psiddrv.h.prebuilt.3.4 b/system/vice/psiddrv.h.prebuilt.3.4 new file mode 100644 index 0000000000..c1820907b8 --- /dev/null +++ b/system/vice/psiddrv.h.prebuilt.3.4 @@ -0,0 +1,28 @@ + 0x01, 0x00, 0x6f, 0x36, 0x35, 0x00, 0x03, 0x00, 0x00, 0x10, 0x35, 0x01, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x70, 0x73, 0x69, 0x64, + 0x64, 0x72, 0x76, 0x2e, 0x6f, 0x36, 0x35, 0x00, 0x1c, 0x03, 0x44, 0x61, 0x67, 0x20, 0x4c, 0x65, + 0x6d, 0x20, 0x3c, 0x72, 0x65, 0x73, 0x69, 0x64, 0x40, 0x6e, 0x69, 0x6d, 0x72, 0x6f, 0x64, 0x2e, + 0x6e, 0x6f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x2b, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x2b, 0x11, 0x31, 0x11, + 0xa9, 0x00, 0x8d, 0x1a, 0xd0, 0xad, 0x19, 0xd0, 0x8d, 0x19, 0xd0, 0xa9, 0x7f, 0x8d, 0x0d, 0xdc, + 0x8d, 0x0d, 0xdd, 0xad, 0x0d, 0xdc, 0xad, 0x0d, 0xdd, 0xa2, 0x08, 0xbd, 0x0c, 0x10, 0x9d, 0x00, + 0x80, 0xca, 0x10, 0xf7, 0xad, 0x18, 0x10, 0xc9, 0x03, 0x90, 0x14, 0xd0, 0x07, 0xad, 0x17, 0x10, + 0xc9, 0x1a, 0x90, 0x0b, 0xa2, 0x05, 0xbd, 0x25, 0x10, 0x9d, 0x14, 0x03, 0xca, 0x10, 0xf7, 0xa9, + 0x1b, 0xa2, 0x00, 0x8d, 0x11, 0xd0, 0x8e, 0x12, 0xd0, 0xad, 0x21, 0x10, 0xf0, 0x06, 0xa9, 0x25, + 0xa2, 0x40, 0xd0, 0x04, 0xa9, 0x95, 0xa2, 0x42, 0x8d, 0x04, 0xdc, 0x8e, 0x05, 0xdc, 0xa9, 0x0f, + 0x8d, 0x18, 0xd4, 0xac, 0x15, 0x10, 0x88, 0xcc, 0x16, 0x10, 0x90, 0x02, 0xa0, 0x00, 0x98, 0x48, + 0xad, 0x1c, 0x10, 0xf0, 0x27, 0xae, 0x1c, 0x10, 0x20, 0xf9, 0x10, 0x8d, 0x24, 0x10, 0xc0, 0x20, + 0x90, 0x02, 0xa0, 0x1f, 0xa9, 0x00, 0xaa, 0x38, 0x2a, 0x90, 0x02, 0x2a, 0xe8, 0x88, 0x10, 0xf8, + 0x3d, 0x1d, 0x10, 0xd0, 0x07, 0xa9, 0x81, 0x8d, 0x1a, 0xd0, 0xd0, 0x0a, 0xa9, 0x81, 0xa2, 0x01, + 0x8d, 0x0d, 0xdc, 0x8e, 0x0e, 0xdc, 0xa9, 0x2f, 0x85, 0x00, 0xad, 0x1a, 0x10, 0xae, 0x23, 0x10, + 0x20, 0xf9, 0x10, 0x85, 0x01, 0x68, 0xaa, 0xa8, 0x20, 0xf3, 0x10, 0xad, 0x1c, 0x10, 0xf0, 0x04, + 0xa9, 0x36, 0x85, 0x01, 0x58, 0x4c, 0xf0, 0x10, 0x6c, 0x19, 0x10, 0x6c, 0x1b, 0x10, 0xc9, 0xe0, + 0x90, 0x03, 0xa9, 0x35, 0x60, 0xc9, 0xd0, 0x90, 0x03, 0xa9, 0x34, 0x60, 0xe0, 0xa0, 0x90, 0x03, + 0xa9, 0x36, 0x60, 0xa9, 0x37, 0x60, 0xad, 0x1c, 0x10, 0xf0, 0x0c, 0xad, 0x24, 0x10, 0x85, 0x01, + 0x20, 0xf6, 0x10, 0xa9, 0x36, 0x85, 0x01, 0xad, 0x19, 0xd0, 0x8d, 0x19, 0xd0, 0xad, 0x0d, 0xdc, + 0x68, 0xa8, 0x68, 0xaa, 0x68, 0x40, 0x2c, 0x0d, 0xdd, 0x40, 0x00, 0x00, 0x0b, 0x82, 0x1b, 0x82, + 0x02, 0x82, 0x02, 0x82, 0x1e, 0x82, 0x09, 0x82, 0x09, 0x82, 0x09, 0x82, 0x13, 0x82, 0x1a, 0x82, + 0x04, 0x82, 0x09, 0x82, 0x05, 0x82, 0x03, 0x82, 0x03, 0x82, 0x15, 0x82, 0x1a, 0x82, 0x03, 0x82, + 0x03, 0x82, 0x08, 0x82, 0x03, 0x82, 0x0a, 0x82, 0x03, 0x82, 0x03, 0x82, 0x1b, 0x82, 0x05, 0x82, + 0x05, 0x82, 0x00, 0x00, 0x00, 0x00, diff --git a/system/vice/slack-desc b/system/vice/slack-desc index 9148291f61..589a2077b8 100644 --- a/system/vice/slack-desc +++ b/system/vice/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -vice: VICE - the Versatile Commodore Emulator +vice: vice (Commodore 8-bit emulator) vice: -vice: VICE is a program that runs on a Unix, MS-DOS, Win32, OS/2, BeOS, -vice: QNX 4.x, QNX 6.x, Amiga, Syllable or Mac OS X machine and executes -vice: programs intended for the old 8-bit computers. The current version -vice: emulates the C64, the C64DTV, the C128, the VIC20, practically all -vice: PET models, the PLUS4 and the CBM-II (aka C610/C510). An extra -vice: emulator is provided for C64 expanded with the CMD SuperCPU. +vice: VICE is a program that runs on a modern machine and executes +vice: programs intended for the the C64, the C64DTV, the C128, the +vice: VIC20, practically all PET models, the PLUS4 and the CBM-II (aka +vice: C610/C510). An extra emulator is provided for C64 expanded with +vice: the CMD SuperCPU. vice: -vice: Homepage: http://vice-emu.sourceforge.io +vice: Build options: ffpmeg=@FF@, sdl=@SDL@, pulse=@PA@ vice: +vice: Homepage: http://vice-emu.sourceforge.io diff --git a/system/vice/vice.SlackBuild b/system/vice/vice.SlackBuild index 578b7d0626..0b1d3f9e64 100644 --- a/system/vice/vice.SlackBuild +++ b/system/vice/vice.SlackBuild @@ -2,7 +2,8 @@ # Slackware build script for VICE -# Copyright 2008 Mauro Giachero (mauro dot giachero at gmail dot com) +# Copyright 2008 Mauro Giachero (email removed) +# Copyright 2020 B. Watson (yalhcru@gmail.com) # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,21 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Initialize variables +# 20200801 bkw: +# - Take over maintenance +# - Autodetect ffmpeg +# - Allow building with SDL 1.x +# - Allow building without pulseaudio +# - Get rid of xa dep +# - Install TTF fonts in correct place, get rid of other formats +# - install-info in doinst.sh so vice.info shows up in the info dir +# - Have slack-desc show build options +# - Re-enable the old x64 emulator +# - BUILD=3 + PRGNAM=vice VERSION=${VERSION:-3.4} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -58,14 +70,40 @@ else LIBDIRSUFFIX="" fi -# The "--enable-shared-ffmpeg" option creates conflicts with external ffmpeg libraries -# So we use an external ffmpeg from another package if requested. -if [ "${FFMPEG:-no}" = "yes" ]; then ffmpeg="--enable-external-ffmpeg"; else ffmpeg=""; fi - -# Exit if errors encountered set -e -# Setup for package creation +# The "--enable-shared-ffmpeg" option creates conflicts with external +# ffmpeg libraries, so we don't use it here. Static would be OK, but +# it won't build, so it's not an option for now either: I don't care +# enough about it to spend any more time trying to fix it. If you do +# care, come up with a way to build with --enable-static-ffmpeg, send +# me a patch, and I'll include it here. + +[ -x /usr/bin/ffmpeg ] && ffmpeg="--enable-external-ffmpeg" + +SDL="${SDL:-auto}" +if [ "$SDL" = "auto" ]; then + SDL=1 + pkg-config --exists sdl2 && SDL=2 +fi + +case "$SDL" in + 1) sdlopt="--enable-sdlui" ;; + 2) sdlopt="--enable-sdlui2" ;; + *) echo -e "$( basename $0 ):" \ + "invalid SDL option '$SDL'." \ + "Valid options are:\n auto 1 2" \ + 1>&2 + exit 1 ;; +esac + +# Anticipating 15.0's pure-alsa-system +if [ "${PULSE:-yes}" != "yes" ]; then + pulseopt="--without-pulse" +fi + +echo "=== sdlopt '$sdlopt', ffmpeg '$ffmpeg', pulseopt '$pulseopt'" + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -73,11 +111,8 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.?z 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 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 {} \+ # Set proper paths in documentation. sed -i "s/\/usr\/local\/lib\//\/usr\/lib${LIBDIRSUFFIX}\//g" \ @@ -87,20 +122,33 @@ sed -i 's/"\/vice_toc\.html"/"\/html\/vice_toc\.html"/g' \ sed -i "s/\/usr\/local/\/usr/g" doc/vice.* doc/html/*html sed -i "s/\/usr\/lib\//\/usr\/lib${LIBDIRSUFFIX}\//g" doc/vice.* doc/html/*html +# Avoid the need for xa. It's only used to generate a small C header +# file, which we include a prebuilt version of here. There's nothing +# dynamic about this header, it's just a small chunk of 6502 object +# code as a C array, and for a given version of vice it'll always be +# the same code. +cat $CWD/psiddrv.h.prebuilt.$VERSION > src/c64/psiddrv.h + autoreconf -vif -# Configure the software +DOCDIR=/usr/doc/$PRGNAM-$VERSION +PKGDOC=$PKG/$DOCDIR + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +XA=/bin/true \ ./configure \ + $sdlopt \ + $ffmpeg \ + $pulseopt \ + --enable-x64 \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --infodir=/usr/info \ - $ffmpeg \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ + --docdir=$DOCDIR \ --with-x \ --enable-quicktime \ --enable-ethernet \ @@ -108,46 +156,59 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-cpuhistory \ --build=$ARCH-slackware-linux -# Build the software make -make install DESTDIR=$PKG - -# Strip symbols from binaries -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 - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -# Compress info files +make install-strip DESTDIR=$PKG rm -f $PKG/usr/info/dir -gzip -9 $PKG/usr/info/* +gzip -9 $PKG/usr/man/man?/*.? $PKG/usr/info/* -# Install icon and menu entries mkdir -p $PKG/usr/share/{applications,pixmaps} install -D -m 0644 $CWD/config/*.desktop $PKG/usr/share/applications install -D -m 0644 $CWD/config/vice.png $PKG/usr/share/pixmaps -# Move the original documentation folder to the usual place -# and create a link to where vice expect it to be -mkdir -p $PKG/usr/doc -mv $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/doc $PKG/usr/doc/$PRGNAM-$VERSION -( cd $PKG/usr/doc/$PRGNAM-$VERSION +# Move the docs to the Slackware standard place, symlink to where vice +# expects it to be. +mkdir -p $PKGDOC +mv $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/doc/* $PKGDOC +( cd $PKGDOC chmod 644 * mkdir html mv *.html *.png *.gif *.css html/ ) -( cd $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM ; ln -s /usr/doc/$PRGNAM-$VERSION doc ) - -# Copy additional program documentation -cp -a AUTHORS ChangeLog COPYING FEEDBACK INSTALL NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +( cd $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM + rmdir doc + ln -s $DOCDIR doc ) + +# 20200728 bkw: when I inherited this build, it was installing the +# fonts to the doc dir (where they can't be used), but updating +# the font cache in doinst.sh. I'm not so sure the fonts are +# really necessary, but in case they are, I've moved them to +# /usr/share/fonts/TTF (and gotten rid of the non-TTF ones). +mkdir -p $PKG/usr/share/fonts/TTF +mv $PKGDOC/*.ttf $PKG/usr/share/fonts/TTF +rm -f $PKGDOC/Lato-* + +# This would install Commodore font where other software can use it. +# However, the characters in the font are in PETSCII order, not ASCII +# or Unicode, so it's not all that useful. +#ln -s ../../../lib$LIBDIRSUFFIX/$PRGNAM/common/CBM.ttf $PKG/usr/share/fonts/TTF + +cp -a AUTHORS ChangeLog COPYING FEEDBACK NEWS README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +# Make the slack-desc reflect the build options. +FF=no; SDL=1.2; PA=no + +# We can't use ldd to detect whether ffmpeg is built in since it +# gets loaded with dlopen(). Hence this stuff: +grep -q '^#define USE_SDLUI2\>' src/config.h && SDL=2.0 +grep -q '^#define HAVE_FFMPEG\>' src/config.h && FF=yes +grep -q '^#define USE_PULSE\>' src/config.h && PA=yes -# Setup package install directory mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed -e "s,@FF@,$FF," \ + -e "s,@PA@,$PA," \ + -e "s,@SDL@,$SDL," \ + $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Create package cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/vice/vice.info b/system/vice/vice.info index 0ba82114ce..481d98ad3f 100644 --- a/system/vice/vice.info +++ b/system/vice/vice.info @@ -5,6 +5,6 @@ DOWNLOAD="https://downloads.sourceforge.net/project/vice-emu/releases/vice-3.4.t MD5SUM="24d83f692910f5d87de19857e8095f0b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="SDL2 xa" -MAINTAINER="Eric B. Pratt" -EMAIL="eric.b.pratt@gmail.com" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |