blob: a14053cec2f0a4526391537af42a61602b662c3a (
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
|
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# May need to use cargo-ebuild to generate this list to get workspace crates.
CRATES="
aho-corasick@1.1.3
alloc-no-stdlib@2.0.4
alloc-stdlib@0.2.2
autocfg@1.4.0
aws-lc-fips-sys@0.13.0
aws-lc-rs@1.12.0
aws-lc-sys@0.24.0
bindgen@0.69.5
bitflags@2.6.0
brotli@7.0.0
brotli-decompressor@4.0.1
bytes@1.9.0
cc@1.2.5
cesu8@1.1.0
cexpr@0.6.0
cfg-if@1.0.0
clang-sys@1.8.1
cmake@0.1.52
combine@4.6.7
core-foundation@0.10.0
core-foundation-sys@0.8.7
dunce@1.0.5
either@1.13.0
errno@0.3.10
fs_extra@1.3.0
getrandom@0.2.15
glob@0.3.1
hashbrown@0.12.3
home@0.5.11
indexmap@1.9.3
itertools@0.12.1
jni@0.21.1
jni-sys@0.3.0
jobserver@0.1.32
lazy_static@1.5.0
lazycell@1.3.0
libc@0.2.171
libloading@0.8.6
linux-raw-sys@0.4.14
log@0.4.26
memchr@2.7.4
minimal-lexical@0.2.1
nom@7.1.3
nom8@0.2.0
once_cell@1.20.2
openssl-probe@0.1.5
paste@1.0.15
prettyplease@0.2.25
proc-macro2@1.0.92
quote@1.0.37
regex@1.11.1
regex-automata@0.4.9
regex-syntax@0.8.5
ring@0.17.8
rustc-hash@1.1.0
rustix@0.38.42
rustls@0.23.25
rustls-native-certs@0.8.1
rustls-pki-types@1.11.0
rustls-platform-verifier@0.5.1
rustls-platform-verifier-android@0.1.1
rustls-webpki@0.103.0
rustversion@1.0.18
same-file@1.0.6
schannel@0.1.27
security-framework@3.1.0
security-framework-sys@2.13.0
serde@1.0.219
serde_derive@1.0.219
serde_spanned@0.6.8
shlex@1.3.0
spin@0.9.8
subtle@2.6.1
syn@2.0.90
thiserror@1.0.69
thiserror-impl@1.0.69
toml@0.6.0
toml_datetime@0.5.1
toml_edit@0.18.1
unicode-ident@1.0.14
untrusted@0.9.0
walkdir@2.5.0
wasi@0.11.0+wasi-snapshot-preview1
webpki-root-certs@0.26.7
which@4.4.2
winapi-util@0.1.9
windows-sys@0.45.0
windows-sys@0.52.0
windows-sys@0.59.0
windows-targets@0.42.2
windows-targets@0.52.6
windows_aarch64_gnullvm@0.42.2
windows_aarch64_gnullvm@0.52.6
windows_aarch64_msvc@0.42.2
windows_aarch64_msvc@0.52.6
windows_i686_gnu@0.42.2
windows_i686_gnu@0.52.6
windows_i686_gnullvm@0.52.6
windows_i686_msvc@0.42.2
windows_i686_msvc@0.52.6
windows_x86_64_gnu@0.42.2
windows_x86_64_gnu@0.52.6
windows_x86_64_gnullvm@0.42.2
windows_x86_64_gnullvm@0.52.6
windows_x86_64_msvc@0.42.2
windows_x86_64_msvc@0.52.6
zeroize@1.8.1
zlib-rs@0.4.1
"
RUST_MULTILIB=1
inherit cargo flag-o-matic multilib-minimal rust-toolchain
DESCRIPTION="C-to-rustls bindings"
HOMEPAGE="https://github.com/rustls/rustls-ffi"
SRC_URI="https://github.com/rustls/rustls-ffi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" ${CARGO_CRATE_URIS}"
# Strictly speaking the core package is "|| ( Apache-2.0 MIT ISC )"
# but dependencies explicitly require at least one of each.
LICENSE+=" Apache-2.0 BSD ISC MIT Unicode-3.0 MPL-2.0"
# For Ring (see its LICENSE)
LICENSE+=" ISC openssl SSLeay MIT"
SLOT="0/${PV%.*}"
KEYWORDS="~amd64"
BDEPEND="dev-util/cargo-c"
QA_FLAGS_IGNORED="usr/lib.*/librustls.*"
src_prepare() {
default
# Currently only used for development, we can skip this
# and significantly reduce the number of required crates.
# Produces a docgen binary that we may want to use in the future. Just API docs?
rm -r tools || die
sed '/ "tools"/d' -i Cargo.toml || die
cargo_update_crates
multilib_copy_sources
}
src_configure() {
# bug #927231
filter-lto
multilib-minimal_src_configure
}
src_compile() {
multilib-minimal_src_compile
}
multilib_src_compile() {
local cargoargs=(
--library-type=cdylib
--prefix="${EPREFIX}"/usr
--libdir="${EPREFIX}/usr/$(get_libdir)"
--target="$(rust_abi)"
$(usev !debug '--release')
)
cargo cbuild "${cargoargs[@]}" || die "cargo cbuild failed"
}
src_test() {
multilib-minimal_src_test
}
multilib_src_test() {
local cargoargs=(
--prefix="${EPREFIX}"/usr
--libdir="${EPREFIX}/usr/$(get_libdir)"
--target="$(rust_abi)"
$(usex debug '--debug' '--release')
)
cargo ctest "${cargoargs[@]}" || die "cargo ctest failed"
}
src_install() {
multilib-minimal_src_install
}
multilib_src_install() {
local cargoargs=(
--library-type=cdylib
--prefix="${EPREFIX}"/usr
--libdir="${EPREFIX}/usr/$(get_libdir)"
--target="$(rust_abi)"
--destdir="${D}"
$(usex debug '--debug' '--release')
)
cargo cinstall "${cargoargs[@]}" || die "cargo cinstall failed"
}
|