mirror of
https://git.freebsd.org/ports.git
synced 2025-05-12 23:31:50 -04:00
www/qt6-webengine: fix build on armv7
Improve two patches with more complete variants from devel/electron19. Patch bundled boringssl with additional patches from the same port. Avoid an OOM condition by using the same extra patch previously only used on i386. In that patch, decreate BROTLI_PARAM_QUALITY further to 4 to avoid flakiness on armv7. Obtained from: devel/electron19 Approved by: kai (with hat: kde, maintainer) PR: 271228
This commit is contained in:
parent
48c7cfa95e
commit
dd2c7b7789
6 changed files with 90 additions and 9 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
PORTNAME= webengine
|
||||
DISTVERSION= ${QT6_VERSION}
|
||||
PORTREVISION= 5
|
||||
PORTREVISION= 6
|
||||
CATEGORIES= www
|
||||
PKGNAMEPREFIX= qt6-
|
||||
|
||||
|
@ -109,8 +109,8 @@ SNDIO_CMAKE_OFF= -DQT_FEATURE_webengine_system_sndio:BOOL=OFF
|
|||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == i386
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-i386-compress_files_js
|
||||
.if ${ARCH} == i386 || ${ARCH} == armv7
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-32bit-compress_files_js
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
|
|
|
@ -8,7 +8,7 @@ node.js stops with either SIGSEGV or SIGABRT after ~530 processed files.
|
|||
output.write(Buffer.from(sizeHeader));
|
||||
return new Promise((resolve, reject) => {
|
||||
- pipeline(Readable.from(sourceData), zlib.createBrotliCompress(), output, err => {
|
||||
+ pipeline(Readable.from(sourceData), zlib.createBrotliCompress({ params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 5 } }), output, err => {
|
||||
+ pipeline(Readable.from(sourceData), zlib.createBrotliCompress({ params: { [zlib.constants.BROTLI_PARAM_QUALITY]: 4 } }), output, err => {
|
||||
return err ? reject(err) : resolve();
|
||||
});
|
||||
});
|
|
@ -1,14 +1,17 @@
|
|||
--- src/3rdparty/chromium/third_party/boringssl/BUILD.generated.gni.orig 2022-09-26 10:05:50 UTC
|
||||
--- src/3rdparty/chromium/third_party/boringssl/BUILD.generated.gni.orig 2022-12-12 18:53:13 UTC
|
||||
+++ src/3rdparty/chromium/third_party/boringssl/BUILD.generated.gni
|
||||
@@ -81,6 +81,7 @@ crypto_sources = [
|
||||
@@ -81,8 +81,10 @@ crypto_sources = [
|
||||
"src/crypto/cpu_aarch64_apple.c",
|
||||
"src/crypto/cpu_aarch64_fuchsia.c",
|
||||
"src/crypto/cpu_aarch64_linux.c",
|
||||
+ "src/crypto/cpu_aarch64_openbsd.c",
|
||||
"src/crypto/cpu_aarch64_win.c",
|
||||
"src/crypto/cpu_arm.c",
|
||||
+ "src/crypto/cpu_arm_freebsd.c",
|
||||
"src/crypto/cpu_arm_linux.c",
|
||||
@@ -186,6 +187,7 @@ crypto_sources = [
|
||||
"src/crypto/cpu_arm_linux.h",
|
||||
"src/crypto/cpu_intel.c",
|
||||
@@ -186,6 +188,7 @@ crypto_sources = [
|
||||
"src/crypto/rand_extra/deterministic.c",
|
||||
"src/crypto/rand_extra/forkunsafe.c",
|
||||
"src/crypto/rand_extra/fuchsia.c",
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
--- src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu_arm_freebsd.c.orig 2023-06-03 08:17:28 UTC
|
||||
+++ src/3rdparty/chromium/third_party/boringssl/src/crypto/cpu_arm_freebsd.c
|
||||
@@ -0,0 +1,52 @@
|
||||
+/* Copyright (c) 2016, Google Inc.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
||||
+
|
||||
+#include "internal.h"
|
||||
+
|
||||
+#if defined(OPENSSL_ARM) && defined(OPENSSL_FREEBSD) && \
|
||||
+ !defined(OPENSSL_STATIC_ARMCAP)
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/auxv.h>
|
||||
+
|
||||
+#include <openssl/arm_arch.h>
|
||||
+#include <openssl/mem.h>
|
||||
+
|
||||
+extern uint32_t OPENSSL_armcap_P;
|
||||
+
|
||||
+void OPENSSL_cpuid_setup(void) {
|
||||
+ unsigned long hwcap = 0, hwcap2 = 0;
|
||||
+
|
||||
+ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap);
|
||||
+ elf_aux_info(AT_HWCAP2, &hwcap2, sizeof hwcap2);
|
||||
+
|
||||
+ // Matching OpenSSL, only report other features if NEON is present.
|
||||
+ if (hwcap & HWCAP_NEON) {
|
||||
+ OPENSSL_armcap_P |= ARMV7_NEON;
|
||||
+
|
||||
+ if (hwcap2 & HWCAP2_AES) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_AES;
|
||||
+ }
|
||||
+ if (hwcap2 & HWCAP2_PMULL) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_PMULL;
|
||||
+ }
|
||||
+ if (hwcap2 & HWCAP2_SHA1) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_SHA1;
|
||||
+ }
|
||||
+ if (hwcap2 & HWCAP2_SHA2) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_SHA256;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#endif // OPENSSL_ARM && OPENSSL_OPENBSD && !OPENSSL_STATIC_ARMCAP
|
|
@ -1,4 +1,4 @@
|
|||
--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2022-09-26 10:05:50 UTC
|
||||
--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2022-06-10 05:40:07 UTC
|
||||
+++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp
|
||||
@@ -73,6 +73,42 @@
|
||||
return features;
|
||||
|
@ -43,3 +43,26 @@
|
|||
#elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
|
||||
#include <sys/auxv.h>
|
||||
|
||||
@@ -115,6 +151,22 @@
|
||||
return features;
|
||||
}
|
||||
|
||||
+#elif defined(SK_CPU_ARM32) && defined(__FreeBSD__)
|
||||
+ #include <sys/auxv.h>
|
||||
+
|
||||
+ static uint32_t read_cpu_features() {
|
||||
+ unsigned long hwcaps = 0;
|
||||
+ uint32_t features = 0;
|
||||
+
|
||||
+ elf_aux_info(AT_HWCAP, (void *)&hwcaps, sizeof hwcaps);
|
||||
+ if (hwcaps & HWCAP_NEON) {
|
||||
+ features |= SkCpu::NEON;
|
||||
+ if (hwcaps & HWCAP_VFPv4) {
|
||||
+ features |= SkCpu::NEON_FMA|SkCpu::VFP_FP16;
|
||||
+ }
|
||||
+ }
|
||||
+ return features;
|
||||
+ }
|
||||
#elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>) && \
|
||||
(!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
|
||||
// sys/auxv.h will always be present in the Android NDK due to unified
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
lib_name = std::string(path);
|
||||
}
|
||||
result.push_back(SharedLibraryAddress(
|
||||
+#if defined(__i386__) || defined(OS_FREEBSD)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(OS_FREEBSD)
|
||||
+ lib_name, static_cast<uintptr_t>(map->kve_start),
|
||||
+ static_cast<uintptr_t>(map->kve_end)));
|
||||
+#else
|
||||
|
|
Loading…
Add table
Reference in a new issue