archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / yuzu / repos / community-x86_64 / PKGBUILD
blob898e1b7bb3e1b08f8789ab36d2632eaa411aa2c0
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Alexandre Bouvier <contact@amb.tf>
4 pkgname=yuzu
5 pkgver=1426
6 pkgrel=1
7 pkgdesc='Nintendo Switch emulator'
8 arch=(x86_64)
9 url=https://yuzu-emu.org/
10 license=(GPL3)
11 depends=(
12   enet
13   gcc-libs
14   glibc
15   libavcodec.so
16   libavutil.so
17   libboost_context.so
18   libcrypto.so
19   libfmt.so
20   libINIReader.so
21   libopus.so
22   libspeexdsp.so
23   libssl.so
24   libswscale.so
25   libusb-1.0.so
26   libva.so
27   libzstd.so
28   lz4
29   qt5-base
30   qt5-multimedia
31   qt5-webengine
32   sdl2
34 makedepends=(
35   boost
36   clang
37   cmake
38   git
39   glslang
40   llvm
41   ninja
42   nlohmann-json
43   qt5-tools
44   shaderc
45   spirv-headers
46   vulkan-headers
48 options=(!debug)
49 _tag=3da9b31ccc4b773c13303a5fb3498f806b0fa000
50 source=(
51   git+https://github.com/yuzu-emu/yuzu-mainline.git#tag=${_tag}
52   git+https://github.com/arsenm/sanitizers-cmake.git
53   git+https://github.com/yhirose/cpp-httplib.git
54   git+https://github.com/arun11299/cpp-jwt.git
55   git+https://github.com/mozilla/cubeb.git
56   git+https://github.com/MerryMage/dynarmic.git
57   yuzu-mbedtls::git+https://github.com/yuzu-emu/mbedtls.git
58   yuzu-sirit::git+https://github.com/yuzu-emu/sirit.git
59   git+https://github.com/herumi/xbyak.git
61 b2sums=('SKIP'
62         'SKIP'
63         'SKIP'
64         'SKIP'
65         'SKIP'
66         'SKIP'
67         'SKIP'
68         'SKIP'
69         'SKIP')
71 prepare() {
72   cd yuzu-mainline
73   git config submodule.cpp-httplib.url "${srcdir}"/cpp-httplib
74   git config submodule.cpp-jwt.url "${srcdir}"/cpp-jwt
75   git config submodule.cubeb.url "${srcdir}"/cubeb
76   git config submodule.dynarmic.url "${srcdir}"/dynarmic
77   git config submodule.mbedtls.url "${srcdir}"/yuzu-mbedtls
78   git config submodule.sirit.url "${srcdir}"/yuzu-sirit
79   git config submodule.xbyak.url "${srcdir}"/xbyak
80   git -c protocol.file.allow=always submodule update
81   cd externals/cubeb
82   git config submodule.cmake/sanitizers-cmake.url "${srcdir}"/sanitizers-cmake
83   git -c protocol.file.allow=always submodule update
86 pkgver() {
87   cd yuzu-mainline
88   git describe --tags | sed 's/.*-//'
91 build() {
92   cmake -S yuzu-mainline -B build -G Ninja \
93     -DCMAKE_BUILD_TYPE=None \
94     -DCMAKE_INSTALL_PREFIX=/usr \
95     -DBUILD_REPOSITORY=yuzu-emu/yuzu-mainline \
96     -DBUILD_TAG=${pkgver} \
97     -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
98     -DENABLE_QT6=OFF \
99     -DENABLE_QT_TRANSLATION=ON \
100     -DENABLE_SDL2=ON \
101     -DENABLE_WEB_SERVICE=ON \
102     -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \
103     -DTITLE_BAR_FORMAT_IDLE="yuzu | ${pkgver} {}" \
104     -DTITLE_BAR_FORMAT_RUNNING="yuzu | ${pkgver} | {}" \
105     -DUSE_DISCORD_PRESENCE=OFF \
106     -DYUZU_CHECK_SUBMODULES=OFF \
107     -DYUZU_USE_BUNDLED_FFMPEG=OFF \
108     -DYUZU_USE_BUNDLED_QT=OFF \
109     -DYUZU_USE_BUNDLED_SDL2=OFF \
110     -DYUZU_USE_EXTERNAL_VULKAN_HEADERS=OFF \
111     -DYUZU_USE_EXTERNAL_SDL2=OFF \
112     -DYUZU_USE_FASTER_LD=OFF \
113     -DYUZU_USE_PRECOMPILED_HEADERS=OFF \
114     -DYUZU_USE_QT_MULTIMEDIA=ON \
115     -DYUZU_USE_QT_WEB_ENGINE=ON \
116     -DYUZU_TESTS=OFF \
117     -Wno-dev
118   cmake --build build
121 package() {
122   DESTDIR="${pkgdir}" cmake --install build
125 # vim: ts=2 sw=2 et: