diff options
Diffstat (limited to 'gnu/packages/chromium.scm')
-rw-r--r-- | gnu/packages/chromium.scm | 84 |
1 files changed, 55 insertions, 29 deletions
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index 49ad8de84c..0b3d19a428 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -37,7 +37,6 @@ #:use-module (gnu packages curl) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) - #:use-module (gnu packages gcc) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -49,6 +48,7 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages kerberos) #:use-module (gnu packages ninja) #:use-module (gnu packages node) @@ -70,7 +70,8 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) - #:use-module (ice-9 match)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1)) (define %preserved-third-party-files '("base/third_party/cityhash" ;Expat @@ -106,10 +107,6 @@ "third_party/blink" ;BSD-3, LGPL2+ "third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC) "third_party/boringssl/src/third_party/fiat" ;Expat - "third_party/boringssl/src/third_party/sike" ;Expat - ;; XXX: these files are generated by fp-$arch.pl in the above directory. - "third_party/boringssl/linux-aarch64/crypto/third_party/sike/asm/fp-armv8.S" - "third_party/boringssl/linux-x86_64/crypto/third_party/sike/asm/fp-x86_64.S" "third_party/breakpad" ;BSD-3 "third_party/brotli" ;Expat "third_party/cacheinvalidation" ;ASL2.0 @@ -117,11 +114,14 @@ "third_party/catapult/common/py_vulcanize/third_party/rcssmin" ;ASL2.0 "third_party/catapult/common/py_vulcanize/third_party/rjsmin" ;ASL2.0 "third_party/catapult/third_party/polymer" ;BSD-3 + ;; XXX: This is a minified version of <https://d3js.org/>. "third_party/catapult/tracing/third_party/d3" ;BSD-3 "third_party/catapult/tracing/third_party/gl-matrix" ;Expat + ;; XXX: Minified version of <https://github.com/Stuk/jszip>. "third_party/catapult/tracing/third_party/jszip" ;Expat or GPL3 "third_party/catapult/tracing/third_party/mannwhitneyu" ;Expat "third_party/catapult/tracing/third_party/oboe" ;BSD-2 + ;; XXX: Minified version of <https://github.com/nodeca/pako>. "third_party/catapult/tracing/third_party/pako" ;Expat "third_party/ced" ;BSD-3 "third_party/cld_3" ;ASL2.0 @@ -134,6 +134,9 @@ "third_party/dav1d" ;BSD-2 "third_party/dawn" ;ASL2.0 "third_party/depot_tools/owners.py" ;BSD-3 + "third_party/devtools-frontend" ;BSD-3 + "third_party/devtools-frontend/src/third_party/axe-core" ;MPL2.0 + "third_party/devtools-frontend/src/third_party/pyjson5" ;ASL2.0 "third_party/dom_distiller_js" ;BSD-3 "third_party/emoji-segmenter" ;ASL2.0 "third_party/flatbuffers" ;ASL2.0 @@ -154,6 +157,7 @@ "third_party/libaom" ;BSD-2 or "Alliance for Open Media Patent License 1.0" "third_party/libaom/source/libaom/third_party/vector" ;Expat "third_party/libaom/source/libaom/third_party/x86inc" ;ISC + "third_party/libgifcodec" ;MPL1.1/GPL2+/LGPL2.1+, BSD-3, BSD-2 "third_party/libjingle_xmpp" ;BSD-3 "third_party/libphonenumber" ;ASL2.0 "third_party/libsecret" ;LGPL2.1+ @@ -181,6 +185,7 @@ "third_party/pdfium/third_party/bigint" ;Public domain, BSD-3 "third_party/pdfium/third_party/skia_shared" ;BSD-3 "third_party/pdfium/third_party/freetype/include/pstables.h" ;FreeType + "third_party/perfetto" ;ASL2.0 "third_party/pffft" ;the "FFTPACK" license, similar to BSD-3 "third_party/ply" ;BSD-3 "third_party/polymer" ;BSD-3 @@ -194,7 +199,6 @@ "third_party/sfntly" ;ASL2.0 "third_party/skia" ;BSD-3 "third_party/skia/include/third_party/skcms" ;BSD-3 - "third_party/skia/third_party/gif" ;MPL1.1/GPL2+/LGPL2.1+ "third_party/skia/third_party/skcms" ;BSD-3 "third_party/skia/third_party/vulkanmemoryallocator" ;BSD-3, Expat "third_party/smhasher" ;Expat, public domain @@ -243,9 +247,9 @@ from forcing GEXP-PROMISE." #:system system #:guile-for-build guile))) -(define %chromium-version "79.0.3945.130") -(define %ungoogled-revision "e2fae994d786b6716fb473a47b0c880bcfdc2497") -(define %debian-revision "debian/79.0.3945.130-2") +(define %chromium-version "80.0.3987.132") +(define %ungoogled-revision "7e68f18f1d16a132fe7d913a176daf79897eaa58") +(define %debian-revision "debian/80.0.3987.116-1") (define package-revision "0") (define %package-version (string-append %chromium-version "-" package-revision "." @@ -259,7 +263,7 @@ from forcing GEXP-PROMISE." %chromium-version ".tar.xz")) (sha256 (base32 - "183vz3lf1588cr9s5vlnj65qvbmz36s8cg8k7dvr64cxmcqk86an")))) + "00f2hpi2d0n15yw29dv3dli566cgi7qh55bfpziag9a6j02i401c")))) (define %ungoogled-origin (origin @@ -270,7 +274,7 @@ from forcing GEXP-PROMISE." (string-take %ungoogled-revision 7))) (sha256 (base32 - "15vmc07iba1zmzn4j7c5n2hyvyxzwwf9hc3kyym0m4jajlsyxr5f")))) + "196rr3nly42pzl2bap22vzw4d8x87yl3zy1wq2fla5z8iy4x8ym1")))) (define %debian-origin (origin @@ -284,7 +288,7 @@ from forcing GEXP-PROMISE." (_ (string-take %debian-revision 7))))) (sha256 (base32 - "1rbzxcwfp7v0c6rkvn9jl9by7p363cnbdyqazwiak1z03kmw3nkz")))) + "1cc5sp566dd8f2grgr770xwbxgxf58dk1w7q3s8pmv4js5h3pwq8")))) ;; This is a "computed" origin that does the following: ;; *) Runs the Ungoogled scripts on a pristine Chromium tarball. @@ -344,7 +348,7 @@ from forcing GEXP-PROMISE." (with-directory-excursion chromium-dir - (format #t "applying Debian patches...~%") + (format #t "Applying Debian patches...~%") (force-output) (let* ((debian #+debian-source) (patches (string-append debian "/debian/patches")) @@ -423,6 +427,18 @@ from forcing GEXP-PROMISE." `(cons "--enable-custom-modes" ,flags)))))) +;; Add a custom ld wrapper that supports quoted strings in response files. +;; To be merged with 'ld-wrapper' in a future rebuild cycle. +(define-public ld-wrapper-next + (let ((orig (car (assoc-ref (%final-inputs) "ld-wrapper")))) + (package + (inherit orig) + (name "ld-wrapper-next") + (inputs + `(("wrapper" ,(search-path %load-path + "gnu/packages/ld-wrapper-next.in")) + ,@(alist-delete "wrapper" (package-inputs orig))))))) + (define-public ungoogled-chromium (package (name "ungoogled-chromium") @@ -446,8 +462,10 @@ from forcing GEXP-PROMISE." ;; directory for an exhaustive list of supported flags. ;; (Note: The 'configure' phase will do that for you.) (list "is_debug=false" + "is_cfi=false" "use_gold=false" "use_lld=false" + "clang_use_chrome_plugins=false" "linux_use_bundled_binutils=false" "use_custom_libcxx=false" "use_sysroot=false" @@ -477,18 +495,6 @@ from forcing GEXP-PROMISE." ;; friends from the environment. "custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" "host_toolchain=\"//build/toolchain/linux/unbundle:default\"" - ;; Don't assume it's clang. - "is_clang=false" - ;; Disable debugging features to save space. These are normally - ;; pulled in by "is_official_build", but that requires "is_clang". - "enable_iterator_debugging=false" - "exclude_unwind_tables=true" - ;; Optimize for building everything at once, as opposed to - ;; incrementally for development. See "docs/jumbo.md". - "use_jumbo_build=true" - ;; The default file merge limit of 50 requires huge amounts of RAM. - ;; Cap it to make sure the build succeeds on commodity hardware. - "jumbo_file_merge_limit=8" ;; Prefer system libraries. "use_system_freetype=true" @@ -584,6 +590,10 @@ from forcing GEXP-PROMISE." (substitute* "third_party/webrtc/rtc_base/strings/json.h" (("#include \"third_party/jsoncpp/") "#include \"json/")) + (substitute* "gpu/config/gpu_util.cc" + (("third_party/vulkan/include/") + "")) + (substitute* '("components/viz/common/gpu/vulkan_context_provider.h" "components/viz/common/resources/resource_format_utils.h") (("third_party/vulkan/include/") "")) @@ -636,14 +646,19 @@ from forcing GEXP-PROMISE." ;; Make sure the right build tools are used. (setenv "AR" "ar") (setenv "NM" "nm") - (setenv "CC" "gcc") (setenv "CXX" "g++") + (setenv "CC" "clang") (setenv "CXX" "clang++") - ;; Prevent GCC from optimizing away null pointer safety checks. + ;; Do not optimize away null pointer safety checks. (setenv "CXXFLAGS" "-fno-delete-null-pointer-checks") ;; TODO: pre-compile instead. Avoids a race condition. (setenv "PYTHONDONTWRITEBYTECODE" "1") + (substitute* + ;; From Debians 'system/node.patch'. + "third_party/devtools-frontend/src/scripts/devtools_paths.py" + (("/usr/bin/nodejs") (which "node"))) + ;; XXX: How portable is this. (mkdir-p "third_party/node/linux/node-linux-x64") (symlink (string-append (assoc-ref inputs "node") "/bin") @@ -748,9 +763,10 @@ from forcing GEXP-PROMISE." #t)))))) (native-inputs `(("bison" ,bison) - ("gcc" ,gcc-8) + ("clang" ,clang-9) ("gn" ,gn) ("gperf" ,gperf) + ("ld-wrapper" ,ld-wrapper-next) ("ninja" ,ninja) ("node" ,node) ("pkg-config" ,pkg-config) @@ -852,6 +868,16 @@ disabled in order to protect the users privacy.") ,@(package-inputs ungoogled-chromium))) (arguments (substitute-keyword-arguments (package-arguments ungoogled-chromium) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'add-ozone-patch + (lambda _ + ;; Add missing include statement required when using libstdc++, + ;; Clang and Ozone. Fixed in M81. + (substitute* "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc" + (("#include \"base/logging\\.h" all) + (string-append "#include <algorithm>\n" all))) + #t)))) ((#:configure-flags flags) `(append (list "use_ozone=true" "ozone_platform_wayland=true" |