[arch-commits] Commit in pcsx2/trunk (PKGBUILD pcsx2-gcc6.patch)

Maxime Gauduin alucryd at archlinux.org
Sun Feb 9 15:49:04 UTC 2020


    Date: Sunday, February 9, 2020 @ 15:49:03
  Author: alucryd
Revision: 565402

FS#65409: pcsx2 1.4.0-9

Modified:
  pcsx2/trunk/PKGBUILD
  pcsx2/trunk/pcsx2-gcc6.patch

------------------+
 PKGBUILD         |   96 +++++++++++++++++++++++++++++++----------------------
 pcsx2-gcc6.patch |   77 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 130 insertions(+), 43 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-09 15:47:33 UTC (rev 565401)
+++ PKGBUILD	2020-02-09 15:49:03 UTC (rev 565402)
@@ -4,56 +4,74 @@
 
 pkgname=pcsx2
 pkgver=1.4.0
-pkgrel=8
+pkgrel=9
 pkgdesc='A Sony PlayStation 2 emulator'
-arch=('x86_64')
-url='https://www.pcsx2.net'
-license=('GPL2' 'GPL3' 'LGPL2.1' 'LGPL3')
-depends=('lib32-glew' 'lib32-libaio' 'lib32-libcanberra' 'lib32-libjpeg-turbo'
-         'lib32-libpulse' 'lib32-nvidia-cg-toolkit' 'lib32-portaudio'
-         'lib32-sdl2' 'lib32-soundtouch' 'lib32-wxgtk2')
-makedepends=('cmake' 'png++')
-source=("pcsx2-${pkgver}.tar.gz::https://github.com/PCSX2/pcsx2/archive/v${pkgver}.tar.gz"
-        'pcsx2-gcc6.patch')
-sha256sums=('2c8a986e2b6514d7018f6cfd39c4f2a72229b9b4ab06ca6b1d3466dfd9c33005'
-            'd78c63808a609a249ec7e8330eeabee306a55ee08d2c9ce9c383b46b334bf7d0')
+arch=(x86_64)
+url=https://www.pcsx2.net
+license=(
+  GPL2
+  GPL3
+  LGPL2.1
+  LGPL3
+)
+depends=(
+  lib32-glew
+  lib32-libaio
+  lib32-libcanberra
+  lib32-libjpeg-turbo
+  lib32-libpulse
+  lib32-nvidia-cg-toolkit
+  lib32-portaudio
+  lib32-sdl2
+  lib32-soundtouch
+  lib32-wxgtk2
+)
+makedepends=(
+  cmake
+  git
+  png++
+)
+source=(
+  git+https://github.com/PCSX2/pcsx2.git#tag=8f74b640f01d8d00030254b25742bdd002ea18c8
+  pcsx2-gcc6.patch
+)
+sha256sums=(
+  SKIP
+  68364f4e571836c96674061a989934d0f551f6a142e33816c791de980d140e00
+)
 
+pkgver() {
+  cd pcsx2
+
+  git describe --tags | sed 's/^v//'
+}
+
 prepare() {
-  cd pcsx2-${pkgver}
+  cd pcsx2
 
   patch -Np1 -i ../pcsx2-gcc6.patch
 }
 
 build() {
-  if [[ -d build ]]; then
-    rm -rf build
-  fi
-  mkdir build && cd build
-
-  # TODO: Drop wxWidgets_CONFIG_EXECUTABLE once the upstream fix is released
-  # https://github.com/PCSX2/pcsx2/issues/1933
-  cmake ../pcsx2-${pkgver} \
-    -DCMAKE_BUILD_TYPE='Release' \
-    -DwxWidgets_CONFIG_EXECUTABLE='/usr/bin/wx-config32' \
-    -DCMAKE_TOOLCHAIN_FILE='cmake/linux-compiler-i386-multilib.cmake' \
-    -DCMAKE_INSTALL_PREFIX='/usr' \
-    -DCMAKE_LIBRARY_PATH='/usr/lib32' \
-    -DPLUGIN_DIR='/usr/lib32/pcsx2' \
-    -DGAMEINDEX_DIR='/usr/share/pcsx2' \
-    -DDISABLE_ADVANCE_SIMD='TRUE' \
-    -DEXTRA_PLUGINS='TRUE' \
-    -DREBUILD_SHADER='TRUE' \
-    -DGLSL_API='TRUE' \
-    -DPACKAGE_MODE='TRUE' \
-    -DXDG_STD='TRUE'
-
-  make
+  cmake -S pcsx2 -B build \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_LIBRARY_PATH=/usr/lib32 \
+    -DGAMEINDEX_DIR=/usr/share/pcsx2 \
+    -DPLUGIN_DIR=/usr/lib32/pcsx2 \
+    -DDISABLE_ADVANCE_SIMD=ON \
+    -DEXTRA_PLUGINS=ON \
+    -DGLSL_API=ON \
+    -DPACKAGE_MODE=ON \
+    -DREBUILD_SHADER=ON \
+    -DXDG_STD=ON \
+    -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config32
+  make -C build
 }
 
 package() {
-  cd build
-
-  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" -C build install
 }
 
 # vim: ts=2 sw=2 et:

