gnu: webkitgtk: Fix the build.

This is a followup to commit 8797a07ac0.

* gnu/packages/webkit.scm (webkitgtk)[arguments]: Add "-DUSE_SOUP2=ON"
to the configure flags.  Add the 'prepare-build-environment' phase,
which arranges to use clang for compilation.
[native-inputs]: Add clang-11.
[inputs]: Add lcms.
This commit is contained in:
Mark H Weaver 2021-11-03 02:41:23 -04:00
parent af5742c05b
commit 9d3a5ddc27
No known key found for this signature in database
GPG key ID: 7CEF29847562C516

View file

@ -2,7 +2,7 @@
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org> ;;; Copyright © 20152021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 20182021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 20182021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
@ -40,6 +40,7 @@ (define-module (gnu packages webkit)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (gnu packages gettext) #:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl) #:use-module (gnu packages gl)
#:use-module (gnu packages glib) #:use-module (gnu packages glib)
#:use-module (gnu packages gnome) #:use-module (gnu packages gnome)
@ -51,6 +52,7 @@ (define-module (gnu packages webkit)
#:use-module (gnu packages image) #:use-module (gnu packages image)
#:use-module (gnu packages libreoffice) #:use-module (gnu packages libreoffice)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python) #:use-module (gnu packages python)
@ -252,6 +254,9 @@ (define-public webkitgtk
"-DLIB_INSTALL_DIR=" "-DLIB_INSTALL_DIR="
(assoc-ref %outputs "out") "/lib") (assoc-ref %outputs "out") "/lib")
;; XXX TODO: Use libsoup@3.
"-DUSE_SOUP2=ON"
;; XXX Adding GStreamer GL support would apparently ;; XXX Adding GStreamer GL support would apparently
;; require adding gst-plugins-bad to the inputs, ;; require adding gst-plugins-bad to the inputs,
;; which might entail a security risk as a result of ;; which might entail a security risk as a result of
@ -290,6 +295,11 @@ (define-public webkitgtk
(("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version) (("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version)
(string-append wpebackend-fdo "/lib/" all))) (string-append wpebackend-fdo "/lib/" all)))
#t))) #t)))
(add-before 'configure 'prepare-build-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CC" "clang")
(setenv "CXX" "clang++")
#t))
(add-after 'install 'move-doc-files (add-after 'install 'move-doc-files
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
@ -299,7 +309,8 @@ (define-public webkitgtk
(string-append doc "/share/gtk-doc")) (string-append doc "/share/gtk-doc"))
#t)))))) #t))))))
(native-inputs (native-inputs
`(("bison" ,bison) `(("clang" ,clang-11)
("bison" ,bison)
("gettext" ,gettext-minimal) ("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin") ; for glib-mkenums, etc. ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection) ("gobject-introspection" ,gobject-introspection)
@ -323,6 +334,7 @@ (define-public webkitgtk
("harfbuzz" ,harfbuzz) ("harfbuzz" ,harfbuzz)
("hyphen" ,hyphen) ("hyphen" ,hyphen)
("icu4c" ,icu4c) ("icu4c" ,icu4c)
("lcms" ,lcms)
("libgcrypt" ,libgcrypt) ("libgcrypt" ,libgcrypt)
("libjpeg" ,libjpeg-turbo) ("libjpeg" ,libjpeg-turbo)
("libnotify" ,libnotify) ("libnotify" ,libnotify)