86 lines
3.7 KiB
Bash
86 lines
3.7 KiB
Bash
# Maintainer: 0xDEADCADE <$(base64 -d<<<MHhkZWFkY2FkZUBwcm90b25tYWlsLmNvbQ==)>
|
|
# shellcheck disable=SC2148,SC2034,SC2154
|
|
|
|
_pkgname=yuzu
|
|
pkgname=$_pkgname-early-access
|
|
_repo="pineappleEA/pineapple-src"
|
|
_releases_gh=$(curl https://api.github.com/repos/${_repo}/releases)
|
|
pkgver=$(echo "$_releases_gh" | jq -r .[0].tag_name | cut -d "-" -f 2)
|
|
pkgrel=1
|
|
pkgdesc="An experimental open-source Nintendo Switch emulator/debugger (early access version)"
|
|
arch=('i686' 'x86_64')
|
|
url="https://yuzu-emu.org/"
|
|
license=('GPL2')
|
|
depends=('boost-libs' 'shared-mime-info' 'hicolor-icon-theme' 'sdl2' 'qt5-base' 'qt5-multimedia' 'qt5-webengine' 'libxkbcommon-x11' 'ffmpeg' 'fmt' 'libzip' 'opus' 'libfdk-aac' 'lz4' 'mbedtls' 'openssl' 'zstd')
|
|
makedepends=('llvm' 'git' 'glslang' 'cmake' 'ninja' 'graphviz' 'doxygen' 'clang' 'boost' 'catch2' 'nlohmann-json' 'rapidjson' 'qt5-tools' 'desktop-file-utils' 'robin-map' 'jq')
|
|
optdepends=('qt5-wayland: for Wayland support')
|
|
provides=('yuzu')
|
|
conflicts=('yuzu')
|
|
source=("https://github.com/pineappleEA/pineapple-src/archive/EA-${pkgver}.tar.gz"
|
|
"https://github.com/pineappleEA/pineapple-src/releases/download/EA-${pkgver}/Windows-Yuzu-EA-${pkgver}.zip"
|
|
"https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/master/yuzu.xml")
|
|
sha256sums=('SKIP'
|
|
'SKIP'
|
|
'99b593b80efd8ef237b08648099345f6f55d472dd55f44bbf3430fb4857274de')
|
|
|
|
prepare() {
|
|
cd "$srcdir/yuzu-windows-msvc-early-access" || exit
|
|
tar -xvf -- *.tar.xz
|
|
cd "$(find ./ -name "*.tar.xz" | sed -e 's/.tar.xz//')" || exit
|
|
cp -R .git* "$srcdir/pineapple-src-EA-${pkgver}/"
|
|
|
|
cd "$srcdir/pineapple-src-EA-${pkgver}" || exit
|
|
for i in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') ; do
|
|
rm -rf "$i"
|
|
done
|
|
git submodule update --init --recursive
|
|
|
|
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror$/-W/g' {} +
|
|
#find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*)$/ )/g' {} +
|
|
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*$/ /g' {} +
|
|
find . -name "CMakeLists.txt" -exec sed -i 's/-Werror/-W/g' {} +
|
|
sed -i -e 's/--quiet //g' src/video_core/host_shaders/CMakeLists.txt
|
|
# shellcheck disable=SC2016
|
|
sed -i -e 's#${SPIRV_HEADER_FILE} ${SOURCE_FILE}#${SPIRV_HEADER_FILE} ${SOURCE_FILE} 2>/dev/null#g' src/video_core/host_shaders/CMakeLists.txt
|
|
sed -i -e '/Name=yuzu/ s/$/ Early Access/' dist/yuzu.desktop
|
|
sed -i -e '/yuzu %f/a StartupWMClass=yuzu' dist/yuzu.desktop
|
|
sed -i -e 's_^MimeType=.*_&application/x-nx-nsp;application/x-nx-xci;_' dist/yuzu.desktop
|
|
sed -i -e 's| (%2)||' src/yuzu/aboutdialog.ui
|
|
|
|
cp -f "$srcdir/yuzu.xml" "dist/yuzu.xml"
|
|
}
|
|
build() {
|
|
cd "$srcdir/pineapple-src-EA-${pkgver}" || exit
|
|
mkdir -p build && cd build || exit
|
|
cmake .. -GNinja \
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_C_FLAGS="$CFLAGS -flto=thin" \
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS -flto=thin" \
|
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
|
-DTITLE_BAR_FORMAT_IDLE="yuzu Early Access $pkgver" \
|
|
-DTITLE_BAR_FORMAT_RUNNING="yuzu Early Access $pkgver | {3}" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON \
|
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
|
-DYUZU_USE_QT_WEB_ENGINE=ON \
|
|
-DUSE_DISCORD_PRESENCE=ON \
|
|
-DENABLE_QT_TRANSLATION=ON \
|
|
-DYUZU_USE_BUNDLED_OPUS=OFF \
|
|
-DDYNARMIC_NO_BUNDLED_FMT=ON \
|
|
-DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON \
|
|
-DYUZU_USE_BUNDLED_FFMPEG=OFF \
|
|
-DYUZU_USE_BUNDLED_LIBUSB=OFF \
|
|
-DYUZU_USE_BUNDLED_QT=OFF \
|
|
-DYUZU_USE_EXTERNAL_SDL2=OFF
|
|
|
|
ninja
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/pineapple-src-EA-${pkgver}/build" || exit
|
|
DESTDIR="$pkgdir" ninja install
|
|
|
|
rm -rf "$pkgdir/usr/lib" "$pkgdir/usr/include"
|
|
}
|