Skip to content

Commit fc7738c

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

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed

archlinuxcn/citron-git/PKGBUILD

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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' 'shared-mime-info' 'hicolor-icon-theme' 'sdl2' 'qt6-base' 'qt6-tools' 'qt6-multimedia' 'qt6-webengine' 'libxkbcommon-x11' 'fmt' 'libzip' 'opus' 'libfdk-aac' 'lz4' 'openssl' 'zstd' 'cubeb' 'enet' 'libinih' 'discord-rpc' 'cpp-httplib' 'enet')
13+
makedepends=('llvm' 'git' 'glslang' 'cmake'
14+
# 'dynarmic' 'xbyak' 'mbedtls'
15+
# with dynarmic we have to compile glad which gives unsupported cmake command
16+
'vulkan-memory-allocator' 'vulkan-utility-libraries' 'ninja' 'graphviz' 'doxygen' 'boost' 'catch2' 'nlohmann-json' 'rapidjson' 'qt5-tools' 'desktop-file-utils' 'robin-map' 'cpp-jwt' 'vulkan-headers' 'spirv-headers' 'dos2unix' 'clang' 'python' 'renderdoc' 'gamemode' 'perl' 'yasm' 'python-jsonschema' 'python-jinja' 'patch' 'dos2unix')
17+
optdepends=('qt6-wayland: for Wayland support')
18+
source=(
19+
git+${url}.git
20+
git+https://github.com/lioncash/dynarmic.git#commit=ba8192d
21+
git+https://github.com/yuzu-mirror/sirit.git#commit=ab75463
22+
git+https://github.com/yuzu-mirror/mbedtls.git#commit=8c88150
23+
git+https://github.com/herumi/xbyak.git#commit=a1ac3750f9
24+
ffmpeg::git+https://github.com/FFmpeg/FFmpeg.git#commit=99e2af4e78
25+
git+https://github.com/brofield/simpleini.git#commit=6048871ea9
26+
"https://github.com/lat9nq/tzdb_to_nx/releases/download/221202/221202.zip"
27+
)
28+
noextract=('221202.zip')
29+
b2sums=('SKIP'
30+
'01942df0d991c75f716a524bb81bb75f7ddeeb5ae0215915e40d5d90bb53bf0a34c5bab7368e4936c859f2e08b687864d93f25dcd01da1d70fa69b890c1deaf8'
31+
'91e4cd03d67c930b6d751ca19cf6fbaaba86084412bd13b172186387ea27b461457a3e19bc0af315c807839e64f91c865298678af748e2d6e07df2abc85430ed'
32+
'6198d4eea1f6618d4bed5fc3e6103245d42080a1b7a327ae566c6cae609fde64819c8b67284ec6a79ad42afb1c07bb809411f9277ea3e03325ef1ddfa181c2d1'
33+
'10564f981204fe52c4c737a5c98ff4431e156ea0936355ee999656b7564329531fe832dfbf742642c33fbb86ab95b2a082dcd9415ef91b9089e282f535f10057'
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+
dynarmic
48+
xbyak
49+
)
50+
51+
for pro in ${submods[@]}; do
52+
if [ -d $srcdir/$_pkgname/externals/${pro} ]; then
53+
cp -rf ${srcdir}/${pro}/* $srcdir/$_pkgname/externals/${pro}
54+
else
55+
cp -rf ${srcdir}/${pro} $srcdir/$_pkgname/externals/${pro}
56+
fi
57+
done
58+
59+
cp -rf ffmpeg/* $srcdir/$_pkgname/externals/ffmpeg/ffmpeg
60+
cd $srcdir/$_pkgname
61+
sed -i CMakeLists.txt \
62+
-e '/-DBOOST_ASIO_DISABLE_CONCEPTS/d' \
63+
-e 's/1.4.307/1.4.304/g' \
64+
-e '/target_compile_options/d'
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+
}
80+
81+
build() {
82+
export CC=clang
83+
export CXX=clang++
84+
85+
local cmake_args=(
86+
-GNinja
87+
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
88+
-DTITLE_BAR_FORMAT_IDLE="$_pkgname $pkgver"
89+
-DTITLE_BAR_FORMAT_RUNNING="$_pkgname $pkgver | {3}"
90+
-DCMAKE_INSTALL_PREFIX=/usr
91+
-DCMAKE_BUILD_TYPE=Release
92+
-DCITRON_ENABLE_COMPATIBILITY_REPORTING=OFF
93+
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF
94+
-DCITRON_USE_QT_WEB_ENGINE=ON
95+
-DUSE_DISCORD_PRESENCE=ON
96+
-DENABLE_QT_TRANSLATION=ON
97+
-DCITRON_USE_BUNDLED_FFMPEG=OFF
98+
-DCITRON_USE_BUNDLED_QT=OFF
99+
-DCITRON_USE_EXTERNAL_SDL2=OFF
100+
-DCITRON_CHECK_SUBMODULES=OFF
101+
-DCITRON_USE_EXTERNAL_VULKAN_HEADERS=OFF
102+
-DCITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=OFF
103+
-DCITRON_USE_FASTER_LD=OFF
104+
-DCITRON_USE_PRECOMPILED_HEADERS=OFF
105+
-DCITRON_USE_QT_MULTIMEDIA=ON
106+
# download timezone data from our zip file.
107+
-DCITRON_DOWNLOAD_TIME_ZONE_DATA=ON
108+
-DCITRON_TESTS=OFF
109+
-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=ON
110+
-DUSE_SYSTEM_QT=ON
111+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
112+
)
113+
install -d build
114+
cmake -S ${_pkgname} -B build "${cmake_args[@]}"
115+
ninja -C build
116+
117+
}
118+
119+
package() {
120+
install -Dm644 $srcdir/${_pkgname}/dist/72-${_pkgname,,}-input.rules -t ${pkgdir}/usr/lib/udev/rules.d/
121+
DESTDIR="$pkgdir/" ninja -C $srcdir/build install
122+
123+
}

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+
email: su975853527@gmail.com
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)