blob: 4e025b94bbc4770e1c4dc9e72c65e832e7779de2 (
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
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
|
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.16.0
EAPI=8
CRATES="
aho-corasick@1.1.3
anstream@0.6.20
anstyle-parse@0.2.7
anstyle-query@1.1.4
anstyle-wincon@3.0.10
anstyle@1.0.11
anyhow@1.0.99
ash@0.38.0+1.3.281
bindgen@0.72.1
bitflags@2.13.1
bytemuck@1.23.2
bytemuck_derive@1.10.1
cc@1.2.36
cexpr@0.6.0
cfg-if@1.0.3
cfg_aliases@0.2.1
clang-sys@1.8.1
clap@4.5.47
clap_builder@4.5.47
clap_complete@4.5.57
clap_derive@4.5.47
clap_lex@0.7.5
colorchoice@1.0.4
deranged@0.5.3
downcast-rs@1.2.1
drm-ffi@0.9.0
drm-fourcc@2.2.0
drm-sys@0.8.0
drm@0.14.1
either@1.15.0
errno@0.3.14
ffmpeg-next@8.1.0
find-msvc-tools@0.1.1
glob@0.3.3
heck@0.5.0
hermit-abi@0.5.2
human-size@0.4.3
is_terminal_polyfill@1.70.1
itertools@0.13.0
itoa@1.0.15
libc@0.2.175
libloading@0.8.8
linux-raw-sys@0.4.15
linux-raw-sys@0.6.5
linux-raw-sys@0.9.4
log-once@0.4.1
log@0.4.28
memchr@2.7.5
minimal-lexical@0.2.1
mio@1.0.4
nix@0.30.1
nom@7.1.3
num-conv@0.1.0
num_cpus@1.17.0
num_threads@0.1.7
once_cell_polyfill@1.70.1
pkg-config@0.3.32
powerfmt@0.2.0
proc-macro2@1.0.101
quick-xml@0.37.5
quote@1.0.40
regex-automata@0.4.10
regex-syntax@0.8.6
regex@1.11.2
rustc-hash@2.1.1
rustix@0.38.44
rustix@1.0.8
ryu@1.0.20
serde@1.0.219
serde_derive@1.0.219
serde_json@1.0.143
shlex@1.3.0
signal-hook-mio@0.2.4
signal-hook-registry@1.4.6
signal-hook@0.3.18
simplelog@0.12.2
smallvec@1.15.1
strsim@0.11.1
syn@2.0.106
termcolor@1.4.1
thiserror-impl@2.0.16
thiserror@2.0.16
time-core@0.1.6
time-macros@0.2.24
time@0.3.43
unicode-ident@1.0.18
utf8parse@0.2.2
vcpkg@0.2.15
wasi@0.11.1+wasi-snapshot-preview1
wayland-backend@0.3.11
wayland-client@0.31.11
wayland-protocols-wlr@0.3.9
wayland-protocols@0.32.9
wayland-scanner@0.31.7
wayland-sys@0.31.7
winapi-util@0.1.11
windows-link@0.1.3
windows-link@0.2.0
windows-sys@0.59.0
windows-sys@0.60.2
windows-sys@0.61.0
windows-targets@0.52.6
windows-targets@0.53.3
windows_aarch64_gnullvm@0.52.6
windows_aarch64_gnullvm@0.53.0
windows_aarch64_msvc@0.52.6
windows_aarch64_msvc@0.53.0
windows_i686_gnu@0.52.6
windows_i686_gnu@0.53.0
windows_i686_gnullvm@0.52.6
windows_i686_gnullvm@0.53.0
windows_i686_msvc@0.52.6
windows_i686_msvc@0.53.0
windows_x86_64_gnu@0.52.6
windows_x86_64_gnu@0.53.0
windows_x86_64_gnullvm@0.52.6
windows_x86_64_gnullvm@0.53.0
windows_x86_64_msvc@0.52.6
windows_x86_64_msvc@0.53.0
"
declare -A GIT_CRATES=(
[ffmpeg-sys-next]='https://github.com/russelltg/rust-ffmpeg-sys;233554c454386b5a3493a20d2c1c4331e8de1090;rust-ffmpeg-sys-%commit%'
)
RUST_MIN_VER="1.85.0"
LLVM_COMPAT=( {19..22} )
inherit cargo shell-completion llvm-r2
DESCRIPTION="High performance screen/audio recorder for wlroots"
HOMEPAGE="https://github.com/russelltg/wl-screenrec"
SRC_URI="
https://github.com/russelltg/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
${CARGO_CRATE_URIS}
"
LICENSE="Apache-2.0 BSD ISC MIT Unicode-3.0 WTFPL-2"
SLOT="0"
KEYWORDS="~amd64"
# We need a running Wayland compositor for the tests to work
RESTRICT="test"
PATCHES=(
"${FILESDIR}/${P}-update_ffmpeg.patch"
)
BDEPEND="
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
')
"
RDEPEND="
media-video/ffmpeg:=[vaapi]
x11-libs/libdrm
"
DEPEND="
${RDEPEND}
"
QA_FLAGS_IGNORED="usr/bin/${PN}"
pkg_setup() {
llvm-r2_pkg_setup
rust_pkg_setup
}
src_prepare() {
default
CUSTOM_FFMPEG="rust-ffmpeg-sys-233554c454386b5a3493a20d2c1c4331e8de1090"
PACKAGE_HASH="7a2a9eb3135a9ec64df9164b15781df2d8bb7a52ad76738bf0c2d65df3f36df3"
FFMPEG_VENDOR="${ECARGO_VENDOR}/ffmpeg-sys-next-8.0.1"
# ${ECARGO_VENDOR} is defined in cargo.eclass
cp -r "${WORKDIR}/${CUSTOM_FFMPEG}" "${FFMPEG_VENDOR}" || \
die "Could not move the patched version of ffmpeg-sys-next into the vendor directory"
echo "{\"package\": \"${PACKAGE_HASH}\", \"files\": {}}" > "${FFMPEG_VENDOR}/.cargo-checksum.json"
}
src_compile() {
cargo_src_compile
./"$(cargo_target_dir)/${PN}" --generate-completions bash > "${S}/wl-screenrec" || \
die "Could not generate bash completion"
./"$(cargo_target_dir)/${PN}" --generate-completions fish > "${S}/wl-screenrec.fish" || \
die "Could not generate fish completion"
./"$(cargo_target_dir)/${PN}" --generate-completions zsh > "${S}/_wl-screenrec" || \
die "Could not generate zsh completion"
}
src_install() {
cargo_src_install
dobashcomp "${S}/wl-screenrec" || die "Could not install bash completion"
dofishcomp "${S}/wl-screenrec.fish" || die "Could not install fish completion"
dozshcomp "${S}/_wl-screenrec" || die "Could not install zsh completion"
}
pkg_postinst() {
elog "You need a wayland compositor that supports the"
elog "following unstable protocols:"
elog " - wlr-output-management-unstable-v1"
elog " - wlr-screencopy-unstable-v1"
elog "You should also make sure you have the correct librairies"
elog "installed. See: https://trac.ffmpeg.org/wiki/Hardware/VAAPI"
}
|