This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
suyu-dev-git/PKGBUILD

210 lines
5.6 KiB
Text
Raw Normal View History

# Maintainer: Fijxu <fijxu [at] nadeko [dot] net>
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
2023-02-12 09:11:21 -03:00
_pkgname=suyu
2024-03-06 17:21:31 -03:00
_branch=dev
pkgname=suyu-dev-git
2024-06-02 12:02:48 -04:00
pkgver=r27439.daf2c1f496
2023-07-31 06:00:11 -04:00
pkgrel=1
2024-03-06 17:21:31 -03:00
pkgdesc="suyu is the afterlife the world's most popular, open-source, Nintendo Switch emulator (dev branch)"
2023-02-12 09:11:21 -03:00
arch=(x86_64)
url=https://git.suyu.dev/suyu/suyu
2024-03-11 00:29:18 -03:00
license=(GPL-3.0-or-later)
provides=('suyu')
2024-06-02 12:02:48 -04:00
conflicts=(suyu-git suyu-dev-qt6-git suyu-appimage)
2024-03-21 03:55:13 -03:00
provides=(suyu-git suyu-dev-qt6-git)
2024-03-06 17:21:31 -03:00
install=$pkgname.install
2023-02-12 09:11:21 -03:00
depends=(
2024-03-11 00:29:18 -03:00
brotli
2023-02-12 09:11:21 -03:00
enet
2024-03-10 22:30:41 -03:00
llvm-libs
2023-02-12 09:11:21 -03:00
gcc-libs
glibc
2023-11-20 12:24:25 -03:00
hicolor-icon-theme
2023-02-12 09:11:21 -03:00
libavcodec.so
libavutil.so
libboost_context.so
libcrypto.so
libfmt.so
libopus.so
libspeexdsp.so
libssl.so
libusb-1.0.so
libva.so
libzstd.so
lz4
2023-12-20 16:42:21 -03:00
qt5-base
qt5-multimedia
qt5-webengine
2023-02-12 09:11:21 -03:00
sdl2
2023-11-20 12:24:25 -03:00
zlib
2023-02-12 09:11:21 -03:00
)
makedepends=(
boost
clang
cmake
2023-12-20 16:42:21 -03:00
ffmpeg
2024-06-02 12:02:48 -04:00
xbyak
oaknut
dynarmic
2023-02-12 09:11:21 -03:00
git
glslang
llvm
ninja
nlohmann-json
2023-12-20 16:42:21 -03:00
qt5-tools
2023-02-12 09:11:21 -03:00
shaderc
spirv-headers
vulkan-headers
2024-03-10 22:30:41 -03:00
vulkan-utility-libraries
2024-03-09 16:03:06 -03:00
catch2
rapidjson
2024-03-11 00:29:18 -03:00
mbedtls
2023-02-12 09:11:21 -03:00
)
2024-03-13 19:46:39 -03:00
options=(!debug lto strip)
2023-02-12 09:11:21 -03:00
source=(
git+https://git.suyu.dev/suyu/suyu.git#branch=${_branch}
git+https://github.com/lsalzman/enet.git
2023-02-12 09:11:21 -03:00
git+https://github.com/mozilla/cubeb.git
git+https://git.suyu.dev/suyu/dynarmic.git
git+https://github.com/libusb/libusb.git
git+https://git.suyu.dev/suyu/discord-rpc.git
git+https://github.com/KhronosGroup/Vulkan-Headers.git
git+https://git.suyu.dev/suyu/sirit.git
git+https://git.suyu.dev/suyu/mbedtls.git
git+https://github.com/herumi/xbyak.git
git+https://github.com/xiph/opus.git
git+https://github.com/libsdl-org/SDL.git
git+https://github.com/yhirose/cpp-httplib.git
ffmpeg::git+https://github.com/FFmpeg/FFmpeg.git
git+https://github.com/microsoft/vcpkg.git
git+https://github.com/arun11299/cpp-jwt.git
2023-06-08 05:32:02 -04:00
git+https://github.com/bylaws/libadrenotools.git
git+https://github.com/lat9nq/tzdb_to_nx.git
git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
git+https://git.suyu.dev/suyu/breakpad.git
2023-12-01 11:56:12 -03:00
git+https://github.com/brofield/simpleini.git
git+https://github.com/merryhime/oaknut.git
git+https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
# Submodule Submodules
git+https://github.com/arsenm/sanitizers-cmake.git
git+https://github.com/zyantific/zycore-c.git
git+https://github.com/bylaws/liblinkernsbypass.git
2023-12-20 16:42:21 -03:00
git+https://github.com/KhronosGroup/SPIRV-Headers.git
2023-06-20 03:38:35 -04:00
git+https://github.com/eggert/tz.git
2023-02-12 09:11:21 -03:00
)
b2sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
2023-02-12 09:11:21 -03:00
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
2023-06-08 05:32:02 -04:00
'SKIP'
2023-06-20 03:38:35 -04:00
'SKIP'
'SKIP'
2023-07-18 05:34:32 -04:00
'SKIP'
'SKIP'
2023-02-12 09:11:21 -03:00
'SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
2023-02-12 09:11:21 -03:00
prepare() {
cd "$srcdir/$_pkgname"
for submodule in {enet,cubeb,dynarmic,libusb,discord-rpc,Vulkan-Headers,sirit,mbedtls,xbyak,opus,SDL,cpp-httplib,ffmpeg,vcpkg,cpp-jwt,libadrenotools,tzdb_to_nx,VulkanMemoryAllocator,breakpad,simpleini,oaknut,Vulkan-Utility-Libraries};
do
2024-03-31 21:09:28 -03:00
git config --file=.gitmodules submodule.$submodule.url "${srcdir}"/$submodule
done
2024-03-31 21:09:28 -03:00
git -c protocol.file.allow=always submodule update --init
2023-06-20 03:38:35 -04:00
pushd externals/cubeb
2023-02-12 09:11:21 -03:00
git config submodule.cmake/sanitizers-cmake.url "${srcdir}"/sanitizers-cmake
git -c protocol.file.allow=always submodule update
2023-06-20 03:38:35 -04:00
popd
pushd externals/dynarmic/externals/zydis
git config submodule.dependencies/zycore.url "${srcdir}"/zycore
git -c protocol.file.allow=always submodule update
popd
pushd externals/libadrenotools
git config submodule.lib/linkersbypass.url "${srcdir}"/linkernsbypass
git -c protocol.file.allow=always submodule update
popd
2023-06-20 03:38:35 -04:00
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 16:42:21 -03: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 09:11:21 -03:00
}
build() {
2024-03-11 00:29:18 -03:00
if [[ $CXXFLAGS == *"-flto"* ]]; then
flags+=("-DSUYU_ENABLE_LTO=ON")
fi
2023-12-20 16:42:21 -03:00
export CXXFLAGS+=' -Wno-switch'
cmake -S suyu -B build -G Ninja \
2023-02-12 09:11:21 -03:00
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
2024-03-05 22:26:48 -03:00
-DBUILD_REPOSITORY=suyu-emu/suyu \
2024-03-06 17:21:31 -03:00
-DBUILD_TAG=${_branch}-${pkgver} \
2024-03-11 00:29:18 -03:00
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF \
2024-03-11 00:43:36 -03:00
-DENABLE_QT6=OFF \
2023-02-12 09:11:21 -03:00
-DENABLE_QT_TRANSLATION=ON \
-DENABLE_SDL2=ON \
-DENABLE_WEB_SERVICE=ON \
-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON \
2024-03-06 17:21:31 -03:00
-DTITLE_BAR_FORMAT_IDLE="suyu | ${_branch}-${pkgver} {}" \
-DTITLE_BAR_FORMAT_RUNNING="suyu | ${_branch}-${pkgver} | {}" \
-DUSE_DISCORD_PRESENCE=ON \
-DSUYU_CHECK_SUBMODULES=ON \
-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=OFF \
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
-DSUYU_USE_QT_MULTIMEDIA=ON \
-DSUYU_USE_QT_WEB_ENGINE=ON \
-DSUYU_TESTS=OFF \
2024-03-11 00:29:18 -03:00
"${flags[@]}" \
2023-02-12 09:11:21 -03:00
-Wno-dev
cmake --build build
}
package() {
DESTDIR="${pkgdir}" cmake --install build
2024-03-09 18:21:11 -03:00
install -Dm644 ${_pkgname}/dist/72-suyu-input.rules -t "${pkgdir}"/usr/lib/udev/rules.d/
cd "${pkgdir}"/usr/share/applications
2024-04-17 11:44:06 -04:00
sed -i '12s/Exec=suyu/Exec=env QT_QPA_PLATFORM=xcb suyu/' dev.suyu_emu.suyu.desktop
2023-02-12 09:11:21 -03:00
}
# vim: ts=2 sw=2 et