1
1
# Maintainer: username227 <gfrank227 [at] gmail [dot] com>
2
2
_pkgname=Citron
3
+ _xbyak_tag=7.24.2
3
4
pkgname=${_pkgname,,} -git
4
- pkgver=0.6.1.canary.refresh.r14
5
+ pkgver=0.6.1.canary.refresh.r15
5
6
pkgrel=1
6
7
pkgdesc=" Nintendo Switch emulator forked from yuzu"
7
8
arch=(x86_64)
8
9
url=https://git.citron-emu.org/Citron/Citron
9
10
license=(GPL-3.0-or-later)
10
11
provides=(' citron' )
11
12
conflicts=(' citron' )
12
- depends=(' boost-libs' ' hicolor-icon-theme' ' sdl2' ' qt6-base' ' qt6-webengine' ' fmt' ' opus' ' lz4' ' openssl ' ' zstd ' ' cubeb ' ' enet ' ' discord-rpc ' ' cpp-httplib ' ' dynarmic ' )
13
- makedepends=( ' llvm ' ' git ' ' glslang ' ' cmake '
14
- # 'xbyak' 'mbedtls'
15
- # with xbyak we got the runtime err: terminate called after throwing an instance of 'Xbyak::Error' what(): bad size of register
13
+ depends=(' boost-libs' ' hicolor-icon-theme' ' sdl2' ' qt6-base' ' qt6-webengine' ' fmt' ' opus' ' lz4'
14
+ ' openssl ' ' zstd ' ' cubeb ' ' enet ' ' discord-rpc ' ' cpp-httplib ' ' dynarmic ' ' mbedtls2 ' ' ffmpeg '
15
+ )
16
+ makedepends=( ' llvm ' ' git ' ' glslang ' ' cmake ' ' ninja ' ' perl ' ' clang '
16
17
' qt6-tools' ' qt6-multimedia' ' libxkbcommon-x11' ' libzip' ' libfdk-aac' ' libinih'
17
- ' vulkan-memory-allocator' ' vulkan-utility-libraries'
18
- ' ninja' ' graphviz' ' doxygen' ' boost' ' catch2' ' nlohmann-json' ' rapidjson' ' robin-map' ' cpp-jwt' ' vulkan-headers' ' spirv-headers' ' clang' ' python' ' renderdoc'
19
- ' gamemode' ' perl' ' yasm' ' python-jsonschema' ' python-jinja' )
18
+ ' vulkan-memory-allocator' ' vulkan-utility-libraries' ' vulkan-headers' ' spirv-headers'
19
+ ' boost' ' nlohmann-json' ' robin-map' ' cpp-jwt' ' gamemode' ' python' ' renderdoc'
20
+
21
+ # 'xbyak'
22
+ # with xbyak we get the runtime err:
23
+ # terminate called after throwing an instance of 'Xbyak::Error' what(): bad size of register
24
+
25
+ # for documentation
26
+ # 'doxygen' 'python-jinja' 'python-jsonschema' 'graphviz'
27
+
28
+ # for testing
29
+ # 'catch2'
30
+ )
20
31
optdepends=(' qt6-wayland: for Wayland support' )
21
32
source=(
22
33
git+${url} .git
23
34
git+https://github.com/yuzu-mirror/sirit.git#commit=ab75463
24
- git+https://github.com/yuzu-mirror/mbedtls.git#commit=8c88150
25
- git+https://github.com/herumi/xbyak.git#commit=a1ac3750f9
26
- ffmpeg::git+https://github.com/FFmpeg/FFmpeg.git#commit=99e2af4e78
35
+ git+https://github.com/herumi/xbyak.git#tag=v${_xbyak_tag:- 7.22}
36
+ # citron use xbyak v6.68 by default, but v7.22 is okay
27
37
git+https://github.com/brofield/simpleini.git#commit=6048871ea9
28
38
" https://github.com/lat9nq/tzdb_to_nx/releases/download/221202/221202.zip"
29
39
)
30
40
noextract=(' 221202.zip' )
31
41
b2sums=(' SKIP'
32
42
' 91e4cd03d67c930b6d751ca19cf6fbaaba86084412bd13b172186387ea27b461457a3e19bc0af315c807839e64f91c865298678af748e2d6e07df2abc85430ed'
33
- ' 6198d4eea1f6618d4bed5fc3e6103245d42080a1b7a327ae566c6cae609fde64819c8b67284ec6a79ad42afb1c07bb809411f9277ea3e03325ef1ddfa181c2d1'
34
- ' 10564f981204fe52c4c737a5c98ff4431e156ea0936355ee999656b7564329531fe832dfbf742642c33fbb86ab95b2a082dcd9415ef91b9089e282f535f10057'
35
- ' ebc933862e140d108fa13328f8c4a6a3dbdf2a2155fbe9318c950fea2a700d0e64a646dcc96e9b54a68c2f261b1b2b12587a7fe0fc2490566e370a76a1470fc2'
43
+ ' c3cd6fdac08d04ff996a082d51b87c98a46a0c07b17cf1c9e794c4fbb284860e6355c7c4d7b41a66293d8181ec17a18dac772fac384a324b6e7e144540430ac5'
36
44
' fae42bb13f180ab991f6bfc8a45ea3df08ced1d77db77f54cf5a222f93ea468bd6fc0d36d65f9f3739e9813d77dbae31931948dc9afa28e884c53b8128c13c94'
37
45
' 7bd0ff5ca80cf560344ae7edbfeb7c9466c096dc499a7348276cff5d30aa07464f7e2ea391ca9cedac0e21ba6f563169a8b38f2df729a230a0acfb1125ea1b66' )
38
46
pkgver () {
@@ -44,7 +52,6 @@ prepare() {
44
52
local submods=(
45
53
sirit
46
54
simpleini
47
- mbedtls
48
55
xbyak
49
56
)
50
57
@@ -56,7 +63,6 @@ prepare() {
56
63
fi
57
64
done
58
65
59
- cp -rf ffmpeg/* $srcdir /$_pkgname /externals/ffmpeg/ffmpeg
60
66
cd $srcdir /$_pkgname
61
67
sed -i CMakeLists.txt \
62
68
-e ' /-DBOOST_ASIO_DISABLE_CONCEPTS/d' \
@@ -66,27 +72,41 @@ prepare() {
66
72
-e ' s|^add\_subdirectory(src)|add_subdirectory(externals)\n add_subdirectory(src)#|g'
67
73
sed -i src/CMakeLists.txt \
68
74
-e ' s|-Werror=shadow$|-Wno-error=shadow|g' \
69
- -e ' s|-Werror=unused$|-Wno-error=unused|g'
70
-
75
+ -e ' s|-Werror=unused$|-Wno-error=unused|g' \
76
+ -e ' s|include_directories(.|include_directories(. /usr/include/mbedtls2|g' \
77
+ -e ' /include_directories/a link_directories(/usr/lib/mbedtls2)'
78
+ sed -i src/${_pkgname,,} _cmd/CMakeLists.txt \
79
+ -e " /target_include_directories(${_pkgname,,} -cmd/a target_link_libraries(${_pkgname,,} -cmd PRIVATE mbedtls mbedcrypto)"
80
+ sed -i src/${_pkgname,,} /CMakeLists.txt \
81
+ -e " /target_sources(${_pkgname,,} /i target_link_libraries(${_pkgname,,} PRIVATE mbedtls mbedcrypto)"
71
82
sed -i src/video_core/host_shaders/CMakeLists.txt \
72
83
-e ' s/--quiet //g' \
73
84
-e ' s#${SPIRV_HEADER_FILE} ${SOURCE_FILE}#${SPIRV_HEADER_FILE} ${SOURCE_FILE} 2>/dev/null#g'
74
85
sed -i -e ' s| (%2)||' src/${_pkgname,,} /aboutdialog.ui
75
86
sed -i -e ' s|io_service|io_context|g' src/input_common/drivers/udp_client.cpp src/tests/input_common/calibration_configuration_job.cpp
76
- sed -i -e ' s|u64|std::uint64_t|g' src/citron /discord_impl.h
87
+ sed -i -e ' s|u64|std::uint64_t|g' src/${_pkgname,,} /discord_impl.h
77
88
sed -i -e " s|https://github.com/lat9nq/tzdb_to_nx/releases/download/\$ {NX_TZDB_VERSION}|file://${srcdir} |g" externals/nx_tzdb/CMakeLists.txt
78
89
79
90
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
80
-
81
91
# see dynarmic 6.7.0 changelog
82
92
sed -i src/core/arm/dynarmic/arm_dynarmic_{32,64}.cpp \
83
93
-e ' /fastmem_pointer/s/nullptr/std::nullopt/g' \
84
94
-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'
95
+
96
+ # this line causes crash, introduced in commit 54173384271
97
+ sed -i externals/xbyak/xbyak/xbyak.h \
98
+ -e ' /if (!(type & T_ALLOW_DIFF_SIZE) && r1.isREG() && r2.isREG() && r1.getBit() != r2.getBit()) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER)/d'
99
+ # system mbedtls
100
+ sed -i externals/CMakeLists.txt \
101
+ -e ' /add_subdirectory(mbedtls)/c pkg_check_modules(MbedTLS REQUIRED IMPORTED_TARGET GLOBAL mbedtls mbedcrypto)' \
102
+ -e ' /target_include_directories(mbedtls/d' \
103
+ -e ' /^ *target_compile_options(mbedcrypto/,/)/ { s/^/#/ }'
85
104
}
86
105
87
106
build () {
88
107
export CC=clang
89
108
export CXX=clang++
109
+ export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} :/usr/lib/mbedtls2/pkgconfig
90
110
91
111
local cmake_args=(
92
112
-GNinja
0 commit comments