aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/chromium.scm118
-rw-r--r--gnu/packages/patches/ungoogled-chromium-system-nspr.patch22
2 files changed, 81 insertions, 59 deletions
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 3d6a1b03ec..73ef209100 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -27,9 +27,11 @@
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages assembly)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages compression)
@@ -141,6 +143,7 @@
"third_party/depot_tools/owners.py" ;BSD-3
"third_party/devtools-frontend" ;BSD-3
"third_party/devtools-frontend/src/front_end/third_party/acorn" ;Expat
+ "third_party/devtools-frontend/src/front_end/third_party/axe-core" ;MPL2.0
"third_party/devtools-frontend/src/front_end/third_party/chromium" ;BSD-3
"third_party/devtools-frontend/src/front_end/third_party/codemirror" ;Expat
"third_party/devtools-frontend/src/front_end/third_party/fabricjs" ;Expat
@@ -150,8 +153,8 @@
"third_party/devtools-frontend/src/front_end/third_party/lit-html" ;BSD-3
"third_party/devtools-frontend/src/front_end/third_party/lodash-isequal" ;Expat
"third_party/devtools-frontend/src/front_end/third_party/marked" ;Expat, BSD-3
+ "third_party/devtools-frontend/src/front_end/third_party/puppeteer" ;ASL2.0
"third_party/devtools-frontend/src/front_end/third_party/wasmparser" ;ASL2.0
- "third_party/devtools-frontend/src/third_party/axe-core" ;MPL2.0
"third_party/devtools-frontend/src/third_party/pyjson5" ;ASL2.0
"third_party/devtools-frontend/src/third_party/typescript" ;ASL2.0
"third_party/dom_distiller_js" ;BSD-3
@@ -219,6 +222,7 @@
"third_party/pffft" ;the "FFTPACK" license, similar to BSD-3
"third_party/ply" ;BSD-3
"third_party/polymer" ;BSD-3
+ "third_party/private_membership" ;ASL2.0
"third_party/private-join-and-compute" ;ASL2.0
"third_party/protobuf" ;BSD-3
"third_party/protobuf/third_party/six" ;Expat
@@ -231,6 +235,8 @@
"third_party/s2cellid" ;ASL2.0
"third_party/schema_org" ;CC-BY-SA3.0
"third_party/securemessage" ;ASL2.0
+ "third_party/shaka-player" ;ASL2.0
+ "third_party/shell-encryption" ;ASL2.0
"third_party/skia" ;BSD-3
"third_party/skia/include/third_party/skcms" ;BSD-3
"third_party/skia/third_party/skcms" ;BSD-3
@@ -252,6 +258,8 @@
"third_party/usb_ids" ;BSD-3
"third_party/usrsctp" ;BSD-2
"third_party/vulkan_memory_allocator" ;Expat
+ "third_party/wayland/protocol" ;Expat
+ "third_party/wayland/stubs" ;BSD-3, Expat
"third_party/wayland/wayland_scanner_wrapper.py" ;BSD-3
"third_party/wayland-protocols" ;Expat
"third_party/web-animations-js" ;ASL2.0
@@ -294,17 +302,9 @@
(string-append "ungoogled-chromium-" category "-" name))))
(sha256 (base32 hash))))
-(define (arch-patch name revision hash)
- (origin
- (method url-fetch)
- (uri (string-append "https://raw.githubusercontent.com/archlinux"
- "/svntogit-packages/" revision "/trunk/" name))
- (sha256 (base32 hash))))
-
-(define %chromium-version "86.0.4240.198")
-(define %ungoogled-revision "b68e17f32e9eff56615a07b44e457835bb9460c6")
+(define %chromium-version "87.0.4280.66")
+(define %ungoogled-revision "1f7cdef6dfa8f612afde8f988131f210612333e0")
(define %debian-revision "debian/84.0.4147.105-1")
-(define %arch-revision "2cbe439471932d30ff2c8ded6b3dfd51b312bbc9")
(define %debian-patches
(list (debian-patch "system/zlib.patch" %debian-revision
@@ -312,17 +312,6 @@
(debian-patch "system/openjpeg.patch" %debian-revision
"0zd6v5njx1pc7i0y6mslxvpx5j4cq01mmyx55qcqx8qzkm0gm48j")))
-(define %arch-patches
- (list (arch-patch "check-for-enable-accelerated-video-decode-on-Linux.patch"
- %arch-revision
- "12qj23dcp2g2ivyfyj13m4fzf68nllb9djwcxf1h195gn8wkml03")
- (arch-patch "only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch"
- %arch-revision
- "0073qjp0dp9kj2ix2j6cxrima01rpdpkcjj9crxlb9b43b4cc53m")
- (arch-patch "fix-invalid-end-iterator-usage-in-CookieMonster.patch"
- %arch-revision
- "1p1wy3dfncw0hhz77a1km0xjhix69ksgbpa569qz86nv76jbgn39")))
-
(define %ungoogled-origin
(origin
(method git-fetch)
@@ -332,7 +321,7 @@
(string-take %ungoogled-revision 7)))
(sha256
(base32
- "0visyhz321ykrmbjndvx31yd8xlmha9gas0xbkavc2i45rpfahjq"))))
+ "1cka9h7znkmilz9ld4s8pw1jjq2p7br03g3agcnqrk591y5h141i"))))
(define %guix-patches
(list (local-file
@@ -363,8 +352,7 @@
(for-each (lambda (patch)
(invoke "patch" "-p1" "--force" "--input"
patch "--no-backup-if-mismatch"))
- (append '#+%debian-patches '#+%arch-patches
- '#+%guix-patches))
+ (append '#+%debian-patches '#+%guix-patches))
(with-directory-excursion #+%ungoogled-origin
(format #t "Ungooglifying...~%")
@@ -455,7 +443,7 @@
%chromium-version ".tar.xz"))
(sha256
(base32
- "0i3s1il0x5yi3528gdsg3bhnyhs2x24zh7p1nd5apv3va9g85ax0"))
+ "0hgpg31gkksqgyvycsan7l7vjypc7cr6ikjfygf2zv7dhbmf9a19"))
(modules '((guix build utils)))
(snippet (force ungoogled-chromium-snippet))))
(build-system gnu-build-system)
@@ -469,7 +457,7 @@
#:configure-flags
;; See tools/gn/docs/cookbook.md and
;; https://www.chromium.org/developers/gn-build-configuration
- ;; for usage. Run "./gn args . --list" in the Release
+ ;; for usage. Run "gn args . --list" in the Release
;; directory for an exhaustive list of supported flags.
;; (Note: The 'configure' phase will do that for you.)
(list "is_debug=false"
@@ -477,8 +465,10 @@
;; a developer build.
"is_official_build=true"
(string-append "max_jobs_per_link="
- (number->string (parallel-job-count)))
+ ;; Respect the default cap of 8 jobs.
+ (number->string (max 8 (parallel-job-count))))
"clang_use_chrome_plugins=false"
+ "chrome_pgo_phase=0"
"use_sysroot=false"
"goma_dir=\"\""
"enable_nacl=false"
@@ -512,6 +502,11 @@
"use_system_libjpeg=true"
"use_system_libopenjpeg2=true"
"use_system_libpng=true"
+ "use_system_wayland_scanner=true"
+ (string-append "system_wayland_scanner_path=\""
+ (assoc-ref %build-inputs "wayland-scanner")
+ "/bin/wayland-scanner\"")
+
"use_system_zlib=true"
"use_gnome_keyring=false" ;deprecated by libsecret
"use_openh264=true"
@@ -535,6 +530,8 @@
;; WebRTC stuff.
"rtc_use_h264=true"
+ "rtc_use_pipewire=true"
+ "rtc_link_pipewire=true"
;; Don't use bundled sources.
"rtc_build_json=true" ;FIXME: libc++ std::string ABI difference
"rtc_build_libevent=false"
@@ -790,7 +787,8 @@
("python-beautifulsoup4" ,python2-beautifulsoup4)
("python-html5lib" ,python2-html5lib)
- ("python" ,python-2)))
+ ("python" ,python-2)
+ ("wayland-scanner" ,wayland)))
(inputs
`(("alsa-lib" ,alsa-lib)
("atk" ,atk)
@@ -840,12 +838,14 @@
("opus" ,opus+custom)
("pango" ,pango)
("pciutils" ,pciutils)
+ ("pipewire" ,pipewire)
("pulseaudio" ,pulseaudio)
("snappy" ,snappy)
("speech-dispatcher" ,speech-dispatcher)
("udev" ,eudev)
("valgrind" ,valgrind)
- ("vulkan-headers" ,vulkan-headers)))
+ ("vulkan-headers" ,vulkan-headers)
+ ("wayland" ,wayland)))
(native-search-paths
(list (search-path-specification
(variable "CHROMIUM_EXTENSION_DIRECTORY")
@@ -878,24 +878,46 @@ disabled in order to protect the users privacy.")
license:lgpl2.1+))))
(define-public ungoogled-chromium/wayland
- (package/inherit ungoogled-chromium
+ (package
+ (inherit ungoogled-chromium)
(name "ungoogled-chromium-wayland")
+ (native-inputs '())
(inputs
- `(("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
- ,@(package-inputs ungoogled-chromium)))
+ `(("bash" ,bash-minimal)
+ ("glibc-locales" ,glibc-utf8-locales)
+ ("ungoogled-chromium" ,ungoogled-chromium)))
+ (build-system trivial-build-system)
(arguments
- (substitute-keyword-arguments (package-arguments ungoogled-chromium)
- ((#:configure-flags flags)
- `(append (list "use_ozone=true"
- "ozone_platform_wayland=true"
- "ozone_platform_x11=true"
- "ozone_auto_platforms=false"
- "ozone_platform=\"wayland\""
- "use_xkbcommon=true"
- "use_system_minigbm=true"
- "use_system_libwayland=true"
- (string-append "system_wayland_scanner_path=\""
- (assoc-ref %build-inputs "wayland")
- "/bin/wayland-scanner\""))
- (delete "use_vaapi=true" ,flags)))))))
+ '(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (chromium (assoc-ref %build-inputs "ungoogled-chromium"))
+ (locales (assoc-ref %build-inputs "glibc-locales"))
+ (out (assoc-ref %outputs "out"))
+ (exe (string-append out "/bin/chromium")))
+
+ ;; Use a Unicode locale so we can substitute the file below.
+ (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.utf8")
+
+ (mkdir-p (dirname exe))
+ (symlink (string-append chromium "/bin/chromedriver")
+ (string-append out "/bin/chromedriver"))
+
+ (call-with-output-file exe
+ (lambda (port)
+ (format port "#!~a
+exec ~a --enable-features=UseOzonePlatform --ozone-platform=wayland $@"
+ (string-append bash "/bin/bash")
+ (string-append chromium "/bin/chromium"))))
+ (chmod exe #o555)
+
+ ;; Provide the manual and .desktop file.
+ (copy-recursively (string-append chromium "/share")
+ (string-append out "/share"))
+ (substitute* (string-append
+ out "/share/applications/chromium.desktop")
+ ((chromium) out))
+ #t))))))
diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
index 6fbc0a56a7..988296b143 100644
--- a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
+++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
@@ -17,8 +17,8 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -14,7 +14,7 @@
- #include "base/macros.h"
- #include "base/no_destructor.h"
+ #include "base/optional.h"
+ #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "base/third_party/nspr/prtime.h"
+#include <nspr/prtime.h>
@@ -27,7 +27,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
-@@ -107,6 +107,9 @@ config("base_flags") {
+@@ -102,6 +102,9 @@
"-Wglobal-constructors",
]
}
@@ -37,7 +37,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
}
config("base_implementation") {
-@@ -712,8 +715,6 @@ jumbo_component("base") {
+@@ -720,8 +723,6 @@
"third_party/cityhash_v103/src/city_v103.h",
"third_party/icu/icu_utf.cc",
"third_party/icu/icu_utf.h",
@@ -48,19 +48,19 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
"threading/hang_watcher.cc",
--- a/tools/gn/build/gen.py
+++ b/tools/gn/build/gen.py
-@@ -339,6 +339,9 @@ def WriteGNNinja(path, platform, host, o
+@@ -380,6 +380,9 @@
if not options.no_static_libstdcpp:
ldflags.append('-static-libstdc++')
+ # Additional system libraries that are used.
+ libs.append('-lnspr4')
+
- # This is needed by libc++.
- if not platform.is_mingw():
- libs.append('-ldl')
+ if platform.is_mingw() or platform.is_msys():
+ cflags.remove('-std=c++17')
+ cflags.extend([
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -103,6 +103,9 @@
+@@ -110,6 +110,9 @@
"//build/win:default_exe_manifest",
"//third_party/icu",
]
@@ -72,7 +72,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
# This isn't strictly necessary since we can just add the deps to "platform",
--- a/third_party/crashpad/crashpad/handler/BUILD.gn
+++ b/third_party/crashpad/crashpad/handler/BUILD.gn
-@@ -140,6 +140,9 @@
+@@ -144,6 +144,9 @@
"../third_party/mini_chromium:base",
"../tools:tool_support",
]
@@ -104,7 +104,7 @@ https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/sys
+ "-lnspr4",
+ ]
if (is_ios) {
- libs = [ "UIKit.framework" ]
+ frameworks = [ "UIKit.framework" ]
}
--- a/components/schema_org/BUILD.gn
+++ b/components/schema_org/BUILD.gn