%global debug_package %{nil} %global gituser iCatButler %global gitname pcsxr %global commit 62467b86871aee3d70c7445f3cb79f0858ec566e %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global gitcounter 7 %undefine _hardened_build Name: pcsxr Version: 1.9.94.git.%{gitcounter} Release: %{shortcommit}%{?dist} Summary: A plugin based PlayStation (PSX) emulator with high compatibility License: GPLv3+ and BSD and Public Domain URL: https://github.com/%{gituser}/%{gitname} Source0: %{url}/tarball/%{commit}#/%{gituser}-%{gitname}-%{shortcommit}.tar.gz Patch1: %{url}/pull/25.patch#/Fix_compilation_GCC_10.patch Patch2: %{url}/pull/24.patch#/Add_HarfBuzz_support.patch BuildRequires: alsa-lib-devel pulseaudio-libs-devel atk-devel SDL2-devel cairo-devel BuildRequires: cmake gcc gcc-c++ BuildRequires: gdk-pixbuf2-devel BuildRequires: gettext BuildRequires: glib2-devel BuildRequires: glibc-devel BuildRequires: gtk3-devel BuildRequires: harfbuzz-devel BuildRequires: libarchive-devel BuildRequires: libcdio-devel BuildRequires: libXtst-devel BuildRequires: libXv-devel BuildRequires: libXxf86vm-devel BuildRequires: mesa-libGL-devel BuildRequires: nasm BuildRequires: pango-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: hicolor-icon-theme Requires: hicolor-icon-theme %description PCSX-Reloaded is an advanced PlayStation (PSX) emulator, which uses a plugin architecture to provide full support for all components of the PSX. It has full emulation support for game pads, videos, sound, memory cards, and other important PSX components, and is able to play many games without problems. %prep %autosetup -p1 -n %{gituser}-%{gitname}-%{shortcommit} # remove any unnecessary files: rm -f -r win32 macosx # Remove changes to c/cxx flags, upstream strips out debug symbols sed -i '/CMAKE_C.*_FLAGS/d' CMakeLists.txt # Remove cmake rule to install license sed -i '/COPYING/d' doc/CMakeLists.txt # use base64 to fit patch into spec cat | base64 -d > Fix-Pango-includedirs.patch << EOF RnJvbSAxMGY0NDliNmRlZjdhMzllYzAxNGFjZGY4ZmY5ZWNlY2Y4MThhZDVlIE1vbiBT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wpPyQiKQotLSAKMi4yMS4xCgo= EOF patch -p1 < Fix-Pango-includedirs.patch cat > %{name}.appdata.xml << EOF2 pcsxr.desktop CC-BY-SA-3.0 GPL-2.0 PCSXR A plugin based PlayStation (PSX) emulator with high compatibility

PCSX-Reloaded is an advanced PlayStation (PSX) emulator, which uses a plugin architecture to provide full support for all components of the PSX. It has full emulation support for game pads, videos, sound, memory cards, and other important PSX components, and is able to play many games without problems.

EOF2 # fix running under wayland sed -i 's|^Exec=|Exec=env GDK_BACKEND=x11 |' gui/data/%{name}.desktop %build export CFLAGS=$(echo "$CFLAGS -std=gnu11 -Wno-error=incompatible-pointer-types" | sed -e 's|-g|-g0|' -e 's|-march=x86-64|-march=x86-64-v2 -fvect-cost-model=dynamic|') export CXXFLAGS=$(echo "$CXXFLAGS -std=c++11" | sed -e 's|-g|-g0|' -e 's|-march=x86-64|-march=x86-64-v2 -fvect-cost-model=dynamic|') %cmake -DUSE_LIBCDIO:BOOL=ON -DUSE_LIBARCHIVE:BOOL=ON \ -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -zmuldefs -fno-pie" \ -DCMAKE_MODULE_LINKER_FLAGS="$LDFLAGS -zmuldefs" %cmake_build %install %cmake_install desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop # Install appdata.xml and verify install -p -D -m 0644 %{name}.appdata.xml %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml # Find locale %find_lang %{name} %files -f %{name}.lang %license COPYING %{_docdir}/%{name} %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} %{_libdir}/games/psemu %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/*.appdata.xml %{_datadir}/icons/hicolor/*/apps/%{name}-icon.png %changelog * Fri Nov 21 2025 samoht0 git-master - based on old fedora package