diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-21 17:28:07 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-21 17:28:07 +0200 |
| commit | e01824515806d2943aa9266a9befaf37b740ac2c (patch) | |
| tree | 5397050cd74aec75c3b76c8c0b7f0f95eea0ee2a | |
| parent | 42fe2e72960409caeb5d59137f17492a4d72335e (diff) | |
| download | my-slackbuilds-e01824515806d2943aa9266a9befaf37b740ac2c.tar.gz my-slackbuilds-e01824515806d2943aa9266a9befaf37b740ac2c.zip | |
pcsx2: add version 2.8.2
Port the 2.4.0 script from Slackware 15.0 to -current. 15.0 shipped none
of the libraries pcsx2 needs, so the old script vendored sixteen sources
and patched upstream's dependency builder with hardcoded sed line ranges
to skip the Qt build. -current already provides SDL3, Qt6, libpng,
libjpeg-turbo, libwebp, lz4, zstd, ffmpeg and the Vulkan headers at or
above the versions upstream pins, and kddockwidgets 2.4.1 comes from SBo,
so both the vendoring and the line-range surgery mostly go away.
Five dependencies have no packaged counterpart and are still built here,
now directly with upstream's own flags rather than through the patched
builder: libbacktrace, plutovg, plutosvg, rapidyaml and shaderc (with its
three pinned third-party trees). They are built static into a private
prefix that only the build sees, so nothing lands in the package and the
old /usr/lib64/pcsx2 libdir and its LD_LIBRARY_PATH desktop wrapper are
both gone. Verified: the package ships one binary and no shared objects,
no NEEDED entry references the vendored five, and every remaining NEEDED
resolves in a clean -current container with only kddockwidgets added.
pcsx2 2.8.2 still reads AVCodec::pix_fmts and sample_fmts, removed in
ffmpeg 8, so building against -current's ffmpeg 9 fails in GSCapture.cpp.
Disable find_package(FFMPEG) to select the bundled headers upstream ships
for this case; ffmpeg is dlopen'd at runtime, so capture still uses the
system library.
Also drop the llvm-opt dependency now that -current's llvm provides
clang, restrict ARCH to x86_64 with an explicit error, and remove
qt-6.10.patch, which patched the no longer vendored KDDockWidgets 2.2.3.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| -rw-r--r-- | .extras/nvchecker.toml | 5 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | pcsx2/README | 22 | ||||
| -rw-r--r-- | pcsx2/doinst.sh | 14 | ||||
| -rw-r--r-- | pcsx2/pcsx2.SlackBuild | 245 | ||||
| -rw-r--r-- | pcsx2/pcsx2.info | 28 | ||||
| -rw-r--r-- | pcsx2/slack-desc | 19 |
7 files changed, 334 insertions, 0 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml index ffc34ac..def12c0 100644 --- a/.extras/nvchecker.toml +++ b/.extras/nvchecker.toml @@ -174,3 +174,8 @@ host = "git.outfoxxed.me" gitea = "quickshell/quickshell" use_max_tag = true prefix = "v" + +[pcsx2] +source = "github" +github = "PCSX2/pcsx2" +use_latest_release = true @@ -67,6 +67,7 @@ Each package lives in its own top-level subfolder: | qtmaildir | ✅ | not tested | ❌ | 0.29.0 | 0.29.0 | | typora-bin | ✅ | not tested | ❌ | 1.14.9 | 1.14.9 | | quickshell | ✅ | ❌ | ❌ | 0.3.1 | 0.3.1 | +| pcsx2 | ✅ | not tested | ❌ | 2.8.2 | 2.8.2 | > **Note on `quickshell`:** Slackware 15.0 ships Qt5 only, so this package is > **Slackware64-current only**. It also relies on private Qt APIs and must be diff --git a/pcsx2/README b/pcsx2/README new file mode 100644 index 0000000..11198c1 --- /dev/null +++ b/pcsx2/README @@ -0,0 +1,22 @@ +pcsx2 (PlayStation 2 emulator) + +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. + +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. + +This build targets Slackware -current, which already provides SDL3, Qt6, +libpng, libjpeg-turbo, libwebp, lz4, zstd, ffmpeg and the Vulkan +headers at the versions upstream expects. Only libbacktrace, plutovg, +plutosvg, rapidyaml and shaderc are built here, statically, into the +binary. + +Upstream only supports clang, so the build uses the clang/lld from +-current's llvm package. diff --git a/pcsx2/doinst.sh b/pcsx2/doinst.sh new file mode 100644 index 0000000..262eb5a --- /dev/null +++ b/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/pcsx2/pcsx2.SlackBuild b/pcsx2/pcsx2.SlackBuild new file mode 100644 index 0000000..e3740de --- /dev/null +++ b/pcsx2/pcsx2.SlackBuild @@ -0,0 +1,245 @@ +#!/bin/bash + +# Slackware build script for pcsx2 + +# Copyright 2022-2024 Steven Voges <Oregon, USA> +# Copyright 2025 Ruoh-Shoei LIN +# Copyright 2026 Danilo M. <danix@danix.xyz> +# 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:-2.8.2} +PATCHVER=${PATCHVER:-7e1b6936ad2a70c9e28ae21c7c2f3b1510a1736f} +GIT_DATE=${GIT_DATE:-2026-09-04 15:25:34 +0000} +GIT_VERSION=${GIT_VERSION:-v2.8.2} +GIT_HASH=${GIT_HASH:-fd9d310ccbb6b8b62c976da8886a3c8fd3a10ff3} + +# Slackware -current ships SDL3, Qt6, libpng, libjpeg-turbo, libwebp, lz4, +# zstd, ffmpeg and the Vulkan headers at or above the versions upstream pins, +# and kddockwidgets comes from SBo. Only the deps below have no packaged +# counterpart, so they are the only ones built here. Versions are upstream's +# pins from .github/workflows/scripts/linux/build-dependencies-qt.sh. +LIBBACKTRACE=${LIBBACKTRACE:-ad106d5fdd5d960bd33fae1c48a351af567fd075} +PLUTOVG=${PLUTOVG:-1.3.2} +PLUTOSVG=${PLUTOSVG:-0.0.7} +RAPIDYAML=${RAPIDYAML:-0.12.1} +SHADERC=${SHADERC:-2026.2} +SHADERC_GLSLANG=${SHADERC_GLSLANG:-275822a6261ee689aadb1da5f09a0ec2f058685c} +SHADERC_SPIRVHEADERS=${SHADERC_SPIRVHEADERS:-58006c901d1d5c37dece6b6610e9af87fa951375} +SHADERC_SPIRVTOOLS=${SHADERC_SPIRVTOOLS:-6337eb62cadd7d124ac6789bf39c0f71148f0a73} + +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-$VERSION/deps + +if [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + echo "$ARCH is not supported: pcsx2 requires a 64-bit x86 CPU." 1>&2 + exit 1 +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +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 {} \; + +# Upstream only supports clang; -current's llvm provides it. +export CC=clang +export CXX=clang++ + +# The unpackaged deps are built static and installed into a private prefix +# that only the pcsx2 build sees, so nothing lands in the package and no +# LD_LIBRARY_PATH wrapper is needed at runtime. +mkdir -p ${DEPS}-build +pushd ${DEPS}-build + +echo "Building libbacktrace..." +tar xvf $CWD/libbacktrace-$LIBBACKTRACE.tar.gz +( cd libbacktrace-$LIBBACKTRACE + CFLAGS="$SLKCFLAGS" ./configure --prefix="$DEPS" --with-pic \ + --enable-static --disable-shared + make + make install ) + +echo "Building PlutoVG..." +tar xvf $CWD/plutovg-$PLUTOVG.tar.gz +( cd plutovg-$PLUTOVG + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_SHARED_LIBS=OFF \ + -DPLUTOVG_BUILD_EXAMPLES=OFF + cmake --build build + ninja -C build install ) + +echo "Building PlutoSVG..." +tar xvf $CWD/plutosvg-$PLUTOSVG.tar.gz +( cd plutosvg-$PLUTOSVG + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_SHARED_LIBS=OFF \ + -DPLUTOSVG_ENABLE_FREETYPE=OFF \ + -DPLUTOSVG_BUILD_EXAMPLES=OFF + cmake --build build + ninja -C build install ) + +echo "Building RapidYAML..." +tar xvf $CWD/rapidyaml-$RAPIDYAML-src.tgz +( cd rapidyaml-$RAPIDYAML-src + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_SHARED_LIBS=OFF + cmake --build build + ninja -C build install ) + +echo "Building shaderc..." +tar xvf $CWD/shaderc-$SHADERC.tar.gz +( cd shaderc-$SHADERC + ( cd third_party + tar xvf $CWD/glslang-$SHADERC_GLSLANG.tar.gz + mv glslang-$SHADERC_GLSLANG glslang + tar xvf $CWD/SPIRV-Headers-$SHADERC_SPIRVHEADERS.tar.gz + mv SPIRV-Headers-$SHADERC_SPIRVHEADERS spirv-headers + tar xvf $CWD/SPIRV-Tools-$SHADERC_SPIRVTOOLS.tar.gz + mv SPIRV-Tools-$SHADERC_SPIRVTOOLS spirv-tools ) + patch -p1 < $TMP/$PRGNAM-$VERSION/.github/workflows/scripts/common/shaderc-changes.patch + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DSHADERC_SKIP_TESTS=ON \ + -DSHADERC_SKIP_EXAMPLES=ON \ + -DSHADERC_SKIP_COPYRIGHT_CHECK=ON + cmake --build build + ninja -C build install ) + +tar xvf $CWD/${PRGNAM}_patches-${PATCHVER}.tar.gz +popd + +echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h + +# pcsx2 2.8.2 still uses AVCodec::pix_fmts/sample_fmts, removed in ffmpeg 8. +# -current ships ffmpeg 9, so force the bundled ffmpeg headers upstream +# provides for exactly this case. ffmpeg is dlopen'd at runtime, not linked, +# so video capture still uses the system ffmpeg. + +mkdir -p build +cd build + cmake -GNinja \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_PREFIX_PATH="${DEPS}" \ + -DCMAKE_DISABLE_FIND_PACKAGE_FFMPEG=ON \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ + -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld -lrt" \ + -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld -lrt" \ + -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld -lrt" \ + -DENABLE_SETCAP=OFF \ + -DPACKAGE_MODE=ON \ + -DDISABLE_ADVANCE_SIMD=ON \ + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ + -DPCSX2_APP_DATADIR=/usr/share/PCSX2/resources \ + -DCMAKE_BUILD_TYPE=Release .. + ninja + ninja unittests + DESTDIR=$PKG ninja install +cd .. + +install -v -Dm644 ./bin/resources/icons/AppIconLarge.png \ + $PKG/usr/share/icons/hicolor/512x512/apps/net.pcsx2.PCSX2.png +install -v -Dm644 ./.github/workflows/scripts/linux/pcsx2-qt.desktop \ + $PKG/usr/share/applications/net.pcsx2.PCSX2.desktop +desktop-file-edit \ + --set-key=Icon \ + --set-value=net.pcsx2.PCSX2 \ + $PKG/usr/share/applications/net.pcsx2.PCSX2.desktop +sed -i \ + "s/@GIT_VERSION@/$GIT_VERSION/g;s/@GIT_DATE@/$GIT_DATE/g;s/@GIT_HASH@/$GIT_HASH/g" \ + .github/workflows/scripts/linux/pcsx2-qt.metainfo.xml.in +install -v -Dm644 .github/workflows/scripts/linux/pcsx2-qt.metainfo.xml.in \ + $PKG/usr/share/metainfo/net.pcsx2.PCSX2.metainfo.xml + +# pcsx2_patches, collection of game patches (e.g. widescreen hacks) +zip -mTj9 \ + $CWD/patches.zip \ + ${DEPS}-build/${PRGNAM}_patches-${PATCHVER}/patches/* +install -Dm644 $CWD/patches.zip -t $PKG/usr/share/PCSX2/resources + +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.* README.md bin/docs \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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 --remove-rpaths $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/pcsx2/pcsx2.info b/pcsx2/pcsx2.info new file mode 100644 index 0000000..52538ac --- /dev/null +++ b/pcsx2/pcsx2.info @@ -0,0 +1,28 @@ +PRGNAM="pcsx2" +VERSION="2.8.2" +HOMEPAGE="https://pcsx2.net" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/PCSX2/pcsx2/archive/v2.8.2/pcsx2-2.8.2.tar.gz \ + https://github.com/PCSX2/pcsx2_patches/archive/7e1b6936ad2a70c9e28ae21c7c2f3b1510a1736f/pcsx2_patches-7e1b6936ad2a70c9e28ae21c7c2f3b1510a1736f.tar.gz \ + https://github.com/ianlancetaylor/libbacktrace/archive/ad106d5fdd5d960bd33fae1c48a351af567fd075/libbacktrace-ad106d5fdd5d960bd33fae1c48a351af567fd075.tar.gz \ + https://github.com/sammycage/plutovg/archive/v1.3.2/plutovg-1.3.2.tar.gz \ + https://github.com/sammycage/plutosvg/archive/v0.0.7/plutosvg-0.0.7.tar.gz \ + https://github.com/biojppm/rapidyaml/releases/download/v0.12.1/rapidyaml-0.12.1-src.tgz \ + https://github.com/google/shaderc/archive/v2026.2/shaderc-2026.2.tar.gz \ + https://github.com/KhronosGroup/glslang/archive/275822a6261ee689aadb1da5f09a0ec2f058685c/glslang-275822a6261ee689aadb1da5f09a0ec2f058685c.tar.gz \ + https://github.com/KhronosGroup/SPIRV-Headers/archive/58006c901d1d5c37dece6b6610e9af87fa951375/SPIRV-Headers-58006c901d1d5c37dece6b6610e9af87fa951375.tar.gz \ + https://github.com/KhronosGroup/SPIRV-Tools/archive/6337eb62cadd7d124ac6789bf39c0f71148f0a73/SPIRV-Tools-6337eb62cadd7d124ac6789bf39c0f71148f0a73.tar.gz" +MD5SUM_x86_64="0fc17f7ac25017fd0c09d23c5bb990bd \ + 4341073d699f8bdd354d76642a76ca4b \ + 6a32924c5e2e90a99f0bc853dc188c67 \ + 8f13cdd4135974cf659b6744913526d3 \ + 264c0254e03e8722641ce3e9c451af5b \ + bf028c7a394def3a45fccde3073b3b0d \ + 3a6c42c237a3a6f40f076c7ee366ec29 \ + 216183751d35b7ec18c514516f1ce8e6 \ + 88d2899666e260d710500beb101dc9fd \ + 3824b67172252d7a446f1ddf71714dcd" +REQUIRES="kddockwidgets" +MAINTAINER="danix" +EMAIL="danix@danix.xyz" diff --git a/pcsx2/slack-desc b/pcsx2/slack-desc new file mode 100644 index 0000000..87f7142 --- /dev/null +++ b/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 is a free and open-source PlayStation 2 (PS2) emulator. +pcsx2: +pcsx2: Its purpose is to emulate the PS2's hardware, using a combination of +pcsx2: MIPS CPU Interpreters, Recompilers and a Virtual Machine which +pcsx2: manages hardware states and PS2 system memory. +pcsx2: +pcsx2: Homepage: https://pcsx2.net +pcsx2: +pcsx2: |
