%global commit e10ac8cbece9519165cf90e2698699cbf91b3f4f %global short_commit e10ac8 Name: pcsx2 Version: 1.5 Release: 0.rc0.git.%{short_commit}%{?dist} Summary: A Sony Playstation2 emulator License: GPLv3 URL: https://github.com/PCSX2/pcsx2 Source0: https://github.com/PCSX2/pcsx2/archive/%{commit}.zip Patch1: pcsx2-gcc6.patch Patch2: remove-wx-sdl-validation.patch # PCSX2 does not support running as a 64 bit application. # http://code.google.com/p/pcsx2/wiki/ChrootAnd64bStatusLinux ExclusiveArch: i686 BuildRequires: desktop-file-utils BuildRequires: cmake BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: freetype-devel BuildRequires: gettext BuildRequires: glew-devel BuildRequires: libGL-devel BuildRequires: libGLU-devel BuildRequires: libX11-devel BuildRequires: libICE-devel BuildRequires: libXrandr-devel BuildRequires: mesa-libGLES-devel BuildRequires: alsa-lib-devel BuildRequires: SDL2-devel #BuildRequires: SDL2-devel BuildRequires: gtk2-devel #BuildRequires: gtk3-devel BuildRequires: portaudio-devel BuildRequires: sparsehash-devel %if (0%{?fedora} >= 28) BuildRequires: compat-wxGTK3-gtk2-devel %else BuildRequires: wxGTK-devel %endif #BuildRequires: wxGTK3-devel BuildRequires: soundtouch-devel BuildRequires: libaio-devel BuildRequires: xz-devel # for /usr/bin/perl %if 0%{?rhel} && 0%{?rhel} < 8 BuildRequires: perl BuildRequires: perl-version %else BuildRequires: perl-interpreter %endif BuildRequires: systemd-devel Requires: joystick Requires: hicolor-icon-theme %description A Playstation 2 emulator. Requires a dump of a real PS2 BIOS (not included) WARNING: It requires a CPU with SSE2 instructions. If your CPU does not support this instruction set, it does not have enough horsepower to run this emulator anyway. %prep %setup -q -n pcsx2-%{commit} %patch1 -p1 -b .gcc6 %patch2 -p1 -b .wxdl-validation # To remove executable bits from man, doc and icon files chmod -x pcsx2/Docs/GPL.txt pcsx2/Docs/License.txt pcsx2/Docs/readme-Docs.txt pcsx2/Docs/PCSX2_FAQ.doc pcsx2/Docs/PCSX2_Readme.doc bin/docs/PCSX2.1 linux_various/PCSX2.xpm # Remove DOS encoding errors in txt files sed -i 's/\r//' pcsx2/Docs/GPL.txt sed -i 's/\r//' pcsx2/Docs/License.txt #Remove fedora incompatible values sed -i 's/@PCSX2_MENU_CATEGORIES@/Game;Emulator;GTK;/g' linux_various/PCSX2.desktop.in %build # pcsx2 contains cflags that override Fedora cflags, however # a conservative approach has been taken because to quote upsteam "PCSX2 is not # an ordinary sofware. Most of the code executed are self-generated by PCSX2 # itself (aka dynamic recompiler/virtual machine). That means 1/ gcc flags # have no much impact on speed 2/ some gcc flags (used to) crash PCSX2" # Extensive testing will is therefore needed. See rpmfusion bug #2455 %cmake . -DPACKAGE_MODE=TRUE \ -DGLSL_SHADER_DIR=%{_libdir}/pcsx2 \ -DBUILD_REPLAY_LOADERS=FALSE \ -DXDG_STD=TRUE \ -DGLSL_API=TRUE \ -DFORCE_INTERNAL_SOUNDTOUCH=FALSE \ -DFORCE_INTERNAL_SDL=FALSE \ -DPLUGIN_DIR=%{_libdir}/pcsx2 \ -DGAMEINDEX_DIR=%{_datadir}/pcsx2 \ -DCMAKE_BUILD_STRIP=FALSE \ -DGTK3_API=FALSE \ %if (0%{?fedora} >= 28) -DWX28_API=FALSE \ %else -DWX28_API=TRUE \ %endif -DEXTRA_PLUGINS=FALSE \ -DSDL2_API=TRUE \ -DCMAKE_BUILD_TYPE=Release make %{?_smp_mflags} VERBOSE=1 %install make install DESTDIR=%{buildroot} # strip extra copies of pdf files, which are now in /doc/pcsx2 rm -rf %{buildroot}/usr/share/doc/PCSX2 # Install icon mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/ install -pm 644 %{_builddir}/%{name}-%{commit}/linux_various/PCSX2.xpm %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/ # Install Desktop file mv %{_builddir}/%{name}-%{commit}/linux_various/PCSX2.desktop.in %{_builddir}/%{name}-%{commit}/linux_various/PCSX2.desktop desktop-file-install \ --dir=%{buildroot}/%{_datadir}/applications \ %{_builddir}/%{name}-%{commit}/linux_various/PCSX2.desktop #strip extra copy of icon file, Wrong place for fedora rm -rf %{buildroot}/usr/share/pixmaps # Install man page mkdir -p %{buildroot}/%{_mandir}/man1 install -p -D -m 644 bin/docs/PCSX2.1 %{buildroot}/%{_mandir}/man1 %find_lang pcsx2_Iconized %find_lang pcsx2_Main %post /sbin/ldconfig /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun /sbin/ldconfig if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %files -f pcsx2_Iconized.lang -f pcsx2_Main.lang %doc bin/docs/PCSX2_Readme.pdf bin/docs/PCSX2_FAQ.pdf %{_bindir}/PCSX2 %{_bindir}/PCSX2-linux.sh %{_libdir}/pcsx2/ %{_datadir}/applications/PCSX2.desktop %{_datadir}/icons/hicolor/128x128/apps/PCSX2.xpm %{_mandir}/man1/PCSX2.* %{_datadir}/pcsx2/ %changelog * Fri Dec 29 2017 wyvie - 1.5-0.git.e10ac8 - Rebuilt from master branch on e10ac8 commit * Sun Oct 08 2017 Sérgio Basto - 1.4-5 - Rebuild for soundtouch 2.0.0 - Just enable compat-wxGTK3-gtk2, pcsx2 fails to detect wxGTK3 therefore SDL2 also is disabled, intructions on https://github.com/PCSX2/pcsx2/wiki/Installing-on-Linux - Enable GLSL_API and AVX - Fix Perl builroot changes. * Thu Aug 31 2017 RPM Fusion Release Engineering - 1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sun Mar 26 2017 RPM Fusion Release Engineering - 1.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Jul 14 2016 Sérgio Basto - 1.4-2 - Add gcc6 patch * Thu Feb 11 2016 Giles Birchley -1.4-1 - Build for new release 1.4 - Drop patch pcsx2-1.3.1_fedora_cflags_opts.diff - cflag options now streamlined upstream - Add dependency for lzma-devel - Add dependency for libICE-devel - Remove dependency for Cg - Remove dependency for libjpeg-turbo-devel - Remove dependency for package glew-devel - Add build option to retain WxWidget 2.8 -DWX28_API=TRUE - Add build option -DGTK3_API=FALSE - Add build option -DSDL2_API=FALSE - Add build option -DDISABLE_ADVANCE_SIMD=TRUE - For now, avoided specifying crosscompile (-DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake) as not sure of rpmfusion guideline on this - Binary name has been altered to PCSX2 upstream; renamed PCSX2.desktop.in, PCSX2.xpm and PCSX2.1 - Added new launcher script PCSX2-linux.sh * Tue Feb 04 2014 Giles Birchley -1.2.1-1 - Updated source to 1.2.1 - Updated patch1 permissions - Source required modification to remove copyrighted files - added Source1 * Tue Feb 04 2014 Giles Birchley -1.2.0-1 - Updated source to 1.2 - Updated patch1 - Source required modification to remove copyrighted files - added Source1 * Sat Jul 27 2013 Giles Birchley - 1.1.0-5 - made overlooked change suggested in rpmfusion review (#2455) - changed requires from libGL-devel/libGLU-devel instead of mesa-libGL-devel * Sun Jun 30 2013 Giles Birchley - 1.1.0-4 - made some minor changes suggested in rpmfusion review (#2455) - removed backslash in cmake command - removed pcsx2-1.1.0-fedora_cflags.diff - replaced patch with pcsx2-1.1.0-fedora_cflags_opts.diff * Tue Jun 25 2013 Giles Birchley - 1.1.0-3 - made some minor changes suggested in rpmfusion review (#2455) - fix URL * Tue Jun 25 2013 Giles Birchley - 1.1.0-2 - made some minor changes suggested in rpmfusion review (#2455): - changed icon install permissions - changed URL - changed description line length - reintroduced %%{version} macro to source0 - removed extra backslash from %%cmake - changed line indentations so all are single space - removed -DDOC_DIR from %%cmake - removed extraneous remove lines * Sun Jun 09 2013 Giles Birchley - 1.1.0-1 - changes following rpmfusion review (#2455). - removed Group tag. - updated source to v1.1 (linux fixes) - removed pcsx2-1.0.0_helpfile.diff (no longer needed). - removed pcsx2-1.0.0_fedora_cmake.diff (Fedora<16 is no longer supported). - removed pcsx2-1.1.0_fedora_gcc.diff as this patch is now applied in 1.1.0 source - added Requires: hicolor-icon-theme (icons in %%{_datadir}/icons/hicolor/). - added BuildRequires: libaio-devel (needed for 1.1.0). - added warning about SSE2 to %%description. - comment about 64 bit status shortened. - version from names of docs removed (unversioned in 1.1.0). - fixed omissions in pcsx2.xpm shebang (fix rpmlint error) - Use %%{_docdir} instead of %%{_defaultdocdir}. - removed some docs that were either misplaced or should not be packaged. - removed specification of CMAKE_INSTALL_PREFIX and CMAKE_VERBOSE_MAKEFILE (%%cmake macro already sets them). - moved %%find_lang macro to end of %%install. - moved shell invocation to line following %%post %%postun (fix rpmlint error) * Mon May 27 2013 Giles Birchley - 1.0.0-2 - further changes to comply with rpmfusion review (#2455): - libGL-devel/libGLU-devel instead of mesa-libGL-devel - Remove BuildRequires: libCg (redundant with Cg) - Use %%{_prefix} instead of /usr for CMAKE install prefix - add Gregory Hainaut's patch to fix issue with gcc 4.8, for Fedora 19 build - Changed cmake option of DBUILD_REPLAY_LOADERS to false and changed %%files accrdingly * Tue Mar 05 2013 Giles Birchley - bleeding edge build, altered package name - added pcsx2 as a conflict * Mon Oct 15 2012 Giles Birchley - 1.0.0-1 - Build of official 1.0.0 Release - Significant modifications to script to comply with Fedora/RPMFusion packaging requirements - Removed redundant BuildRequires - Added upstream source - Added Patch to make CFLAGS compliant - Changed DCMAKE_BUILD_STRIP to FALSE to allow rpm debug package to be created - Changed document destination in cmake by specifying DDOC_DIR= - Changed language detection - Changed icon and desktop file installation * Tue Aug 09 2011 Danger Boy - 0.9.8.4851-1 - initial build