LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pcsx2.spec of Package pcsx2 (Project home:linux4humans:games)

# spec file for package pcsx2
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.links2linux.org/

%define with_lto 1
#%%define with_gtk3 1

Name:          pcsx2
License:       GPL-3.0
Group:         System/Emulators
Version:       1.4.0+git20170221.0955
Release:       3.12
URL:           http://pcsx2.net/
ExclusiveArch: %ix86
%ifarch x86_64
Summary:       Use i586 package!
Summary:       Sony PlayStation 2 Emulator
Group:         System/Emulators/Other
Source:        %{name}.tar.xz
Source1:       baselibs.conf
Patch0:        pcsx2.os-release.patch
%if 0%{?sles_version} && 0%{?suse_version} == 1110
BuildRequires:  gcc48
BuildRequires:  gcc48-c++
BuildRequires:  gcc-c++ >= 4.7
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: libaio-devel
# non-free library
#BuildRequires: libCg-devel
BuildRequires: libjpeg-devel
%if 0%{?suse_version} >= 1130
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(glesv2)
BuildRequires: Mesa-devel
%if 0%{?suse_version} > 1230
BuildRequires: Mesa-libGLESv3-devel
BuildRequires: alsa-devel
BuildRequires: glew-devel
%if %{with gtk3}
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: wxGTK3-devel
BuildRequires: gtk2-devel
BuildRequires: wxWidgets-3_2-devel
BuildRequires: xz-devel
BuildRequires: libudev-devel
%if 0%{?suse_version} < 1120
BuildRequires: SDL-devel
BuildRequires: libSDL-devel
#BuildRequires: pkgconfig(sdl2)
BuildRequires: soundtouch-devel
BuildRequires: portaudio-devel
BuildRequires: xz
BuildRequires: update-desktop-files
BuildRoot:     %{_tmppath}/%{name}-%{version}-build

Sony PlayStation 2 emulator. Requires a BIOS image in %_libdir/%name/bios
or in .%name/bios in your HOME directory (will be created when you first run
PCSX2). Check http://www.pcsx2.net/guide.php#Bios for details on which files
you need and how to obtain them.

%setup -q -n %{name}
%patch0 -p1

# Make experimental things possible
sed -i -e "s:FATAL_ERROR:WARNING:g" cmake/BuildParameters.cmake

# zerogs doesn't build and source dir must be removed without libCg-devel
rm -rf plugins/zerogs/

%if 0%{?sles_version} && 0%{?suse_version} == 1110
export CC=gcc-4.8
export CXX=g++-4.8
tee os-release <<_EOF_
PRETTY_NAME="SUSE Linux Enterprise Desktop 11 SP4"

mkdir build
cd build
cmake \
  -DUSER_CMAKE_C_FLAGS='%{optflags}' \
  -DUSER_CMAKE_CXX_FLAGS='%{optflags}' \
%if %{with lto}
  -DLTO_FLAGS='-fuse-linker-plugin -fuse-ld=gold' \
  -DUSER_CMAKE_LD_FLAGS='--plugin %(gcc --print-file-name=liblto_plugin.so)' \
%if %{with gtk3}
%if 0%{?suse_version} < 1130
  -DCMAKE_INSTALL_PREFIX='%{_prefix}' \
  -DCMAKE_BUILD_TYPE='Release' \
  -DPLUGIN_DIR='%{_libdir}/pcsx2' \
  -DGAMEINDEX_DIR='%{_datadir}/pcsx2' \
  -DDOC_DIR='%{_datadir}/doc/pcsx2' \
  -DBIN_DIR='%{_bindir}' \
make %{?jobs:-j%{jobs}}
cd ..

cd build
cd ..

mkdir -p %{buildroot}/%{_docdir}/
mv %{buildroot}/%{_datadir}/doc/pcsx2/ %{buildroot}/%{_docdir}/

# move translations to main language dir if there isn't a sublang or delete
# translations not supported by distro at all
for i in $(ls %{buildroot}%{_datadir}/locale | grep _); do
  new=$(echo $i | sed "s:_.*::g")
  if [ ! -d %{_datadir}/locale/$i ]; then
    if [ -d %{_datadir}/locale/$new ]; then
      mv %{buildroot}%{_datadir}/locale/$i %{buildroot}%{_datadir}/locale/$new
      rm -rf %{buildroot}%{_datadir}/locale/$i

%fdupes -s %{buildroot}
%suse_update_desktop_file -r PCSX2 System Emulator

%if 0%{?sles_version} && 0%{?suse_version} == 1110
update-desktop-database &> /dev/null || :

%if 0%{?sles_version} && 0%{?suse_version} == 1110
update-desktop-database &> /dev/null || :


* Tue Feb  7 2017 olaf@aepfle.de
- Provide package as pcsx2-32bit
* Tue Jan 10 2017 olaf@aepfle.de
- Enforce 32bit builds
* Sun Aug 31 2014 johannesobermayr@gmx.de
- Update to git master
- Fix RPATH/RUNPATH issue the right way
* Fri Mar 21 2014 p.seiler@linuxmail.org
- fixed typo
* Thu Mar 20 2014 p.seiler@linuxmail.org
- changed the way of creating of script file
* Mon Mar  3 2014 p.seiler@linuxmail.org
- add variable to pass through command line parameters to the binary
* Thu Feb  6 2014 p.seiler@linuxmail.org
- removed libegl dependency (not working correctly)
* Thu Feb  6 2014 p.seiler@linuxmail.org
- added libegl dependency
* Thu Feb  6 2014 p.seiler@linuxmail.org
- removed libCg dependency. Used glsl shaders instead
* Wed Feb  5 2014 p.seiler@linuxmail.org
- changed binary name
- added shell script to run binary correctly
* Wed Feb  5 2014 p.seiler@linuxmail.org
- added dependencies for base system and pcsx2 binary
- cleanup -> used cmake to compile
- removed unneeded patch
* Tue Feb  4 2014 p.seiler@linuxmail.org
- initial commit