diff options
-rwxr-xr-x | .SRCINFO | 7 | ||||
-rwxr-xr-x | PKGBUILD | 37 | ||||
-rwxr-xr-x | yuzu-gcc12-clang13.patch | 11 |
3 files changed, 45 insertions, 10 deletions
@@ -1,6 +1,6 @@ pkgbase = yuzu-git pkgdesc = An experimental open-source emulator for the Nintendo Switch - pkgver = r21376.8037f2eae + pkgver = r21473.4ae75bec5 pkgrel = 1 url = https://github.com/yuzu-emu/yuzu arch = i686 @@ -8,15 +8,18 @@ pkgbase = yuzu-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-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-git md5sums = SKIP md5sums = SKIP md5sums = SKIP + md5sums = 0c60d6dae4ae6c5f33c944c584a5a7dc pkgname = yuzu-git @@ -3,7 +3,7 @@ _pkgname=yuzu pkgname=$_pkgname-git -pkgver=r21376.8037f2eae +pkgver=r21473.4ae75bec5 pkgrel=1 pkgdesc='An experimental open-source emulator for the Nintendo Switch' arch=('i686' 'x86_64') @@ -15,6 +15,7 @@ depends=('desktop-file-utils' 'fmt' 'glslang' 'libfdk-aac' + 'libusb' 'libxkbcommon-x11' 'lz4' 'mbedtls' @@ -31,11 +32,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" 'git+https://github.com/benhoyt/inih.git' 'git+https://github.com/kinetiknz/cubeb.git' @@ -54,7 +57,8 @@ source=("$_pkgname::git+https://github.com/yuzu-emu/yuzu" # 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' @@ -71,7 +75,8 @@ md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP') + 'SKIP' + '0c60d6dae4ae6c5f33c944c584a5a7dc') pkgver() { cd "$srcdir/$_pkgname" @@ -102,6 +107,9 @@ prepare() { git config submodule.${submodule}.url "$srcdir/${submodule##*/}" git submodule update --init done + + cd "$srcdir/$_pkgname" + patch -p1 < ../yuzu-gcc12-clang13.patch } build() { @@ -111,23 +119,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; |