#!/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: # Version 4.x used to write the config file to the current directory. # Starting with 5.0, it stores configs in ~/.config/86box. # We now have rtmidi in the repo. The build doesn't autodetect it and # disable it if it's missing, we have to help it out with -DRTMIDI=OFF # if needed. It's OK, it'll use FluidSynth for MIDI playback if there's # no rtmidi. # 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. # 20250829 bkw: update for v5.0. # 20240925 bkw: update for v4.2.1. # 20240812 bkw: update for v4.2. # 20240311 bkw: update for v4.1. # - submitted a build for rtmidi, so it's now supported here as an # optional dep. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=86box SRCNAM=86Box VERSION=${VERSION:-5.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 # 20250829 bkw: Starting with version 5.0, SSE2 is required at # runtime, for x86 and x86_64. If we're somehow building on an ancient # CPU that lacks SSE2, warn the user, but don't stop the build. # There is probably a way to patch it to build without SSE2 on x86, # but I'm not spending a lot of time to figure it out because I doubt # anyone really needs it. check_sse2() { grep -q '\' /proc/cpuinfo && return cat < $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install sed "s,@WITH@,$WITH," < $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