This repository was archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
52 lines (48 loc) · 1.96 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: AverageMensch (https://github.com/avgmensch)
# The PKGBUILD is based on the lime3ds package from the AUR.
pkgname=lime3ds
pkgver=2119.1
pkgrel=2
arch=('x86_64')
pkgdesc='An discontinued open-source Nintendo 3DS emulator/debugger'
url='https://github.com/Lime3DS/lime3ds-archive'
license=('GPL-2.0-or-later')
depends=('sdl2' 'mbedtls' 'speexdsp' 'qt6-base' 'qt6-multimedia' 'ffmpeg' 'libfdk-aac' 'libusb' 'openssl' 'glibc' 'gcc-libs' 'sndio' 'zstd' 'soundtouch' 'fmt' 'libinih' 'openal' 'enet' 'zydis' 'boost-libs' 'glslang' 'hicolor-icon-theme')
makedepends=('git' 'cmake' 'python' 'doxygen' 'rapidjson' 'llvm' 'qt6-tools' 'gcc' 'vulkan-headers' 'nlohmann-json' 'catch2' 'clang' 'ninja' 'boost')
conflicts=('lime3ds-appimage' 'lime3ds-git')
options=('!lto')
source=("https://github.com/Lime3DS/lime3ds-archive/releases/download/$pkgver/$pkgname-unified-source-$pkgver.tar.xz")
sha256sums=('1bd7be965f0b58e368556283c861082c25b971bc5c653d36ff3179e6df34541a')
build() {
# Fix to help cmake find libusb
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=None \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-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
cmake --build build
}
package() {
DESTDIR="$pkgdir/" cmake --install build
rm -rf $pkgdir/usr/include/
}