diff options
Diffstat (limited to 'games/pcsx2')
-rw-r--r-- | games/pcsx2/README | 16 | ||||
-rw-r--r-- | games/pcsx2/doinst.sh | 14 | ||||
-rw-r--r-- | games/pcsx2/pcsx2.SlackBuild | 150 | ||||
-rw-r--r-- | games/pcsx2/pcsx2.info | 20 | ||||
-rw-r--r-- | games/pcsx2/slack-desc | 19 |
5 files changed, 219 insertions, 0 deletions
diff --git a/games/pcsx2/README b/games/pcsx2/README new file mode 100644 index 0000000000..b8bf7b2e1a --- /dev/null +++ b/games/pcsx2/README @@ -0,0 +1,16 @@ +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. + +PCSX2 requires a CPU that supports the SSE4.1 instruction set. +Check your processor flags with lscpu for sse4_1. + +PCSX2 requires a GPU that supports OpenGL 3.3 or Vulkan 1.1. + +RetroAchievements are enabled by default, to disable this +functionality, pass ACHIEVEMENTS=OFF to the build script. + +Discord Rich Presence is disabled by default, to enable Discord +functionality, pass DISCORD=ON to the build script. diff --git a/games/pcsx2/doinst.sh b/games/pcsx2/doinst.sh new file mode 100644 index 0000000000..262eb5a9e5 --- /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 0000000000..e225fc106f --- /dev/null +++ b/games/pcsx2/pcsx2.SlackBuild @@ -0,0 +1,150 @@ +#!/bin/bash + +# Slackware build script for pcsx2 + +# Copyright 2022-2024 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:-1.7.3772} +COMMIT=$(echo $VERSION | cut -c 5-) +SRCVER=${SRCVER:-7cb22815e63df2def2f5e5d008ef1b91b895130a} +FMT=${FMT:-a33701196adfad74917046096bf5a2aa0ab0bb50} +GLSLANG=${GLSLANG:-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5} +LIBCHDR=${LIBCHDR:-5de1a59019815ccdbba0fe07c71b31406d023248} +RCHEEVOS=${RCHEEVOS:-31f8788fe0e694e99db7ce138d45a655c556fa96} +VULKANHEADERS=${VULKANHEADERS:-9f4c61a31435a7a90a314fc68aeb386c92a09c0f} +ACHIEVEMENTS=$ACHIEVEMENTS=:-ON} +DISCORD=${DISCORD:-OFF} +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/fmt-$FMT.tar.gz -C \ + $DEPS/fmt/fmt --strip-components 1 +tar xvf $CWD/glslang-$GLSLANG.tar.gz -C \ + $DEPS/glslang/glslang --strip-components 1 +tar xvf $CWD/libchdr-$LIBCHDR.tar.gz -C \ + $DEPS/libchdr/libchdr --strip-components 1 +tar xvf $CWD/rcheevos-$RCHEEVOS.tar.gz -C \ + $DEPS/rcheevos/rcheevos --strip-components 1 +tar xvf $CWD/Vulkan-Headers-$VULKANHEADERS.tar.gz -C \ + $DEPS/vulkan-headers --strip-components 1 + +sed -i "s/#define PCSX2_VersionLo 0/#define PCSX2_VersionLo ${COMMIT}/g" \ + pcsx2/SysForwardDefs.h + +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 \ + -DDISABLE_PCSX2_WRAPPER=ON \ + -DDISABLE_SETCAP=ON \ + -DENABLE_TESTS=OFF \ + -DPACKAGE_MODE=ON \ + -DQT_BUILD=$QT \ + -DUSE_ACHIEVEMENTS=$ACHIEVEMENTS \ + -DUSE_DISCORD_PRESENCE=$DISCORD \ + -DUSE_SYSTEM_FMT=OFF \ + -DUSE_VULKAN=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 0000000000..ae3cfba4b6 --- /dev/null +++ b/games/pcsx2/pcsx2.info @@ -0,0 +1,20 @@ +PRGNAM="pcsx2" +VERSION="1.7.3772" +HOMEPAGE="https://pcsx2.net" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/PCSX2/pcsx2/archive/7cb22815e63df2def2f5e5d008ef1b91b895130a/pcsx2-7cb22815e63df2def2f5e5d008ef1b91b895130a.tar.gz \ + https://github.com/KhronosGroup/Vulkan-Headers/archive/9f4c61a31435a7a90a314fc68aeb386c92a09c0f/Vulkan-Headers-9f4c61a31435a7a90a314fc68aeb386c92a09c0f.tar.gz \ + https://github.com/fmtlib/fmt/archive/a33701196adfad74917046096bf5a2aa0ab0bb50/fmt-a33701196adfad74917046096bf5a2aa0ab0bb50.tar.gz \ + https://github.com/KhronosGroup/glslang/archive/c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5.tar.gz \ + https://github.com/rtissera/libchdr/archive/5de1a59019815ccdbba0fe07c71b31406d023248/libchdr-5de1a59019815ccdbba0fe07c71b31406d023248.tar.gz \ + https://github.com/RetroAchievements/rcheevos/archive/31f8788fe0e694e99db7ce138d45a655c556fa96/rcheevos-31f8788fe0e694e99db7ce138d45a655c556fa96.tar.gz" +MD5SUM_x86_64="a9c767fd77587be7cec5c7932b772027 \ + d3ccd22b8486dae09a44462b2f06b7e8 \ + 5069920ee4e07003d7b135d0d477ced8 \ + e2f744abeca9a55aa7e49e652a983ebd \ + fc702efac9ba601156c27f7fc7055f98 \ + cb03a7c28b5a9b184f609f2c9b0c6fae" +REQUIRES="fast_float 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 0000000000..9de93c015d --- /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: |