qt6-pdf: fix on musl

fixes: #55571
This commit is contained in:
classabbyamp 2025-08-13 00:44:11 -04:00
parent e851c2a154
commit 825b6d8e5c
No known key found for this signature in database
GPG key ID: 6BE0755918A4C7F5
3 changed files with 44 additions and 4 deletions

View file

@ -0,0 +1,24 @@
this was commented out for some reason, making it ignore the CFLAGS/CXXFLAGS we pass
--- a/src/3rdparty/gn/build/gen.py
+++ b/src/3rdparty/gn/build/gen.py
@@ -428,15 +428,10 @@
# ar = os.environ.get('AR', 'ar')
- # cflags = os.environ.get('CFLAGS', '').split()
- # cflags += os.environ.get('CXXFLAGS', '').split()
- # ldflags = os.environ.get('LDFLAGS', '').split()
- # libflags = os.environ.get('LIBFLAGS', '').split()
-
- cflags = []
- cflags_cc = []
- ldflags = []
- libflags = []
+ cflags = os.environ.get('CFLAGS', '').split()
+ cflags += os.environ.get('CXXFLAGS', '').split()
+ ldflags = os.environ.get('LDFLAGS', '').split()
+ libflags = os.environ.get('LIBFLAGS', '').split()
cc = options.cc
cxx = options.cxx

View file

@ -0,0 +1,16 @@
source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/qt6-qtwebengine/no-sandbox-settls.patch
this optimisation of CLONE_SETTLS is not valid used like this, and future musl
clone(3) will EINVAL on this use
--
--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
+++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
@@ -89,7 +89,7 @@
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
void* tls = nullptr;
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
+#if 0 && (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
!defined(MEMORY_SANITIZER)
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
// Since clone writes to the new child's TLS before returning, we must set a

View file

@ -1,7 +1,7 @@
# Template file for 'qt6-pdf'
pkgname=qt6-pdf
version=6.8.2
revision=2
revision=3
build_style=cmake
configure_args="-DQT_FEATURE_qtpdf_build=ON
-DQT_FEATURE_qtpdf_widgets_build=ON
@ -84,9 +84,9 @@ fi
_bootstrap_gn() {
# Bootstrap gn (generate ninja)
echo "Bootstrapping 'gn'"
msg_normal "Bootstrapping 'gn'\n"
cd ${wrksrc}/src/3rdparty/gn
CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
CFLAGS="$CFLAGS_host -D_LARGEFILE64_SOURCE" CXXFLAGS="$CXXFLAGS_host -D_LARGEFILE64_SOURCE" LDFLAGS="$LDFLAGS_host" \
PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
python3 build/gen.py --no-last-commit-position --out-path \
${wrksrc}/src/3rdparty/gn/out/Release --cc "${CC_host:-$CC}" \
@ -98,7 +98,7 @@ _bootstrap_gn() {
_unbundle_libs() {
cd ${wrksrc}/src/3rdparty/chromium
echo Dropping bundled libs from chromium
msg_normal "Dropping bundled libs from chromium\n"
# Use system-provided libraries.
# TODO: use_system_hunspell (upstream changes needed).
# TODO: use_system_libsrtp.