Merge pull request #100162 from samuelgrf/pcsx2_gtk3-x86_64

pcsx2: multiple improvements
This commit is contained in:
Christoph Hrdinka 2020-10-23 16:48:45 +02:00 committed by GitHub
commit 972ba804fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 23 deletions

View File

@ -1,21 +1,19 @@
{ alsaLib, cmake, fetchFromGitHub, glib, gettext, gtk2, harfbuzz, lib, libaio
, libpng, libpcap, libxml2, makeWrapper, perl, pkgconfig, portaudio
, SDL2, soundtouch, stdenv, udev, wxGTK, zlib
{ alsaLib, cmake, fetchFromGitHub, gcc-unwrapped, gettext, glib, gtk3, harfbuzz
, libaio, libpcap, libpng, libxml2, makeWrapper, perl, pkgconfig, portaudio
, SDL2, soundtouch, stdenv, udev, wrapGAppsHook, wxGTK, zlib
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "pcsx2";
version = "1.6.0";
version = "unstable-2020-10-10";
src = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2";
rev = "v${version}";
sha256 = "0528kh3275285lvfsykycdhc35c1z8pmccl2s7dfi3va2cp4x8wa";
rev = "7e2ccd64e8e6049b6059141e8767037463421c33";
sha256 = "0c7m74ch68p4y9xlld34a9r38kb2py6wlkg4vranc6dicxvi1b3r";
};
postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DDISABLE_ADVANCE_SIMD=TRUE"
@ -23,31 +21,36 @@ stdenv.mkDerivation rec {
"-DDOC_DIR=${placeholder "out"}/share/doc/pcsx2"
"-DGAMEINDEX_DIR=${placeholder "out"}/share/pcsx2"
"-DGLSL_SHADER_DIR=${placeholder "out"}/share/pcsx2"
"-DwxWidgets_LIBRARIES=${wxGTK}/lib"
"-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
"-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
"-DGTK3_API=TRUE"
"-DPACKAGE_MODE=TRUE"
"-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
"-DREBUILD_SHADER=TRUE"
"-DUSE_LTO=TRUE"
"-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
"-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
"-DwxWidgets_LIBRARIES=${wxGTK}/lib"
"-DXDG_STD=TRUE"
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
"-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
"-DGTK3_API=FALSE"
];
postPatch = ''
substituteInPlace cmake/BuildParameters.cmake \
--replace /usr/bin/gcc-ar ${gcc-unwrapped}/bin/gcc-ar \
--replace /usr/bin/gcc-nm ${gcc-unwrapped}/bin/gcc-nm \
--replace /usr/bin/gcc-ranlib ${gcc-unwrapped}/bin/gcc-ranlib
'';
postFixup = ''
wrapProgram $out/bin/PCSX2 \
--set __GL_THREADED_OPTIMIZATIONS 1
'';
nativeBuildInputs = [ cmake makeWrapper perl pkgconfig ];
nativeBuildInputs = [ cmake makeWrapper perl pkgconfig wrapGAppsHook ];
buildInputs = [
alsaLib
glib
gettext
gtk2
glib
gtk3
harfbuzz
libaio
libpcap
@ -71,13 +74,13 @@ stdenv.mkDerivation rec {
PC, with many additional features and benefits.
'';
homepage = "https://pcsx2.net";
maintainers = with maintainers; [ hrdinka ];
maintainers = with maintainers; [ hrdinka samuelgrf ];
# PCSX2's source code is released under LGPLv3+. It However ships
# additional data files and code that are licensed differently.
# This might be solved in future, for now we should stick with
# license.free
license = licenses.free;
platforms = platforms.i686;
platforms = platforms.x86;
};
}

View File

@ -22712,8 +22712,8 @@ in
ffmpeg = ffmpeg_2;
};
pcsx2 = pkgsi686Linux.callPackage ../misc/emulators/pcsx2 {
wxGTK = pkgsi686Linux.wxGTK30;
pcsx2 = callPackage ../misc/emulators/pcsx2 {
wxGTK = wxGTK30-gtk3;
};
pekwm = callPackage ../applications/window-managers/pekwm { };