blob: 513110bd5ca4f328a1b70d18b584d2f579aa8daf (
plain)
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
|
# Maintainer: davi <me@justdavi.dev>
pkgname=leafyrino-git
_pkgname=leafyrino
pkgver=7.5.4.r1026.g00caf19
pkgrel=1
pkgdesc='Fork of Chatterino 7 with Leafyzito custom features (git version)'
arch=('x86_64' 'aarch64')
url='https://github.com/Leafyzito/leafyrino'
license=('MIT')
install=${pkgname}.install
depends=(
'boost-libs'
'hunspell'
'libnotify'
'openssl'
'qt6-base'
'qt6-charts'
'qt6-imageformats'
'qt6-svg'
'qt6-tools'
'qtkeychain-qt6'
)
makedepends=(
'boost'
'cmake'
'git'
'ninja'
'pkgconf'
'rapidjson'
)
optdepends=(
'qt6-wayland: Wayland support'
'streamlink: piping Twitch streams to video players'
'pulseaudio: audio output'
'pipewire-pulse: audio output'
)
provides=('leafyrino')
conflicts=('leafyrino')
source=(
"git+https://github.com/Leafyzito/leafyrino.git#branch=leafyrino"
'git+https://github.com/Chatterino/libcommuni.git#branch=chatterino-cmake'
'git+https://github.com/pajlada/settings.git'
'git+https://github.com/pajlada/signals.git'
'git+https://github.com/pajlada/serialize.git'
'git+https://github.com/Neargye/magic_enum.git'
'git+https://github.com/mackron/miniaudio.git'
'git+https://github.com/lua/lua.git#branch=v5.4'
'git+https://github.com/ThePhD/sol2.git'
'git+https://github.com/Chatterino/certify.git'
'git+https://github.com/martinmoene/expected-lite.git'
'git+https://github.com/HowardHinnant/date.git'
'git+https://github.com/fmtlib/fmt.git'
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long --abbrev=7 --tags --match 'v[0-9]*' --exclude 'v2*' --exclude '*beta*' |
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/${_pkgname}"
# Keep only the submodules needed for the Linux package build. RapidJSON and
# qtkeychain are taken from Arch packages; generated EventSub JSON sources are
# already tracked, so Python dependency downloads are skipped in build().
git config submodule.cmake/sanitizers-cmake.update 'none'
git config submodule.lib/WinToast.update 'none'
git config submodule.lib/rapidjson.update 'none'
git config submodule.lib/qtkeychain.update 'none'
git config submodule.lib/googletest.update 'none'
git config submodule.lib/kimageformats.update 'none'
git config submodule.tools/crash-handler.update 'none'
git submodule init
git config submodule.lib/libcommuni.url "${srcdir}/libcommuni"
git config submodule.lib/settings.url "${srcdir}/settings"
git config submodule.lib/signals.url "${srcdir}/signals"
git config submodule.lib/serialize.url "${srcdir}/serialize"
git config submodule.lib/magic_enum.url "${srcdir}/magic_enum"
git config submodule.lib/miniaudio.url "${srcdir}/miniaudio"
git config submodule.lib/lua/src.url "${srcdir}/lua"
git config submodule.lib/sol2.url "${srcdir}/sol2"
git config submodule.lib/certify.url "${srcdir}/certify"
git config submodule.lib/expected-lite.url "${srcdir}/expected-lite"
git config submodule.lib/twitch-eventsub-ws/lib/date.url "${srcdir}/date"
git config submodule.lib/twitch-eventsub-ws/lib/fmt.url "${srcdir}/fmt"
git -c protocol.file.allow=always submodule update
}
build() {
cd "${srcdir}/${_pkgname}"
export CFLAGS+=" -ffile-prefix-map=${srcdir}=. -fmacro-prefix-map=${srcdir}=."
export CXXFLAGS+=" -ffile-prefix-map=${srcdir}=. -fmacro-prefix-map=${srcdir}=."
rm -rf build
local -a cmake_options=(
-S .
-B build
-G Ninja
-DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_PREFIX=/usr
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DBUILD_WITH_CRASHPAD=OFF
-DBUILD_WITH_QTKEYCHAIN=ON
-DUSE_SYSTEM_QTKEYCHAIN=ON
-DUSE_PRECOMPILED_HEADERS=OFF
-DCHATTERINO_NO_AVIF_PLUGIN=ON
-DCHATTERINO_PLUGINS=ON
-DCHATTERINO_SPELLCHECK=ON
-DCHATTERINO_UPDATER=OFF
-DSKIP_JSON_GENERATION=ON
)
if [[ ${CXXFLAGS} == *'-flto'* ]]; then
cmake_options+=(-DCHATTERINO_LTO=ON)
fi
cmake "${cmake_options[@]}"
cmake --build build
}
package() {
cd "${srcdir}/${_pkgname}"
DESTDIR="${pkgdir}" cmake --install build
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|