summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/pcsx2/README4
-rw-r--r--games/pcsx2/pcsx2.SlackBuild18
-rw-r--r--games/pcsx2/pcsx2.info8
-rw-r--r--games/pcsx2/portaudio.patch320
4 files changed, 339 insertions, 11 deletions
diff --git a/games/pcsx2/README b/games/pcsx2/README
index 3e1ed39b6a..722069e2f0 100644
--- a/games/pcsx2/README
+++ b/games/pcsx2/README
@@ -2,9 +2,11 @@ PCSX2 is an open source Playstation 2 emulator. Its purpose is to mimic
the PS2 hardware, using a combination of MIPS CPU Interpreters, Recompilers
and a Virtual Machine which manages hardware states and PS2 system memory.
+portaudio is an optional dependency.
+
NOTE: This is buildable only on x86 32bit platforms and will require a PS2 bios
dump to play games. For x86_64 64bit platforms multilib support will be needed
-including compat32 versions of SDL2, wxGTK3, portaudio and soundtouch.
+including compat32 versions of SDL2, wxGTK3, soundtouch and optionally portaudio.
PCSX2 offers experimental support for the EGL api instead of GLX. This can be
used by building PCSX2 with:
diff --git a/games/pcsx2/pcsx2.SlackBuild b/games/pcsx2/pcsx2.SlackBuild
index 2f5096784e..6f8a6e67f2 100644
--- a/games/pcsx2/pcsx2.SlackBuild
+++ b/games/pcsx2/pcsx2.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for pcsx2
-# Copyright 2016-2018 Hunter Sezen California, USA
+# Copyright 2016-2018, 2020 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pcsx2
-VERSION=${VERSION:-2018.12.11_0e43803}
+VERSION=${VERSION:-1.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -72,8 +72,10 @@ find -L . \
# pcsx2 does not support x86_64 yet and does
# not plan to for the foreseeable future.
BINDIR=; MULTILIB=
-[ "$ARCH" = 'x86_64' ] && BINDIR='/32' \
+if [ "$ARCH" = 'x86_64' ]; then
+ BINDIR='/32'
MULTILIB='-DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake'
+fi
RELEASE=Debug
@@ -102,6 +104,11 @@ sed -i \
's|truetype/freefont/FreeSerif.ttf|TTF/LiberationSerif-Regular.ttf|' \
plugins/GSdx/GSdx.cpp
+# spu2-x: Make portaudio an optional dependency.
+# https://github.com/PCSX2/pcsx2/pull/3110
+# https://github.com/PCSX2/pcsx2/commit/84d090e2fde50c66b965b84c73abd9f04a1770dd
+patch -p1 < $CWD/portaudio.patch
+
mkdir -p build
cd build
cmake \
@@ -113,7 +120,6 @@ cd build
-DwxWidgets_CONFIG_EXECUTABLE=/usr/bin${BINDIR}/wx-config \
-DwxWidgets_wxrc_EXECUTABLE=/usr/bin${BINDIR}/wxrc-3.0 \
-DBUILD_REPLAY_LOADERS=TRUE \
- -DDISABLE_ADVANCE_SIMD=ON \
-DDISABLE_BUILD_DATE=ON \
-DGSDX_LEGACY=ON \
-DPACKAGE_MODE=ON \
@@ -144,7 +150,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Fix doinst.sh for x86_64
-[ "$ARCH" = 'x86_64' ] && \
+[ "$ARCH" != 'x86_64' ] ||
sed -i 's|-loaders |-loaders-32 |' $PKG/install/doinst.sh
cd $PKG
diff --git a/games/pcsx2/pcsx2.info b/games/pcsx2/pcsx2.info
index 721f10dd91..5f6122596b 100644
--- a/games/pcsx2/pcsx2.info
+++ b/games/pcsx2/pcsx2.info
@@ -1,10 +1,10 @@
PRGNAM="pcsx2"
-VERSION="2018.12.11_0e43803"
+VERSION="1.6.0"
HOMEPAGE="https://pcsx2.net"
-DOWNLOAD="http://slackless.raccoons.tech/src/pcsx2-2018.12.11_0e43803.tar.xz"
-MD5SUM="48af5b3fc0c1a16bd71dd433ea14111e"
+DOWNLOAD="https://github.com/PCSX2/pcsx2/archive/v1.6.0/pcsx2-1.6.0.tar.gz"
+MD5SUM="51185d06f77b39df03e42fc68710c174"
DOWNLOAD_x86_64="UNSUPPORTED"
MD5SUM_x86_64=""
-REQUIRES="SDL2 wxGTK3 portaudio soundtouch"
+REQUIRES="SDL2 wxGTK3 soundtouch"
MAINTAINER="Hunter Sezen"
EMAIL="orbea@riseup.net"
diff --git a/games/pcsx2/portaudio.patch b/games/pcsx2/portaudio.patch
new file mode 100644
index 0000000000..e4194bc3b7
--- /dev/null
+++ b/games/pcsx2/portaudio.patch
@@ -0,0 +1,320 @@
+From 84d090e2fde50c66b965b84c73abd9f04a1770dd Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Thu, 7 May 2020 15:31:48 +0000
+Subject: [PATCH] spu2-x: Make portaudio an optional dependency. (#3110)
+
+* spu2-x: Make portaudio an optional dependency.
+
+v2: Fix crash in the audio settings with SDL1 and without portaudio.
+
+* cmake: Add PORTAUDIO_API to disable portaudio support.
+---
+ build.sh | 4 +++-
+ cmake/BuildParameters.cmake | 1 +
+ cmake/SearchForStuff.cmake | 6 ++++--
+ cmake/SelectPcsx2Plugins.cmake | 15 ++++++++-------
+ plugins/spu2-x/src/CMakeLists.txt | 19 ++++++++++++++++---
+ plugins/spu2-x/src/Linux/Config.cpp | 20 +++++++++++++++++++-
+ plugins/spu2-x/src/SndOut.cpp | 2 ++
+ plugins/spu2-x/src/SndOut.h | 2 ++
+ 8 files changed, 55 insertions(+), 14 deletions(-)
+
+diff --git a/build.sh b/build.sh
+index e1bc256475..54b30e404e 100755
+--- a/build.sh
++++ b/build.sh
+@@ -213,6 +213,7 @@ for ARG in "$@"; do
+ --pgo-optimize ) flags="$flags -DUSE_PGO_OPTIMIZE=TRUE" ;;
+ --pgo-generate ) flags="$flags -DUSE_PGO_GENERATE=TRUE" ;;
+ --no-dev9ghzdrk ) flags="$flags -DDISABLE_DEV9GHZDRK=TRUE" ;;
++ --no-portaudio ) flags="$flags -DPORTAUDIO_API=FALSE" ;;
+ --no-simd ) flags="$flags -DDISABLE_ADVANCE_SIMD=TRUE" ;;
+ --no-trans ) flags="$flags -DNO_TRANSLATION=TRUE" ;;
+ --cross-multilib ) flags="$flags -DCMAKE_TOOLCHAIN_FILE=$toolfile"; useCross=1; ;;
+@@ -244,7 +245,8 @@ for ARG in "$@"; do
+ echo
+ echo "** Distribution Compatibilities **"
+ echo "--sdl12 : Build with SDL1.2 (requires if wx is linked against SDL1.2)"
+- echo "--no-dev9ghzdrk : Skip dev9ghzdrk. (Avoids needing escalated privileges to build.)"
++ echo "--no-dev9ghzdrk : Skip dev9ghzdrk. (Avoids needing escalated privileges to build.)"
++ echo "--no-portaudio : Skip portaudio for spu2x."
+ echo
+ echo "** Expert Developer option **"
+ echo "--gtk3 : replace GTK2 by GTK3"
+diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
+index 235bdb8e59..83bab90dab 100644
+--- a/cmake/BuildParameters.cmake
++++ b/cmake/BuildParameters.cmake
+@@ -48,6 +48,7 @@ option(DISABLE_CHEATS_ZIP "Disable including the cheats_ws.zip file")
+ option(DISABLE_PCSX2_WRAPPER "Disable including the PCSX2-linux.sh file")
+ option(XDG_STD "Use XDG standard path instead of the standard PCSX2 path")
+ option(EXTRA_PLUGINS "Build various 'extra' plugins")
++option(PORTAUDIO_API "Build portaudio support on spu2x" ON)
+ option(SDL2_API "Use SDL2 on spu2x and onepad (wxWidget mustn't be built with SDL1.2 support" ON)
+ option(GTK3_API "Use GTK3 api (experimental/wxWidget must be built with GTK3 support)")
+
+diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
+index a062d457a3..50f8f5f3e8 100644
+--- a/cmake/SearchForStuff.cmake
++++ b/cmake/SearchForStuff.cmake
+@@ -105,7 +105,9 @@ endif()
+ if(OPENCL_API)
+ check_lib(OPENCL OpenCL CL/cl.hpp)
+ endif()
+-check_lib(PORTAUDIO portaudio portaudio.h pa_linux_alsa.h)
++if(PORTAUDIO_API)
++ check_lib(PORTAUDIO portaudio portaudio.h pa_linux_alsa.h)
++endif()
+ check_lib(SOUNDTOUCH SoundTouch soundtouch/SoundTouch.h)
+
+ if(SDL2_API)
+@@ -227,4 +229,4 @@ if((GCC_VERSION VERSION_EQUAL "9.0" OR GCC_VERSION VERSION_GREATER "9.0") AND GC
+ https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=275ab714637a64672c6630cfd744af2c70957d5a
+ Even with that patch, compiling with LTO may still segfault. Use at your own risk!
+ This text being in a compile log in an open issue may cause it to be closed.")
+-endif()
+\ No newline at end of file
++endif()
+diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake
+index 69d0e07b91..00bf22e6ca 100644
+--- a/cmake/SelectPcsx2Plugins.cmake
++++ b/cmake/SelectPcsx2Plugins.cmake
+@@ -7,7 +7,7 @@ set(msg_dep_cdvdgiga "check these libraries -> gtk2, libudev")
+ set(msg_dep_zerogs "check these libraries -> glew, opengl, X11, nvidia-cg-toolkit (>=2.1)")
+ set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11, liblzma")
+ set(msg_dep_onepad "check these libraries -> sdl2, X11, gtk2")
+-set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (>=1.2) pcsx2 common libs")
++set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (optional, >=1.9), sdl (>=1.2), pcsx2 common libs")
+ set(msg_dep_zerospu2 "check these libraries -> soundtouch (>=1.5), alsa")
+ set(msg_dep_dev "check these libraries -> gtk2, pcap, libxml2")
+ if(GLSL_API)
+@@ -267,12 +267,13 @@ endif()
+ # spu2-x
+ #---------------------------------------
+ # requires: -SoundTouch
+-# -ALSA
+-# -Portaudio
++# -ALSA
+ # -SDL
+ # -common_libs
++#
++# optional: -Portaudio
+ #---------------------------------------
+-if((PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDLn_FOUND AND common_libs)
++if((SOUNDTOUCH_FOUND AND SDLn_FOUND AND common_libs)
+ AND ((Linux AND ALSA_FOUND) OR (UNIX AND NOT Linux)))
+ set(spu2-x TRUE)
+ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/spu2-x")
+@@ -287,8 +288,8 @@ endif()
+ # zerospu2
+ #---------------------------------------
+ # requires: -SoundTouch
+-# -ALSA
+-# -PortAudio
++# -ALSA
++# -PortAudio
+ #---------------------------------------
+ if(EXTRA_PLUGINS)
+ if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND)
+@@ -312,4 +313,4 @@ if(GTKn_FOUND)
+ set(USBnull TRUE)
+ endif()
+ #---------------------------------------
+-#-------------------------------------------------------------------------------
+\ No newline at end of file
++#-------------------------------------------------------------------------------
+diff --git a/plugins/spu2-x/src/CMakeLists.txt b/plugins/spu2-x/src/CMakeLists.txt
+index e4c7141287..d17538e33e 100644
+--- a/plugins/spu2-x/src/CMakeLists.txt
++++ b/plugins/spu2-x/src/CMakeLists.txt
+@@ -45,7 +45,6 @@ set(spu2xSources
+ RegTable.cpp
+ Reverb.cpp
+ SndOut.cpp
+- SndOut_Portaudio.cpp
+ SndOut_SDL.cpp
+ spu2freeze.cpp
+ Spu2replay.cpp
+@@ -111,7 +110,6 @@ else()
+ include_directories(Linux)
+ endif()
+
+-
+ set(spu2xFinalSources
+ ${spu2xSources}
+ ${spu2xHeaders}
+@@ -121,11 +119,26 @@ set(spu2xFinalSources
+ set(spu2xFinalLibs
+ Utilities_NO_TLS
+ ${ALSA_LIBRARIES}
+- ${PORTAUDIO_LIBRARIES}
+ ${GTK2_LIBRARIES}
+ ${SOUNDTOUCH_LIBRARIES}
+ )
+
++if (PORTAUDIO_FOUND)
++ set(spu2xFinalFlags
++ ${spu2xFinalFlags}
++ "-DSPU2X_PORTAUDIO"
++ )
++
++ LIST(APPEND spu2xFinalSources
++ SndOut_Portaudio.cpp
++ )
++
++ set(spu2xFinalLibs
++ ${spu2xFinalLibs}
++ ${PORTAUDIO_LIBRARIES}
++ )
++endif()
++
+ if (SDL2_API)
+ set(spu2xFinalLibs
+ ${spu2xFinalLibs}
+diff --git a/plugins/spu2-x/src/Linux/Config.cpp b/plugins/spu2-x/src/Linux/Config.cpp
+index 998f9bd25a..96a9e7bc8b 100644
+--- a/plugins/spu2-x/src/Linux/Config.cpp
++++ b/plugins/spu2-x/src/Linux/Config.cpp
+@@ -76,7 +76,9 @@ bool _visual_debug_enabled = false; // windows only feature
+ u32 OutputModule = 0;
+ int SndOutLatencyMS = 300;
+ int SynchMode = 0; // Time Stretch, Async or Disabled
++#ifdef SPU2X_PORTAUDIO
+ static u32 OutputAPI = 0;
++#endif
+ static u32 SdlOutputAPI = 0;
+
+ int numSpeakers = 0;
+@@ -122,7 +124,7 @@ void ReadSettings()
+
+ wxString temp;
+
+-#if SDL_MAJOR_VERSION >= 2
++#if SDL_MAJOR_VERSION >= 2 || !defined(SPU2X_PORTAUDIO)
+ CfgReadStr(L"OUTPUT", L"Output_Module", temp, SDLOut->GetIdent());
+ #else
+ CfgReadStr(L"OUTPUT", L"Output_Module", temp, PortaudioOut->GetIdent());
+@@ -130,6 +132,7 @@ void ReadSettings()
+ OutputModule = FindOutputModuleById(temp.c_str()); // find the driver index of this module
+
+ // find current API
++#ifdef SPU2X_PORTAUDIO
+ #ifdef __linux__
+ CfgReadStr(L"PORTAUDIO", L"HostApi", temp, L"ALSA");
+ if (temp == L"OSS")
+@@ -142,6 +145,7 @@ void ReadSettings()
+ CfgReadStr(L"PORTAUDIO", L"HostApi", temp, L"OSS");
+ OutputAPI = 0; // L"OSS"
+ #endif
++#endif
+
+ #ifdef __unix__
+ CfgReadStr(L"SDL", L"HostApi", temp, L"pulseaudio");
+@@ -158,7 +162,9 @@ void ReadSettings()
+ SndOutLatencyMS = CfgReadInt(L"OUTPUT", L"Latency", 300);
+ SynchMode = CfgReadInt(L"OUTPUT", L"Synch_Mode", 0);
+
++#ifdef SPU2X_PORTAUDIO
+ PortaudioOut->ReadSettings();
++#endif
+ #ifdef __unix__
+ SDLOut->ReadSettings();
+ #endif
+@@ -209,7 +215,9 @@ void WriteSettings()
+ CfgWriteInt(L"OUTPUT", L"Synch_Mode", SynchMode);
+ CfgWriteInt(L"DEBUG", L"DelayCycles", delayCycles);
+
++#ifdef SPU2X_PORTAUDIO
+ PortaudioOut->WriteSettings();
++#endif
+ #ifdef __unix__
+ SDLOut->WriteSettings();
+ #endif
+@@ -273,7 +281,9 @@ void DisplayDialog()
+
+ GtkWidget *output_frame, *output_box;
+ GtkWidget *mod_label, *mod_box;
++#ifdef SPU2X_PORTAUDIO
+ GtkWidget *api_label, *api_box;
++#endif
+ #if SDL_MAJOR_VERSION >= 2
+ GtkWidget *sdl_api_label, *sdl_api_box;
+ #endif
+@@ -309,11 +319,14 @@ void DisplayDialog()
+ mod_label = gtk_label_new("Module:");
+ mod_box = gtk_combo_box_text_new();
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "0 - No Sound (Emulate SPU2 only)");
++#ifdef SPU2X_PORTAUDIO
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "1 - PortAudio (Cross-platform)");
++#endif
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "2 - SDL Audio (Recommended for PulseAudio)");
+ //gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "3 - Alsa (probably doesn't work)");
+ gtk_combo_box_set_active(GTK_COMBO_BOX(mod_box), OutputModule);
+
++#ifdef SPU2X_PORTAUDIO
+ api_label = gtk_label_new("PortAudio API:");
+ api_box = gtk_combo_box_text_new();
+ #ifdef __linux__
+@@ -325,6 +338,7 @@ void DisplayDialog()
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(api_box), "OSS");
+ #endif
+ gtk_combo_box_set_active(GTK_COMBO_BOX(api_box), OutputAPI);
++#endif
+
+ #if SDL_MAJOR_VERSION >= 2
+ sdl_api_label = gtk_label_new("SDL API:");
+@@ -383,8 +397,10 @@ void DisplayDialog()
+
+ gtk_container_add(GTK_CONTAINER(output_box), mod_label);
+ gtk_container_add(GTK_CONTAINER(output_box), mod_box);
++#ifdef SPU2X_PORTAUDIO
+ gtk_container_add(GTK_CONTAINER(output_box), api_label);
+ gtk_container_add(GTK_CONTAINER(output_box), api_box);
++#endif
+ #if SDL_MAJOR_VERSION >= 2
+ gtk_container_add(GTK_CONTAINER(output_box), sdl_api_label);
+ gtk_container_add(GTK_CONTAINER(output_box), sdl_api_box);
+@@ -430,6 +446,7 @@ void DisplayDialog()
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(mod_box)) != -1)
+ OutputModule = gtk_combo_box_get_active(GTK_COMBO_BOX(mod_box));
+
++#ifdef SPU2X_PORTAUDIO
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(api_box)) != -1) {
+ OutputAPI = gtk_combo_box_get_active(GTK_COMBO_BOX(api_box));
+ #ifdef __linux__
+@@ -456,6 +473,7 @@ void DisplayDialog()
+ }
+ #endif
+ }
++#endif
+
+ #if SDL_MAJOR_VERSION >= 2
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(sdl_api_box)) != -1) {
+diff --git a/plugins/spu2-x/src/SndOut.cpp b/plugins/spu2-x/src/SndOut.cpp
+index 7963b12b75..6d9d58c2b3 100644
+--- a/plugins/spu2-x/src/SndOut.cpp
++++ b/plugins/spu2-x/src/SndOut.cpp
+@@ -88,7 +88,9 @@ SndOutModule *mods[] =
+ DSoundOut,
+ WaveOut,
+ #endif
++#if defined(_WIN32) || defined(SPU2X_PORTAUDIO)
+ PortaudioOut,
++#endif
+ #if defined(SPU2X_SDL) || defined(SPU2X_SDL2)
+ SDLOut,
+ #endif
+diff --git a/plugins/spu2-x/src/SndOut.h b/plugins/spu2-x/src/SndOut.h
+index ba84075aec..918d9d08ff 100644
+--- a/plugins/spu2-x/src/SndOut.h
++++ b/plugins/spu2-x/src/SndOut.h
+@@ -673,7 +673,9 @@ extern SndOutModule *DSoundOut;
+ extern SndOutModule *XAudio2_27_Out;
+ extern SndOutModule *XAudio2Out;
+ #endif
++#if defined(_WIN32) || defined(SPU2X_PORTAUDIO)
+ extern SndOutModule *PortaudioOut;
++#endif
+ #if defined(SPU2X_SDL) || defined(SPU2X_SDL2)
+ extern SndOutModule *const SDLOut;
+ #endif