Сравнение zerotier-1.10.1 с zerotier-1.10.6

/usr/portage/net-misc/zerotier/zerotier-1.10.6.ebuild 2023-10-09 14:52:34.720368482 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit flag-o-matic systemd toolchain-funcs
6
CARGO_OPTIONAL=1
7

  
8
CRATES="
9
	android_system_properties@0.1.5
10
	ansi_term@0.12.1
11
	atty@0.2.14
12
	autocfg@1.1.0
13
	base64@0.13.1
14
	base64@0.21.0
15
	bitflags@1.3.2
16
	block-buffer@0.10.3
17
	bumpalo@3.12.0
18
	bytes@1.4.0
19
	cbindgen@0.20.0
20
	cc@1.0.79
21
	cfg-if@1.0.0
22
	chrono@0.4.23
23
	clap@2.34.0
24
	codespan-reporting@0.11.1
25
	core-foundation-sys@0.8.3
26
	core-foundation@0.9.3
27
	cpufeatures@0.2.5
28
	crypto-common@0.1.6
29
	cxx-build@1.0.91
30
	cxx@1.0.91
31
	cxxbridge-flags@1.0.91
32
	cxxbridge-macro@1.0.91
33
	darling@0.13.4
34
	darling_core@0.13.4
35
	darling_macro@0.13.4
36
	digest@0.10.6
37
	either@1.8.1
38
	encoding_rs@0.8.32
39
	errno-dragonfly@0.1.2
40
	errno@0.2.8
41
	fastrand@1.9.0
42
	fnv@1.0.7
43
	foreign-types-shared@0.1.1
44
	foreign-types@0.3.2
45
	form_urlencoded@1.1.0
46
	futures-channel@0.3.26
47
	futures-core@0.3.26
48
	futures-io@0.3.26
49
	futures-sink@0.3.26
50
	futures-task@0.3.26
51
	futures-util@0.3.26
52
	generic-array@0.14.6
53
	getrandom@0.2.8
54
	h2@0.3.16
55
	hashbrown@0.12.3
56
	heck@0.3.3
57
	hermit-abi@0.1.19
58
	hermit-abi@0.2.6
59
	hmac@0.12.1
60
	http-body@0.4.5
61
	http@0.2.9
62
	httparse@1.8.0
63
	httpdate@1.0.2
64
	hyper-tls@0.5.0
65
	hyper@0.14.24
66
	iana-time-zone-haiku@0.1.1
67
	iana-time-zone@0.1.53
68
	ident_case@1.0.1
69
	idna@0.3.0
70
	indexmap@1.9.2
71
	instant@0.1.12
72
	io-lifetimes@1.0.5
73
	ipnet@2.7.1
74
	itertools@0.10.5
75
	itoa@1.0.5
76
	js-sys@0.3.61
77
	lazy_static@1.4.0
78
	libc@0.2.139
79
	link-cplusplus@1.0.8
80
	linux-raw-sys@0.1.4
81
	log@0.4.17
82
	memchr@2.5.0
83
	mime@0.3.16
84
	mio@0.8.6
85
	native-tls@0.2.11
86
	num-bigint@0.4.3
87
	num-integer@0.1.45
88
	num-traits@0.2.15
89
	num_cpus@1.15.0
90
	oauth2@4.3.0
91
	once_cell@1.17.1
92
	openidconnect@2.5.0
93
	openssl-macros@0.1.0
94
	openssl-probe@0.1.5
95
	openssl-sys@0.9.80
96
	openssl@0.10.45
97
	ordered-float@2.10.0
98
	percent-encoding@2.2.0
99
	pin-project-lite@0.2.9
100
	pin-utils@0.1.0
101
	pkg-config@0.3.26
102
	ppv-lite86@0.2.17
103
	proc-macro2@1.0.51
104
	quote@1.0.23
105
	rand@0.8.5
106
	rand_chacha@0.3.1
107
	rand_core@0.6.4
108
	redox_syscall@0.2.16
109
	reqwest@0.11.14
110
	ring@0.16.20
111
	rustix@0.36.8
112
	ryu@1.0.12
113
	schannel@0.1.21
114
	scratch@1.0.3
115
	security-framework-sys@2.8.0
116
	security-framework@2.8.2
117
	serde-value@0.7.0
118
	serde@1.0.152
119
	serde_derive@1.0.152
120
	serde_json@1.0.93
121
	serde_path_to_error@0.1.9
122
	serde_plain@1.0.1
123
	serde_urlencoded@0.7.1
124
	serde_with@1.14.0
125
	serde_with_macros@1.5.2
126
	sha2@0.10.6
127
	slab@0.4.8
128
	socket2@0.4.7
129
	spin@0.5.2
130
	strsim@0.10.0
131
	strsim@0.8.0
132
	subtle@2.4.1
133
	syn@1.0.109
134
	tempfile@3.4.0
135
	termcolor@1.2.0
136
	textwrap@0.11.0
137
	thiserror-impl@1.0.38
138
	thiserror@1.0.38
139
	time-core@0.1.0
140
	time-macros@0.2.8
141
	time@0.3.20
142
	tinyvec@1.6.0
143
	tinyvec_macros@0.1.1
144
	tokio-native-tls@0.3.1
145
	tokio-util@0.7.7
146
	tokio@1.26.0
147
	toml@0.5.11
148
	tower-service@0.3.2
149
	tracing-core@0.1.30
150
	tracing@0.1.37
151
	try-lock@0.2.4
152
	typenum@1.16.0
