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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
# Contributor: Charlotte <cemetery394@gmail.com>
pkgname=citron-neo
pkgver=2026.04.27
pkgrel=4
pkgdesc="Nintendo Switch emulator fork from citron-neo (git version)"
arch=('x86_64')
url="https://github.com/citron-neo/emulator"
license=('GPL-3.0-or-later')
depends=(
'brotli' 'libgcc' 'lz4' 'glibc' 'zstd' 'sdl2' 'zlib' 'opus'
'boost-libs' 'ffmpeg' 'libusb' 'openssl' 'speexdsp' 'libva'
'hicolor-icon-theme' 'qt6-base' 'enet' 'openal' 'fmt'
'libstdc++' 'qt6-webengine'
)
makedepends=(
'git' 'cmake' 'ninja' 'python' 'boost' 'nlohmann-json'
'qt6-tools' 'qt6-svg' 'qt6-multimedia' 'qt6-webengine'
'vulkan-headers' 'rapidjson' 'clang' 'lld'
)
provides=('citron' 'citron-git' "${pkgname::-4}")
conflicts=('citron' 'citron-git' "${pkgname::-4}")
source=("git+https://github.com/citron-neo/emulator.git#tag=${pkgver//./-}"
"git+https://github.com/lsalzman/enet.git"
"git+https://github.com/mozilla/cubeb.git"
"git+https://github.com/xinitrcn1/dynarmic.git"
"git+https://github.com/libusb/libusb.git"
"git+https://github.com/yuzu-mirror/discord-rpc.git"
"git+https://github.com/KhronosGroup/Vulkan-Headers.git"
"git+https://github.com/yuzu-mirror/sirit.git"
"git+https://github.com/yuzu-mirror/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"
"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://github.com/yuzu-mirror/breakpad.git"
"git+https://github.com/brofield/simpleini.git"
"git+https://github.com/yuzu-mirror/oaknut"
"git+https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git"
"git+https://github.com/KhronosGroup/SPIRV-Headers"
"git+https://github.com/martinus/unordered_dense.git"
#cubeb submodules
"git+https://github.com/google/googletest.git"
"git+https://github.com/arsenm/sanitizers-cmake.git"
#dynarmic's submodules
"git+https://github.com/lioncash/biscuit.git"
"catch::git+https://github.com/catchorg/Catch2.git"
"git+https://github.com/fmtlib/fmt.git"
"oaknut-merryhime::git+https://github.com/merryhime/oaknut.git"
#xbyak and unordered_dense are also dynarmic submodules
#libadrenotools submodules
"git+https://github.com/bylaws/liblinkernsbypass.git"
#tzdb_to_nx submodules
"git+https://github.com/eggert/tz.git"
#sirit submodules includes SPIRV-Headers
"fix.patch::https://github.com/citron-neo/emulator/commit/bb6ca099e7f8ae5dc6de33da52419a4a62b95ada.diff"
)
sha256sums=('725134f15505326c4e175a7789bbdd91021baa5d0e54e6b97a60d4c05af36830'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'1120a1fb92143791127c3516938aaf371ec92ad85adb076b707183d6d2873383')
prepare() {
cd emulator
git submodule init
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
git config submodule.${_submodule}.url "$srcdir/${_submodule}"
done
git config submodule.externals/SPIRV-Headers.url "$srcdir/SPIRV-Headers"
git config submodule.externals/unordered_dense.url "$srcdir/unordered_dense"
git -c protocol.file.allow=always submodule update
pushd externals/cubeb
git submodule init
git config submodule.googletest.url "$srcdir/googletest"
git config submodule.cmake/sanitizers-cmake.url "$srcdir/sanitizers-cmake"
git -c protocol.file.allow=always submodule update
popd
pushd externals/dynarmic
git submodule init
for _submodule in {biscuit,catch,fmt,xbyak}
do
git config submodule.${_submodule}.url "$srcdir/${_submodule}"
done
git config submodule.oaknut.url "$srcdir/oaknut-merryhime"
git config submodule.externals/unordered_dense.url "$srcdir/unordered_dense"
git -c protocol.file.allow=always submodule update
popd
pushd externals/libadrenotools
git submodule init
git config submodule.lib/linkernsbypass.url "$srcdir/liblinkernsbypass"
git -c protocol.file.allow=always submodule update
popd
pushd externals/nx_tzdb/tzdb_to_nx
git submodule init
git config submodule.externals/tz/tz.url "$srcdir/tz"
git -c protocol.file.allow=always submodule update
popd
pushd externals/sirit
git submodule init
git config submodule.externals/SPIRV-Headers.url "$srcdir/SPIRV-Headers"
git -c protocol.file.allow=always submodule update
popd
patch -Np1 < "$srcdir/fix.patch"
}
build() {
cd "$srcdir"
export CFLAGS="${CFLAGS} -DNDEBUG -flto=thin"
export CXXFLAGS="${CXXFLAGS} -DNDEBUG -flto=thin"
export LDFLAGS="$LDFLAGS -fuse-ld=lld"
cmake -B build -S emulator -G Ninja \
-DCMAKE_BUILD_TYPE= \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCITRON_USE_BUNDLED_FFMPEG=OFF \
-DCITRON_USE_BUNDLED_QT=OFF \
-DCITRON_USE_EXTERNAL_VULKAN_HEADERS=ON \
-DCITRON_USE_EXTERNAL_SDL2=OFF \
-DCITRON_USE_QT_MULTIMEDIA=ON \
-DCITRON_USE_QT_WEB_ENGINE=ON \
-DCITRON_DOWNLOAD_TIME_ZONE_DATA=ON \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DCITRON_USE_FASTER_LD=OFF \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS" \
-DTITLE_BAR_FORMAT_RUNNING="citron-neo | ${pkgver} {}" \
-DTITLE_BAR_FORMAT_IDLE="citron-neo | ${pkgver} {}" \
-DBUILD_ID="archlinux.org" \
-DCITRON_TESTS=OFF \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++
cmake --build build
}
package() {
cd "$srcdir"
DESTDIR="$pkgdir" cmake --install build
#install -Dm644 dist/org.citron_emu.citron.desktop "$pkgdir/usr/share/applications/citron.desktop" 2>/dev/null || true
#install -Dm644 dist/citron.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/citron.svg" 2>/dev/null || true
install -Dm644 "$srcdir/emulator/dist/72-citron-input.rules" "$pkgdir/usr/lib/udev/rules.d/72-citron-input.rules"
sed -i 's/KERNEL==/ACTION!="remove", KERNEL==/' "$pkgdir/usr/lib/udev/rules.d/72-citron-input.rules"
sed -i 's/Name=citron/Name=Citron-Neo/g' "$pkgdir/usr/share/applications/org.citron_emu.citron.desktop"
}
|