[packages/gtk-webkit4] add possibility to customize max bundle size in unified build
atler
atler at pld-linux.org
Fri Jan 23 13:12:36 CET 2026
commit 54218f7edcd3c1a1cf29103542dfc014d6ee9da4
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Jan 23 13:11:34 2026 +0100
add possibility to customize max bundle size in unified build
gtk-webkit4.spec | 5 ++++-
max-bundle-size.patch | 11 +++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/gtk-webkit4.spec b/gtk-webkit4.spec
index e64376d..84e336c 100644
--- a/gtk-webkit4.spec
+++ b/gtk-webkit4.spec
@@ -35,6 +35,7 @@ Patch0: x32.patch
Patch1: %{name}-icu59.patch
Patch2: parallel-gir.patch
Patch3: %{name}-driver-version-suffix.patch
+Patch4: max-bundle-size.patch
URL: https://webkitgtk.org/
BuildRequires: /usr/bin/ld.gold
BuildRequires: EGL-devel
@@ -315,6 +316,7 @@ Dokumentacja API portu WebKitu do GTK 4.
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
+%patch -P 4 -p1
%build
CXXFLAGS="%{rpmcxxflags} -DNDEBUG %{?with_lowmem:--param ggc-min-expand=20 --param ggc-min-heapsize=65536}"
@@ -341,7 +343,8 @@ for kind in %{?with_gtk3:%{?with_libsoup2:soup2} %{?with_libsoup3:soup3}} %{?wit
$([ "$kind" != "gtk4" ] && echo -DUSE_GTK4=OFF) \
-DUSE_LIBBACKTRACE=OFF \
$([ "$kind" = "soup2" ] && echo -DUSE_SOUP2=ON) \
- %{!?with_sysprof:-DUSE_SYSPROF_CAPTURE=OFF}
+ %{!?with_sysprof:-DUSE_SYSPROF_CAPTURE=OFF} \
+ %{?max_bundle_size:-DUNIFIED_BUILD_MAX_BUNDLE_SIZE=%{max_bundle_size}}
%{__make} -C build-${kind}
done
diff --git a/max-bundle-size.patch b/max-bundle-size.patch
new file mode 100644
index 0000000..0765210
--- /dev/null
+++ b/max-bundle-size.patch
@@ -0,0 +1,11 @@
+--- webkitgtk-2.50.4/Source/cmake/WebKitMacros.cmake.orig 2025-08-08 11:17:56.304456000 +0200
++++ webkitgtk-2.50.4/Source/cmake/WebKitMacros.cmake 2026-01-23 12:48:45.426052097 +0100
+@@ -16,6 +16,8 @@
+ # Windows needs a larger bundle size because that helps keep WebCore.lib's size below the 4GB maximum in debug builds.
+ if (MSVC AND ${_framework} STREQUAL "WebCore" AND ${_framework}_LIBRARY_TYPE STREQUAL "STATIC")
+ list(APPEND gusb_args --max-bundle-size 16)
++ elseif (UNIFIED_BUILD_MAX_BUNDLE_SIZE)
++ list(APPEND gusb_args --max-bundle-size ${UNIFIED_BUILD_MAX_BUNDLE_SIZE})
+ endif ()
+
+ if (ENABLE_UNIFIED_BUILDS)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gtk-webkit4.git/commitdiff/54218f7edcd3c1a1cf29103542dfc014d6ee9da4
More information about the pld-cvs-commit
mailing list