1 |
commit: 08fa1dca3c36bb26bd8beed70c174318cb0e7131 |
2 |
Author: layman <layman <AT> localhost> |
3 |
AuthorDate: Sat Jan 5 00:41:30 2019 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 5 00:43:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=08fa1dca |
7 |
|
8 |
dev-qt/qtwebengine: initial commit |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
|
12 |
dev-qt/qtwebengine/Manifest | 1 + |
13 |
.../qtwebengine/files/musl/arm-missing-files.patch | 205 ++++++++++++++++ |
14 |
.../files/musl/arm-void-is-not-android.patch | 17 ++ |
15 |
dev-qt/qtwebengine/files/musl/musl-sandbox.patch | 70 ++++++ |
16 |
.../files/musl/qt-musl-dispatch_to_musl.patch | 103 ++++++++ |
17 |
.../qtwebengine/files/musl/qt-musl-execinfo.patch | 259 +++++++++++++++++++++ |
18 |
.../qtwebengine/files/musl/qt-musl-fpstate.patch | 48 ++++ |
19 |
.../qtwebengine/files/musl/qt-musl-mallinfo.patch | 42 ++++ |
20 |
dev-qt/qtwebengine/files/musl/qt-musl-off_t.patch | 10 + |
21 |
.../files/musl/qt-musl-pread-pwrite.patch | 20 ++ |
22 |
.../qtwebengine/files/musl/qt-musl-pvalloc.patch | 14 ++ |
23 |
.../files/musl/qt-musl-remove-cdefs.patch | 12 + |
24 |
.../qtwebengine/files/musl/qt-musl-resolve.patch | 61 +++++ |
25 |
.../qtwebengine/files/musl/qt-musl-serialio.patch | 12 + |
26 |
.../qtwebengine/files/musl/qt-musl-siginfo_t.patch | 18 ++ |
27 |
.../files/musl/qt-musl-stackstart.patch | 21 ++ |
28 |
.../files/musl/qt-musl-sysreg-for__WORDSIZE.patch | 14 ++ |
29 |
.../files/musl/qt-musl-thread-stacksize.patch | 26 +++ |
30 |
dev-qt/qtwebengine/files/musl/yasm-nls.patch | 13 ++ |
31 |
.../qtwebengine-5.11.1-nouveau-disable-gpu.patch | 98 ++++++++ |
32 |
.../qtwebengine-5.11.2-paxmark-mksnapshot.patch | 41 ++++ |
33 |
.../qtwebengine/files/qtwebengine-5.9.6-gcc8.patch | 24 ++ |
34 |
dev-qt/qtwebengine/metadata.xml | 30 +++ |
35 |
dev-qt/qtwebengine/qtwebengine-5.11.3.ebuild | 158 +++++++++++++ |
36 |
24 files changed, 1317 insertions(+) |
37 |
|
38 |
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest |
39 |
new file mode 100644 |
40 |
index 0000000..b38c131 |
41 |
--- /dev/null |
42 |
+++ b/dev-qt/qtwebengine/Manifest |
43 |
@@ -0,0 +1 @@ |
44 |
+DIST qtwebengine-everywhere-src-5.11.3.tar.xz 233678844 BLAKE2B 451a2f8361b158835f7f565aea9e7e372ea5670f56a5eef918d0340857e1b336d7147c5f87417a21ea225c248cfda8248869c2023b2e359aa9216ec472dea4b9 SHA512 323179244187b075836101eec15fc96569e31dee7ca0b28d51833cf02a55439ca0ab8e3e14acf970eb0258e1f5187b6b33fc1a35bf9056e4941a2b20be9b0431 |
45 |
|
46 |
diff --git a/dev-qt/qtwebengine/files/musl/arm-missing-files.patch b/dev-qt/qtwebengine/files/musl/arm-missing-files.patch |
47 |
new file mode 100644 |
48 |
index 0000000..59af5db |
49 |
--- /dev/null |
50 |
+++ b/dev-qt/qtwebengine/files/musl/arm-missing-files.patch |
51 |
@@ -0,0 +1,205 @@ |
52 |
+From bf9a9d0532d7749901082ffce976d182672c2d36 Mon Sep 17 00:00:00 2001 |
53 |
+From: Allan Sandfeld Jensen <allan.jensen@××.io> |
54 |
+Date: Mon, 10 Dec 2018 14:35:22 +0100 |
55 |
+Subject: [PATCH] Fix building gn on arm |
56 |
+ |
57 |
+Two arm header files were missing. |
58 |
+ |
59 |
+Change-Id: I3d9cd03c682b9de6b38e75085bcda9deef81b5fa |
60 |
+Fixes: QTBUG-72393 |
61 |
+Reviewed-by: Michal Klocek <michal.klocek@××.io> |
62 |
+--- |
63 |
+ gn/base/numerics/safe_conversions_arm_impl.h | 51 +++++++++++ |
64 |
+ gn/base/numerics/safe_math_arm_impl.h | 122 +++++++++++++++++++++++++++ |
65 |
+ 2 files changed, 173 insertions(+) |
66 |
+ create mode 100644 gn/base/numerics/safe_conversions_arm_impl.h |
67 |
+ create mode 100644 gn/base/numerics/safe_math_arm_impl.h |
68 |
+ |
69 |
+diff --git a/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h b/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h |
70 |
+new file mode 100644 |
71 |
+index 0000000000..da5813f65e |
72 |
+--- /dev/null |
73 |
++++ b/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h |
74 |
+@@ -0,0 +1,51 @@ |
75 |
++// Copyright 2017 The Chromium Authors. All rights reserved. |
76 |
++// Use of this source code is governed by a BSD-style license that can be |
77 |
++// found in the LICENSE file. |
78 |
++ |
79 |
++#ifndef BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_ |
80 |
++#define BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_ |
81 |
++ |
82 |
++#include <cassert> |
83 |
++#include <limits> |
84 |
++#include <type_traits> |
85 |
++ |
86 |
++#include "base/numerics/safe_conversions_impl.h" |
87 |
++ |
88 |
++namespace base { |
89 |
++namespace internal { |
90 |
++ |
91 |
++// Fast saturation to a destination type. |
92 |
++template <typename Dst, typename Src> |
93 |
++struct SaturateFastAsmOp { |
94 |
++ static const bool is_supported = |
95 |
++ std::is_signed<Src>::value && std::is_integral<Dst>::value && |
96 |
++ std::is_integral<Src>::value && |
97 |
++ IntegerBitsPlusSign<Src>::value <= IntegerBitsPlusSign<int32_t>::value && |
98 |
++ IntegerBitsPlusSign<Dst>::value <= IntegerBitsPlusSign<int32_t>::value && |
99 |
++ !IsTypeInRangeForNumericType<Dst, Src>::value; |
100 |
++ |
101 |
++ __attribute__((always_inline)) static Dst Do(Src value) { |
102 |
++ int32_t src = value; |
103 |
++ typename std::conditional<std::is_signed<Dst>::value, int32_t, |
104 |
++ uint32_t>::type result; |
105 |
++ if (std::is_signed<Dst>::value) { |
106 |
++ asm("ssat %[dst], %[shift], %[src]" |
107 |
++ : [dst] "=r"(result) |
108 |
++ : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32 |
109 |
++ ? IntegerBitsPlusSign<Dst>::value |
110 |
++ : 32)); |
111 |
++ } else { |
112 |
++ asm("usat %[dst], %[shift], %[src]" |
113 |
++ : [dst] "=r"(result) |
114 |
++ : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32 |
115 |
++ ? IntegerBitsPlusSign<Dst>::value |
116 |
++ : 31)); |
117 |
++ } |
118 |
++ return static_cast<Dst>(result); |
119 |
++ } |
120 |
++}; |
121 |
++ |
122 |
++} // namespace internal |
123 |
++} // namespace base |
124 |
++ |
125 |
++#endif // BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_ |
126 |
+diff --git a/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h b/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h |
127 |
+new file mode 100644 |
128 |
+index 0000000000..a7cda1bb23 |
129 |
+--- /dev/null |
130 |
++++ b/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h |
131 |
+@@ -0,0 +1,122 @@ |
132 |
++// Copyright 2017 The Chromium Authors. All rights reserved. |
133 |
++// Use of this source code is governed by a BSD-style license that can be |
134 |
++// found in the LICENSE file. |
135 |
++ |
136 |
++#ifndef BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_ |
137 |
++#define BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_ |
138 |
++ |
139 |
++#include <cassert> |
140 |
++#include <limits> |
141 |
++#include <type_traits> |
142 |
++ |
143 |
++#include "base/numerics/safe_conversions.h" |
144 |
++ |
145 |
++namespace base { |
146 |
++namespace internal { |
147 |
++ |
148 |
++template <typename T, typename U> |
149 |
++struct CheckedMulFastAsmOp { |
150 |
++ static const bool is_supported = |
151 |
++ FastIntegerArithmeticPromotion<T, U>::is_contained; |
152 |
++ |
153 |
++ // The following is much more efficient than the Clang and GCC builtins for |
154 |
++ // performing overflow-checked multiplication when a twice wider type is |
155 |
++ // available. The below compiles down to 2-3 instructions, depending on the |
156 |
++ // width of the types in use. |
157 |
++ // As an example, an int32_t multiply compiles to: |
158 |
++ // smull r0, r1, r0, r1 |
159 |
++ // cmp r1, r1, asr #31 |
160 |
++ // And an int16_t multiply compiles to: |
161 |
++ // smulbb r1, r1, r0 |
162 |
++ // asr r2, r1, #16 |
163 |
++ // cmp r2, r1, asr #15 |
164 |
++ template <typename V> |
165 |
++ __attribute__((always_inline)) static bool Do(T x, U y, V* result) { |
166 |
++ using Promotion = typename FastIntegerArithmeticPromotion<T, U>::type; |
167 |
++ Promotion presult; |
168 |
++ |
169 |
++ presult = static_cast<Promotion>(x) * static_cast<Promotion>(y); |
170 |
++ *result = static_cast<V>(presult); |
171 |
++ return IsValueInRangeForNumericType<V>(presult); |
172 |
++ } |
173 |
++}; |
174 |
++ |
175 |
++template <typename T, typename U> |
176 |
++struct ClampedAddFastAsmOp { |
177 |
++ static const bool is_supported = |
178 |
++ BigEnoughPromotion<T, U>::is_contained && |
179 |
++ IsTypeInRangeForNumericType< |
180 |
++ int32_t, |
181 |
++ typename BigEnoughPromotion<T, U>::type>::value; |
182 |
++ |
183 |
++ template <typename V> |
184 |
++ __attribute__((always_inline)) static V Do(T x, U y) { |
185 |
++ // This will get promoted to an int, so let the compiler do whatever is |
186 |
++ // clever and rely on the saturated cast to bounds check. |
187 |
++ if (IsIntegerArithmeticSafe<int, T, U>::value) |
188 |
++ return saturated_cast<V>(x + y); |
189 |
++ |
190 |
++ int32_t result; |
191 |
++ int32_t x_i32 = x; |
192 |
++ int32_t y_i32 = y; |
193 |
++ |
194 |
++ asm("qadd %[result], %[first], %[second]" |
195 |
++ : [result] "=r"(result) |
196 |
++ : [first] "r"(x_i32), [second] "r"(y_i32)); |
197 |
++ return saturated_cast<V>(result); |
198 |
++ } |
199 |
++}; |
200 |
++ |
201 |
++template <typename T, typename U> |
202 |
++struct ClampedSubFastAsmOp { |
203 |
++ static const bool is_supported = |
204 |
++ BigEnoughPromotion<T, U>::is_contained && |
205 |
++ IsTypeInRangeForNumericType< |
206 |
++ int32_t, |
207 |
++ typename BigEnoughPromotion<T, U>::type>::value; |
208 |
++ |
209 |
++ template <typename V> |
210 |
++ __attribute__((always_inline)) static V Do(T x, U y) { |
211 |
++ // This will get promoted to an int, so let the compiler do whatever is |
212 |
++ // clever and rely on the saturated cast to bounds check. |
213 |
++ if (IsIntegerArithmeticSafe<int, T, U>::value) |
214 |
++ return saturated_cast<V>(x - y); |
215 |
++ |
216 |
++ int32_t result; |
217 |
++ int32_t x_i32 = x; |
218 |
++ int32_t y_i32 = y; |
219 |
++ |
220 |
++ asm("qsub %[result], %[first], %[second]" |
221 |
++ : [result] "=r"(result) |
222 |
++ : [first] "r"(x_i32), [second] "r"(y_i32)); |
223 |
++ return saturated_cast<V>(result); |
224 |
++ } |
225 |
++}; |
226 |
++ |
227 |
++template <typename T, typename U> |
228 |
++struct ClampedMulFastAsmOp { |
229 |
++ static const bool is_supported = CheckedMulFastAsmOp<T, U>::is_supported; |
230 |
++ |
231 |
++ template <typename V> |
232 |
++ __attribute__((always_inline)) static V Do(T x, U y) { |
233 |
++ // Use the CheckedMulFastAsmOp for full-width 32-bit values, because |
234 |
++ // it's fewer instructions than promoting and then saturating. |
235 |
++ if (!IsIntegerArithmeticSafe<int32_t, T, U>::value && |
236 |
++ !IsIntegerArithmeticSafe<uint32_t, T, U>::value) { |
237 |
++ V result; |
238 |
++ if (CheckedMulFastAsmOp<T, U>::Do(x, y, &result)) |
239 |
++ return result; |
240 |
++ return CommonMaxOrMin<V>(IsValueNegative(x) ^ IsValueNegative(y)); |
241 |
++ } |
242 |
++ |
243 |
++ assert((FastIntegerArithmeticPromotion<T, U>::is_contained)); |
244 |
++ using Promotion = typename FastIntegerArithmeticPromotion<T, U>::type; |
245 |
++ return saturated_cast<V>(static_cast<Promotion>(x) * |
246 |
++ static_cast<Promotion>(y)); |
247 |
++ } |
248 |
++}; |
249 |
++ |
250 |
++} // namespace internal |
251 |
++} // namespace base |
252 |
++ |
253 |
++#endif // BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_ |
254 |
+-- |
255 |
+2.16.3 |
256 |
+ |
257 |
|
258 |
diff --git a/dev-qt/qtwebengine/files/musl/arm-void-is-not-android.patch b/dev-qt/qtwebengine/files/musl/arm-void-is-not-android.patch |
259 |
new file mode 100644 |
260 |
index 0000000..6ae86dd |
261 |
--- /dev/null |
262 |
+++ b/dev-qt/qtwebengine/files/musl/arm-void-is-not-android.patch |
263 |
@@ -0,0 +1,17 @@ |
264 |
+--- qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 |
265 |
++++ qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2018-01-30 16:42:15.332826020 +0100 |
266 |
+@@ -194,14 +194,6 @@ |
267 |
+ "sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S", |
268 |
+ "sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S", |
269 |
+ ] |
270 |
+- if (arm_optionally_use_neon) { |
271 |
+- # Run-time NEON detection. |
272 |
+- deps = [ "//third_party/android_tools:cpu_features" ] |
273 |
+- # To get the __android_log_print routine |
274 |
+- libs = [ "log" ] |
275 |
+- # Detection routine |
276 |
+- sources += [ "sp/src/arm/detect.c" ] |
277 |
+- } |
278 |
+ } |
279 |
+ |
280 |
+ # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl_neon |
281 |
|
282 |
diff --git a/dev-qt/qtwebengine/files/musl/musl-sandbox.patch b/dev-qt/qtwebengine/files/musl/musl-sandbox.patch |
283 |
new file mode 100644 |
284 |
index 0000000..46b5d0b |
285 |
--- /dev/null |
286 |
+++ b/dev-qt/qtwebengine/files/musl/musl-sandbox.patch |
287 |
@@ -0,0 +1,70 @@ |
288 |
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc |
289 |
+index 5f81dff..85b7ea0 100644 |
290 |
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc |
291 |
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc |
292 |
+@@ -129,23 +129,13 @@ namespace sandbox { |
293 |
+ // CLONE_VM, nor CLONE_THREAD, which includes all fork() implementations. |
294 |
+ ResultExpr RestrictCloneToThreadsAndEPERMFork() { |
295 |
+ const Arg<unsigned long> flags(0); |
296 |
++ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | |
297 |
++ CLONE_THREAD | CLONE_SYSVSEM; |
298 |
++ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | |
299 |
++ CLONE_DETACHED; |
300 |
++ const BoolExpr thread_clone_ok = (flags&~safe)==required; |
301 |
+ |
302 |
+- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. |
303 |
+- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | |
304 |
+- CLONE_SIGHAND | CLONE_THREAD | |
305 |
+- CLONE_SYSVSEM; |
306 |
+- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED; |
307 |
+- |
308 |
+- const uint64_t kGlibcPthreadFlags = |
309 |
+- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | |
310 |
+- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID; |
311 |
+- const BoolExpr glibc_test = flags == kGlibcPthreadFlags; |
312 |
+- |
313 |
+- const BoolExpr android_test = |
314 |
+- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, |
315 |
+- flags == kGlibcPthreadFlags); |
316 |
+- |
317 |
+- return If(IsAndroid() ? android_test : glibc_test, Allow()) |
318 |
++ return If(thread_clone_ok, Allow()) |
319 |
+ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM)) |
320 |
+ .Else(CrashSIGSYSClone()); |
321 |
+ } |
322 |
+diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc |
323 |
+index 1d9f95c..21fbe21 100644 |
324 |
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc |
325 |
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc |
326 |
+@@ -373,6 +373,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { |
327 |
+ #if defined(__i386__) |
328 |
+ case __NR_waitpid: |
329 |
+ #endif |
330 |
++ case __NR_set_tid_address: |
331 |
+ return true; |
332 |
+ case __NR_clone: // Should be parameter-restricted. |
333 |
+ case __NR_setns: // Privileged. |
334 |
+@@ -385,7 +386,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { |
335 |
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) |
336 |
+ case __NR_set_thread_area: |
337 |
+ #endif |
338 |
+- case __NR_set_tid_address: |
339 |
+ case __NR_unshare: |
340 |
+ #if !defined(__mips__) && !defined(__aarch64__) |
341 |
+ case __NR_vfork: |
342 |
+@@ -492,6 +492,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { |
343 |
+ case __NR_mlock: |
344 |
+ case __NR_munlock: |
345 |
+ case __NR_munmap: |
346 |
++ case __NR_mremap: |
347 |
+ return true; |
348 |
+ case __NR_madvise: |
349 |
+ case __NR_mincore: |
350 |
+@@ -507,7 +508,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { |
351 |
+ case __NR_modify_ldt: |
352 |
+ #endif |
353 |
+ case __NR_mprotect: |
354 |
+- case __NR_mremap: |
355 |
+ case __NR_msync: |
356 |
+ case __NR_munlockall: |
357 |
+ case __NR_readahead: |
358 |
|
359 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-dispatch_to_musl.patch b/dev-qt/qtwebengine/files/musl/qt-musl-dispatch_to_musl.patch |
360 |
new file mode 100644 |
361 |
index 0000000..1258d4f |
362 |
--- /dev/null |
363 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-dispatch_to_musl.patch |
364 |
@@ -0,0 +1,103 @@ |
365 |
+--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc |
366 |
++++ qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc |
367 |
+@@ -6,6 +6,7 @@ |
368 |
+ |
369 |
+ #include <malloc.h> |
370 |
+ |
371 |
++#if defined(__GLIBC__) |
372 |
+ // This translation unit defines a default dispatch for the allocator shim which |
373 |
+ // routes allocations to libc functions. |
374 |
+ // The code here is strongly inspired from tcmalloc's libc_override_glibc.h. |
375 |
+@@ -73,3 +74,92 @@ const AllocatorDispatch AllocatorDispatch::default_dispatch = { |
376 |
+ nullptr, /* free_definite_size_function */ |
377 |
+ nullptr, /* next */ |
378 |
+ }; |
379 |
++ |
380 |
++#else // defined(__GLIBC__) |
381 |
++ |
382 |
++#include <dlfcn.h> |
383 |
++ |
384 |
++extern "C" { |
385 |
++// Declare function pointers to the memory functions |
386 |
++typedef void* (*t_libc_malloc)(size_t size); |
387 |
++typedef void* (*t_libc_calloc)(size_t n, size_t size); |
388 |
++typedef void* (*t_libc_realloc)(void* address, size_t size); |
389 |
++typedef void* (*t_libc_memalign)(size_t alignment, size_t size); |
390 |
++typedef void (*t_libc_free)(void* ptr); |
391 |
++typedef size_t (*t_libc_malloc_usable_size)(void* ptr); |
392 |
++ |
393 |
++// Static instances of pointers to libc.so dl symbols |
394 |
++static t_libc_malloc libc_malloc = NULL; |
395 |
++static t_libc_calloc libc_calloc = NULL; |
396 |
++static t_libc_realloc libc_realloc = NULL; |
397 |
++static t_libc_memalign libc_memalign = NULL; |
398 |
++static t_libc_free libc_free = NULL; |
399 |
++static t_libc_malloc_usable_size libc_malloc_usable_size = NULL; |
400 |
++ |
401 |
++// resolve the symbols in libc.so |
402 |
++void musl_libc_memory_init(void) |
403 |
++{ |
404 |
++ libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc"); |
405 |
++ libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc"); |
406 |
++ libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc"); |
407 |
++ libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign"); |
408 |
++ libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free"); |
409 |
++ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size"); |
410 |
++} |
411 |
++} // extern "C" |
412 |
++ |
413 |
++namespace { |
414 |
++ |
415 |
++using base::allocator::AllocatorDispatch; |
416 |
++ |
417 |
++void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) { |
418 |
++ if (!libc_malloc) |
419 |
++ musl_libc_memory_init(); |
420 |
++ return (*libc_malloc)(size); |
421 |
++} |
422 |
++ |
423 |
++void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) { |
424 |
++ if (!libc_calloc) |
425 |
++ musl_libc_memory_init(); |
426 |
++ return (*libc_calloc)(n, size); |
427 |
++} |
428 |
++ |
429 |
++void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) { |
430 |
++ if (!libc_realloc) |
431 |
++ musl_libc_memory_init(); |
432 |
++ return (*libc_realloc)(address, size); |
433 |
++} |
434 |
++ |
435 |
++void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) { |
436 |
++ if (!libc_memalign) |
437 |
++ musl_libc_memory_init(); |
438 |
++ return (*libc_memalign)(alignment, size); |
439 |
++} |
440 |
++ |
441 |
++void MuslFree(const AllocatorDispatch*, void* address, void* context) { |
442 |
++ if (!libc_free) |
443 |
++ musl_libc_memory_init(); |
444 |
++ (*libc_free)(address); |
445 |
++} |
446 |
++ |
447 |
++size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) { |
448 |
++ // TODO(siggi, primiano): malloc_usable_size may need redirection in the |
449 |
++ // presence of interposing shims that divert allocations. |
450 |
++ if (!libc_malloc_usable_size) |
451 |
++ musl_libc_memory_init(); |
452 |
++ return (*libc_malloc_usable_size)(address); |
453 |
++} |
454 |
++ |
455 |
++} // namespace |
456 |
++ |
457 |
++const AllocatorDispatch AllocatorDispatch::default_dispatch = { |
458 |
++ &MuslMalloc, /* alloc_function */ |
459 |
++ &MuslCalloc, /* alloc_zero_initialized_function */ |
460 |
++ &MuslMemalign, /* alloc_aligned_function */ |
461 |
++ &MuslRealloc, /* realloc_function */ |
462 |
++ &MuslFree, /* free_function */ |
463 |
++ &MuslGetSizeEstimate, /* get_size_estimate_function */ |
464 |
++ nullptr, /* next */ |
465 |
++}; |
466 |
++ |
467 |
++#endif |
468 |
|
469 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-execinfo.patch b/dev-qt/qtwebengine/files/musl/qt-musl-execinfo.patch |
470 |
new file mode 100644 |
471 |
index 0000000..af8d55c |
472 |
--- /dev/null |
473 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-execinfo.patch |
474 |
@@ -0,0 +1,259 @@ |
475 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/leak_tracker.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/leak_tracker.h |
476 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/leak_tracker.h 2018-11-19 18:55:45.000000000 +0000 |
477 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/leak_tracker.h 2019-01-03 16:49:39.751073711 +0000 |
478 |
+@@ -10,7 +10,7 @@ |
479 |
+ #include "build/build_config.h" |
480 |
+ |
481 |
+ // Only enable leak tracking in non-uClibc debug builds. |
482 |
+-#if !defined(NDEBUG) && !defined(__UCLIBC__) |
483 |
++#if !defined(NDEBUG) && defined(__GLIBC__) |
484 |
+ #define ENABLE_LEAK_TRACKER |
485 |
+ #endif |
486 |
+ |
487 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace.cc qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace.cc |
488 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace.cc 2018-11-19 18:55:45.000000000 +0000 |
489 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace.cc 2019-01-03 16:49:46.971351734 +0000 |
490 |
+@@ -214,7 +214,7 @@ |
491 |
+ |
492 |
+ std::string StackTrace::ToString() const { |
493 |
+ std::stringstream stream; |
494 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
495 |
++#if defined(__GLIBC__) && !defined(_AIX) |
496 |
+ OutputToStream(&stream); |
497 |
+ #endif |
498 |
+ return stream.str(); |
499 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace.h |
500 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace.h 2018-11-19 18:55:45.000000000 +0000 |
501 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace.h 2019-01-03 16:49:59.271825377 +0000 |
502 |
+@@ -83,7 +83,7 @@ |
503 |
+ // Prints the stack trace to stderr. |
504 |
+ void Print() const; |
505 |
+ |
506 |
+-#if !defined(__UCLIBC__) & !defined(_AIX) |
507 |
++#if defined(__GLIBC__) & !defined(_AIX) |
508 |
+ // Resolves backtrace to symbols and write to stream. |
509 |
+ void OutputToStream(std::ostream* os) const; |
510 |
+ #endif |
511 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace_posix.cc qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace_posix.cc |
512 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2018-11-19 18:55:45.000000000 +0000 |
513 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2019-01-03 16:48:39.980772200 +0000 |
514 |
+@@ -27,7 +27,7 @@ |
515 |
+ #if !defined(USE_SYMBOLIZE) |
516 |
+ #include <cxxabi.h> |
517 |
+ #endif |
518 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
519 |
++#if defined(__GLIBC__) && !defined(_AIX) |
520 |
+ #include <execinfo.h> |
521 |
+ #endif |
522 |
+ |
523 |
+@@ -85,7 +85,7 @@ |
524 |
+ // Note: code in this function is NOT async-signal safe (std::string uses |
525 |
+ // malloc internally). |
526 |
+ |
527 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
528 |
++#if defined(__GLIBC__) && !defined(_AIX) |
529 |
+ std::string::size_type search_from = 0; |
530 |
+ while (search_from < text->size()) { |
531 |
+ // Look for the start of a mangled symbol, from search_from. |
532 |
+@@ -120,7 +120,7 @@ |
533 |
+ search_from = mangled_start + 2; |
534 |
+ } |
535 |
+ } |
536 |
+-#endif // !defined(__UCLIBC__) && !defined(_AIX) |
537 |
++#endif // defined(__GLIBC__) && !defined(_AIX) |
538 |
+ } |
539 |
+ #endif // !defined(USE_SYMBOLIZE) |
540 |
+ |
541 |
+@@ -132,7 +132,7 @@ |
542 |
+ virtual ~BacktraceOutputHandler() = default; |
543 |
+ }; |
544 |
+ |
545 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
546 |
++#if defined(__GLIBC__) && !defined(_AIX) |
547 |
+ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { |
548 |
+ // This should be more than enough to store a 64-bit number in hex: |
549 |
+ // 16 hex digits + 1 for null-terminator. |
550 |
+@@ -209,7 +209,7 @@ |
551 |
+ } |
552 |
+ #endif // defined(USE_SYMBOLIZE) |
553 |
+ } |
554 |
+-#endif // !defined(__UCLIBC__) && !defined(_AIX) |
555 |
++#endif // defined(__GLIBC__) && !defined(_AIX) |
556 |
+ |
557 |
+ void PrintToStderr(const char* output) { |
558 |
+ // NOTE: This code MUST be async-signal safe (it's used by in-process |
559 |
+@@ -800,7 +800,7 @@ |
560 |
+ // NOTE: This code MUST be async-signal safe (it's used by in-process |
561 |
+ // stack dumping signal handler). NO malloc or stdio is allowed here. |
562 |
+ |
563 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
564 |
++#if defined(__GLIBC__) && !defined(_AIX) |
565 |
+ count = std::min(arraysize(trace_), count); |
566 |
+ |
567 |
+ // Though the backtrace API man page does not list any possible negative |
568 |
+@@ -815,13 +815,13 @@ |
569 |
+ // NOTE: This code MUST be async-signal safe (it's used by in-process |
570 |
+ // stack dumping signal handler). NO malloc or stdio is allowed here. |
571 |
+ |
572 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
573 |
++#if defined(__GLIBC__) && !defined(_AIX) |
574 |
+ PrintBacktraceOutputHandler handler; |
575 |
+ ProcessBacktrace(trace_, count_, &handler); |
576 |
+ #endif |
577 |
+ } |
578 |
+ |
579 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
580 |
++#if defined(__GLIBC__) && !defined(_AIX) |
581 |
+ void StackTrace::OutputToStream(std::ostream* os) const { |
582 |
+ StreamBacktraceOutputHandler handler(os); |
583 |
+ ProcessBacktrace(trace_, count_, &handler); |
584 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc |
585 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc 2018-11-19 18:55:45.000000000 +0000 |
586 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc 2019-01-03 16:49:05.605758913 +0000 |
587 |
+@@ -39,7 +39,7 @@ |
588 |
+ #else |
589 |
+ #define MAYBE_OutputToStream OutputToStream |
590 |
+ #endif |
591 |
+-#if !defined(__UCLIBC__) && !defined(_AIX) |
592 |
++#if defined(__GLIBC__) && !defined(_AIX) |
593 |
+ TEST_F(StackTraceTest, MAYBE_OutputToStream) { |
594 |
+ StackTrace trace; |
595 |
+ |
596 |
+@@ -151,7 +151,7 @@ |
597 |
+ TEST_F(StackTraceTest, DebugPrintBacktrace) { |
598 |
+ StackTrace().Print(); |
599 |
+ } |
600 |
+-#endif // !defined(__UCLIBC__) |
601 |
++#endif // defined(__GLIBC__) |
602 |
+ |
603 |
+ #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) |
604 |
+ #if !defined(OS_IOS) |
605 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/logging.cc qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/logging.cc |
606 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/logging.cc 2018-11-19 18:55:45.000000000 +0000 |
607 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/logging.cc 2019-01-03 16:50:39.137361583 +0000 |
608 |
+@@ -574,7 +574,7 @@ |
609 |
+ |
610 |
+ LogMessage::~LogMessage() { |
611 |
+ size_t stack_start = stream_.tellp(); |
612 |
+-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \ |
613 |
++#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \ |
614 |
+ !defined(OS_AIX) |
615 |
+ if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { |
616 |
+ // Include a stack trace on a fatal, unless a debugger is attached. |
617 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/build/build_config.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/build/build_config.h |
618 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/build/build_config.h 2018-11-19 18:55:45.000000000 +0000 |
619 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/build/build_config.h 2019-01-03 16:47:30.314089618 +0000 |
620 |
+@@ -43,7 +43,7 @@ |
621 |
+ #define OS_LINUX 1 |
622 |
+ // include a system header to pull in features.h for glibc/uclibc macros. |
623 |
+ #include <unistd.h> |
624 |
+-#if defined(__GLIBC__) && !defined(__UCLIBC__) |
625 |
++#if defined(__GLIBC__) |
626 |
+ // we really are using glibc, not uClibc pretending to be glibc |
627 |
+ #define LIBC_GLIBC 1 |
628 |
+ #endif |
629 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp |
630 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2018-11-19 18:55:45.000000000 +0000 |
631 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2019-01-03 16:53:50.292728521 +0000 |
632 |
+@@ -49,7 +49,7 @@ |
633 |
+ #include <windows.h> |
634 |
+ #endif |
635 |
+ |
636 |
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__)) |
637 |
++#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(__GLIBC__)) |
638 |
+ #include <cxxabi.h> |
639 |
+ #include <dlfcn.h> |
640 |
+ #include <execinfo.h> |
641 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/glsl/strtod.c qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/glsl/strtod.c |
642 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/glsl/strtod.c 2018-11-19 18:55:45.000000000 +0000 |
643 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/glsl/strtod.c 2019-01-03 16:51:04.446336966 +0000 |
644 |
+@@ -45,7 +45,7 @@ |
645 |
+ glsl_strtod(const char *s, char **end) |
646 |
+ { |
647 |
+ #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ |
648 |
+- !defined(__HAIKU__) && !defined(__UCLIBC__) && !defined(ANDROID) |
649 |
++ !defined(__HAIKU__) && defined(__GLIBC__) && !defined(ANDROID) |
650 |
+ static locale_t loc = NULL; |
651 |
+ if (!loc) { |
652 |
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL); |
653 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/mesa/drivers/dri/common/xmlconfig.c qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/mesa/drivers/dri/common/xmlconfig.c |
654 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/mesa/drivers/dri/common/xmlconfig.c 2018-11-19 18:55:45.000000000 +0000 |
655 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/mesa/drivers/dri/common/xmlconfig.c 2019-01-03 16:52:43.126139986 +0000 |
656 |
+@@ -41,7 +41,7 @@ |
657 |
+ |
658 |
+ #undef GET_PROGRAM_NAME |
659 |
+ |
660 |
+-#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__) |
661 |
++#if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) |
662 |
+ # if !defined(__GLIBC__) || (__GLIBC__ < 2) |
663 |
+ /* These aren't declared in any libc5 header */ |
664 |
+ extern char *program_invocation_name, *program_invocation_short_name; |
665 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/mesa/main/imports.c qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/mesa/main/imports.c |
666 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/mesa/src/src/mesa/main/imports.c 2018-11-19 18:55:45.000000000 +0000 |
667 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/mesa/src/src/mesa/main/imports.c 2019-01-03 16:52:34.009788651 +0000 |
668 |
+@@ -542,7 +542,7 @@ |
669 |
+ _mesa_strtof( const char *s, char **end ) |
670 |
+ { |
671 |
+ #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ |
672 |
+- !defined(ANDROID) && !defined(__HAIKU__) && !defined(__UCLIBC__) |
673 |
++ !defined(ANDROID) && !defined(__HAIKU__) && defined(__GLIBC__) |
674 |
+ static locale_t loc = NULL; |
675 |
+ if (!loc) { |
676 |
+ loc = newlocale(LC_CTYPE_MASK, "C", NULL); |
677 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/pdfium/third_party/build/build_config.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/pdfium/third_party/build/build_config.h |
678 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/pdfium/third_party/build/build_config.h 2018-11-19 18:55:45.000000000 +0000 |
679 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/pdfium/third_party/build/build_config.h 2019-01-03 16:51:13.710694002 +0000 |
680 |
+@@ -43,7 +43,7 @@ |
681 |
+ #define OS_LINUX 1 |
682 |
+ // include a system header to pull in features.h for glibc/uclibc macros. |
683 |
+ #include <unistd.h> |
684 |
+-#if defined(__GLIBC__) && !defined(__UCLIBC__) |
685 |
++#if defined(__GLIBC__) |
686 |
+ // we really are using glibc, not uClibc pretending to be glibc |
687 |
+ #define LIBC_GLIBC 1 |
688 |
+ #endif |
689 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp |
690 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp 2018-11-19 18:55:45.000000000 +0000 |
691 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/skia/src/ports/SkOSFile_stdio.cpp 2019-01-03 16:50:46.693652796 +0000 |
692 |
+@@ -88,7 +88,7 @@ |
693 |
+ } |
694 |
+ |
695 |
+ void sk_fsync(FILE* f) { |
696 |
+-#if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \ |
697 |
++#if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && defined(__GLIBC__) \ |
698 |
+ && !defined(_NEWLIB_VERSION) |
699 |
+ int fd = fileno(f); |
700 |
+ fsync(fd); |
701 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/sqlite/amalgamation/config.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/sqlite/amalgamation/config.h |
702 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/sqlite/amalgamation/config.h 2018-11-19 18:55:45.000000000 +0000 |
703 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/sqlite/amalgamation/config.h 2019-01-03 16:53:47.012602106 +0000 |
704 |
+@@ -33,7 +33,7 @@ |
705 |
+ * malloc_usable_size() is not exported by the Android NDK. It is not |
706 |
+ * implemented by uclibc. |
707 |
+ */ |
708 |
+-#if defined(__linux__) && !defined(__UCLIBC__) |
709 |
++#if defined(__linux__) && defined(__GLIBC__) |
710 |
+ #define HAVE_MALLOC_H 1 |
711 |
+ #define HAVE_MALLOC_USABLE_SIZE 1 |
712 |
+ #endif |
713 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc |
714 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2018-11-19 18:55:45.000000000 +0000 |
715 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2019-01-03 16:53:17.723473331 +0000 |
716 |
+@@ -16,7 +16,7 @@ |
717 |
+ #include <cstdio> |
718 |
+ #include <cstdlib> |
719 |
+ |
720 |
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) |
721 |
++#if defined(__GLIBCXX__) && defined(__GLIBC__) |
722 |
+ #include <cxxabi.h> |
723 |
+ #include <execinfo.h> |
724 |
+ #endif |
725 |
+@@ -73,7 +73,7 @@ |
726 |
+ // to get usable symbols on Linux. This is copied from V8. Chromium has a more |
727 |
+ // advanced stace trace system; also more difficult to copy. |
728 |
+ void DumpBacktrace() { |
729 |
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) |
730 |
++#if defined(__GLIBCXX__) && defined(__GLIBC__) |
731 |
+ void* trace[100]; |
732 |
+ int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); |
733 |
+ char** symbols = backtrace_symbols(trace, size); |
734 |
|
735 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-fpstate.patch b/dev-qt/qtwebengine/files/musl/qt-musl-fpstate.patch |
736 |
new file mode 100644 |
737 |
index 0000000..42fe157 |
738 |
--- /dev/null |
739 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-fpstate.patch |
740 |
@@ -0,0 +1,48 @@ |
741 |
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
742 |
+index 052ce37..95b0fb4 100644 |
743 |
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
744 |
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
745 |
+@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
746 |
+ } |
747 |
+ |
748 |
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
749 |
+- const struct _libc_fpstate* fp) { |
750 |
++ const struct _fpstate* fp) { |
751 |
+ const greg_t* regs = uc->uc_mcontext.gregs; |
752 |
+ |
753 |
+ out->context_flags = MD_CONTEXT_X86_FULL | |
754 |
+@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
755 |
+ } |
756 |
+ |
757 |
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
758 |
+- const struct _libc_fpstate* fpregs) { |
759 |
++ const struct _fpstate* fpregs) { |
760 |
+ const greg_t* regs = uc->uc_mcontext.gregs; |
761 |
+ |
762 |
+ out->context_flags = MD_CONTEXT_AMD64_FULL; |
763 |
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
764 |
+index f830618..f3dde1f 100644 |
765 |
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
766 |
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
767 |
+@@ -50,7 +50,7 @@ struct UContextReader { |
768 |
+ // info: the collection of register structures. |
769 |
+ #if defined(__i386__) || defined(__x86_64) |
770 |
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
771 |
+- const struct _libc_fpstate* fp); |
772 |
++ const struct _fpstate* fp); |
773 |
+ #elif defined(__aarch64__) |
774 |
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
775 |
+ const struct fpsimd_context* fpregs); |
776 |
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h |
777 |
+index d1dc331..d1cc562 100644 |
778 |
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h |
779 |
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h |
780 |
+@@ -48,7 +48,7 @@ class ExceptionHandler; |
781 |
+ #if defined(__aarch64__) |
782 |
+ typedef struct fpsimd_context fpstate_t; |
783 |
+ #elif !defined(__ARM_EABI__) && !defined(__mips__) |
784 |
+-typedef struct _libc_fpstate fpstate_t; |
785 |
++typedef struct _fpstate fpstate_t; |
786 |
+ #endif |
787 |
+ |
788 |
+ // These entries store a list of memory regions that the client wants included |
789 |
|
790 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-mallinfo.patch b/dev-qt/qtwebengine/files/musl/qt-musl-mallinfo.patch |
791 |
new file mode 100644 |
792 |
index 0000000..545b7bf |
793 |
--- /dev/null |
794 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-mallinfo.patch |
795 |
@@ -0,0 +1,42 @@ |
796 |
+--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2017-11-28 14:06:53.000000000 +0100 |
797 |
++++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2018-01-27 20:13:26.960932805 +0100 |
798 |
+@@ -243,7 +243,7 @@ |
799 |
+ allocated_objects_count = main_heap_info.block_count; |
800 |
+ #elif defined(OS_FUCHSIA) |
801 |
+ // TODO(fuchsia): Port, see https://crbug.com/706592. |
802 |
+-#else |
803 |
++#elif defined(__GLIBC__) |
804 |
+ struct mallinfo info = mallinfo(); |
805 |
+ DCHECK_GE(info.arena + info.hblkhd, info.uordblks); |
806 |
+ |
807 |
+@@ -255,6 +255,8 @@ |
808 |
+ |
809 |
+ // Total allocated space is given by |uordblks|. |
810 |
+ allocated_objects_size = info.uordblks; |
811 |
++#else |
812 |
++// musl libc does not support mallinfo() |
813 |
+ #endif |
814 |
+ |
815 |
+ MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc"); |
816 |
+--- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2017-11-28 14:06:53.000000000 +0100 |
817 |
++++ qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2018-01-27 20:48:11.571040348 +0100 |
818 |
+@@ -94,7 +94,7 @@ |
819 |
+ malloc_statistics_t stats = {0}; |
820 |
+ malloc_zone_statistics(nullptr, &stats); |
821 |
+ return stats.size_in_use; |
822 |
+-#elif defined(OS_LINUX) || defined(OS_ANDROID) |
823 |
++#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID) |
824 |
+ struct mallinfo minfo = mallinfo(); |
825 |
+ #if defined(USE_TCMALLOC) |
826 |
+ return minfo.uordblks; |
827 |
+--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2018-11-19 18:55:45.000000000 +0000 |
828 |
++++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2019-01-05 00:34:23.346513661 +0000 |
829 |
+@@ -25,7 +25,7 @@ |
830 |
+ // though, this provides only a partial and misleading value. |
831 |
+ // Unfortunately some telemetry benchmark rely on it and these need to |
832 |
+ // be refactored before getting rid of this. See crbug.com/581365 . |
833 |
+-#if defined(OS_LINUX) || defined(OS_ANDROID) |
834 |
++#if defined(__GLIBC__) && ( defined(OS_LINUX) || defined(OS_ANDROID) ) |
835 |
+ size_t GetMemoryUsageKB() { |
836 |
+ struct mallinfo minfo = mallinfo(); |
837 |
+ uint64_t mem_usage = |
838 |
|
839 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-off_t.patch b/dev-qt/qtwebengine/files/musl/qt-musl-off_t.patch |
840 |
new file mode 100644 |
841 |
index 0000000..52db3b9 |
842 |
--- /dev/null |
843 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-off_t.patch |
844 |
@@ -0,0 +1,10 @@ |
845 |
+--- qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2016-05-26 14:58:54.000000000 +0200 |
846 |
++++ qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2016-10-01 14:31:30.885000000 +0200 |
847 |
+@@ -21,6 +21,7 @@ |
848 |
+ #define htons(x) _byteswap_ushort (x) |
849 |
+ #else |
850 |
+ #include <arpa/inet.h> |
851 |
++#include <sys/types.h> |
852 |
+ #include <stdint.h> |
853 |
+ #endif |
854 |
+ |
855 |
|
856 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-pread-pwrite.patch b/dev-qt/qtwebengine/files/musl/qt-musl-pread-pwrite.patch |
857 |
new file mode 100644 |
858 |
index 0000000..c5dcfd8 |
859 |
--- /dev/null |
860 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-pread-pwrite.patch |
861 |
@@ -0,0 +1,20 @@ |
862 |
+diff --git a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h |
863 |
+index 5d9c2e8..e81e7b4 100644 |
864 |
+--- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h |
865 |
++++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h |
866 |
+@@ -1794,6 +1794,15 @@ struct kernel_statfs { |
867 |
+ /* End of s390/s390x definitions */ |
868 |
+ #endif |
869 |
+ |
870 |
++#ifndef __GLIBC__ |
871 |
++ /* For Musl libc pread/pread is the same as pread64/pwrite64 */ |
872 |
++#ifndef __NR_pread |
873 |
++#define __NR_pread __NR_pread64 |
874 |
++#endif |
875 |
++#ifndef __NR_pwrite |
876 |
++#define __NR_pwrite __NR_pwrite64 |
877 |
++#endif |
878 |
++#endif /* ifndef __GLIBC__ */ |
879 |
+ |
880 |
+ /* After forking, we must make sure to only call system calls. */ |
881 |
+ #if defined(__BOUNDED_POINTERS__) |
882 |
|
883 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-pvalloc.patch b/dev-qt/qtwebengine/files/musl/qt-musl-pvalloc.patch |
884 |
new file mode 100644 |
885 |
index 0000000..d5caf38 |
886 |
--- /dev/null |
887 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-pvalloc.patch |
888 |
@@ -0,0 +1,14 @@ |
889 |
+--- qtwebengine/src/core/api/qtbug-61521.cpp 2017-11-29 09:42:29.000000000 +0100 |
890 |
++++ qtwebengine/src/core/api/qtbug-61521.cpp 2018-01-28 06:49:29.454175725 +0100 |
891 |
+@@ -111,7 +111,11 @@ |
892 |
+ } |
893 |
+ |
894 |
+ SHIM_HIDDEN void* ShimPvalloc(size_t size) { |
895 |
++#if defined(__GLIBC__) |
896 |
+ return pvalloc(size); |
897 |
++#else |
898 |
++ return valloc((size+4095)&~4095); |
899 |
++#endif |
900 |
+ } |
901 |
+ |
902 |
+ SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) { |
903 |
|
904 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-remove-cdefs.patch b/dev-qt/qtwebengine/files/musl/qt-musl-remove-cdefs.patch |
905 |
new file mode 100644 |
906 |
index 0000000..2c02dae |
907 |
--- /dev/null |
908 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-remove-cdefs.patch |
909 |
@@ -0,0 +1,12 @@ |
910 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/allocator/allocator_shim_internals.h qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/allocator/allocator_shim_internals.h |
911 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/base/allocator/allocator_shim_internals.h 2018-11-19 18:55:45.000000000 +0000 |
912 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/base/allocator/allocator_shim_internals.h 2019-01-05 00:17:19.461697601 +0000 |
913 |
+@@ -7,7 +7,7 @@ |
914 |
+ |
915 |
+ #if defined(__GNUC__) |
916 |
+ |
917 |
+-#include <sys/cdefs.h> // for __THROW |
918 |
++//#include <sys/cdefs.h> // for __THROW |
919 |
+ |
920 |
+ #ifndef __THROW // Not a glibc system |
921 |
+ #ifdef _NOEXCEPT // LLVM libc++ uses noexcept instead |
922 |
|
923 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-resolve.patch b/dev-qt/qtwebengine/files/musl/qt-musl-resolve.patch |
924 |
new file mode 100644 |
925 |
index 0000000..a481e50 |
926 |
--- /dev/null |
927 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-resolve.patch |
928 |
@@ -0,0 +1,61 @@ |
929 |
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2016-11-07 15:46:18.000000000 +0100 |
930 |
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2016-12-20 03:33:11.749059656 +0100 |
931 |
+@@ -9,6 +9,10 @@ |
932 |
+ |
933 |
+ #include <resolv.h> |
934 |
+ |
935 |
++#if !defined(__GLIBC__) |
936 |
++#include "resolv_compat.h" |
937 |
++#endif |
938 |
++ |
939 |
+ #include "base/lazy_instance.h" |
940 |
+ #include "base/logging.h" |
941 |
+ #include "base/macros.h" |
942 |
+--- qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2016-11-07 15:46:18.000000000 +0100 |
943 |
++++ qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2016-12-20 03:40:07.671953098 +0100 |
944 |
+@@ -6,6 +6,10 @@ |
945 |
+ |
946 |
+ #include <string> |
947 |
+ |
948 |
++#if !defined(__GLIBC__) |
949 |
++#include "resolv_compat.h" |
950 |
++#endif |
951 |
++ |
952 |
+ #include "base/bind.h" |
953 |
+ #include "base/files/file.h" |
954 |
+ #include "base/files/file_path.h" |
955 |
+diff --git a/src/3rdparty/chromium/net/dns/resolv_compat.h b/src/3rdparty/chromium/net/dns/resolv_compat.h |
956 |
+new file mode 100644 |
957 |
+index 0000000..4f0e852 |
958 |
+--- /dev/null |
959 |
++++ b/src/3rdparty/chromium/net/dns/resolv_compat.h |
960 |
+@@ -0,0 +1,29 @@ |
961 |
++#if !defined(__GLIBC__) |
962 |
++/*************************************************************************** |
963 |
++ * resolv_compat.h |
964 |
++ * |
965 |
++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc |
966 |
++ * Note: res_init() is actually deprecated according to |
967 |
++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html |
968 |
++ **************************************************************************/ |
969 |
++#include <string.h> |
970 |
++ |
971 |
++static inline int res_ninit(res_state statp) |
972 |
++{ |
973 |
++ int rc = res_init(); |
974 |
++ if (statp != &_res) { |
975 |
++ memcpy(statp, &_res, sizeof(*statp)); |
976 |
++ } |
977 |
++ return rc; |
978 |
++} |
979 |
++ |
980 |
++static inline int res_nclose(res_state statp) |
981 |
++{ |
982 |
++ if (!statp) |
983 |
++ return -1; |
984 |
++ if (statp != &_res) { |
985 |
++ memset(statp, 0, sizeof(*statp)); |
986 |
++ } |
987 |
++ return 0; |
988 |
++} |
989 |
++#endif |
990 |
|
991 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-serialio.patch b/dev-qt/qtwebengine/files/musl/qt-musl-serialio.patch |
992 |
new file mode 100644 |
993 |
index 0000000..cf0e0fa |
994 |
--- /dev/null |
995 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-serialio.patch |
996 |
@@ -0,0 +1,12 @@ |
997 |
+--- qtwebengine/src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc 2017-01-03 10:28:53.000000000 +0100 |
998 |
++++ qtwebengine/src/3rdparty/chromium/device/serial/serial_io_handler_posix.cc 2017-02-23 21:20:42.650669563 +0100 |
999 |
+@@ -12,6 +12,9 @@ |
1000 |
+ |
1001 |
+ #if defined(OS_LINUX) |
1002 |
+ #include <linux/serial.h> |
1003 |
++#if !defined(__GLIBC__) |
1004 |
++#include <asm-generic/ioctls.h> |
1005 |
++#endif |
1006 |
+ |
1007 |
+ // The definition of struct termios2 is copied from asm-generic/termbits.h |
1008 |
+ // because including that header directly conflicts with termios.h. |
1009 |
|
1010 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-siginfo_t.patch b/dev-qt/qtwebengine/files/musl/qt-musl-siginfo_t.patch |
1011 |
new file mode 100644 |
1012 |
index 0000000..fe760be |
1013 |
--- /dev/null |
1014 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-siginfo_t.patch |
1015 |
@@ -0,0 +1,18 @@ |
1016 |
+There's a subtle difference in the internal name of siginfo_t fields |
1017 |
+between glibc and musl. The structure itself is equivalent, so it |
1018 |
+should suffice to add a macro to rename the field. |
1019 |
+ |
1020 |
+--- qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-02-17 05:57:43.000000000 +0100 |
1021 |
++++ qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2015-06-03 08:20:25.032716427 +0200 |
1022 |
+@@ -22,6 +22,11 @@ |
1023 |
+ #include "sandbox/linux/services/android_ucontext.h" |
1024 |
+ #endif |
1025 |
+ |
1026 |
++// musl libc defines siginfo_t __si_fields instead of _sifields |
1027 |
++#if !defined(__GLIBC__) |
1028 |
++#define _sifields __si_fields |
1029 |
++#endif |
1030 |
++ |
1031 |
+ namespace { |
1032 |
+ |
1033 |
+ const int kCapacityIncrement = 20; |
1034 |
|
1035 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-stackstart.patch b/dev-qt/qtwebengine/files/musl/qt-musl-stackstart.patch |
1036 |
new file mode 100644 |
1037 |
index 0000000..5002cfd |
1038 |
--- /dev/null |
1039 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-stackstart.patch |
1040 |
@@ -0,0 +1,21 @@ |
1041 |
+diff -Naur qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp |
1042 |
+--- qtwebengine-everywhere-src-5.11.3.orig/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2018-11-19 18:55:45.000000000 +0000 |
1043 |
++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2019-01-05 00:28:12.437391690 +0000 |
1044 |
+@@ -28,7 +28,7 @@ |
1045 |
+ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size |
1046 |
+ // correctly for the main thread. |
1047 |
+ |
1048 |
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ |
1049 |
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ |
1050 |
+ defined(OS_FUCHSIA) |
1051 |
+ // pthread_getattr_np() can fail if the thread is not invoked by |
1052 |
+ // pthread_create() (e.g., the main thread of webkit_unit_tests). |
1053 |
+@@ -96,7 +96,7 @@ |
1054 |
+ } |
1055 |
+ |
1056 |
+ void* GetStackStart() { |
1057 |
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ |
1058 |
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ |
1059 |
+ defined(OS_FUCHSIA) |
1060 |
+ pthread_attr_t attr; |
1061 |
+ int error; |
1062 |
|
1063 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-sysreg-for__WORDSIZE.patch b/dev-qt/qtwebengine/files/musl/qt-musl-sysreg-for__WORDSIZE.patch |
1064 |
new file mode 100644 |
1065 |
index 0000000..a8b74e4 |
1066 |
--- /dev/null |
1067 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-sysreg-for__WORDSIZE.patch |
1068 |
@@ -0,0 +1,14 @@ |
1069 |
+diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h |
1070 |
+index d03c7a8..d43fda0 100644 |
1071 |
+--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h |
1072 |
++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h |
1073 |
+@@ -36,6 +36,9 @@ |
1074 |
+ #include <elf.h> |
1075 |
+ #include <link.h> |
1076 |
+ #include <stddef.h> |
1077 |
++#ifndef __GLIBC__ |
1078 |
++#include <sys/reg.h> |
1079 |
++#endif |
1080 |
+ |
1081 |
+ #include "common/memory_range.h" |
1082 |
+ |
1083 |
|
1084 |
diff --git a/dev-qt/qtwebengine/files/musl/qt-musl-thread-stacksize.patch b/dev-qt/qtwebengine/files/musl/qt-musl-thread-stacksize.patch |
1085 |
new file mode 100644 |
1086 |
index 0000000..a5c59fe |
1087 |
--- /dev/null |
1088 |
+++ b/dev-qt/qtwebengine/files/musl/qt-musl-thread-stacksize.patch |
1089 |
@@ -0,0 +1,26 @@ |
1090 |
+diff --git a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc |
1091 |
+index 02bf49b..05ee182 100644 |
1092 |
+--- a/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc |
1093 |
++++ b/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc |
1094 |
+@@ -13,7 +13,7 @@ namespace pp { |
1095 |
+ namespace { |
1096 |
+ |
1097 |
+ // Use 2MB default stack size for Native Client, otherwise use system default. |
1098 |
+-#if defined(__native_client__) |
1099 |
++#if defined(__native_client__) || !defined(__GLIBC__) |
1100 |
+ const size_t kDefaultStackSize = 2 * 1024 * 1024; |
1101 |
+ #else |
1102 |
+ const size_t kDefaultStackSize = 0; |
1103 |
+diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
1104 |
+index cf7f3ec..e06a5ce 100644 |
1105 |
+--- a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
1106 |
++++ b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc |
1107 |
+@@ -761,7 +761,7 @@ void Thread::Start() { |
1108 |
+ #if V8_OS_MACOSX |
1109 |
+ // Default on Mac OS X is 512kB -- bump up to 1MB |
1110 |
+ stack_size = 1 * 1024 * 1024; |
1111 |
+-#elif V8_OS_AIX |
1112 |
++#elif V8_OS_AIX || !defined(__GLIBC__) |
1113 |
+ // Default on AIX is 96kB -- bump up to 2MB |
1114 |
+ stack_size = 2 * 1024 * 1024; |
1115 |
+ #endif |
1116 |
|
1117 |
diff --git a/dev-qt/qtwebengine/files/musl/yasm-nls.patch b/dev-qt/qtwebengine/files/musl/yasm-nls.patch |
1118 |
new file mode 100644 |
1119 |
index 0000000..6b412ab |
1120 |
--- /dev/null |
1121 |
+++ b/dev-qt/qtwebengine/files/musl/yasm-nls.patch |
1122 |
@@ -0,0 +1,13 @@ |
1123 |
+diff --git a/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h b/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h |
1124 |
+index 9e36539..f588083 100644 |
1125 |
+--- a/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h |
1126 |
++++ b/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h |
1127 |
+@@ -5,7 +5,7 @@ |
1128 |
+ #define CPP_PROG "gcc -E" |
1129 |
+ |
1130 |
+ /* */ |
1131 |
+-#define ENABLE_NLS 1 |
1132 |
++/* #undef ENABLE_NLS 1 */ |
1133 |
+ |
1134 |
+ /* Define to 1 if you have the `abort' function. */ |
1135 |
+ #define HAVE_ABORT 1 |
1136 |
|
1137 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch |
1138 |
new file mode 100644 |
1139 |
index 0000000..aaf3aae |
1140 |
--- /dev/null |
1141 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch |
1142 |
@@ -0,0 +1,98 @@ |
1143 |
+From: Antonio Larrosa <alarrosa@××××.com> |
1144 |
+Subject: Disable GPU when using nouveau or running on wayland |
1145 |
+References: boo#1005323, boo#1060990 |
1146 |
+ |
1147 |
+Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support. |
1148 |
+It also crashes when running on wayland, the cause is not yet known. |
1149 |
+Work around these issues by not doing GPU-accelerated rendering in such |
1150 |
+cases. |
1151 |
+ |
1152 |
+Index: qtwebengine-everywhere-src-5.11.0/src/core/web_engine_context.cpp |
1153 |
+=================================================================== |
1154 |
+--- qtwebengine-everywhere-src-5.11.0.orig/src/core/web_engine_context.cpp |
1155 |
++++ qtwebengine-everywhere-src-5.11.0/src/core/web_engine_context.cpp |
1156 |
+@@ -100,6 +100,7 @@ |
1157 |
+ #include <QOffscreenSurface> |
1158 |
+ #ifndef QT_NO_OPENGL |
1159 |
+ # include <QOpenGLContext> |
1160 |
++# include <QOpenGLFunctions> |
1161 |
+ #endif |
1162 |
+ #include <QQuickWindow> |
1163 |
+ #include <QStringList> |
1164 |
+@@ -178,6 +179,39 @@ void dummyGetPluginCallback(const std::v |
1165 |
+ } |
1166 |
+ #endif |
1167 |
+ |
1168 |
++#ifndef QT_NO_OPENGL |
1169 |
++QString openGLVendor() |
1170 |
++{ |
1171 |
++ QString vendor; |
1172 |
++ |
1173 |
++ QOpenGLContext *oldContext = QOpenGLContext::currentContext(); |
1174 |
++ QSurface *oldSurface = 0; |
1175 |
++ if (oldContext) |
1176 |
++ oldSurface = oldContext->surface(); |
1177 |
++ |
1178 |
++ QScopedPointer<QOffscreenSurface> surface( new QOffscreenSurface ); |
1179 |
++ surface->create(); |
1180 |
++ QOpenGLContext context; |
1181 |
++ if (!context.create()) { |
1182 |
++ qDebug() << "Error creating openGL context"; |
1183 |
++ } |
1184 |
++ else if (!context.makeCurrent(surface.data())) { |
1185 |
++ qDebug() << "Error making openGL context current context"; |
1186 |
++ } else { |
1187 |
++ const GLubyte *p; |
1188 |
++ QOpenGLFunctions *f = context.functions(); |
1189 |
++ if ((p = f->glGetString(GL_VENDOR))) |
1190 |
++ vendor = QString::fromLatin1(reinterpret_cast<const char *>(p)); |
1191 |
++ } |
1192 |
++ |
1193 |
++ context.doneCurrent(); |
1194 |
++ if (oldContext && oldSurface) |
1195 |
++ oldContext->makeCurrent(oldSurface); |
1196 |
++ |
1197 |
++ return vendor; |
1198 |
++} |
1199 |
++#endif |
1200 |
++ |
1201 |
+ } // namespace |
1202 |
+ |
1203 |
+ namespace QtWebEngineCore { |
1204 |
+@@ -414,6 +448,27 @@ WebEngineContext::WebEngineContext() |
1205 |
+ const char *glType = 0; |
1206 |
+ #ifndef QT_NO_OPENGL |
1207 |
+ |
1208 |
++ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU"); |
1209 |
++ |
1210 |
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && platform.startsWith("wayland", Qt::CaseInsensitive)) |
1211 |
++ { |
1212 |
++ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n" |
1213 |
++ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n" |
1214 |
++ "environment variable before running this application, but this is \n" |
1215 |
++ "not recommended since this usually causes applications to crash."; |
1216 |
++ disableGpu = true; |
1217 |
++ } |
1218 |
++ |
1219 |
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau")) |
1220 |
++ { |
1221 |
++ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n" |
1222 |
++ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n" |
1223 |
++ "environment variable before running this application, but this is \n" |
1224 |
++ "not recommended since this usually causes applications to crash as\n" |
1225 |
++ "Nouveau openGL drivers don't support multithreaded rendering"; |
1226 |
++ disableGpu = true; |
1227 |
++ } |
1228 |
++ |
1229 |
+ bool tryGL = |
1230 |
+ !usingANGLE() |
1231 |
+ && (!usingSoftwareDynamicGL() |
1232 |
+@@ -424,7 +479,7 @@ WebEngineContext::WebEngineContext() |
1233 |
+ || enableWebGLSoftwareRendering |
1234 |
+ #endif |
1235 |
+ ) |
1236 |
+- && !usingQtQuick2DRenderer(); |
1237 |
++ && !usingQtQuick2DRenderer() && !disableGpu; |
1238 |
+ |
1239 |
+ if (tryGL) { |
1240 |
+ if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) { |
1241 |
|
1242 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.2-paxmark-mksnapshot.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.2-paxmark-mksnapshot.patch |
1243 |
new file mode 100644 |
1244 |
index 0000000..f7a5c06 |
1245 |
--- /dev/null |
1246 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.2-paxmark-mksnapshot.patch |
1247 |
@@ -0,0 +1,41 @@ |
1248 |
+Bug: https://bugs.gentoo.org/634220 |
1249 |
+ |
1250 |
+--- a/src/3rdparty/chromium/v8/BUILD.gn |
1251 |
++++ b/src/3rdparty/chromium/v8/BUILD.gn |
1252 |
+@@ -803,6 +803,7 @@ |
1253 |
+ |
1254 |
+ deps = [ |
1255 |
+ ":mksnapshot($v8_snapshot_toolchain)", |
1256 |
++ ":run_paxmark", |
1257 |
+ ] |
1258 |
+ |
1259 |
+ script = "tools/run.py" |
1260 |
+@@ -854,6 +855,28 @@ |
1261 |
+ } |
1262 |
+ } |
1263 |
+ } |
1264 |
++action("run_paxmark") { |
1265 |
++ visibility = [ ":*" ] # Only targets in this file can depend on this. |
1266 |
++ |
1267 |
++ deps = [ |
1268 |
++ ":mksnapshot($v8_snapshot_toolchain)", |
1269 |
++ ] |
1270 |
++ |
1271 |
++ script = "/usr/sbin/pypaxctl" |
1272 |
++ |
1273 |
++ sources = [] |
1274 |
++ |
1275 |
++ outputs = [ |
1276 |
++ "$target_out_dir/mksnapshot", |
1277 |
++ ] |
1278 |
++ |
1279 |
++ args = [ |
1280 |
++ "-sm", |
1281 |
++ "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", |
1282 |
++ "root_out_dir") + "/mksnapshot", |
1283 |
++ root_build_dir), |
1284 |
++ ] |
1285 |
++} |
1286 |
+ |
1287 |
+ action("v8_dump_build_config") { |
1288 |
+ script = "tools/testrunner/utils/dump_build_config.py" |
1289 |
|
1290 |
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch b/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch |
1291 |
new file mode 100644 |
1292 |
index 0000000..ba6a49f |
1293 |
--- /dev/null |
1294 |
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch |
1295 |
@@ -0,0 +1,24 @@ |
1296 |
+From: Fedora |
1297 |
+Subject: Fix build for 32-bit platforms |
1298 |
+ |
1299 |
+Apparently not upstream, can't find this anywhere. So I assume Fedora is the actual source? |
1300 |
+https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-66.0.3359.170-gcc8-alignof.patch |
1301 |
+ |
1302 |
+diff -up chromium-66.0.3359.170/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof chromium-66.0.3359.170/src/3rdparty/chromium/mojo/public/c/system/macros.h |
1303 |
+--- a/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:46.448912634 -0400 |
1304 |
++++ b/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400 |
1305 |
+@@ -18,7 +18,13 @@ |
1306 |
+ #endif |
1307 |
+ |
1308 |
+ // Like the C++11 |alignof| operator. |
1309 |
+-#if __cplusplus >= 201103L |
1310 |
++#if defined(__GNUC__) && __GNUC__ >= 8 |
1311 |
++// GCC 8 has changed the alignof operator to return the minimal alignment |
1312 |
++// required by the target ABI, instead of the preferred alignment. |
1313 |
++// This means that on 32-bit x86, it will return 4 instead of 8. |
1314 |
++// Use __alignof__ instead to avoid this. |
1315 |
++#define MOJO_ALIGNOF(type) __alignof__(type) |
1316 |
++#elif __cplusplus >= 201103L |
1317 |
+ #define MOJO_ALIGNOF(type) alignof(type) |
1318 |
+ #elif defined(__GNUC__) |
1319 |
+ #define MOJO_ALIGNOF(type) __alignof__(type) |
1320 |
|
1321 |
diff --git a/dev-qt/qtwebengine/metadata.xml b/dev-qt/qtwebengine/metadata.xml |
1322 |
new file mode 100644 |
1323 |
index 0000000..acca734 |
1324 |
--- /dev/null |
1325 |
+++ b/dev-qt/qtwebengine/metadata.xml |
1326 |
@@ -0,0 +1,30 @@ |
1327 |
+<?xml version="1.0" encoding="UTF-8"?> |
1328 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1329 |
+<pkgmetadata> |
1330 |
+ <maintainer type="project"> |
1331 |
+ <email>qt@g.o</email> |
1332 |
+ <name>Gentoo Qt Project</name> |
1333 |
+ </maintainer> |
1334 |
+ <use> |
1335 |
+ <flag name="designer">Install the QWebEngineView plugin used to add widgets in |
1336 |
+ <pkg>dev-qt/designer</pkg> forms that display web pages.</flag> |
1337 |
+ <flag name="geolocation">Enable physical position determination |
1338 |
+ via <pkg>dev-qt/qtpositioning</pkg></flag> |
1339 |
+ <flag name="jumbo-build">Combine source files to speed up build process.</flag> |
1340 |
+ <flag name="pax_kernel">Enable building under a PaX enabled kernel</flag> |
1341 |
+ <flag name="system-ffmpeg">Use the system-wide <pkg>media-video/ffmpeg</pkg> |
1342 |
+ instead of bundled.</flag> |
1343 |
+ <flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg> |
1344 |
+ instead of bundled.</flag> |
1345 |
+ <flag name="widgets">Enable QtWidgets support</flag> |
1346 |
+ </use> |
1347 |
+ <upstream> |
1348 |
+ <bugs-to>https://bugreports.qt.io/</bugs-to> |
1349 |
+ <doc>https://doc.qt.io/</doc> |
1350 |
+ </upstream> |
1351 |
+ <slots> |
1352 |
+ <subslots> |
1353 |
+ Must only be used by packages that are known to use private parts of the Qt API. |
1354 |
+ </subslots> |
1355 |
+ </slots> |
1356 |
+</pkgmetadata> |
1357 |
|
1358 |
diff --git a/dev-qt/qtwebengine/qtwebengine-5.11.3.ebuild b/dev-qt/qtwebengine/qtwebengine-5.11.3.ebuild |
1359 |
new file mode 100644 |
1360 |
index 0000000..0afa49a |
1361 |
--- /dev/null |
1362 |
+++ b/dev-qt/qtwebengine/qtwebengine-5.11.3.ebuild |
1363 |
@@ -0,0 +1,158 @@ |
1364 |
+# Copyright 1999-2018 Gentoo Authors |
1365 |
+# Distributed under the terms of the GNU General Public License v2 |
1366 |
+ |
1367 |
+EAPI=6 |
1368 |
+PYTHON_COMPAT=( python2_7 ) |
1369 |
+inherit multiprocessing pax-utils python-any-r1 qt5-build |
1370 |
+ |
1371 |
+DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications" |
1372 |
+ |
1373 |
+if [[ ${QT5_BUILD_TYPE} == release ]]; then |
1374 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
1375 |
+fi |
1376 |
+ |
1377 |
+IUSE="alsa bindist designer geolocation +jumbo-build pax_kernel pulseaudio |
1378 |
+ +system-ffmpeg +system-icu widgets" |
1379 |
+REQUIRED_USE="designer? ( widgets )" |
1380 |
+ |
1381 |
+RDEPEND=" |
1382 |
+ app-arch/snappy:= |
1383 |
+ dev-libs/glib:2 |
1384 |
+ dev-libs/nspr |
1385 |
+ dev-libs/nss |
1386 |
+ ~dev-qt/qtcore-${PV} |
1387 |
+ ~dev-qt/qtdeclarative-${PV} |
1388 |
+ ~dev-qt/qtgui-${PV} |
1389 |
+ ~dev-qt/qtnetwork-${PV} |
1390 |
+ ~dev-qt/qtprintsupport-${PV} |
1391 |
+ ~dev-qt/qtwebchannel-${PV}[qml] |
1392 |
+ dev-libs/expat |
1393 |
+ dev-libs/libevent:= |
1394 |
+ dev-libs/libxml2[icu] |
1395 |
+ dev-libs/libxslt |
1396 |
+ dev-libs/re2:= |
1397 |
+ media-libs/fontconfig |
1398 |
+ media-libs/freetype |
1399 |
+ media-libs/harfbuzz:= |
1400 |
+ media-libs/lcms:2 |
1401 |
+ media-libs/libjpeg-turbo:= |
1402 |
+ media-libs/libpng:0= |
1403 |
+ >=media-libs/libvpx-1.5:=[svc] |
1404 |
+ media-libs/libwebp:= |
1405 |
+ media-libs/mesa[egl] |
1406 |
+ media-libs/opus |
1407 |
+ sys-apps/dbus |
1408 |
+ sys-apps/pciutils |
1409 |
+ sys-libs/libcap |
1410 |
+ sys-libs/zlib[minizip] |
1411 |
+ virtual/libudev |
1412 |
+ x11-libs/libdrm |
1413 |
+ x11-libs/libX11 |
1414 |
+ x11-libs/libXcomposite |
1415 |
+ x11-libs/libXcursor |
1416 |
+ x11-libs/libXdamage |
1417 |
+ x11-libs/libXext |
1418 |
+ x11-libs/libXfixes |
1419 |
+ x11-libs/libXi |
1420 |
+ x11-libs/libXrandr |
1421 |
+ x11-libs/libXrender |
1422 |
+ x11-libs/libXScrnSaver |
1423 |
+ x11-libs/libXtst |
1424 |
+ alsa? ( media-libs/alsa-lib ) |
1425 |
+ designer? ( ~dev-qt/designer-${PV} ) |
1426 |
+ geolocation? ( ~dev-qt/qtpositioning-${PV} ) |
1427 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
1428 |
+ system-ffmpeg? ( media-video/ffmpeg:0= ) |
1429 |
+ system-icu? ( >=dev-libs/icu-60.2:= ) |
1430 |
+ widgets? ( |
1431 |
+ ~dev-qt/qtdeclarative-${PV}[widgets] |
1432 |
+ ~dev-qt/qtwidgets-${PV} |
1433 |
+ ) |
1434 |
+" |
1435 |
+DEPEND="${RDEPEND} |
1436 |
+ ${PYTHON_DEPS} |
1437 |
+ >=app-arch/gzip-1.7 |
1438 |
+ dev-util/gperf |
1439 |
+ dev-util/ninja |
1440 |
+ dev-util/re2c |
1441 |
+ sys-devel/bison |
1442 |
+ pax_kernel? ( sys-apps/elfix ) |
1443 |
+" |
1444 |
+ |
1445 |
+PATCHES+=( |
1446 |
+ "${FILESDIR}/${PN}-5.9.6-gcc8.patch" # bug 657124 |
1447 |
+ "${FILESDIR}/${PN}-5.11.1-nouveau-disable-gpu.patch" # bug 609752 |
1448 |
+ "${FILESDIR}/musl/arm-missing-files.patch" |
1449 |
+ "${FILESDIR}/musl/arm-void-is-not-android.patch" |
1450 |
+ "${FILESDIR}/musl/musl-sandbox.patch" |
1451 |
+ "${FILESDIR}/musl/qt-musl-dispatch_to_musl.patch" |
1452 |
+ "${FILESDIR}/musl/qt-musl-execinfo.patch" |
1453 |
+ "${FILESDIR}/musl/qt-musl-fpstate.patch" |
1454 |
+ "${FILESDIR}/musl/qt-musl-mallinfo.patch" |
1455 |
+ "${FILESDIR}/musl/qt-musl-off_t.patch" |
1456 |
+ "${FILESDIR}/musl/qt-musl-pread-pwrite.patch" |
1457 |
+ "${FILESDIR}/musl/qt-musl-pvalloc.patch" |
1458 |
+ "${FILESDIR}/musl/qt-musl-resolve.patch" |
1459 |
+ "${FILESDIR}/musl/qt-musl-serialio.patch" |
1460 |
+ "${FILESDIR}/musl/qt-musl-siginfo_t.patch" |
1461 |
+ "${FILESDIR}/musl/qt-musl-stackstart.patch" |
1462 |
+ "${FILESDIR}/musl/qt-musl-sysreg-for__WORDSIZE.patch" |
1463 |
+ "${FILESDIR}/musl/qt-musl-thread-stacksize.patch" |
1464 |
+ "${FILESDIR}/musl/qt-musl-remove-cdefs.patch" |
1465 |
+ "${FILESDIR}/musl/yasm-nls.patch" |
1466 |
+) |
1467 |
+ |
1468 |
+src_prepare() { |
1469 |
+ use pax_kernel && PATCHES+=( "${FILESDIR}/${PN}-5.11.2-paxmark-mksnapshot.patch" ) |
1470 |
+ |
1471 |
+ if ! use jumbo-build; then |
1472 |
+ sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \ |
1473 |
+ src/core/config/common.pri || die |
1474 |
+ fi |
1475 |
+ |
1476 |
+ # bug 620444 - ensure local headers are used |
1477 |
+ find "${S}" -type f -name "*.pr[fio]" | xargs sed -i -e 's|INCLUDEPATH += |&$$QTWEBENGINE_ROOT/include |' || die |
1478 |
+ |
1479 |
+ qt_use_disable_config alsa webengine-alsa src/core/config/linux.pri |
1480 |
+ qt_use_disable_config pulseaudio webengine-pulseaudio src/core/config/linux.pri |
1481 |
+ |
1482 |
+ qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro |
1483 |
+ |
1484 |
+ qt_use_disable_mod geolocation positioning \ |
1485 |
+ mkspecs/features/configure.prf \ |
1486 |
+ src/core/core_chromium.pri \ |
1487 |
+ src/core/core_common.pri |
1488 |
+ |
1489 |
+ qt_use_disable_mod widgets widgets src/src.pro |
1490 |
+ |
1491 |
+ qt5-build_src_prepare |
1492 |
+} |
1493 |
+ |
1494 |
+src_configure() { |
1495 |
+ export NINJA_PATH=/usr/bin/ninja |
1496 |
+ export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}" |
1497 |
+ |
1498 |
+ local myqmakeargs=( |
1499 |
+ -- |
1500 |
+ -opus |
1501 |
+ -printing-and-pdf |
1502 |
+ -webp |
1503 |
+ $(usex alsa '-alsa' '') |
1504 |
+ $(usex bindist '' '-proprietary-codecs') |
1505 |
+ $(usex pulseaudio '-pulseaudio' '') |
1506 |
+ $(usex system-ffmpeg '-ffmpeg' '') |
1507 |
+ $(usex system-icu '-webengine-icu' '') |
1508 |
+ ) |
1509 |
+ qt5-build_src_configure |
1510 |
+} |
1511 |
+ |
1512 |
+src_install() { |
1513 |
+ qt5-build_src_install |
1514 |
+ |
1515 |
+ # bug 601472 |
1516 |
+ if [[ ! -f ${D%/}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then |
1517 |
+ die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/" |
1518 |
+ fi |
1519 |
+ |
1520 |
+ pax-mark m "${D%/}${QT5_LIBEXECDIR}"/QtWebEngineProcess |
1521 |
+} |