Modified: pcsx2-gcc6.patch
===================================================================
--- pcsx2-gcc6.patch	2020-02-09 15:47:33 UTC (rev 565401)
+++ pcsx2-gcc6.patch	2020-02-09 15:49:03 UTC (rev 565402)
@@ -1,5 +1,37 @@
+diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake
+index 889c0ba..b96aeff 100644
+--- a/cmake/BuildParameters.cmake
++++ b/cmake/BuildParameters.cmake
+@@ -126,7 +126,7 @@ if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386")
+
+     if(NOT DEFINED ARCH_FLAG)
+         if (DISABLE_ADVANCE_SIMD)
+-            set(ARCH_FLAG "-msse -msse2 -mfxsr -march=i686")
++            set(ARCH_FLAG "-msse -msse2 -mfxsr -march=i686 -mxsave")
+         else()
+             # AVX requires some fix of the ABI (mangling) (default 2)
+             # Note: V6 requires GCC 4.7
+diff --git a/common/include/intrin_x86.h b/common/include/intrin_x86.h
+index 9665dd1..e35132e 100644
+--- a/common/include/intrin_x86.h
++++ b/common/include/intrin_x86.h
+@@ -104,12 +104,8 @@ static __inline__ __attribute__((always_inline)) void __cpuidex(int CPUInfo[], c
+ 	__asm__ __volatile__("cpuid": "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (level), "c" (count));
+ }
+
+-static __inline__ __attribute__((always_inline)) unsigned long long _xgetbv(unsigned int index)
+-{
+-	unsigned int eax, edx;
+-	__asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
+-	return ((unsigned long long)edx << 32) | eax;
+-}
++#include <immintrin.h>
++#define xgetbv _xgetbv
+
+ /*** Interrupts ***/
+ #ifndef __linux__
 diff --git a/common/src/x86emitter/cpudetect.cpp b/common/src/x86emitter/cpudetect.cpp
-index b318909..38f506d 100644
+index 717ca89..d6fb581 100644
 --- a/common/src/x86emitter/cpudetect.cpp
 +++ b/common/src/x86emitter/cpudetect.cpp
 @@ -16,6 +16,7 @@
@@ -6,7 +38,44 @@
  #include "PrecompiledHeader.h"
  #include "cpudetect_internal.h"
  #include "internal.h"
-+#include "fxsrintrin.h"
- 
++#include "intrin_x86.h"
+
  using namespace x86Emitter;
- 
+
+@@ -270,7 +271,7 @@ void x86capabilities::Identify()
+
+ 	if((Flags2 >> 27) & 1) // OSXSAVE
+ 	{
+-		if((_xgetbv(0) & 6) == 6) // XFEATURE_ENABLED_MASK[2:1] = '11b' (XMM state and YMM state are enabled by OS).
++		if((xgetbv(0) & 6) == 6) // XFEATURE_ENABLED_MASK[2:1] = '11b' (XMM state and YMM state are enabled by OS).
+ 		{
+ 			hasAVX								= ( Flags2 >> 28 ) & 1; //avx
+ 			hasFMA								= ( Flags2 >> 12 ) & 1; //fma
+diff --git a/plugins/zzogl-pg/opengl/Util.h b/plugins/zzogl-pg/opengl/Util.h
+index 27fb537..24fbe72 100644
+--- a/plugins/zzogl-pg/opengl/Util.h
++++ b/plugins/zzogl-pg/opengl/Util.h
+@@ -41,8 +41,6 @@
+ #include <sys/stat.h>
+
+ #include <GL/glew.h>
+-#include <GL/gl.h>
+-#include <GL/glext.h>
+ #include <gtk/gtk.h>
+
+ #include <cstring>
+diff --git a/plugins/zzogl-pg/opengl/ZZGl.h b/plugins/zzogl-pg/opengl/ZZGl.h
+index fd4f3b8..d5d1f17 100644
+--- a/plugins/zzogl-pg/opengl/ZZGl.h
++++ b/plugins/zzogl-pg/opengl/ZZGl.h
+@@ -36,9 +36,6 @@
+
+ // adding glew support instead of glXGetProcAddress (thanks to scaught)
+ #include <GL/glew.h>
+-#include <GL/gl.h>
+-#include <GL/glext.h>
+-#include <GL/glx.h>
+
+ #endif
+
+



More information about the arch-commits mailing list