summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrendan Szymanski2022-06-08 13:35:56 -0400
committerBrendan Szymanski2022-06-08 13:35:56 -0400
commit9773875b5314eb748393b6cdc8f41acc61753ebc (patch)
treec4a74d7fd495d9171e5bfafdb35caa0b7c054d65
parent3bc5525ac3dd734069843dad25dfdd539f62e5d6 (diff)
downloadaur-9773875b5314eb748393b6cdc8f41acc61753ebc.tar.gz
Made clang default compiler, applied patch to workaround constexpr vector issue, use system dependencies
-rwxr-xr-x.SRCINFO7
-rwxr-xr-xPKGBUILD37
-rwxr-xr-xyuzu-gcc12-clang13.patch11
3 files changed, 45 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c3cf3bd987b0..224591abf1d1 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = yuzu-mainline-git
pkgdesc = An experimental open-source emulator for the Nintendo Switch (newest features)
- pkgver = r21377.896616808
+ pkgver = r21478.2f463ada7
pkgrel = 1
url = https://github.com/yuzu-emu/yuzu-mainline
arch = i686
@@ -8,15 +8,18 @@ pkgbase = yuzu-mainline-git
license = GPL2
makedepends = boost
makedepends = catch2
+ makedepends = clang
makedepends = cmake
makedepends = ffmpeg
makedepends = git
makedepends = ninja
makedepends = nlohmann-json
+ makedepends = robin-map
depends = desktop-file-utils
depends = fmt
depends = glslang
depends = libfdk-aac
+ depends = libusb
depends = libxkbcommon-x11
depends = lz4
depends = mbedtls
@@ -52,6 +55,7 @@ pkgbase = yuzu-mainline-git
source = git+https://github.com/yhirose/cpp-httplib.git
source = git+https://github.com/arsenm/sanitizers-cmake.git
source = git+https://github.com/KhronosGroup/SPIRV-Headers.git
+ source = yuzu-gcc12-clang13.patch
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
@@ -69,5 +73,6 @@ pkgbase = yuzu-mainline-git
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
+ md5sums = 0c60d6dae4ae6c5f33c944c584a5a7dc
pkgname = yuzu-mainline-git
diff --git a/PKGBUILD b/PKGBUILD
index ff0f56673839..9ed46e4970b0 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=yuzu
pkgname=$_pkgname-mainline-git
-pkgver=r21377.896616808
+pkgver=r21478.2f463ada7
pkgrel=1
pkgdesc='An experimental open-source emulator for the Nintendo Switch (newest features)'
arch=('i686' 'x86_64')
@@ -14,6 +14,7 @@ depends=('desktop-file-utils'
'fmt'
'glslang'
'libfdk-aac'
+ 'libusb'
'libxkbcommon-x11'
'lz4'
'mbedtls'
@@ -30,11 +31,13 @@ depends=('desktop-file-utils'
'zstd')
makedepends=('boost'
'catch2'
+ 'clang'
'cmake'
'ffmpeg'
'git'
'ninja'
- 'nlohmann-json')
+ 'nlohmann-json'
+ 'robin-map')
source=("$_pkgname::git+https://github.com/yuzu-emu/yuzu-mainline"
'git+https://github.com/benhoyt/inih.git'
'git+https://github.com/kinetiknz/cubeb.git'
@@ -53,7 +56,8 @@ source=("$_pkgname::git+https://github.com/yuzu-emu/yuzu-mainline"
# cubeb dependencies
'git+https://github.com/arsenm/sanitizers-cmake.git'
# sirit dependencies
- 'git+https://github.com/KhronosGroup/SPIRV-Headers.git')
+ 'git+https://github.com/KhronosGroup/SPIRV-Headers.git'
+ 'yuzu-gcc12-clang13.patch')
md5sums=('SKIP'
'SKIP'
'SKIP'
@@ -70,7 +74,8 @@ md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP')
+ 'SKIP'
+ '0c60d6dae4ae6c5f33c944c584a5a7dc')
pkgver() {
cd "$srcdir/$_pkgname"
@@ -101,6 +106,9 @@ prepare() {
git config submodule.${submodule}.url "$srcdir/${submodule##*/}"
git submodule update --init
done
+
+ cd "$srcdir/$_pkgname"
+ patch -p1 < ../yuzu-gcc12-clang13.patch
}
build() {
@@ -110,23 +118,34 @@ build() {
rm -rf build
fi
mkdir -p build && cd build
- cmake .. \
+ cmake .. -GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release \
-DYUZU_USE_QT_WEB_ENGINE=ON \
-DYUZU_USE_EXTERNAL_SDL2=OFF \
-DUSE_DISCORD_PRESENCE=ON \
-DENABLE_QT_TRANSLATION=ON \
- -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON
- make
+ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
+ -DBUILD_REPOSITORY=yuzu-emu/yuzu-mainline \
+ -DBUILD_TAG=${pkgver} \
+ -DTITLE_BAR_FORMAT_IDLE="yuzu | ${pkgver} {}" \
+ -DTITLE_BAR_FORMAT_RUNNING="yuzu | ${pkgver} | {}" \
+ -DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON \
+ -DYUZU_USE_BUNDLED_OPUS=OFF \
+ -DYUZU_USE_BUNDLED_FFMPEG=OFF \
+ -DYUZU_USE_BUNDLED_LIBUSB=OFF \
+ -DYUZU_USE_BUNDLED_QT=OFF
+ ninja
}
check() {
cd "$srcdir/$_pkgname/build"
- make test
+ ninja test
}
package() {
cd "$srcdir/$_pkgname/build"
- make DESTDIR="$pkgdir/" install
+ DESTDIR="$pkgdir" ninja install
}
diff --git a/yuzu-gcc12-clang13.patch b/yuzu-gcc12-clang13.patch
new file mode 100755
index 000000000000..8041bbe71afc
--- /dev/null
+++ b/yuzu-gcc12-clang13.patch
@@ -0,0 +1,11 @@
+--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
++++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+@@ -977,7 +977,7 @@ private:
+ bool uses_demote_to_helper{};
+
+ // TODO: C++20 Remove this when all compilers support constexpr std::vector
+-#if __cpp_lib_constexpr_vector >= 201907
++#if (__cpp_lib_constexpr_vector >= 201907) && !(defined(__clang__)) && !(defined(__GNUC__))
+ static constexpr Flow::Block dummy_flow_block;
+ #else
+ const Flow::Block dummy_flow_block;