153
	unicode-bidi@0.3.10
154
	unicode-ident@1.0.6
155
	unicode-normalization@0.1.22
156
	unicode-segmentation@1.10.1
157
	unicode-width@0.1.10
158
	untrusted@0.7.1
159
	url@2.3.1
160
	vcpkg@0.2.15
161
	vec_map@0.8.2
162
	version_check@0.9.4
163
	want@0.3.0
164
	wasi@0.11.0+wasi-snapshot-preview1
165
	wasm-bindgen-backend@0.2.84
166
	wasm-bindgen-futures@0.4.34
167
	wasm-bindgen-macro-support@0.2.84
168
	wasm-bindgen-macro@0.2.84
169
	wasm-bindgen-shared@0.2.84
170
	wasm-bindgen@0.2.84
171
	web-sys@0.3.61
172
	winapi-i686-pc-windows-gnu@0.4.0
173
	winapi-util@0.1.5
174
	winapi-x86_64-pc-windows-gnu@0.4.0
175
	winapi@0.3.9
176
	windows-sys@0.42.0
177
	windows-sys@0.45.0
178
	windows-targets@0.42.1
179
	windows_aarch64_gnullvm@0.42.1
180
	windows_aarch64_msvc@0.42.1
181
	windows_i686_gnu@0.42.1
182
	windows_i686_msvc@0.42.1
183
	windows_x86_64_gnu@0.42.1
184
	windows_x86_64_gnullvm@0.42.1
185
	windows_x86_64_msvc@0.42.1
186
	winreg@0.10.1
187
"
188

  
189
declare -A GIT_CRATES=(
190
	[jwt]='https://github.com/glimberg/rust-jwt;61a9291fdeec747c6edf14f4fa0caf235136c168;rust-jwt-%commit%'
191
)
192

  
193
inherit cargo flag-o-matic systemd toolchain-funcs
7 194

  
8 195
DESCRIPTION="A software-based managed Ethernet switch for planet Earth"
9 196
HOMEPAGE="https://www.zerotier.com/"
10
SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz"
197
SRC_URI="
198
	https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz
199
	sso? (
200
		${CARGO_CRATE_URIS}
201
	)
202
"
11 203
S="${WORKDIR}"/ZeroTierOne-${PV}
12 204

  
13 205
LICENSE="BUSL-1.1"
206
# Crate licenses
207
LICENSE+=" sso? ( Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016 )"
14 208
SLOT="0"
15 209
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
16
IUSE="cpu_flags_arm_neon"
210
IUSE="cpu_flags_arm_neon debug sso"
17 211

  
18 212
RDEPEND="
19
	dev-libs/json-glib
213
	dev-libs/openssl:=
20 214
	net-libs/libnatpmp
21 215
	>=net-libs/miniupnpc-2:=
22 216
"
23 217
DEPEND="${RDEPEND}"
218
BDEPEND="
219
	sso? (
220
		virtual/rust
221
	)
222
"
24 223

  
25 224
PATCHES=(
26 225
	"${FILESDIR}"/${PN}-1.10.1-respect-ldflags.patch
......
29 228

  
30 229
DOCS=( README.md AUTHORS.md )
31 230

  
231
src_unpack() {
232
	unpack ${P}.tar.gz
233
	use sso && cargo_src_unpack
234
}
235

  
236
src_prepare() {
237
	default
238

  
239
	#1. Dont call cargo, we'll run it with cargo eclass functions
240
	#2. Remove man page compression and install, we'll handle it with ebuild functions
241
	sed -i \
242
		-e '/ifeq ($(ZT_SSO_SUPPORTED)/,/endif/ { /cargo build/d }' \
243
		-e '/install:/,/^$/ { /man[0-9]/d }' \
244
		make-linux.mk || die
245
}
246

  
32 247
src_configure() {
33 248
	tc-export CXX CC
34 249

  
250
	# Several assembler files without GNU-stack markings
251
	# https://github.com/zerotier/ZeroTierOne/issues/1179
35 252
	append-ldflags -Wl,-z,noexecstack
36 253

  
37 254
	use cpu_flags_arm_neon || export ZT_DISABLE_NEON=1
255

  
256
	use sso && cargo_src_configure
38 257
}
39 258

  
40 259
src_compile() {
......
42 261
		CXX="${CXX}"
43 262
		STRIP=:
44 263

  
45
		# Needs Rust and fails to build as of 1.10.1
46
		ZT_SSO_SUPPORTED=0
264
		# Debug doesnt do more than add preprocessor arguments normally,
265
		# but when rust is used it sets the correct rust directory to link against.
266
		# It would be added by cargo eclass eitherway, so instead of adding REQUIRED_USE
267
		# and patching the makefile its just easier to have it.
268
		ZT_DEBUG="$(usex debug 1 0)"
269
		ZT_SSO_SUPPORTED="$(usex sso 1 0)"
47 270
	)
48 271

  
272
	pushd zeroidc > /dev/null || die
273
	use sso && cargo_src_compile
274
	popd > /dev/null || die
275

  
49 276
	emake "${myemakeargs[@]}" one
50 277
}
51 278

  
......
57 284
src_install() {
58 285
	default
59 286

  
60
	# Remove pre-zipped man pages
61
	rm "${ED}"/usr/share/man/{man1,man8}/* || die
62

  
63 287
	newinitd "${FILESDIR}/${PN}".init-r1 "${PN}"
64 288
	systemd_dounit "${FILESDIR}/${PN}".service
65 289

  
Спасибо!