summaryrefslogtreecommitdiffstats
path: root/games/xemu
diff options
context:
space:
mode:
Diffstat (limited to 'games/xemu')
-rw-r--r--games/xemu/README3
-rw-r--r--games/xemu/doinst.sh9
-rw-r--r--games/xemu/slack-desc19
-rw-r--r--games/xemu/xemu.SlackBuild155
-rw-r--r--games/xemu/xemu.info24
5 files changed, 210 insertions, 0 deletions
diff --git a/games/xemu/README b/games/xemu/README
new file mode 100644
index 0000000000..6a991ee778
--- /dev/null
+++ b/games/xemu/README
@@ -0,0 +1,3 @@
+A free and open-source application that emulates the original
+Microsoft Xbox game console, enabling people to play their original
+Xbox games on Windows, macOS, and Linux systems.
diff --git a/games/xemu/doinst.sh b/games/xemu/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/games/xemu/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/xemu/slack-desc b/games/xemu/slack-desc
new file mode 100644
index 0000000000..10d1383dc7
--- /dev/null
+++ b/games/xemu/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------------------------------------------------------|
+xemu: xemu (Original Xbox Emulator)
+xemu:
+xemu: Original Xbox Emulator for Windows, macOS, and Linux
+xemu:
+xemu: Homepage: https://xemu.app
+xemu:
+xemu:
+xemu:
+xemu:
+xemu:
+xemu:
diff --git a/games/xemu/xemu.SlackBuild b/games/xemu/xemu.SlackBuild
new file mode 100644
index 0000000000..f82dc108d4
--- /dev/null
+++ b/games/xemu/xemu.SlackBuild
@@ -0,0 +1,155 @@
+#!/bin/bash
+
+# Slackware build script for xemu
+
+# Copyright 2022-2023 Steven Voges <Oregon, 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=xemu
+BRANCH=${BRANCH:-master}
+VERSION=${VERSION:-0.7.86}
+COMMIT=${COMMIT:-4a99fd0f1855fc52e15885812abd3ee4bb2b3847}
+BSOFTFLOAT3=${BSOFTFLOAT3:-b64af41c3276f97f0e181920400ee056b9c88037}
+BTESTFLOAT3=${BTESTFLOAT3:-5a59dcec19327396a011a17fd924aed4fec416b3}
+GENCONFIG=${GENCONFIG:-44bab849ce87fceafd74703bfcf2b61a1a1b738f}
+IMGUI=${IMGUI:-c71a50deb5ddf1ea386b91e60fa2e4a26d080074}
+IMPLOT=${IMPLOT:-b47c8bacdbc78bc521691f70666f13924bb522ab}
+KEYCODEMAPDB=${KEYCODEMAPDB:-d21009b1c9f94b740ea66be8e48a1d8ad8124023}
+NV2AVSHCPU=${NV2AVSHCPU:-d5a7308809a80e1b01b5c016127d4f1b91c8673b}
+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
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+
+tar xvf $CWD/berkeley-softfloat-3-$BSOFTFLOAT3.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/tests/fp/berkeley-softfloat-3 --strip-components 1
+tar xvf $CWD/berkeley-testfloat-3-$BTESTFLOAT3.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/tests/fp/berkeley-testfloat-3 --strip-components 1
+tar xvf $CWD/genconfig-$GENCONFIG.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/genconfig --strip-components 1
+tar xvf $CWD/imgui-$IMGUI.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/ui/thirdparty/imgui --strip-components 1
+tar xvf $CWD/implot-$IMPLOT.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/ui/thirdparty/implot --strip-components 1
+tar xvf $CWD/keycodemapdb-$KEYCODEMAPDB.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/ui/keycodemapdb --strip-components 1
+tar xvf $CWD/nv2a_vsh_cpu-$NV2AVSHCPU.tar.gz -C \
+ $TMP/$PRGNAM-$VERSION/hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu --strip-components 1
+
+cd $PRGNAM-$VERSION
+
+mkdir -p tomlplusplus/include
+sed -i '7d;8d;9d;10d;11d;12d;13d;14d;15d;16d;17d;18d;19d;20d;21d;22d;23d;24d;25d;26d;27d' \
+ scripts/xemu-version.sh
+sed -i "7iXEMU_COMMIT=${COMMIT}" scripts/xemu-version.sh
+sed -i "8iXEMU_BRANCH=${BRANCH}" scripts/xemu-version.sh
+sed -i "9iXEMU_VERSION=${VERSION}" scripts/xemu-version.sh
+sed -i "s/self._version = self.submodule.head/self._version = '$COMMIT'/g" scripts/gen-license.py
+python3 scripts/gen-license.py > XEMU_LICENSE
+
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-debug-info \
+ --enable-slirp=system \
+ --extra-cflags="-DXBOX=1" \
+ --target-list=i386-softmmu \
+ --with-git-submodules=ignore \
+ --ninja=ninja \
+ --build=$ARCH-slackware-linux
+make qemu-system-i386
+
+install -vDm755 build/qemu-system-i386 $PKG/usr/bin/$PRGNAM
+install -vDm644 ui/${PRGNAM}.desktop -t $PKG/usr/share/applications
+install -vDm644 ui/icons/${PRGNAM}.svg -t $PKG/usr/share/icons/hicolor/scalable/apps
+for SIZE in 16 24 32 48 64 128 256 512; do
+ install -vDm644 ui/icons/xemu_${SIZE}x${SIZE}.png \
+ $PKG/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/$PRGNAM.png
+done
+
+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 \
+ COPYING COPYING.LIB LICENSE MAINTAINERS README.* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+install -vDm644 $TMP/$PRGNAM-$VERSION/XEMU_LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+
+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/xemu/xemu.info b/games/xemu/xemu.info
new file mode 100644
index 0000000000..bda2968318
--- /dev/null
+++ b/games/xemu/xemu.info
@@ -0,0 +1,24 @@
+PRGNAM="xemu"
+VERSION="0.7.86"
+HOMEPAGE="https://xemu.app"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/mborgerson/xemu/archive/v0.7.86/xemu-0.7.86.tar.gz \
+ https://gitlab.com/qemu-project/berkeley-softfloat-3/-/archive/b64af41c3276f97f0e181920400ee056b9c88037/berkeley-softfloat-3-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz \
+ https://gitlab.com/qemu-project/berkeley-testfloat-3/-/archive/5a59dcec19327396a011a17fd924aed4fec416b3/berkeley-testfloat-3-5a59dcec19327396a011a17fd924aed4fec416b3.tar.gz \
+ https://github.com/mborgerson/genconfig/archive/44bab849ce87fceafd74703bfcf2b61a1a1b738f/genconfig-44bab849ce87fceafd74703bfcf2b61a1a1b738f.tar.gz \
+ https://github.com/ocornut/imgui/archive/c71a50deb5ddf1ea386b91e60fa2e4a26d080074/imgui-c71a50deb5ddf1ea386b91e60fa2e4a26d080074.tar.gz \
+ https://github.com/epezent/implot/archive/b47c8bacdbc78bc521691f70666f13924bb522ab/implot-b47c8bacdbc78bc521691f70666f13924bb522ab.tar.gz \
+ https://gitlab.com/qemu-project/keycodemapdb/-/archive/d21009b1c9f94b740ea66be8e48a1d8ad8124023/keycodemapdb-d21009b1c9f94b740ea66be8e48a1d8ad8124023.tar.gz \
+ https://github.com/abaire/nv2a_vsh_cpu/archive/d5a7308809a80e1b01b5c016127d4f1b91c8673b/nv2a_vsh_cpu-d5a7308809a80e1b01b5c016127d4f1b91c8673b.tar.gz"
+MD5SUM_x86_64="f5d4863774ec134b7a7eac371e5b45b6 \
+ 7fa778ee82a15c09162b66564455c01e \
+ 5627edcf7c64f95f50925784c806e4d9 \
+ f55989cc5fd27ee7cbf8addcec370275 \
+ 7f9dcf287b6e7c2fafcc2ffcd4e22c0a \
+ bc067af8983f58ff4fb492a5fc79dae6 \
+ 2766ec9d09dd7fa3aa94c318b5f5e3b3 \
+ cfb9f8a87e1b685ca10fe4e0992c76fe"
+REQUIRES="libslirp tomlplusplus"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"