Arch_PKGBUILD/PKGBUILD

168 lines
4.5 KiB
Bash
Raw Permalink Normal View History

# Maintainer: Fijxu <fijxu [at] nadeko [dot] net>
2023-02-12 13:11:21 +01:00
_pkgname=suyu
2024-03-06 21:21:31 +01:00
_branch=dev
pkgname=suyu-dev-git
2024-03-09 20:03:06 +01:00
pkgver=r27167.d02af377d4
2023-07-31 12:00:11 +02:00
pkgrel=1
2024-03-06 21:21:31 +01:00
pkgdesc="suyu is the afterlife the world's most popular, open-source, Nintendo Switch emulator (dev branch)"
2023-02-12 13:11:21 +01:00
arch=(x86_64)
2024-03-06 02:26:48 +01:00
url=https://gitlab.com/suyu-emu/suyu
2023-02-12 13:11:21 +01:00
license=(GPL3)
provides=('suyu')
2024-03-06 21:21:31 +01:00
install=$pkgname.install
conflicts=(yuzu yuzu-early-access-appimage yuzu-early-access-git)
2023-02-12 13:11:21 +01:00
depends=(
2023-11-20 16:24:25 +01:00
brotli
2023-02-12 13:11:21 +01:00
enet
gcc-libs
glibc
2023-11-20 16:24:25 +01:00
hicolor-icon-theme
2023-02-12 13:11:21 +01:00
libavcodec.so
libavutil.so
libboost_context.so
libcrypto.so
libfmt.so
libopus.so
libspeexdsp.so
libssl.so
libswscale.so
libusb-1.0.so
libva.so
libzstd.so
lz4
2023-12-20 20:42:21 +01:00
qt5-base
qt5-multimedia
qt5-webengine
2023-02-12 13:11:21 +01:00
sdl2
2024-02-08 19:36:04 +01:00
vulkan-utility-libraries
2023-11-20 16:24:25 +01:00
zlib
2023-02-12 13:11:21 +01:00
)
makedepends=(
boost
clang
cmake
2023-12-20 20:42:21 +01:00
ffmpeg
2023-02-12 13:11:21 +01:00
git
glslang
llvm
ninja
nlohmann-json
2023-12-20 20:42:21 +01:00
qt5-tools
2023-02-12 13:11:21 +01:00
shaderc
spirv-headers
vulkan-headers
2024-03-09 20:03:06 +01:00
catch2
rapidjson
2023-02-12 13:11:21 +01:00
)
2024-03-09 20:03:06 +01:00
options=(!debug lto)
2023-02-12 13:11:21 +01:00
source=(
2024-03-06 21:21:31 +01:00
git+https://gitlab.com/suyu-emu/suyu.git#branch=${_branch}
2023-02-12 13:11:21 +01:00
git+https://github.com/arsenm/sanitizers-cmake.git
git+https://github.com/yhirose/cpp-httplib.git
git+https://github.com/arun11299/cpp-jwt.git
git+https://github.com/mozilla/cubeb.git
2024-03-06 02:26:48 +01:00
git+https://gitlab.com/suyu-emu/dynarmic.git
2023-06-08 11:32:02 +02:00
git+https://github.com/bylaws/libadrenotools.git
2024-03-06 02:26:48 +01:00
git+https://gitlab.com/suyu-emu/mbedtls.git
2023-12-01 15:56:12 +01:00
git+https://github.com/brofield/simpleini.git
2024-03-06 02:26:48 +01:00
git+https://gitlab.com/suyu-emu/sirit.git
2023-12-20 20:42:21 +01:00
git+https://github.com/KhronosGroup/SPIRV-Headers.git
2023-06-20 09:38:35 +02:00
git+https://github.com/eggert/tz.git
git+https://github.com/lat9nq/tzdb_to_nx.git
2023-07-18 11:34:32 +02:00
git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
2023-02-12 13:11:21 +01:00
git+https://github.com/herumi/xbyak.git
)
b2sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
2023-06-08 11:32:02 +02:00
'SKIP'
2023-06-20 09:38:35 +02:00
'SKIP'
'SKIP'
2023-07-18 11:34:32 +02:00
'SKIP'
2023-12-01 15:56:12 +01:00
'SKIP'
2023-12-20 20:42:21 +01:00
'SKIP'
2023-02-12 13:11:21 +01:00
'SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
2023-02-12 13:11:21 +01:00
prepare() {
cd "$srcdir/$_pkgname"
git submodule init
2023-02-12 13:11:21 +01:00
git config submodule.cpp-httplib.url "${srcdir}"/cpp-httplib
git config submodule.cpp-jwt.url "${srcdir}"/cpp-jwt
git config submodule.cubeb.url "${srcdir}"/cubeb
git config submodule.dynarmic.url "${srcdir}"/dynarmic
2023-06-08 11:32:02 +02:00
git config submodule.libadrenotools.url "${srcdir}"/libadrenotools
git config submodule.mbedtls.url "${srcdir}"/mbedtls
2023-12-01 15:56:12 +01:00
git config submodule.simpleini.url "${srcdir}"/simpleini
git config submodule.sirit.url "${srcdir}"/sirit
2023-06-20 09:38:35 +02:00
git config submodule.tzdb_to_nx.url "${srcdir}"/tzdb_to_nx
2023-07-18 11:34:32 +02:00
git config submodule.VulkanMemoryAllocator.url "${srcdir}"/VulkanMemoryAllocator
2023-02-12 13:11:21 +01:00
git config submodule.xbyak.url "${srcdir}"/xbyak
git -c protocol.file.allow=always submodule update
2023-06-20 09:38:35 +02:00
pushd externals/cubeb
2023-02-12 13:11:21 +01:00
git config submodule.cmake/sanitizers-cmake.url "${srcdir}"/sanitizers-cmake
git -c protocol.file.allow=always submodule update
2023-06-20 09:38:35 +02:00
popd
pushd externals/nx_tzdb/tzdb_to_nx
git config submodule.externals/tz/tz.url "${srcdir}"/tz
git -c protocol.file.allow=always submodule update
popd
2023-12-20 20:42:21 +01:00
pushd externals/sirit
git config submodule.externals/SPIRV-Headers.url "${srcdir}"/SPIRV-Headers
git -c protocol.file.allow=always submodule update
popd
2023-02-12 13:11:21 +01:00
}
build() {
2023-12-20 20:42:21 +01:00
export CXXFLAGS+=' -Wno-switch'
cmake -S suyu -B build -G Ninja \
2023-02-12 13:11:21 +01:00
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
2024-03-06 02:26:48 +01:00
-DBUILD_REPOSITORY=suyu-emu/suyu \
2024-03-06 21:21:31 +01:00
-DBUILD_TAG=${_branch}-${pkgver} \
2023-02-12 13:11:21 +01:00
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
2023-12-20 20:42:21 +01:00
-DENABLE_QT6=OFF \
2023-02-12 13:11:21 +01:00
-DENABLE_QT_TRANSLATION=ON \
-DENABLE_SDL2=ON \
-DENABLE_WEB_SERVICE=ON \
-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \
2024-03-06 21:21:31 +01:00
-DTITLE_BAR_FORMAT_IDLE="suyu | ${_branch}-${pkgver} {}" \
-DTITLE_BAR_FORMAT_RUNNING="suyu | ${_branch}-${pkgver} | {}" \
-DUSE_DISCORD_PRESENCE=ON \
-DSUYU_CHECK_SUBMODULES=OFF \
-DSUYU_DOWNLOAD_TIME_ZONE_DATA=ON \
-DSUYU_USE_BUNDLED_FFMPEG=OFF \
-DSUYU_USE_BUNDLED_QT=OFF \
-DSUYU_USE_BUNDLED_SDL2=OFF \
-DSUYU_USE_EXTERNAL_VULKAN_HEADERS=OFF \
-DSUYU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=OFF \
-DSUYU_USE_EXTERNAL_SDL2=OFF \
-DSUYU_USE_FASTER_LD=ON \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DSUYU_USE_QT_MULTIMEDIA=ON \
-DSUYU_USE_QT_WEB_ENGINE=ON \
-DSUYU_TESTS=OFF \
2023-02-12 13:11:21 +01:00
-Wno-dev
cmake --build build
}
package() {
DESTDIR="${pkgdir}" cmake --install build
2024-03-09 22:21:11 +01:00
install -Dm644 ${_pkgname}/dist/72-suyu-input.rules -t "${pkgdir}"/usr/lib/udev/rules.d/
2023-02-12 13:11:21 +01:00
}
# vim: ts=2 sw=2 et