-
-
Save HurricanePootis/d6ade8c4810ca635eb453a0bccb2c49b to your computer and use it in GitHub Desktop.
`lime3ds` patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index f7c13ca..cf697c4 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -1,4 +1,5 @@ | |
# Maintainer: username227 <gfrank227 at gmail dot com> | |
+# Contributor: HurricanePootis <hurricanepootis@protonmail.com> | |
# The pkgbuild is based on the original pkgbuild for citra. | |
pkgname=lime3ds | |
@@ -7,27 +8,43 @@ pkgrel=1 | |
arch=('x86_64') | |
pkgdesc='An experimental open-source Nintendo 3DS emulator/debugger' | |
url='https://github.com/Lime3DS/Lime3DS' | |
-license=('GPL-2.0') | |
-depends=('sdl2' 'mbedtls' 'speexdsp' 'qt6-multimedia' 'ffmpeg' 'libfdk-aac' 'libusb' 'openssl' 'glibc' 'gcc-libs' 'sndio' 'zstd' 'soundtouch' 'fmt' 'libinih' 'openal' 'enet' 'zydis') | |
-makedepends=('git' 'cmake' 'python' 'doxygen' 'rapidjson' 'llvm' 'qt6-tools' 'gcc' 'glslang' 'vulkan-headers' 'nlohmann-json' 'catch2' 'clang' 'libc++' 'ninja') | |
+license=('GPL-2.0-or-later') | |
+depends=('sdl2' 'mbedtls' 'speexdsp' 'qt6-multimedia' 'ffmpeg' 'libfdk-aac' 'libusb' 'openssl' 'glibc' 'gcc-libs' 'sndio' 'zstd' 'soundtouch' 'fmt' 'libinih' 'openal' 'enet' 'zydis' 'boost-libs') | |
+makedepends=('git' 'cmake' 'python' 'doxygen' 'rapidjson' 'llvm' 'qt6-tools' 'gcc' 'glslang' 'vulkan-headers' 'nlohmann-json' 'catch2' 'clang' 'ninja' 'boost') | |
conflicts=('lime3ds-appimage' 'lime3ds-git') | |
-options=('lto' '!buildflags') | |
+options=('!lto') | |
source=("lime3ds::https://github.com/Lime3DS/Lime3DS/releases/download/$pkgver/$pkgname-unified-source-$pkgver.tar.xz") | |
md5sums=('914c969f4a4018783bec3377e031b037') | |
build() { | |
# Fix to help cmake find libusb | |
- CXXFLAGS+=" -I/usr/lib/libusb-1.0" | |
+ export CFLAGS=$(echo $CFLAGS | sed 's/-Wp,-D_FORTIFY_SOURCE=3//g') | |
+ export CXXFLAGS=$(echo $CXXFLAGS | sed 's/-Wp,-D_FORTIFY_SOURCE=3//g') | |
+ CXXFLAGS+=" -I/usr/lib/libusb-1.0 -flto=thin" | |
+ CFLAGS+=" -flto=thin" | |
cmake -B build -S "$pkgname-unified-source-$pkgver" -G Ninja \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
- -DCMAKE_BUILD_TYPE=Release \ | |
+ -DCMAKE_BUILD_TYPE=None \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DENABLE_QT_TRANSLATION=ON \ | |
-DUSE_DISCORD_PRESENCE=ON \ | |
- -DCMAKE_CXX_FLAGS="-O2" \ | |
- -DCMAKE_C_FLAGS="-O2" | |
+ -DCMAKE_C_FLAGS="$CFLAGS" \ | |
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ | |
+ -DUSE_SYSTEM_BOOST=ON \ | |
+ -DUSE_SYSTEM_CATCH2=ON \ | |
+ -DUSE_SYSTEM_FMT=ON \ | |
+ -DUSE_SYSTEM_GLSLANG=ON \ | |
+ -DUSE_SYSTEM_INIH=ON \ | |
+ -DUSE_SYSTEM_JSON=ON \ | |
+ -DUSE_SYSTEM_LIBUSB=ON \ | |
+ -DUSE_SYSTEM_OPENAL=ON \ | |
+ -DUSE_SYSTEM_OPENSSL=ON \ | |
+ -DUSE_SYSTEM_SDL2=ON \ | |
+ -DUSE_SYSTEM_SOUNDTOUCH=ON \ | |
+ -DUSE_SYSTEM_VULKAN_HEADERS=ON \ | |
+ -DUSE_SYSTEM_ZSTD=ON | |
cd build | |
ninja | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment