pcre: fork, fix sources
[kiss-trunc88.git] / webkit2gtk / build
blob76f0d7f2b80eebd81bdff01ff7d07678cc14ded0
1 #!/bin/sh -e
3 export CCACHE_SLOPPINESS=time_macros,include_file_mtime
5 #if [ "$(kiss owns /usr/bin/ld)" = mold ]
6 #then
7 # kiss a | grep '/usr/bin/ld' | kiss a -
8 # sl=1
9 #fi
11 # Enable streaming related options if gstreamer is installed.
12 kiss list gst-plugins-base && streaming=ON
14 # Enable the use of openjpeg if the package is installed.
15 kiss list openjpeg2 && jpeg=ON
17 # Enable WEB_CRYPTO if libtasn1 is installed.
18 kiss list libtasn1 && tasn=ON
20 # Remove gettext requirement.
21 sed -e 's/ngettext/printf/g' Tools/MiniBrowser/gtk/BrowserDownloadsBar.c > _
22 mv -f _ Tools/MiniBrowser/gtk/BrowserDownloadsBar.c
24 sed -e '/po_files \*\.po/d' -e '/^GETTEXT_C/d' \
25 Source/WebCore/platform/gtk/po/CMakeLists.txt > _
26 mv -f _ Source/WebCore/platform/gtk/po/CMakeLists.txt
28 # Fix clang build.
29 sed -e '/LC_ALL/d' -e '/WTFLogAlways/d' Source/JavaScriptCore/jsc.cpp > _
30 mv -f _ Source/JavaScriptCore/jsc.cpp
32 # Webkit's CMake configuration forces color output using clang-specific flags
33 # when using Ninja as the CMAKE_GENERATOR. We should disable them.
34 sed "s/-fcolor-diagnostics//" Source/cmake/WebKitCompilerFlags.cmake > _
35 mv -f _ Source/cmake/WebKitCompilerFlags.cmake
37 # Have webkit play nice with ccache (taken from Void).
38 for f in Source/WebCore/bindings/scripts/CodeGenerator.pm \
39 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm \
40 Source/WebCore/css/makeprop.pl \
41 Source/cmake/tools/scripts/version-stamp.pl
43 sed -e '/foreach my.*(keys/s/(keys/(sort keys/' "$f" > _
44 mv -f _ "$f"
45 done
47 # Reduce memory usage.
48 export LDFLAGS="$LDFLAGS -Wl,--no-keep-memory"
50 cmake -B build \
51 -DCMAKE_BUILD_TYPE=Release \
52 -DCMAKE_INSTALL_PREFIX=/usr \
53 -DLIB_INSTALL_DIR=/usr/lib \
54 -DPORT=GTK \
55 -DCMAKE_SKIP_RPATH=ON \
56 -DENABLE_BUBBLEWRAP_SANDBOX=OFF \
57 -DENABLE_SAMPLING_PROFILER=OFF \
58 -DENABLE_GEOLOCATION=OFF \
59 -DENABLE_GLES2=ON \
60 -DENABLE_INTROSPECTION=OFF \
61 -DENABLE_MINIBROWSER=OFF \
62 -DENABLE_SPELLCHECK=OFF \
63 -DUSE_GSTREAMER_GL=OFF \
64 -DUSE_SOUP2=ON \
65 -DUSE_LIBHYPHEN=OFF \
66 -DUSE_LIBNOTIFY=OFF \
67 -DUSE_LIBSECRET=OFF \
68 -DUSE_OPENJPEG=${jpeg:-OFF} \
69 -DUSE_SYSTEMD=OFF \
70 -DUSE_WOFF2=OFF \
71 -DUSE_WPE_RENDERER=OFF \
72 -DENABLE_WEB_CRYPTO=${tasn:-OFF} \
73 -DENABLE_VIDEO=${streaming:-OFF} \
74 -DENABLE_WEB_AUDIO=${streaming:-OFF} \
75 -DENABLE_GAMEPAD=OFF \
76 -Wno-dev
78 cmake --build build
79 cmake --install build
81 #[ -n "$sl" ] && kiss a | grep "/usr/bin/ld" | kiss a -