diff options
author | B. Watson <urchlay@slackware.uk> | 2024-01-24 09:01:50 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-01-24 09:20:31 +0700 |
commit | 5feaca04028e4afad4ffa75353b2079a649d7e73 (patch) | |
tree | ac3f390c57b1ff131decbf7574d6bb0b85911636 /system/86box | |
parent | 75cced034bdcf274b54a035b96a954b283b8825d (diff) |
system/86box: Added (x86box emulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/86box')
-rw-r--r-- | system/86box/86box.SlackBuild | 126 | ||||
-rw-r--r-- | system/86box/86box.info | 12 | ||||
-rw-r--r-- | system/86box/README | 27 | ||||
-rw-r--r-- | system/86box/doinst.sh | 9 | ||||
-rw-r--r-- | system/86box/slack-desc | 19 |
5 files changed, 193 insertions, 0 deletions
diff --git a/system/86box/86box.SlackBuild b/system/86box/86box.SlackBuild new file mode 100644 index 0000000000000..a14f5dda3a067 --- /dev/null +++ b/system/86box/86box.SlackBuild @@ -0,0 +1,126 @@ +#!/bin/bash + +# Slackware build script for 86box + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Notes: + +# This thing uses the current directory for its config file. I thought +# about patching it to use ~/.86box.cfg or ~/.config/86Box/86box.cfg, +# but it might be considered a feature (create each VM in it own +# directory, with its own 86box.cfg). + +# We don't have rtmidi in the repo. The build doesn't autodetect that +# it's missing, we have to help it out with -DRTMIDI=OFF. It's OK, +# it'll use FluidSynth for MIDI playback. + +# The linbox-qt5 frontend, despite its name, seems to require qt6 (pyside6). +# The sl86 fronend looks too simple to be useful. +# The other frontends are mac/windows only. +# Anyway, it has a nice Qt GUI, I don't see why it needs a frontend. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=86box +SRCNAM=86Box +VERSION=${VERSION:-4.0.1} +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 $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +tar xvf $CWD/roms-$VERSION.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 {} + + +mkdir -p build +cd build + cmake \ + -DRTMIDI=OFF \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +# Allow running "86box", lowercase B, to match the package name. +ln -s $SRCNAM $PKG/usr/bin/$PRGNAM + +# This mv will be fast, src and dest are always on the same FS. +mkdir -p $PKG/usr/share/$SRCNAM +mv roms-$VERSION $PKG/usr/share/$SRCNAM/roms + +# Upstream ships desktop/icons, but 'make install' doesn't install it. +mkdir -p $PKG/usr/share/applications +cp -a src/unix/assets/net.86box.86Box.desktop $PKG/usr/share/applications + +mkdir -p $PKG/usr/share/metainfo +cp -a src/unix/assets/net.86box.86Box.metainfo.xml $PKG/usr/share/metainfo + +for i in src/unix/assets/[0-9]*x*/; do + dir=$PKG/usr/share/icons/hicolor/$( basename $i )/apps + mkdir -p $dir + cp -a $i/*.png $dir +done + +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/net.86box.86Box.png \ + $PKG/usr/share/pixmaps/$PRGNAM.png + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYING *.md $PKGDOC +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/system/86box/86box.info b/system/86box/86box.info new file mode 100644 index 0000000000000..f44edb809d6a9 --- /dev/null +++ b/system/86box/86box.info @@ -0,0 +1,12 @@ +PRGNAM="86box" +VERSION="4.0.1" +HOMEPAGE="https://86box.net/" +DOWNLOAD="https://github.com/86Box/86Box/archive/v4.0.1/86Box-4.0.1.tar.gz \ + https://github.com/86Box/roms/archive/v4.0.1/roms-4.0.1.tar.gz" +MD5SUM="352758f2b198dd4f6de5f2fb6f8d6ab2 \ + 4d05fe37518ddbdbc9749788292575f4" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libslirp" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/86box/README b/system/86box/README new file mode 100644 index 0000000000000..0d7e59bb2cec8 --- /dev/null +++ b/system/86box/README @@ -0,0 +1,27 @@ +86box (PC emulator) + +86box is a low level x86 emulator that runs older operating systems +and software designed for IBM PC systems and compatibles from 1981 +through fairly recent system designs based on the PCI bus. + +Features: + +- Easy to use interface inspired by mainstream hypervisor software. +- Low level emulation of 8086-based processors up to the Mendocino-era + Celeron with focus on accuracy. +- Great range of customizability of virtual machines. +- Many available systems, such as the very first IBM PC 5150 from 1981, + or the more obscure IBM PS/2 line of systems based on the Micro + Channel Architecture. +- Lots of supported peripherals including video adapters, sound cards, + network adapters, hard disk controllers, and SCSI adapters. +- MIDI output to Windows built-in MIDI support, FluidSynth, or emulated + Roland synthesizers. +- Supports running MS-DOS, older Windows versions, OS/2, many Linux + distributions, or vintage systems such as BeOS or NEXTSTEP, and + applications for these systems. + +The package includes the ROM images required for emulation. + +Full documentation is available at: +https://86box.readthedocs.io/en/latest/index.html diff --git a/system/86box/doinst.sh b/system/86box/doinst.sh new file mode 100644 index 0000000000000..65c7e2eeb9aa5 --- /dev/null +++ b/system/86box/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/system/86box/slack-desc b/system/86box/slack-desc new file mode 100644 index 0000000000000..ad90ce468722d --- /dev/null +++ b/system/86box/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------------------------------------------------------| +86box: 86box (PC emulator) +86box: +86box: 86box is a low level x86 emulator that runs older operating systems +86box: and software designed for IBM PC systems and compatibles from 1981 +86box: through fairly recent system designs based on the PCI bus. +86box: +86box: +86box: +86box: +86box: +86box: |