/ PKGBUILD
PKGBUILD
1 # Maintainer: Fijxu <fijxu [at] nadeko [dot] net> 2 3 _pkgname=suyu 4 _branch=dev 5 pkgname=suyu-dev-git 6 pkgver=r27187.9895cc94d0 7 pkgrel=1 8 pkgdesc="suyu is the afterlife the world's most popular, open-source, Nintendo Switch emulator (dev branch)" 9 arch=(x86_64) 10 url=https://gitlab.com/suyu-emu/suyu 11 license=(GPL-3.0-or-later) 12 provides=('suyu') 13 conflicts=(suyu-git suyu-dev-qt6-git) 14 install=$pkgname.install 15 depends=( 16 brotli 17 enet 18 llvm-libs 19 gcc-libs 20 glibc 21 hicolor-icon-theme 22 libavcodec.so 23 libavutil.so 24 libboost_context.so 25 libcrypto.so 26 libfmt.so 27 libopus.so 28 libspeexdsp.so 29 libssl.so 30 libusb-1.0.so 31 libva.so 32 libzstd.so 33 lz4 34 qt5-base 35 qt5-multimedia 36 qt5-webengine 37 sdl2 38 zlib 39 ) 40 makedepends=( 41 boost 42 clang 43 cmake 44 ffmpeg 45 git 46 glslang 47 llvm 48 ninja 49 nlohmann-json 50 qt5-tools 51 shaderc 52 spirv-headers 53 vulkan-headers 54 vulkan-utility-libraries 55 catch2 56 rapidjson 57 mbedtls 58 ) 59 options=(!debug lto strip) 60 source=( 61 git+https://gitlab.com/suyu-emu/suyu.git#branch=${_branch} 62 git+https://github.com/arsenm/sanitizers-cmake.git 63 git+https://github.com/yhirose/cpp-httplib.git 64 git+https://github.com/arun11299/cpp-jwt.git 65 git+https://github.com/mozilla/cubeb.git 66 git+https://gitlab.com/suyu-emu/dynarmic.git 67 git+https://github.com/bylaws/libadrenotools.git 68 git+https://github.com/brofield/simpleini.git 69 git+https://gitlab.com/suyu-emu/sirit.git 70 git+https://github.com/KhronosGroup/SPIRV-Headers.git 71 git+https://github.com/eggert/tz.git 72 git+https://github.com/lat9nq/tzdb_to_nx.git 73 git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git 74 git+https://github.com/herumi/xbyak.git 75 ) 76 b2sums=('SKIP' 77 'SKIP' 78 'SKIP' 79 'SKIP' 80 'SKIP' 81 'SKIP' 82 'SKIP' 83 'SKIP' 84 'SKIP' 85 'SKIP' 86 'SKIP' 87 'SKIP' 88 'SKIP' 89 'SKIP') 90 91 pkgver() { 92 cd "$srcdir/$_pkgname" 93 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 94 } 95 96 prepare() { 97 cd "$srcdir/$_pkgname" 98 git submodule init 99 git config submodule.cpp-httplib.url "${srcdir}"/cpp-httplib 100 git config submodule.cpp-jwt.url "${srcdir}"/cpp-jwt 101 git config submodule.cubeb.url "${srcdir}"/cubeb 102 git config submodule.dynarmic.url "${srcdir}"/dynarmic 103 git config submodule.libadrenotools.url "${srcdir}"/libadrenotools 104 git config submodule.simpleini.url "${srcdir}"/simpleini 105 git config submodule.sirit.url "${srcdir}"/sirit 106 git config submodule.tzdb_to_nx.url "${srcdir}"/tzdb_to_nx 107 git config submodule.VulkanMemoryAllocator.url "${srcdir}"/VulkanMemoryAllocator 108 git config submodule.xbyak.url "${srcdir}"/xbyak 109 git -c protocol.file.allow=always submodule update 110 111 pushd externals/cubeb 112 git config submodule.cmake/sanitizers-cmake.url "${srcdir}"/sanitizers-cmake 113 git -c protocol.file.allow=always submodule update 114 popd 115 116 pushd externals/nx_tzdb/tzdb_to_nx 117 git config submodule.externals/tz/tz.url "${srcdir}"/tz 118 git -c protocol.file.allow=always submodule update 119 popd 120 121 pushd externals/sirit 122 git config submodule.externals/SPIRV-Headers.url "${srcdir}"/SPIRV-Headers 123 git -c protocol.file.allow=always submodule update 124 popd 125 } 126 127 build() { 128 if [[ $CXXFLAGS == *"-flto"* ]]; then 129 flags+=("-DSUYU_ENABLE_LTO=ON") 130 fi 131 export CXXFLAGS+=' -Wno-switch' 132 cmake -S suyu -B build -G Ninja \ 133 -DCMAKE_BUILD_TYPE=None \ 134 -DCMAKE_INSTALL_PREFIX=/usr \ 135 -DBUILD_REPOSITORY=suyu-emu/suyu \ 136 -DBUILD_TAG=${_branch}-${pkgver} \ 137 -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \ 138 -DENABLE_QT6=OFF \ 139 -DENABLE_QT_TRANSLATION=ON \ 140 -DENABLE_SDL2=ON \ 141 -DENABLE_WEB_SERVICE=ON \ 142 -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \ 143 -DTITLE_BAR_FORMAT_IDLE="suyu | ${_branch}-${pkgver} {}" \ 144 -DTITLE_BAR_FORMAT_RUNNING="suyu | ${_branch}-${pkgver} | {}" \ 145 -DUSE_DISCORD_PRESENCE=ON \ 146 -DSUYU_CHECK_SUBMODULES=OFF \ 147 -DSUYU_DOWNLOAD_TIME_ZONE_DATA=ON \ 148 -DSUYU_USE_BUNDLED_FFMPEG=OFF \ 149 -DSUYU_USE_BUNDLED_QT=OFF \ 150 -DSUYU_USE_BUNDLED_SDL2=OFF \ 151 -DSUYU_USE_EXTERNAL_VULKAN_HEADERS=OFF \ 152 -DSUYU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=OFF \ 153 -DSUYU_USE_EXTERNAL_SDL2=OFF \ 154 -DSUYU_USE_FASTER_LD=ON \ 155 -DSUYU_USE_PRECOMPILED_HEADERS=OFF \ 156 -DSUYU_USE_QT_MULTIMEDIA=ON \ 157 -DSUYU_USE_QT_WEB_ENGINE=ON \ 158 -DSUYU_TESTS=OFF \ 159 "${flags[@]}" \ 160 -Wno-dev 161 cmake --build build 162 } 163 164 package() { 165 DESTDIR="${pkgdir}" cmake --install build 166 install -Dm644 ${_pkgname}/dist/72-suyu-input.rules -t "${pkgdir}"/usr/lib/udev/rules.d/ 167 } 168 169 # vim: ts=2 sw=2 et