aboutsummaryrefslogtreecommitdiff
path: root/extra/webkit2gtk/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/webkit2gtk/build')
-rwxr-xr-xextra/webkit2gtk/build66
1 files changed, 27 insertions, 39 deletions
diff --git a/extra/webkit2gtk/build b/extra/webkit2gtk/build
index b8342697..c9612ab4 100755
--- a/extra/webkit2gtk/build
+++ b/extra/webkit2gtk/build
@@ -1,65 +1,53 @@
#!/bin/sh -e
-sed_i() {
- for file; do :; done
- sed "$@" > _
- cat _ > "$file"; rm -f _
-}
-
-# Enable streaming related options if gstreamer is installed.
-cpt-list gst-plugins-base >/dev/null 2>&1 && streaming=ON
-
-# Enable the use of openjpeg if the package is installed.
-cpt-list openjpeg2 >/dev/null 2>&1 && jpeg=ON
-
-# Enable webcrypto if libtasn1 is installed.
-cpt-list libtasn1 >/dev/null 2>&1 && libtasn=ON
-
-patch -p1 < fix-musl.patch
+make -C unifdef
# Remove gettext requirement.
-sed_i 's/ngettext/printf/g' Tools/MiniBrowser/gtk/BrowserDownloadsBar.c
-sed_i '/po_files \*\.po/d' Source/WebCore/platform/gtk/po/CMakeLists.txt
-sed_i '/^GETTEXT_C/d' Source/WebCore/platform/gtk/po/CMakeLists.txt
+clsed 's/ngettext/printf/g' Tools/MiniBrowser/gtk/BrowserDownloadsBar.c
+clsed '/po_files \*\.po/d' Source/WebCore/platform/gtk/po/CMakeLists.txt
+clsed '/if.*GETTEXT_FOUND/,/^endif/d' Source/WebCore/platform/gtk/po/CMakeLists.txt
+clsed '/^GETTEXT_C/d' Source/WebCore/platform/gtk/po/CMakeLists.txt
+
# Fix clang build.
-sed -i '/LC_ALL/d' Source/JavaScriptCore/jsc.cpp
-sed -i '/WTFLogAlways/d' Source/JavaScriptCore/jsc.cpp
-
-# Fix the latest icu build.
-printf 'add_compile_definitions("U_DEFINE_FALSE_AND_TRUE=1")\n' \
- >> Source/WTF/wtf/CMakeLists.txt
+clsed '/LC_ALL/d' Source/JavaScriptCore/jsc.cpp
+clsed '/WTFLogAlways/d' Source/JavaScriptCore/jsc.cpp
export DESTDIR="$1"
+# Webkit's CMake configuration forces color output using clang-specific flags
+# when using Ninja as the CMAKE_GENERATOR. We should disable them.
+clsed s,-fcolor-diagnostics,, Source/cmake/WebKitCompilerFlags.cmake
+
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_INSTALL_DIR=/usr/lib \
- -DPORT=GTK \
-DCMAKE_SKIP_RPATH=ON \
+ -DUNIFDEF_EXECUTABLE="$PWD/unifdef/unifdef" \
+ -DLIB_INSTALL_DIR=/usr/lib \
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
- -DENABLE_SAMPLING_PROFILER=OFF \
+ -DENABLE_DOCUMENTATION=OFF \
+ -DENABLE_GAMEPAD=OFF \
-DENABLE_GEOLOCATION=OFF \
-DENABLE_GLES2=ON \
- -DENABLE_INTL=OFF \
-DENABLE_INTROSPECTION=OFF \
+ -DENABLE_JOURNALD_LOG=OFF \
-DENABLE_MINIBROWSER=OFF \
- -DENABLE_OPENGL=OFF \
+ -DENABLE_SAMPLING_PROFILER=OFF \
-DENABLE_SPELLCHECK=OFF \
- -DENABLE_VIDEO=${streaming:-OFF} \
- -DENABLE_WEBGL=OFF \
- -DENABLE_WEB_AUDIO=${streaming:-OFF} \
+ -DENABLE_WEB_CRYPTO="$(cpt l -C libtasn1 ON OFF)" \
+ -DENABLE_QUARTZ_TARGET=OFF \
+ -DENABLE_WAYLAND_TARGET=ON \
+ -DENABLE_X11_TARGET=OFF \
+ -DPORT=GTK \
+ -DUSE_AVIF=OFF \
-DUSE_LIBHYPHEN=OFF \
- -DUSE_LIBNOTIFY=OFF \
+ -DUSE_LIBNOTIFY="$(cpt l -C libnotify ON OFF)" \
-DUSE_LIBSECRET=OFF \
- -DUSE_SYSTEMD=OFF \
- -DUSE_OPENJPEG=${jpeg:-OFF} \
+ -DUSE_OPENJPEG="$(cpt l -C openjpeg2 ON OFF)" \
+ -DUSE_SOUP2=ON \
-DUSE_WOFF2=OFF \
-DUSE_WPE_RENDERER=OFF \
- -DENABLE_WEB_CRYPTO=${libtasn:-OFF} \
- -DENABLE_MEDIASOURCE=${streaming:-OFF} \
- -DENABLE_WAYLAND_TARGET=OFF \
-Wno-dev
cmake --build build