[packages/pcsx2] -new
baggins
baggins at pld-linux.org
Sat Oct 24 14:34:16 CEST 2026
commit 567c5b6adbfd237e9973a1dd580706e67574bccb
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Oct 24 14:33:50 2026 +0200
-new
no-default-build-type.patch | 13 ++++
pcsx2.spec | 158 ++++++++++++++++++++++++++++++++++++++++++++
shaderc.patch | 24 +++++++
3 files changed, 195 insertions(+)
---
diff --git a/pcsx2.spec b/pcsx2.spec
new file mode 100644
index 0000000..64d1c66
--- /dev/null
+++ b/pcsx2.spec
@@ -0,0 +1,158 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+%bcond_without gsrunner # build the GSRunner
+#
+Summary: Free and open-source PlayStation 2 (PS2) emulator
+Name: pcsx2
+Version: 2.9.142
+Release: 0.1
+License: GPL v3
+Group: Applications
+Source0: https://github.com/PCSX2/pcsx2/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: a1e6bfb47726b7a8d0ae0fc36864b0b0
+Patch0: shaderc.patch
+Patch1: no-default-build-type.patch
+URL: https://pcsx2.net/
+BuildRequires: KDDockWidgets-devel >= 2.3.0
+BuildRequires: Qt6Core-devel >= 6.10
+BuildRequires: Qt6Gui-devel >= 6.10
+BuildRequires: Qt6Widgets-devel >= 6.10
+BuildRequires: SDL3-devel >= 3.2.6
+BuildRequires: clang
+BuildRequires: cmake >= 3.16
+BuildRequires: curl-devel
+BuildRequires: dbus-devel
+# Preferred is 9.0
+BuildRequires: ffmpeg-devel >= 7.1
+BuildRequires: fontconfig-devel
+BuildRequires: freetype-devel >= 2.10
+BuildRequires: libbacktrace-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpcap-devel
+BuildRequires: libpng-devel >= 1.6.40
+BuildRequires: libwebp-devel >= 1.3.2
+BuildRequires: lld
+BuildRequires: lz4-devel
+BuildRequires: pkgconfig
+BuildRequires: plutosvg-devel >= 0.0.8-2
+BuildRequires: plutovg-devel >= 1.3.3-3
+BuildRequires: qt6-linguist >= 6.10
+BuildRequires: rapidyaml-devel
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: shaderc-devel
+BuildRequires: udev-devel
+BuildRequires: wayland-devel
+BuildRequires: wayland-egl-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXrandr-devel
+BuildRequires: zlib-devel >= 1.3
+BuildRequires: zstd-devel >= 1.5.5
+ExclusiveArch: %{x8664}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define filterout -fvar-tracking-assignments -Werror=trampolines
+
+%description
+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.
+
+%prep
+%setup -q
+%patch -P0 -p1
+%patch -P1 -p1
+
+%build
+export CC="clang"
+export CXX="clang++"
+export LLVM_PROFDATA="llvm-profdata"
+export AR="llvm-ar"
+export NM="llvm-nm"
+export RANLIB="llvm-ranlib"
+
+%cmake -B build -G Ninja \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DUSE_CLANG:BOOL=ON \
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
+ -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
+ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
+ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
+ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \
+ %{cmake_on_off tests ENABLE_TESTS} \
+ %{cmake_on_off gsrunner ENABLE_GSRUNNER} \
+ -DENABLE_QT_UI:BOOL=ON \
+ -DPACKAGE_MODE:BOOL=ON \
+ -DBUNDLE_EMOJI_FONT:BOOL=ON \
+ -DENABLE_SETCAP:BOOL=ON \
+ -DUSE_OPENGL:BOOL=ON \
+ -DUSE_VULKAN:BOOL=ON \
+ -DX11_API:BOOL=ON \
+ -DWAYLAND_API:BOOL=ON \
+ -DUSE_BACKTRACE:BOOL=ON \
+ -DUSE_LINKED_FFMPEG:BOOL=OFF
+
+%ninja_build -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%ninja_install -C build
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_bindir}/pcsx2-gsrunner
+%attr(755,root,root) %{_bindir}/pcsx2-qt
+%dir %{_datadir}/PCSX2
+%{_datadir}/PCSX2/resources
+%dir %{_datadir}/PCSX2/translations
+%lang(af) %{_datadir}/PCSX2/translations/pcsx2-qt_af-ZA.qm
+%lang(ar) %{_datadir}/PCSX2/translations/pcsx2-qt_ar-SA.qm
+%lang(az) %{_datadir}/PCSX2/translations/pcsx2-qt_az-AZ.qm
+%lang(bg) %{_datadir}/PCSX2/translations/pcsx2-qt_bg-BG.qm
+%lang(ca) %{_datadir}/PCSX2/translations/pcsx2-qt_ca-ES.qm
+%lang(cs) %{_datadir}/PCSX2/translations/pcsx2-qt_cs-CZ.qm
+%lang(da) %{_datadir}/PCSX2/translations/pcsx2-qt_da-DK.qm
+%lang(de) %{_datadir}/PCSX2/translations/pcsx2-qt_de-DE.qm
+%lang(el) %{_datadir}/PCSX2/translations/pcsx2-qt_el-GR.qm
+%lang(en) %{_datadir}/PCSX2/translations/pcsx2-qt_en-fg.qm
+%lang(en) %{_datadir}/PCSX2/translations/pcsx2-qt_en-US.qm
+%lang(es) %{_datadir}/PCSX2/translations/pcsx2-qt_es-419.qm
+%lang(es) %{_datadir}/PCSX2/translations/pcsx2-qt_es-ES.qm
+%lang(fa) %{_datadir}/PCSX2/translations/pcsx2-qt_fa-IR.qm
+%lang(fi) %{_datadir}/PCSX2/translations/pcsx2-qt_fi-FI.qm
+%lang(fr) %{_datadir}/PCSX2/translations/pcsx2-qt_fr-FR.qm
+%lang(gn) %{_datadir}/PCSX2/translations/pcsx2-qt_gn-PY.qm
+%lang(he) %{_datadir}/PCSX2/translations/pcsx2-qt_he-IL.qm
+%lang(hi) %{_datadir}/PCSX2/translations/pcsx2-qt_hi-IN.qm
+%lang(hr) %{_datadir}/PCSX2/translations/pcsx2-qt_hr-HR.qm
+%lang(hu) %{_datadir}/PCSX2/translations/pcsx2-qt_hu-HU.qm
+%lang(id) %{_datadir}/PCSX2/translations/pcsx2-qt_id-ID.qm
+%lang(it) %{_datadir}/PCSX2/translations/pcsx2-qt_it-IT.qm
+%lang(ja) %{_datadir}/PCSX2/translations/pcsx2-qt_ja-JP.qm
+%lang(ka) %{_datadir}/PCSX2/translations/pcsx2-qt_ka-GE.qm
+%lang(ko) %{_datadir}/PCSX2/translations/pcsx2-qt_ko-KR.qm
+%lang(lt) %{_datadir}/PCSX2/translations/pcsx2-qt_lt-LT.qm
+%lang(lv) %{_datadir}/PCSX2/translations/pcsx2-qt_lv-LV.qm
+%lang(nl) %{_datadir}/PCSX2/translations/pcsx2-qt_nl-NL.qm
+%lang(no) %{_datadir}/PCSX2/translations/pcsx2-qt_no-NO.qm
+%lang(pl) %{_datadir}/PCSX2/translations/pcsx2-qt_pl-PL.qm
+%lang(pt_BR) %{_datadir}/PCSX2/translations/pcsx2-qt_pt-BR.qm
+%lang(pt) %{_datadir}/PCSX2/translations/pcsx2-qt_pt-PT.qm
+%lang(qu) %{_datadir}/PCSX2/translations/pcsx2-qt_qu-PE.qm
+%lang(ro) %{_datadir}/PCSX2/translations/pcsx2-qt_ro-RO.qm
+%lang(ru) %{_datadir}/PCSX2/translations/pcsx2-qt_ru-RU.qm
+%lang(sr) %{_datadir}/PCSX2/translations/pcsx2-qt_sr-SP.qm
+%lang(sv) %{_datadir}/PCSX2/translations/pcsx2-qt_sv-SE.qm
+%lang(tr) %{_datadir}/PCSX2/translations/pcsx2-qt_tr-TR.qm
+%lang(uk) %{_datadir}/PCSX2/translations/pcsx2-qt_uk-UA.qm
+%lang(vi) %{_datadir}/PCSX2/translations/pcsx2-qt_vi-VN.qm
+%lang(zh_CN) %{_datadir}/PCSX2/translations/pcsx2-qt_zh-CN.qm
+%lang(zh_TW) %{_datadir}/PCSX2/translations/pcsx2-qt_zh-TW.qm
diff --git a/no-default-build-type.patch b/no-default-build-type.patch
new file mode 100644
index 0000000..9ce3672
--- /dev/null
+++ b/no-default-build-type.patch
@@ -0,0 +1,13 @@
+--- pcsx2-2.9.142/cmake/BuildParameters.cmake~ 2026-10-23 15:26:42.000000000 +0200
++++ pcsx2-2.9.142/cmake/BuildParameters.cmake 2026-10-24 13:15:56.837136345 +0200
+@@ -54,10 +54,6 @@
+ # Note without the CMAKE_BUILD_TYPE options the value is still defined to ""
+ # Ensure that the value set by the User is correct to avoid some bad behavior later
+ #-------------------------------------------------------------------------------
+-if(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Devel|MinSizeRel|RelWithDebInfo|Release")
+- set(CMAKE_BUILD_TYPE Devel)
+- message(STATUS "BuildType set to ${CMAKE_BUILD_TYPE} by default")
+-endif()
+ # Add Devel build type
+ set(CMAKE_C_FLAGS_DEVEL "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
+ CACHE STRING "Flags used by the C compiler during development builds" FORCE)
diff --git a/shaderc.patch b/shaderc.patch
new file mode 100644
index 0000000..de841c1
--- /dev/null
+++ b/shaderc.patch
@@ -0,0 +1,24 @@
+diff --git a/cmake/FindShaderc.cmake b/cmake/FindShaderc.cmake
+index 760184aa0..2ddc3d93f 100644
+--- a/cmake/FindShaderc.cmake
++++ b/cmake/FindShaderc.cmake
+@@ -11,7 +11,7 @@ find_path(
+
+ find_library(
+ SHADERC_LIBRARY
+- NAMES shaderc_shared.1 shaderc_shared
++ NAMES shaderc.1 shaderc
+ PATHS ${ADDITIONAL_LIBRARY_PATHS} ${SHADERC_PATH_LIB}
+ )
+
+@@ -20,8 +20,8 @@ find_package_handle_standard_args(Shaderc DEFAULT_MSG
+ SHADERC_LIBRARY SHADERC_INCLUDE_DIR)
+
+ if(SHADERC_FOUND)
+- add_library(Shaderc::shaderc_shared UNKNOWN IMPORTED)
+- set_target_properties(Shaderc::shaderc_shared PROPERTIES
++ add_library(Shaderc::shaderc UNKNOWN IMPORTED)
++ set_target_properties(Shaderc::shaderc PROPERTIES
+ IMPORTED_LOCATION ${SHADERC_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${SHADERC_INCLUDE_DIR}
+ INTERFACE_COMPILE_DEFINITIONS "SHADERC_SHAREDLIB"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pcsx2.git/commitdiff/567c5b6adbfd237e9973a1dd580706e67574bccb
More information about the pld-cvs-commit
mailing list