aboutsummaryrefslogtreecommitdiff
path: root/games/pcsx2
diff options
context:
space:
mode:
authorSteven Voges <svoges.sbo@gmail.com>2022-09-14 19:28:04 +0100
committerbedlam <dave@slackbuilds.org>2022-09-14 19:28:04 +0100
commiteeb8abcccbfed55f1389d6008b31c43b7dc2b301 (patch)
tree580cbe44fd7060ba1abeb861b530639cacdaffdb /games/pcsx2
parent9da01a8c2166e10437bc789d3d0d62d0e37e8df0 (diff)
games/pcsx2: Added (PlayStation 2 Emulator)
Signed-off-by: bedlam <dave@slackbuilds.org>
Diffstat (limited to 'games/pcsx2')
-rw-r--r--games/pcsx2/README5
-rw-r--r--games/pcsx2/doinst.sh14
-rw-r--r--games/pcsx2/pcsx2.SlackBuild143
-rw-r--r--games/pcsx2/pcsx2.info20
-rw-r--r--games/pcsx2/slack-desc19
5 files changed, 201 insertions, 0 deletions
diff --git a/games/pcsx2/README b/games/pcsx2/README
new file mode 100644
index 000000000000..568e8ae7e075
--- /dev/null
+++ b/games/pcsx2/README
@@ -0,0 +1,5 @@
+PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its
+purpose is to emulate the PS2's hardware, using a combination of MIPS
+CPU Interpreters, Recompilers and a Virtual Machine which manages
+hardware states and PS2 system memory. This allows you to play PS2
+games on your PC, with many additional features and benefits.
diff --git a/games/pcsx2/doinst.sh b/games/pcsx2/doinst.sh
new file mode 100644
index 000000000000..262eb5a9e5eb
--- /dev/null
+++ b/games/pcsx2/doinst.sh
@@ -0,0 +1,14 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+# If other icon themes are installed, then add to/modify this as needed
+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/pcsx2/pcsx2.SlackBuild b/games/pcsx2/pcsx2.SlackBuild
new file mode 100644
index 000000000000..17e1e7125960
--- /dev/null
+++ b/games/pcsx2/pcsx2.SlackBuild
@@ -0,0 +1,143 @@
+#!/bin/bash
+
+# Slackware build script for pcsx2
+
+# Copyright 2022 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=pcsx2
+VERSION=${VERSION:-20220908_4707c02}
+SRCVER=${SRCVER:-4707c02a3439107c83293689d3ab9aa251cdccfc}
+CUBEB=${CUBEB:-dc511c6b3597b6384d28949285b9289e009830ea}
+GLSLANG=${GLSLANG:-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5}
+IMGUI=${IMGUI:-60bea052a92cbb4a93b221002fdf04f0da3698e1}
+LIBCHDR=${LIBCHDR:-5de1a59019815ccdbba0fe07c71b31406d023248}
+VULKANHEADERS=${VULKANHEADERS:-9f4c61a31435a7a90a314fc68aeb386c92a09c0f}
+QT=${QT:-OFF}
+WAYLAND=${WAYLAND:-ON}
+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}
+DEPS=$TMP/$PRGNAM-$SRCVER/3rdparty
+
+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-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
+
+tar xvf $CWD/cubeb-$CUBEB.tar.gz -C \
+ $DEPS/cubeb/cubeb --strip-components 1
+tar xvf $CWD/glslang-$GLSLANG.tar.gz -C \
+ $DEPS/glslang/glslang --strip-components 1
+tar xvf $CWD/imgui-$IMGUI.tar.gz -C \
+ $DEPS/imgui/imgui --strip-components 1
+tar xvf $CWD/libchdr-$LIBCHDR.tar.gz -C \
+ $DEPS/libchdr/libchdr --strip-components 1
+tar xvf $CWD/Vulkan-Headers-$VULKANHEADERS.tar.gz -C \
+ $DEPS/vulkan-headers --strip-components 1
+
+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 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -Wno-dev \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_STRIP=ON \
+ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
+ -DDISABLE_PCSX2_WRAPPER=ON \
+ -DDISABLE_SETCAP=ON \
+ -DENABLE_TESTS=OFF \
+ -DPACKAGE_MODE=ON \
+ -DQT_BUILD=$QT \
+ -DSDL2_API=TRUE \
+ -DUSE_SYSTEM_LIBS=ON \
+ -DWAYLAND_API=$WAYLAND \
+ -DXDG_STD=ON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
+
+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
+
+mv $PKG/usr/share/man $PKG/usr/man
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING.* README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/share/doc/Pcsx2/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -r $PKG/usr/share/doc
+
+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/pcsx2/pcsx2.info b/games/pcsx2/pcsx2.info
new file mode 100644
index 000000000000..20bca833310a
--- /dev/null
+++ b/games/pcsx2/pcsx2.info
@@ -0,0 +1,20 @@
+PRGNAM="pcsx2"
+VERSION="20220908_4707c02"
+HOMEPAGE="https://pcsx2.net"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/PCSX2/pcsx2/archive/4707c02a3439107c83293689d3ab9aa251cdccfc/pcsx2-4707c02a3439107c83293689d3ab9aa251cdccfc.tar.gz \
+ https://github.com/KhronosGroup/Vulkan-Headers/archive/9f4c61a31435a7a90a314fc68aeb386c92a09c0f/Vulkan-Headers-9f4c61a31435a7a90a314fc68aeb386c92a09c0f.tar.gz \
+ https://github.com/mozilla/cubeb/archive/dc511c6b3597b6384d28949285b9289e009830ea/cubeb-dc511c6b3597b6384d28949285b9289e009830ea.tar.gz \
+ https://github.com/KhronosGroup/glslang/archive/c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5.tar.gz \
+ https://github.com/ocornut/imgui/archive/60bea052a92cbb4a93b221002fdf04f0da3698e1/imgui-60bea052a92cbb4a93b221002fdf04f0da3698e1.tar.gz \
+ https://github.com/rtissera/libchdr/archive/5de1a59019815ccdbba0fe07c71b31406d023248/libchdr-5de1a59019815ccdbba0fe07c71b31406d023248.tar.gz"
+MD5SUM_x86_64="57f94444a123c8e092591fbadc4549e7 \
+ d3ccd22b8486dae09a44462b2f06b7e8 \
+ 5a40e81e1d6b2438c9b618ffcb679430 \
+ e2f744abeca9a55aa7e49e652a983ebd \
+ 4a8b4d4183604ed7d2c6c22624e2efaf \
+ fc702efac9ba601156c27f7fc7055f98"
+REQUIRES="fmt rapidyaml soundtouch wxWidgets zstd-cmake"
+MAINTAINER="Steven Voges"
+EMAIL="svoges.sbo@gmail.com"
diff --git a/games/pcsx2/slack-desc b/games/pcsx2/slack-desc
new file mode 100644
index 000000000000..9de93c015d75
--- /dev/null
+++ b/games/pcsx2/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------------------------------------------------------|
+pcsx2: pcsx2 (PlayStation 2 Emulator)
+pcsx2:
+pcsx2: PCSX2 - The Playstation 2 Emulator
+pcsx2:
+pcsx2: Homepage: https://pcsx2.net
+pcsx2:
+pcsx2:
+pcsx2:
+pcsx2:
+pcsx2:
+pcsx2: