From 2c6b7fdb304821ce75f6bbda9237b3eab288606c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 17 Dec 2020 00:00:40 +0700 Subject: [PATCH] webkit2gtk: disable sse2 on i686 - be nice with ccache --- srcpkgs/webkit2gtk/patches/x86-no-sse2.patch | 19 ++++++++++++++++++ srcpkgs/webkit2gtk/template | 21 ++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/webkit2gtk/patches/x86-no-sse2.patch diff --git a/srcpkgs/webkit2gtk/patches/x86-no-sse2.patch b/srcpkgs/webkit2gtk/patches/x86-no-sse2.patch new file mode 100644 index 00000000000..c6c4c803bcf --- /dev/null +++ b/srcpkgs/webkit2gtk/patches/x86-no-sse2.patch @@ -0,0 +1,19 @@ + Source: Debian +--- Source/cmake/WebKitCompilerFlags.cmake.orig 2020-12-15 15:29:50.240722972 +0700 ++++ Source/cmake/WebKitCompilerFlags.cmake 2020-12-15 15:29:59.659853014 +0700 +@@ -138,15 +138,6 @@ + if (CMAKE_COMPILER_IS_GNUCXX) + WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined) + endif () +- +- # Force SSE2 fp on x86 builds. +- if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING) +- WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse) +- include(DetectSSE2) +- if (NOT SSE2_SUPPORT_FOUND) +- message(FATAL_ERROR "SSE2 support is required to compile WebKit") +- endif () +- endif () + endif () + + if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC) diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template index 7a596a6eaa2..09ab879f0db 100644 --- a/srcpkgs/webkit2gtk/template +++ b/srcpkgs/webkit2gtk/template @@ -1,7 +1,7 @@ # Template file for 'webkit2gtk' pkgname=webkit2gtk version=2.30.4 -revision=1 +revision=2 wrksrc="webkitgtk-${version}" build_style=cmake build_helper="gir" @@ -24,8 +24,10 @@ configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF -DENABLE_X11_TARGET=$(vopt_if x11 ON OFF) -DENABLE_SAMPLING_PROFILER=$(vopt_if sampling_profiler ON OFF) -DENABLE_BUBBLEWRAP_SANDBOX=$(vopt_if bubblewrap ON OFF)" +# Don't remove which from hostmakedepends +# Otherwise, they invoke /usr/bin/ccache /usr/lib/ccache/bin/$CC hostmakedepends="perl python pkg-config gperf flex ruby gettext glib-devel - geoclue2 libharfbuzz $(vopt_if wayland wayland-devel)" + geoclue2 libharfbuzz which $(vopt_if wayland wayland-devel)" makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel harfbuzz-devel gst-plugins-base1-devel gst-plugins-bad1-devel sqlite-devel libsoup-devel libxslt-devel gnutls-devel icu-devel enchant-devel @@ -49,6 +51,21 @@ desc_option_jit="JavaScript JIT (Only some architectures)" desc_option_sampling_profiler="Sampling profiler support (JIT + glibc only)" desc_option_minibrowser="Build the minibrowser" +# WebKitCCache.cmake set this variable +# include_file_mtime was not enabled to avoid a race, +# but this is run under our control +export CCACHE_SLOPPINESS=time_macros,include_file_mtime + +post_patch() { + # Reproducible build + # At least, be nice with ccache + vsed -i -e '/foreach my.*(keys/s/(keys/(sort keys/' \ + Source/WebCore/bindings/scripts/CodeGenerator.pm \ + Source/WebCore/bindings/scripts/CodeGeneratorJS.pm \ + Source/WebCore/css/makeprop.pl \ + Source/cmake/tools/scripts/version-stamp.pl +} + do_check() { : }