Skip to content

Commit 83e3441

Browse files
committed
add citron-git
1 parent 6bd9cf1 commit 83e3441

File tree

2 files changed

+155
-0
lines changed

2 files changed

+155
-0
lines changed

archlinuxcn/citron-git/PKGBUILD

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Maintainer: username227 <gfrank227 [at] gmail [dot] com>
2+
_pkgname=Citron
3+
pkgname=${_pkgname,,}-git
4+
pkgver=0.6.1.canary.refresh.r14
5+
pkgrel=1
6+
pkgdesc="Nintendo Switch emulator forked from yuzu"
7+
arch=(x86_64)
8+
url=https://git.citron-emu.org/Citron/Citron
9+
license=(GPL-3.0-or-later)
10+
provides=('citron')
11+
conflicts=('citron')
12+
depends=('boost-libs' 'hicolor-icon-theme' 'sdl2' 'qt6-base' 'qt6-webengine' 'fmt' 'opus' 'lz4' 'openssl' 'zstd'
13+
'cubeb' 'enet' 'discord-rpc' 'cpp-httplib' 'enet'
14+
'dynarmic'
15+
)
16+
makedepends=('llvm' 'git' 'glslang' 'cmake'
17+
'xbyak'
18+
# 'mbedtls'
19+
'qt6-tools' 'qt6-multimedia' 'libxkbcommon-x11' 'libzip' 'libfdk-aac' 'libinih'
20+
'vulkan-memory-allocator' 'vulkan-utility-libraries' 'ninja' 'graphviz' 'doxygen' 'boost' 'catch2' 'nlohmann-json' 'rapidjson' 'desktop-file-utils' 'robin-map' 'cpp-jwt' 'vulkan-headers' 'spirv-headers' 'dos2unix' 'clang' 'python' 'renderdoc' 'gamemode' 'perl' 'yasm' 'python-jsonschema' 'python-jinja')
21+
optdepends=('qt6-wayland: for Wayland support')
22+
source=(
23+
git+${url}.git
24+
git+https://github.com/yuzu-mirror/sirit.git#commit=ab75463
25+
git+https://github.com/yuzu-mirror/mbedtls.git#commit=8c88150
26+
ffmpeg::git+https://github.com/FFmpeg/FFmpeg.git#commit=99e2af4e78
27+
git+https://github.com/brofield/simpleini.git#commit=6048871ea9
28+
"https://github.com/lat9nq/tzdb_to_nx/releases/download/221202/221202.zip"
29+
)
30+
noextract=('221202.zip')
31+
b2sums=('SKIP'
32+
'91e4cd03d67c930b6d751ca19cf6fbaaba86084412bd13b172186387ea27b461457a3e19bc0af315c807839e64f91c865298678af748e2d6e07df2abc85430ed'
33+
'6198d4eea1f6618d4bed5fc3e6103245d42080a1b7a327ae566c6cae609fde64819c8b67284ec6a79ad42afb1c07bb809411f9277ea3e03325ef1ddfa181c2d1'
34+
'ebc933862e140d108fa13328f8c4a6a3dbdf2a2155fbe9318c950fea2a700d0e64a646dcc96e9b54a68c2f261b1b2b12587a7fe0fc2490566e370a76a1470fc2'
35+
'fae42bb13f180ab991f6bfc8a45ea3df08ced1d77db77f54cf5a222f93ea468bd6fc0d36d65f9f3739e9813d77dbae31931948dc9afa28e884c53b8128c13c94'
36+
'7bd0ff5ca80cf560344ae7edbfeb7c9466c096dc499a7348276cff5d30aa07464f7e2ea391ca9cedac0e21ba6f563169a8b38f2df729a230a0acfb1125ea1b66')
37+
pkgver() {
38+
cd "$srcdir/$_pkgname"
39+
git describe --long --abbrev=7 --tags | sed 's/\([^-]*\)-g.*/r\1/;s/-/./g;s/^v//g'
40+
}
41+
42+
prepare() {
43+
local submods=(
44+
sirit
45+
simpleini
46+
mbedtls
47+
)
48+
49+
for pro in ${submods[@]}; do
50+
if [ -d $srcdir/$_pkgname/externals/${pro} ]; then
51+
cp -rf ${srcdir}/${pro}/* $srcdir/$_pkgname/externals/${pro}
52+
else
53+
cp -rf ${srcdir}/${pro} $srcdir/$_pkgname/externals/${pro}
54+
fi
55+
done
56+
57+
cp -rf ffmpeg/* $srcdir/$_pkgname/externals/ffmpeg/ffmpeg
58+
cd $srcdir/$_pkgname
59+
sed -i CMakeLists.txt \
60+
-e '/-DBOOST_ASIO_DISABLE_CONCEPTS/d' \
61+
-e 's/1.4.307/1.4.304/g' \
62+
-e '/target_compile_options/d' \
63+
-e '/add_subdirectory(externals)/d' \
64+
-e 's|^add\_subdirectory(src)|add_subdirectory(externals)\n add_subdirectory(src)#|g'
65+
sed -i src/CMakeLists.txt \
66+
-e 's|-Werror=shadow$|-Wno-error=shadow|g' \
67+
-e 's|-Werror=unused$|-Wno-error=unused|g'
68+
69+
sed -i src/video_core/host_shaders/CMakeLists.txt \
70+
-e 's/--quiet //g' \
71+
-e 's#${SPIRV_HEADER_FILE} ${SOURCE_FILE}#${SPIRV_HEADER_FILE} ${SOURCE_FILE} 2>/dev/null#g'
72+
sed -i -e 's| (%2)||' src/${_pkgname,,}/aboutdialog.ui
73+
sed -i -e 's|io_service|io_context|g' src/input_common/drivers/udp_client.cpp src/tests/input_common/calibration_configuration_job.cpp
74+
sed -i -e 's|u64|std::uint64_t|g' src/citron/discord_impl.h
75+
sed -i -e "s|https://github.com/lat9nq/tzdb_to_nx/releases/download/\${NX_TZDB_VERSION}|file://${srcdir}|g" externals/nx_tzdb/CMakeLists.txt
76+
77+
perl -0777 -i.original -pe 's/(\s*target_compile_options\(video_core PRIVATE\s*-Wno-sign-conversion)/$1\n -msse4.1/igs' src/video_core/CMakeLists.txt
78+
79+
# see dynarmic 6.7.0 changelog
80+
sed -i src/core/arm/dynarmic/arm_dynarmic_{32,64}.cpp \
81+
-e '/fastmem_pointer/s/nullptr/std::nullopt/g' \
82+
-e 's|page_table->fastmem_arena;|(page_table->fastmem_arena != nullptr) ? std::optional<uintptr_t>{reinterpret_cast<uintptr_t>(page_table->fastmem_arena)} : std::nullopt;|g'
83+
}
84+
85+
build() {
86+
export CC=clang
87+
export CXX=clang++
88+
89+
local cmake_args=(
90+
-GNinja
91+
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
92+
-DTITLE_BAR_FORMAT_IDLE="$_pkgname $pkgver"
93+
-DTITLE_BAR_FORMAT_RUNNING="$_pkgname $pkgver | {3}"
94+
-DCMAKE_INSTALL_PREFIX=/usr
95+
-DCMAKE_BUILD_TYPE=Release
96+
-DCITRON_ENABLE_COMPATIBILITY_REPORTING=OFF
97+
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF
98+
-DCITRON_USE_QT_WEB_ENGINE=ON
99+
-DUSE_DISCORD_PRESENCE=ON
100+
-DENABLE_QT_TRANSLATION=ON
101+
-DCITRON_USE_BUNDLED_FFMPEG=OFF
102+
-DCITRON_USE_BUNDLED_QT=OFF
103+
-DCITRON_USE_EXTERNAL_SDL2=OFF
104+
-DCITRON_CHECK_SUBMODULES=OFF
105+
-DCITRON_USE_EXTERNAL_VULKAN_HEADERS=OFF
106+
-DCITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=OFF
107+
-DCITRON_USE_FASTER_LD=OFF
108+
-DCITRON_USE_PRECOMPILED_HEADERS=OFF
109+
-DCITRON_USE_QT_MULTIMEDIA=ON
110+
# download timezone data from our zip file.
111+
-DCITRON_DOWNLOAD_TIME_ZONE_DATA=ON
112+
-DCITRON_TESTS=OFF
113+
-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON
114+
-DUSE_SYSTEM_QT=ON
115+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
116+
)
117+
install -d build
118+
cmake -S ${_pkgname} -B build "${cmake_args[@]}"
119+
ninja -C build
120+
121+
}
122+
123+
package() {
124+
install -Dm644 $srcdir/${_pkgname}/dist/72-${_pkgname,,}-input.rules -t ${pkgdir}/usr/lib/udev/rules.d/
125+
DESTDIR="$pkgdir/" ninja -C $srcdir/build install
126+
127+
}

archlinuxcn/citron-git/lilac.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file is auto-generated by n2y
2+
3+
maintainers:
4+
- github: sukanka
5+
6+
7+
build_prefix: extra-x86_64
8+
9+
pre_build: vcs_update
10+
11+
post_build: git_pkgbuild_commit
12+
13+
repo_depends:
14+
- discord-rpc-git
15+
- cubeb-git
16+
- cpp-httplib
17+
- cpp-jwt
18+
- vulkan-memory-allocator-git
19+
20+
update_on:
21+
- source: alpm
22+
alpm: fmt
23+
repo: extra
24+
- source: alpm
25+
alpm: openssl
26+
- alias: boost
27+
- source: vcs
28+
vcs: git+https://git.citron-emu.org/Citron/Citron.git

0 commit comments

Comments
 (0)