1 |
commit: 281acf551568db9d5fe62051b5d3b445f7ca38c9 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 30 04:23:44 2019 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 30 04:27:05 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=281acf55 |
7 |
|
8 |
net-libs/quiche: Fix multilib |
9 |
|
10 |
* Depend on multilib rust, doesn't support rust-bin, see: |
11 |
https://bugs.gentoo.org/701362 |
12 |
* Pass --target to cargo |
13 |
* Build boringssl separately because cargo doesn't cross compile |
14 |
correctly, see: |
15 |
https://github.com/cloudflare/quiche/issues/277 |
16 |
|
17 |
Closes: https://bugs.gentoo.org/701346 |
18 |
Package-Manager: Portage-2.3.80, Repoman-2.3.19 |
19 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
20 |
|
21 |
.../{quiche-9999.ebuild => quiche-0.1.0-r1.ebuild} | 55 +++++++++++++--------- |
22 |
net-libs/quiche/quiche-9999.ebuild | 25 +++++++--- |
23 |
2 files changed, 53 insertions(+), 27 deletions(-) |
24 |
|
25 |
diff --git a/net-libs/quiche/quiche-9999.ebuild b/net-libs/quiche/quiche-0.1.0-r1.ebuild |
26 |
similarity index 73% |
27 |
copy from net-libs/quiche/quiche-9999.ebuild |
28 |
copy to net-libs/quiche/quiche-0.1.0-r1.ebuild |
29 |
index 3fad3c0e9a3..53701ea9f16 100644 |
30 |
--- a/net-libs/quiche/quiche-9999.ebuild |
31 |
+++ b/net-libs/quiche/quiche-0.1.0-r1.ebuild |
32 |
@@ -8,15 +8,15 @@ aho-corasick-0.7.6 |
33 |
arrayvec-0.4.11 |
34 |
atty-0.2.13 |
35 |
autocfg-0.1.6 |
36 |
-backtrace-0.3.37 |
37 |
+backtrace-0.3.38 |
38 |
backtrace-sys-0.1.31 |
39 |
-bitflags-1.1.0 |
40 |
+bitflags-1.2.0 |
41 |
bstr-0.2.8 |
42 |
bumpalo-2.6.0 |
43 |
byteorder-1.3.2 |
44 |
cast-0.2.2 |
45 |
cc-1.0.45 |
46 |
-cfg-if-0.1.9 |
47 |
+cfg-if-0.1.10 |
48 |
clap-2.33.0 |
49 |
cmake-0.1.42 |
50 |
criterion-0.3.0 |
51 |
@@ -28,7 +28,7 @@ crossbeam-utils-0.6.6 |
52 |
csv-1.1.1 |
53 |
csv-core-0.1.6 |
54 |
docopt-1.1.0 |
55 |
-either-1.5.2 |
56 |
+either-1.5.3 |
57 |
env_logger-0.6.2 |
58 |
failure-0.1.5 |
59 |
failure_derive-0.1.5 |
60 |
@@ -41,7 +41,7 @@ idna-0.1.5 |
61 |
iovec-0.1.2 |
62 |
itertools-0.8.0 |
63 |
itoa-0.4.4 |
64 |
-js-sys-0.3.27 |
65 |
+js-sys-0.3.28 |
66 |
kernel32-sys-0.2.2 |
67 |
lazy_static-1.4.0 |
68 |
libc-0.2.62 |
69 |
@@ -58,7 +58,7 @@ num-traits-0.2.8 |
70 |
num_cpus-1.10.1 |
71 |
percent-encoding-1.0.1 |
72 |
proc-macro2-0.4.30 |
73 |
-proc-macro2-1.0.3 |
74 |
+proc-macro2-1.0.4 |
75 |
quick-error-1.2.2 |
76 |
quote-0.6.13 |
77 |
quote-1.0.2 |
78 |
@@ -78,8 +78,8 @@ same-file-1.0.5 |
79 |
scopeguard-1.0.0 |
80 |
semver-0.9.0 |
81 |
semver-parser-0.7.0 |
82 |
-serde-1.0.100 |
83 |
-serde_derive-1.0.100 |
84 |
+serde-1.0.101 |
85 |
+serde_derive-1.0.101 |
86 |
serde_json-1.0.40 |
87 |
slab-0.4.2 |
88 |
smallvec-0.6.10 |
89 |
@@ -104,13 +104,13 @@ url-1.7.2 |
90 |
version_check-0.1.5 |
91 |
walkdir-2.2.9 |
92 |
wasi-0.7.0 |
93 |
-wasm-bindgen-0.2.50 |
94 |
-wasm-bindgen-backend-0.2.50 |
95 |
-wasm-bindgen-macro-0.2.50 |
96 |
-wasm-bindgen-macro-support-0.2.50 |
97 |
-wasm-bindgen-shared-0.2.50 |
98 |
-wasm-bindgen-webidl-0.2.50 |
99 |
-web-sys-0.3.27 |
100 |
+wasm-bindgen-0.2.51 |
101 |
+wasm-bindgen-backend-0.2.51 |
102 |
+wasm-bindgen-macro-0.2.51 |
103 |
+wasm-bindgen-macro-support-0.2.51 |
104 |
+wasm-bindgen-shared-0.2.51 |
105 |
+wasm-bindgen-webidl-0.2.51 |
106 |
+web-sys-0.3.28 |
107 |
weedle-0.10.0 |
108 |
winapi-0.2.8 |
109 |
winapi-0.3.8 |
110 |
@@ -122,7 +122,7 @@ wincolor-1.0.2 |
111 |
ws2_32-sys-0.2.1 |
112 |
" |
113 |
|
114 |
-inherit cargo multilib-minimal |
115 |
+inherit cargo cmake-utils flag-o-matic multilib-minimal rust-toolchain |
116 |
|
117 |
DESCRIPTION="Implementation of the QUIC transport protocol and HTTP/3" |
118 |
HOMEPAGE="https://github.com/cloudflare/quiche" |
119 |
@@ -133,7 +133,7 @@ if [[ ${PV} == *9999 ]] ; then |
120 |
else |
121 |
CRATES+=" ${P//_/-}" |
122 |
SRC_URI="$(cargo_crate_uris ${CRATES})" |
123 |
- KEYWORDS="~amd64" |
124 |
+ KEYWORDS="~amd64 ~arm64" |
125 |
S="${WORKDIR}/${P//_/-}" |
126 |
fi |
127 |
|
128 |
@@ -151,13 +151,15 @@ IUSE="" |
129 |
DOCS=( CODEOWNERS COPYING README.md ) |
130 |
|
131 |
BDEPEND=" |
132 |
- >=virtual/rust-1.39.0 |
133 |
+ >=dev-lang/rust-1.38.0[${MULTILIB_USEDEP}] |
134 |
dev-util/cmake |
135 |
dev-lang/go |
136 |
" |
137 |
DEPEND="" |
138 |
RDEPEND="" |
139 |
|
140 |
+CMAKE_USE_DIR="${S}/deps/boringssl" |
141 |
+ |
142 |
src_unpack() { |
143 |
if [[ "${PV}" == *9999* ]]; then |
144 |
git-r3_src_unpack |
145 |
@@ -170,15 +172,26 @@ src_unpack() { |
146 |
|
147 |
src_prepare(){ |
148 |
default |
149 |
+ cmake-utils_src_prepare |
150 |
multilib_copy_sources |
151 |
} |
152 |
|
153 |
+multilib_src_configure(){ |
154 |
+ append-flags "-fPIC" |
155 |
+ local mycmakeargs=( |
156 |
+ -DOPENSSL_NO_ASM=ON |
157 |
+ -DBUILD_SHARED_LIBS=OFF |
158 |
+ ) |
159 |
+ BUILD_DIR="${BUILD_DIR}/deps/boringssl/build" cmake-utils_src_configure |
160 |
+} |
161 |
+ |
162 |
multilib_src_compile(){ |
163 |
- cargo_src_compile --features pkg-config-meta |
164 |
+ BUILD_DIR="${BUILD_DIR}/deps/boringssl/build" cmake-utils_src_compile bssl |
165 |
+ QUICHE_BSSL_PATH="${BUILD_DIR}/deps/boringssl" cargo_src_compile --features pkg-config-meta --target="$(rust_abi)" |
166 |
} |
167 |
|
168 |
multilib_src_test(){ |
169 |
- cargo_src_test |
170 |
+ QUICHE_BSSL_PATH="${BUILD_DIR}/deps/boringssl" cargo_src_test --target="$(rust_abi)" |
171 |
} |
172 |
|
173 |
multilib_src_install() { |
174 |
@@ -186,5 +199,5 @@ multilib_src_install() { |
175 |
insinto "/usr/$(get_libdir)/pkgconfig" |
176 |
doins target/release/quiche.pc |
177 |
doheader -r include/* |
178 |
- dolib.so target/release/libquiche.so |
179 |
+ dolib.so "target/$(rust_abi)/release/libquiche.so" |
180 |
} |
181 |
|
182 |
diff --git a/net-libs/quiche/quiche-9999.ebuild b/net-libs/quiche/quiche-9999.ebuild |
183 |
index 3fad3c0e9a3..9c8f1748e85 100644 |
184 |
--- a/net-libs/quiche/quiche-9999.ebuild |
185 |
+++ b/net-libs/quiche/quiche-9999.ebuild |
186 |
@@ -122,7 +122,7 @@ wincolor-1.0.2 |
187 |
ws2_32-sys-0.2.1 |
188 |
" |
189 |
|
190 |
-inherit cargo multilib-minimal |
191 |
+inherit cargo cmake-utils flag-o-matic multilib-minimal rust-toolchain |
192 |
|
193 |
DESCRIPTION="Implementation of the QUIC transport protocol and HTTP/3" |
194 |
HOMEPAGE="https://github.com/cloudflare/quiche" |
195 |
@@ -133,7 +133,7 @@ if [[ ${PV} == *9999 ]] ; then |
196 |
else |
197 |
CRATES+=" ${P//_/-}" |
198 |
SRC_URI="$(cargo_crate_uris ${CRATES})" |
199 |
- KEYWORDS="~amd64" |
200 |
+ KEYWORDS="~amd64 ~arm64" |
201 |
S="${WORKDIR}/${P//_/-}" |
202 |
fi |
203 |
|
204 |
@@ -151,13 +151,15 @@ IUSE="" |
205 |
DOCS=( CODEOWNERS COPYING README.md ) |
206 |
|
207 |
BDEPEND=" |
208 |
- >=virtual/rust-1.39.0 |
209 |
+ >=dev-lang/rust-1.38.0[${MULTILIB_USEDEP}] |
210 |
dev-util/cmake |
211 |
dev-lang/go |
212 |
" |
213 |
DEPEND="" |
214 |
RDEPEND="" |
215 |
|
216 |
+CMAKE_USE_DIR="${S}/deps/boringssl" |
217 |
+ |
218 |
src_unpack() { |
219 |
if [[ "${PV}" == *9999* ]]; then |
220 |
git-r3_src_unpack |
221 |
@@ -170,15 +172,26 @@ src_unpack() { |
222 |
|
223 |
src_prepare(){ |
224 |
default |
225 |
+ cmake-utils_src_prepare |
226 |
multilib_copy_sources |
227 |
} |
228 |
|
229 |
+multilib_src_configure(){ |
230 |
+ append-flags "-fPIC" |
231 |
+ local mycmakeargs=( |
232 |
+ -DOPENSSL_NO_ASM=ON |
233 |
+ -DBUILD_SHARED_LIBS=OFF |
234 |
+ ) |
235 |
+ BUILD_DIR="${BUILD_DIR}/deps/boringssl/build" cmake-utils_src_configure |
236 |
+} |
237 |
+ |
238 |
multilib_src_compile(){ |
239 |
- cargo_src_compile --features pkg-config-meta |
240 |
+ BUILD_DIR="${BUILD_DIR}/deps/boringssl/build" cmake-utils_src_compile bssl |
241 |
+ QUICHE_BSSL_PATH="${BUILD_DIR}/deps/boringssl" cargo_src_compile --features pkg-config-meta --target="$(rust_abi)" |
242 |
} |
243 |
|
244 |
multilib_src_test(){ |
245 |
- cargo_src_test |
246 |
+ QUICHE_BSSL_PATH="${BUILD_DIR}/deps/boringssl" cargo_src_test --target="$(rust_abi)" |
247 |
} |
248 |
|
249 |
multilib_src_install() { |
250 |
@@ -186,5 +199,5 @@ multilib_src_install() { |
251 |
insinto "/usr/$(get_libdir)/pkgconfig" |
252 |
doins target/release/quiche.pc |
253 |
doheader -r include/* |
254 |
- dolib.so target/release/libquiche.so |
255 |
+ dolib.so "target/$(rust_abi)/release/libquiche.so" |
256 |
} |