[PATCH] gnu: Add qtwebengine.

  • Done
  • quality assurance status badge
Details
9 participants
  • Hartmut Goebel
  • Ludovic Courtès
  • Pierre Neidhardt
  • Brendan Tildesley
  • Marius Bakke
  • mike.rosset
  • mike rosset
  • Ricardo Wurmus
  • Ricardo Wurmus
Owner
unassigned
Submitted by
mike rosset
Severity
normal
M
M
mike rosset wrote on 23 May 2019 08:23
(address . guix-patches@gnu.org)(address . mike.rosset@gmail.com)
20190523062344.20601-1-mrosset@bufio.org
From: mike rosset <mike.rosset@gmail.com>

* gnu/packages/qt.scm (qtwebengine): New variable.
---
gnu/packages/qt.scm | 133 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)

Toggle diff (164 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index afc4d8dc06..d00cc2692a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -48,6 +48,7 @@
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
@@ -55,6 +56,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages pcre)
@@ -63,6 +65,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages re2c)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
#:use-module (gnu packages sqlite)
@@ -2274,3 +2277,133 @@ user-friendly than the default @code{QColorDialog} and several other
color-related widgets.")
;; Includes a license exception for combining with GPL2 code.
(license license:lgpl3+))))
+
+(define-public qtwebengine
+ (package
+ (name "qtwebengine")
+ (version (package-version qtbase))
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://download.qt.io/official_releases/qt/"
+ (substring version 0 4)
+ "/" version "/submodules/"
+ (string-append name "-everywhere-src-" version)
+ ".tar.xz"))
+ (sha256
+ (base32
+ "1zmqsdais85cdfh2jh8h4a5jcamp1mzdk3vgqm6xnldqf6nrxd2v"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(
+ ("perl" ,perl)
+ ("python-2" ,python-2)
+ ("pkg-config" ,pkg-config)
+ ("flex" ,flex)
+ ("bison" ,bison)
+ ("ruby" ,ruby)
+ ("ninja" ,ninja)
+ ))
+ (inputs
+ `(
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("libxcb" ,libxcb)
+ ("xcb-util" ,xcb-util)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libx11" ,libx11)
+ ("libxrender" ,libxrender)
+ ("libxi" ,libxi)
+ ;; OpenGL
+ ("mesa" ,mesa)
+ ;; qt web engine
+ ("libgcrypt" ,libgcrypt)
+ ("pciutils" ,pciutils)
+ ("nss" ,nss)
+ ("libxtst" ,libxtst)
+ ("gperf" ,gperf)
+ ("cups-minimal" ,cups-minimal)
+ ("pulseaudio" ,pulseaudio)
+ ("udev" ,eudev)
+ ;; systemd-devel? no systemd on guix
+ ("libcap" ,libcap)
+ ("alsa-lib" ,alsa-lib)
+ ("dbus" ,dbus)
+ ("libxrandr" ,libxrandr)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("fontconfig" ,fontconfig)
+ ("qtwebchannel" ,qtwebchannel)
+ ("atk" ,atk)
+ ("qtmultimedia" ,qtmultimedia)
+ ("re2c" ,re2c)
+ ))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'configure-qmake
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (qtbase (assoc-ref inputs "qtbase"))
+ (tmpdir (string-append (getenv "TMPDIR")))
+ (qmake (string-append tmpdir "/qmake"))
+ (qt.conf (string-append tmpdir "/qt.conf")))
+ ;; Use qmake with a customized qt.conf to override install
+ ;; paths to $out.
+ (symlink (which "qmake") qmake)
+ (setenv "CC" "gcc")
+ (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
+ (with-output-to-file qt.conf
+ (lambda ()
+ (format #t "[Paths]
+Prefix=~a
+ArchData=lib/qt5
+Data=share/qt5
+Documentation=share/doc/qt5
+Headers=include/qt5
+Libraries=lib
+LibraryExecutables=lib/qt5/libexec
+Binaries=bin
+Tests=tests
+Plugins=lib/qt5/plugins
+Imports=lib/qt5/imports
+Qml2Imports=lib/qt5/qml
+Translations=share/qt5/translations
+Settings=etc/xdg
+Examples=share/doc/qt5/examples
+HostPrefix=~a
+HostData=lib/qt5
+HostBinaries=bin
+HostLibraries=lib
+
+[EffectiveSourcePaths]
+HostPrefix=~a
+HostData=lib/qt5
+" out out qtbase)))
+ #t)))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Valid QT_BUILD_PARTS variables are:
+ ;; libs tools tests examples demos docs translations
+ (invoke "qmake" "QT_BUILD_PARTS = libs tools")))
+ (add-before 'check 'set-display
+ (lambda _
+ ;; make Qt render "offscreen", required for tests
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ #t))
+ (add-after 'install-binaries 'install-qt.conf
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tmpdir (string-append (getenv "TMPDIR")))
+ (in.conf (string-append tmpdir "/qt.conf"))
+ (out.conf (string-append out "/lib/qt5/libexec/qt.conf")))
+ (copy-file in.conf out.conf))
+ #t))
+ )))
+ (home-page "https://www.qt.io")
+ (synopsis "Qt5WebEngine")
+ (description "Qt5WebEngine provides support for web
+applications using the Chromium browser project.")
+ (license
+ (package-license qt))))
--
2.21.0
L
L
Ludovic Courtès wrote on 27 May 2019 23:05
(name . mike rosset)(address . mrosset@bufio.org)
87zhn7pq0r.fsf@gnu.org
Hello Mike,

mike rosset <mrosset@bufio.org> skribis:

Toggle quote (4 lines)
> From: mike rosset <mike.rosset@gmail.com>
>
> * gnu/packages/qt.scm (qtwebengine): New variable.

https://github.com/mrosset/nomad/ looks pretty exciting, which
motivates me to take a look at this patch. :-)

Toggle quote (4 lines)
> + (synopsis "Qt5WebEngine")
> + (description "Qt5WebEngine provides support for web
> +applications using the Chromium browser project.")

As you may know, Guix contains a variant of ‘ungoogled-chromium’, which
goes to great lengths to remove non-free software, DRM support, spyware, etc.

The problem is that QtWebEngine bundles Chromium. We would need to
“unbundle” it and/or replace it with ‘ungoogled-chromium’. I’m not sure
how hard that is.

Have you thought about this? Would you like to give it a try?

Thanks,
Ludo’.
M
M
mrosset wrote on 28 May 2019 19:48
(name . Ludovic Courtès)(address . ludo@gnu.org)
87y32qii63.fsf@bufio.org
Ludovic Courtès <ludo@gnu.org> writes:


Hello Ludovic, thank you for looking at this.

Toggle quote (4 lines)
>
> <https://github.com/mrosset/nomad/> looks pretty exciting, which
> motivates me to take a look at this patch. :-)

This is my motivation for having this included with guix. the main URL
is currently being done on the feature-qt branch.

Nomad is still very much WIP. And some early documentation can be found

In short Nomad is an extensible web browser that uses GNU guile as it's
extension language. And is heavily modeled after Emacs.


Toggle quote (11 lines)
>> + (synopsis "Qt5WebEngine")
>> + (description "Qt5WebEngine provides support for web
>> +applications using the Chromium browser project.")
>
> As you may know, Guix contains a variant of ‘ungoogled-chromium’, which
> goes to great lengths to remove non-free software, DRM support, spyware, etc.
>
> The problem is that QtWebEngine bundles Chromium. We would need to
> “unbundle” it and/or replace it with ‘ungoogled-chromium’. I’m not sure
> how hard that is.

I have done some research as to how best to handle the chromium sources
that are distributed with qtwebengine. From my understanding so far. QT
has similar goals as ungoogle-chromium. Based off of the information
found here https://wiki.qt.io/QtWebEngine.Binaries are stripped from
source tree. Services that talk to Google are removed. And the code is
refactored to use system libraries like OpenSSL.

There is a more in depth break down on the chromium rebase process found

It seems to me that QT is already doing the right thing
here. Unfortunately I don't think it will be easy to reuse the
ungoogle-chrome code base. It would probably require manually re-basing
then applying qt patches. Also there is no clear benefit for it. Since
updating ungoogle-chromium would not directly benefit qtwebengine. In
short QT seems to already be doing the necessary work.

I can though now, do my best to ensure that the least amount of 3rd
party libraries are used. I'll update my patch as soon as possible. And
I will explore the chromium source issue more in the process.

Regards,

Mike Rosset
M
M
Mike Rosset wrote on 30 May 2019 01:37
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20190529233705.21127-1-mrosset@bufio.org
This patch ensures qtwebengine uses only Guix libraries. There are some
libraries that fail to be detect or are missing features. I have documented
them within the input expression.

Note. I'm not sure if I've sent this patch right. If this is wrong I can resend
the complete series
M
M
Mike Rosset wrote on 30 May 2019 01:37
(address . 35866@debbugs.gnu.org)
20190529233705.21127-2-mrosset@bufio.org
Most in tree third party libraries are now linked to Guix libraries. There
are a few Guix libraries that break the build or are not automatically
detected these are now documented in the input expression.

gnu: qtwebengine: PDF and printing support is now disabled.

PDF and printing requires pepper plugins. which is not enabled.
---
gnu/packages/qt.scm | 87 +++++++++++++++++++++++++++++----------------
1 file changed, 57 insertions(+), 30 deletions(-)

Toggle diff (150 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index d00cc2692a..658946f4a1 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -46,6 +46,7 @@
#:use-module (gnu packages fontutils)
#:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
@@ -55,6 +56,7 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages maths)
#:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
@@ -62,16 +64,21 @@
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
- #:use-module (gnu packages re2c)
+ #:use-module (gnu packages regex)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages telephony)
+ #:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
@@ -2297,47 +2304,63 @@ color-related widgets.")
(build-system gnu-build-system)
(native-inputs
`(
+ ("bison" ,bison)
+ ("flex" ,flex)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
("perl" ,perl)
- ("python-2" ,python-2)
("pkg-config" ,pkg-config)
- ("flex" ,flex)
- ("bison" ,bison)
+ ("python-2" ,python-2)
("ruby" ,ruby)
- ("ninja" ,ninja)
))
(inputs
`(
- ("qtbase" ,qtbase)
- ("qtdeclarative" ,qtdeclarative)
+ ("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups-minimal" ,cups-minimal)
+ ("dbus" ,dbus)
+ ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("harbuzz" ,harfbuzz)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ ("lcms" ,lcms)
+ ("libcap" ,libcap)
+ ("libevent" ,libevent)
+ ("libgcrypt" ,libgcrypt)
+ ("libjpeg" ,libjpeg-turbo)
+ ;; libsrtp not found by qmake. seems to not have config.tests?
+ ("libsrtp" ,libsrtp)
+ ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
+ ;; ("libvpx" ,libvpx)
+ ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
("libxcb" ,libxcb)
- ("xcb-util" ,xcb-util)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("libxi" ,libxi)
("libxkbcommon" ,libxkbcommon)
- ("libx11" ,libx11)
+ ;; libxml not found due to icu not enabled in libxml?
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
("libxrender" ,libxrender)
- ("libxi" ,libxi)
- ;; OpenGL
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
("mesa" ,mesa)
- ;; qt web engine
- ("libgcrypt" ,libgcrypt)
- ("pciutils" ,pciutils)
+ ("minizip" ,minizip)
("nss" ,nss)
- ("libxtst" ,libxtst)
- ("gperf" ,gperf)
- ("cups-minimal" ,cups-minimal)
+ ("opus" ,opus)
+ ("pciutils" ,pciutils)
+ ("protobuf" ,protobuf)
("pulseaudio" ,pulseaudio)
- ("udev" ,eudev)
- ;; systemd-devel? no systemd on guix
- ("libcap" ,libcap)
- ("alsa-lib" ,alsa-lib)
- ("dbus" ,dbus)
- ("libxrandr" ,libxrandr)
- ("libxcomposite" ,libxcomposite)
- ("libxcursor" ,libxcursor)
- ("fontconfig" ,fontconfig)
- ("qtwebchannel" ,qtwebchannel)
- ("atk" ,atk)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
("qtmultimedia" ,qtmultimedia)
- ("re2c" ,re2c)
+ ("qtwebchannel" ,qtwebchannel)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("udev" ,eudev)
+ ("xcb-util" ,xcb-util)
))
(arguments
`(#:phases
@@ -2386,7 +2409,11 @@ HostData=lib/qt5
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Valid QT_BUILD_PARTS variables are:
;; libs tools tests examples demos docs translations
- (invoke "qmake" "QT_BUILD_PARTS = libs tools")))
+ (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
+ "--webengine-printing-and-pdf=no"
+ "--webengine-ffmpeg=system"
+ "--webengine-icu=system"
+ "--webengine-pepper-plugins=no")))
(add-before 'check 'set-display
(lambda _
;; make Qt render "offscreen", required for tests
--
2.21.0
M
M
Marius Bakke wrote on 31 May 2019 21:28
(address . mike.rosset@gmail.com)
8736kubezn.fsf@devup.no
Hi Mike,

Mike Rosset <mrosset@bufio.org> writes:

Toggle quote (8 lines)
> Most in tree third party libraries are now linked to Guix libraries. There
> are a few Guix libraries that break the build or are not automatically
> detected these are now documented in the input expression.
>
> gnu: qtwebengine: PDF and printing support is now disabled.
>
> PDF and printing requires pepper plugins. which is not enabled.

Thank you very much for this work. I have looked into QtWebEngine
before and do think they are doing "the right thing" (apart from using
Blink in the first place) wrt binaries and spyware.

The patch LGTM overall, but I would like to see the unused "third_party"
directories removed if possible. You might be able to reuse much of
this snippet:


Can you give it a try?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlzxgFwACgkQoqBt8qM6
VPqIaAgArfabwhPUehc9EecxM4XtxOtKzD68smI1r0SV30i2qxMel98XUvW7czKv
iJzA5NFgkv1O3GxRmLcg1WswNAvN858Mfxjt1jkXQx09FkOtskTaKpKNJzztAThS
n9tw5S9xfvq2mp6QJumyZQoo9gxpeUelGRyP2Wuc4AIY3ekAXKwOxDndtN4yC+yQ
jknvRPzpxuEswc/Gig1lZTaP4L3de/g8vJwaKhTLBh0Bz/8ZQ2fuLAl3/NUIzBY2
KPDCFRA0haVBiPR8dstrIyTAaWw+uLkrDZ2Qt44+TmXE0iSSl9hXiUi7vc46E9BP
i1AmLBYXSVYru03rLFslH1DPalm8JA==
=C6Py
-----END PGP SIGNATURE-----

M
M
mrosset wrote on 1 Jun 2019 01:16
(name . Marius Bakke)(address . mbakke@fastmail.com)
87sgsuusd5.fsf@bufio.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (12 lines)
> Thank you very much for this work. I have looked into QtWebEngine
> before and do think they are doing "the right thing" (apart from using
> Blink in the first place) wrt binaries and spyware.
>
> The patch LGTM overall, but I would like to see the unused "third_party"
> directories removed if possible. You might be able to reuse much of
> this snippet:
>
> <https://gitlab.com/mbakke/guix-chromium/blob/master/chromium/chromium.scm#L52>
>
> Can you give it a try?

This is a good idea, not sure why I had not thought to do this
myself. I'll remove everything I can then update my patches series
L
L
Ludovic Courtès wrote on 1 Jun 2019 11:46
Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
(address . mrosset@bufio.org)
877ea5k596.fsf@gnu.org
Hello,

mrosset@bufio.org skribis:

Toggle quote (7 lines)
> It seems to me that QT is already doing the right thing
> here. Unfortunately I don't think it will be easy to reuse the
> ungoogle-chrome code base. It would probably require manually re-basing
> then applying qt patches. Also there is no clear benefit for it. Since
> updating ungoogle-chromium would not directly benefit qtwebengine. In
> short QT seems to already be doing the necessary work.

I think this would require a careful analysis like the one Marius Bakke
carried out when packaging ‘ungoogled-chromium’.

It would be both nicer and easier if QtWebEngine could be tweaked to use
our own ‘ungoogled-chromium’ directly instead of rebuilding one, but
yeah, that sounds tricky.

Toggle quote (4 lines)
> I can though now, do my best to ensure that the least amount of 3rd
> party libraries are used. I'll update my patch as soon as possible. And
> I will explore the chromium source issue more in the process.

OK.

Thank you!

Ludo’.
R
R
Ricardo Wurmus wrote on 18 Jul 2019 11:26
[PATCH] gnu: Add qtwebengine.
(address . 35866@debbugs.gnu.org)(address . mrosset@bufio.org)
87v9vzg0cy.fsf@mdc-berlin.de
Hi Mike,

I’m curious about the current state of this patch. Have you been able
to take a look at whether we could use our ungoogled-chromium package
here?

I’m working on getting the latest R Studio into Guix (upgrading and
moving it from the guix-bimsb channel) and since all versions since 1.2
depend on qtwebengine I have some motivation to see this patch make it
into Guix at some point :)

--
Ricardo
B
B
Brendan Tildesley wrote on 24 Jul 2019 16:06
(address . 35866@debbugs.gnu.org)
23703ef1-c21d-5b52-7848-fc3d2c6fc907@brendan.scot
I was able to apply this patch and succeeded in building qtwebengine. I
then tried to add  it as a dependency to python-pyqt and build it, but I
get this error:

sip/QtPrintSupport/qprinter.sip:28:22: fatal error: qprinter.h: No such
file or directory


It sounds like some simple search path error. Anyone know how that can
be fixed?
P
P
Pierre Neidhardt wrote on 6 Oct 2019 17:45
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
87h84lg9mx.fsf@ambrevar.xyz
+1! :)

As far as I can tell, in its current state the package will trigger the
following error when we try to make a webengine view:

Toggle snippet (4 lines)
15:50:10 INFO: Run :adblock-update to get adblock lists.
15:50:10 CRITICAL: Could not find QtWebEngineProcess

Maybe something like this would help?

Toggle snippet (6 lines)
(native-search-paths
(list (search-path-specification
(variable "QTWEBENGINEPROCESS_PATH")
(files '("lib/qt5/libexec/QtWebEngineProcess")))))

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2aDDYACgkQm9z0l6S7
zH/TuQf/e0PLLDoP7hD60S8s0vEkMrbEHhyvRcZut1YzFPvSfbPty+cob7zNqZkR
Oz4qrrj5jmOkgNg1aywZ+KAPzzN6JTnZ0PAtE/vdK08i3w5cOxn6lxyTL+7So4Dc
FVeNm7nlVcEGc9BlLr7sqThzsczK3DNQlJzsbys0RXrRoAK6z3zH63wAqKuGzYlE
HZzX631P5ufU+jNlF2Eieot7hgm4tOGc7qcaBO/hzWcBWdK1m+2pOqX+F4MlPxzv
dCypIsv4GvyV09A9tIecc5Adc5WHgEqmqVYt37LZbQ6/To89H586aTVsiod+b1d1
mDFuhiPvAX1zIf17scoLji7AsAkNPQ==
=dht6
-----END PGP SIGNATURE-----

M
M
mike.rosset wrote on 7 Oct 2019 17:49
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
878spwblo0.fsf@gmail.com
Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (7 lines)
> Maybe something like this would help?
>
> (native-search-paths
> (list (search-path-specification
> (variable "QTWEBENGINEPROCESS_PATH")
> (files '("lib/qt5/libexec/QtWebEngineProcess")))))

Right I think this is what I was going to propose for
you can temporarily get around this with this ugly hack.

export QTWEBENGINEPROCESS_PATH="$(guix build qtwebengine)/lib/qt5/libexec/QtWebEngineProcess"

I'll add the native-search-path to the nonguix package ASAP.

Note. Once you get past this issues. You will then have problems with
locales. Since the module QT packages assumes you are installing to the
same prefix as qtbase. Which is not feasible with how guix packages
things. For my experimental QT nomad I had some hacks to get around
this, which are not feasible or ideal when creating a package that is a
library and uses qtwebengine. I'm still not sure how to best resolve
this issue. Maybe creating a package that is a union of qtbase and
qtwebengine might help.

Regards,

Mike
H
H
Hartmut Goebel wrote on 16 Dec 2019 16:29
Re: gnu: Add qtwebengine.
(address . 35866@debbugs.gnu.org)
0af1d64d-09e4-1f00-b0c9-27376b7e1e06@crazy-compilers.com
Hi,

has anybody tried this patch(es) recently? Some "search-path" issues
have been fixed recently, so maybe some issues are gone now.

I also wonder whether this could be based on qtsvg, too. I can not spot
any differences in the build-system arguments compared to qtsvg.

--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
M
M
mike.rosset wrote on 16 Dec 2019 17:02
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)
87mubsp8c4.fsf@gmail.com
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

Toggle quote (8 lines)
> Hi,
>
> has anybody tried this patch(es) recently? Some "search-path" issues
> have been fixed recently, so maybe some issues are gone now.
>
> I also wonder whether this could be based on qtsvg, too. I can not spot
> any differences in the build-system arguments compared to qtsvg.

If I recall correctly I tried inheriting from qtsvg but there was
significant divergence to warrant a custom qt.conf for the locale
hacks.

Why don't I resubmit this patch? I believe I have a more up to date local
version. And based on our other threads a module qtwebengine is more
ideal for guix then the monolithic ones. At least this way I can put a
test case together that demonstrates the locale issues.

Mike
P
P
Pierre Neidhardt wrote on 16 Dec 2019 19:01
(address . 35866@debbugs.gnu.org)
87d0cop2t8.fsf@ambrevar.xyz
Please do!

I'll try to test it this week. Just for fun, to see how long it takes
to build :)

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl33xoMACgkQm9z0l6S7
zH/qNwf+Kb6V8cNXS+4w3fbKsEF0xYG0ulMTndg8rLNdWgPPcA64OczvxkPnOwdp
bb3iL0hnHVulIok/Eq+mqC0ewCM+J95/k+N6yPkUdufFYE8t5kjzbP7RvcPTbcxO
ThSa5gZrQnwqakzsfUUJI010dcUWwYiZ3PBBjHC1FayOFIQeYqbo1ZklL6sU88Dl
PyBZoVCXd7hClkRr6eDjs9vqVPvUqWgSHGBTgEeC1WXSS3OtwhTr88IJluQISDpn
mIZV3yDOA1WKhvnzdWhMvfsN+Dnx0btz0LnaEb2qrh3gqLsfJRzr76A9/bGHmFzo
lhIyMNOw8ccFEya35PK/88JH+E3Xig==
=EhU+
-----END PGP SIGNATURE-----

M
M
Mike Rosset wrote on 18 Dec 2019 21:32
[PATCH] gnu: Add qtwebengine.
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20191218203223.22861-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (qtwebengine): New variable.

This is a new qtwebengine patch with working locales.

qtwebengine now inherits qtsvg

This also uses substitute-keyword-arguments to only replace configure phase.
---
gnu/packages/qt.scm | 129 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)

Toggle diff (173 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c0d652a407..12028fd64c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -52,30 +52,40 @@
#:use-module (gnu packages flex)
#: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)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages regex)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
@@ -2020,6 +2030,125 @@ time Web content can be enhanced with native controls.")
(license license:lgpl2.1+)))
+(define-public qtwebengine
+ (package (inherit qtsvg)
+ (name "qtwebengine")
+ (version (package-version qtbase))
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://download.qt.io/official_releases/qt/"
+ (substring version 0 4)
+ "/" version "/submodules/"
+ (string-append name "-everywhere-src-" version)
+ ".tar.xz"))
+ (sha256
+ (base32
+ "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python-2" ,python-2)
+ ("ruby" ,ruby)
+ ))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups-minimal" ,cups-minimal)
+ ("dbus" ,dbus)
+ ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("harbuzz" ,harfbuzz)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ ("lcms" ,lcms)
+ ("libcap" ,libcap)
+ ("libevent" ,libevent)
+ ("libgcrypt" ,libgcrypt)
+ ("libjpeg" ,libjpeg-turbo)
+ ;; libsrtp not found by qmake. seems to not have config.tests?
+ ("libsrtp" ,libsrtp)
+ ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
+ ;; ("libvpx" ,libvpx)
+ ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb" ,libxcb)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("libxi" ,libxi)
+ ("libxkbcommon" ,libxkbcommon)
+ ;; libxml not found due to icu not enabled in libxml?
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
+ ("mesa" ,mesa)
+ ("minizip" ,minizip)
+ ("nss" ,nss)
+ ("opus" ,opus)
+ ("pciutils" ,pciutils)
+ ("protobuf" ,protobuf)
+ ;; ("pulseaudio" ,pulseaudio)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtwebchannel" ,qtwebchannel)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("udev" ,eudev)
+ ("xcb-util" ,xcb-util)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Avoids potential race conditions
+ (setenv "PYTHONDONTWRITEBYTECODE" "1")
+ ;; Make build output less verbose
+ (setenv "NINJAFLAGS" "-k1")
+ ;; Use this output translations not qtbase
+ (substitute* "src/core/web_engine_library_info.cpp"
+ (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
+ (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
+ ;; Substitute full dynamic path for nss
+ (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
+ (("libnssckbi.so")
+ (string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
+ ;; Substitute full dynamic path for udev
+ (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
+ (("libudev.so.1")
+ (string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
+ ;; Valid QT_BUILD_PARTS variables are:
+ ;; libs tools tests examples demos docs translations
+ (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
+ "--webengine-printing-and-pdf=no"
+ "--webengine-ffmpeg=system"
+ "--webengine-icu=system"
+ "--webengine-pepper-plugins=no")))))
+ ((#:tests? _ #f) #f)))
+ (native-search-paths
+ (list (search-path-specification
+ (file-type 'regular)
+ (separator #f)
+ (variable "QTWEBENGINEPROCESS_PATH")
+ (files '("lib/qt5/libexec/QtWebEngineProcess")))))
+ (home-page "https://www.qt.io")
+ (synopsis "Qt WebEngine Module")
+ (description "Qt5WebEngine provides support for web
+applications using the Chromium browser project.")
+ (license
+ (package-license qt))))
+
(define-public dotherside
(package
(name "dotherside")
--
2.24.1
M
M
Mike Rosset wrote on 18 Dec 2019 21:45
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20191218204537.24069-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (qtwebengine): New variable.

This is a new qtwebengine patch with working locales.

qtwebengine now inherits qtsvg

This also uses substitute-keyword-arguments to only replace configure phase.
---
gnu/packages/qt.scm | 129 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)

Toggle diff (173 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c0d652a407..12028fd64c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -52,30 +52,40 @@
#:use-module (gnu packages flex)
#: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)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages regex)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
@@ -2020,6 +2030,125 @@ time Web content can be enhanced with native controls.")
(license license:lgpl2.1+)))
+(define-public qtwebengine
+ (package (inherit qtsvg)
+ (name "qtwebengine")
+ (version (package-version qtbase))
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://download.qt.io/official_releases/qt/"
+ (substring version 0 4)
+ "/" version "/submodules/"
+ (string-append name "-everywhere-src-" version)
+ ".tar.xz"))
+ (sha256
+ (base32
+ "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python-2" ,python-2)
+ ("ruby" ,ruby)
+ ))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups-minimal" ,cups-minimal)
+ ("dbus" ,dbus)
+ ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("harbuzz" ,harfbuzz)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ ("lcms" ,lcms)
+ ("libcap" ,libcap)
+ ("libevent" ,libevent)
+ ("libgcrypt" ,libgcrypt)
+ ("libjpeg" ,libjpeg-turbo)
+ ;; libsrtp not found by qmake. seems to not have config.tests?
+ ("libsrtp" ,libsrtp)
+ ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
+ ;; ("libvpx" ,libvpx)
+ ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb" ,libxcb)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("libxi" ,libxi)
+ ("libxkbcommon" ,libxkbcommon)
+ ;; libxml not found due to icu not enabled in libxml?
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
+ ("mesa" ,mesa)
+ ("minizip" ,minizip)
+ ("nss" ,nss)
+ ("opus" ,opus)
+ ("pciutils" ,pciutils)
+ ("protobuf" ,protobuf)
+ ;; ("pulseaudio" ,pulseaudio)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtwebchannel" ,qtwebchannel)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("udev" ,eudev)
+ ("xcb-util" ,xcb-util)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Avoids potential race conditions
+ (setenv "PYTHONDONTWRITEBYTECODE" "1")
+ ;; Make build output less verbose
+ (setenv "NINJAFLAGS" "-k1")
+ ;; Use this output translations not qtbase
+ (substitute* "src/core/web_engine_library_info.cpp"
+ (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
+ (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
+ ;; Substitute full dynamic path for nss
+ (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
+ (("libnssckbi.so")
+ (string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
+ ;; Substitute full dynamic path for udev
+ (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
+ (("libudev.so.1")
+ (string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
+ ;; Valid QT_BUILD_PARTS variables are:
+ ;; libs tools tests examples demos docs translations
+ (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
+ "--webengine-printing-and-pdf=no"
+ "--webengine-ffmpeg=system"
+ "--webengine-icu=system"
+ "--webengine-pepper-plugins=no")))))
+ ((#:tests? _ #f) #f)))
+ (native-search-paths
+ (list (search-path-specification
+ (file-type 'regular)
+ (separator #f)
+ (variable "QTWEBENGINEPROCESS_PATH")
+ (files '("lib/qt5/libexec/QtWebEngineProcess")))))
+ (home-page "https://www.qt.io")
+ (synopsis "Qt WebEngine Module")
+ (description "Qt5WebEngine provides support for web
+applications using the Chromium browser project.")
+ (license
+ (package-license qt))))
+
(define-public dotherside
(package
(name "dotherside")
--
2.24.1
P
P
Pierre Neidhardt wrote on 19 Dec 2019 19:29
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 35866@debbugs.gnu.org)
877e2sf9t7.fsf@ambrevar.xyz
Looking good!

Comments below:

Toggle quote (4 lines)
> qtwebengine now inherits qtsvg
>
> This also uses substitute-keyword-arguments to only replace configure phase.

I think those 2 lines can be omitted or maybe rephrased. We didn't have
qtwebengine before, so you'd need to explain what's up with qtsvg, why
it was problematic to use it.

Toggle quote (11 lines)
> +(define-public qtwebengine
> + (package (inherit qtsvg)
> + (name "qtwebengine")
> + (version (package-version qtbase))
> + (source
> + (origin
> + (method url-fetch)
> + (uri
> + (string-append "https://download.qt.io/official_releases/qt/"
> + (substring version 0 4)

Use (version-major+minor ...) or similar.

Toggle quote (18 lines)
> + "/" version "/submodules/"
> + (string-append name "-everywhere-src-" version)
> + ".tar.xz"))
> + (sha256
> + (base32
> + "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("bison" ,bison)
> + ("flex" ,flex)
> + ("gperf" ,gperf)
> + ("ninja" ,ninja)
> + ("perl" ,perl)
> + ("pkg-config" ,pkg-config)
> + ("python-2" ,python-2)
> + ("ruby" ,ruby)
> + ))

Dangling parentheses.

Toggle quote (18 lines)
> + (inputs
> + `(("alsa-lib" ,alsa-lib)
> + ("atk" ,atk)
> + ("cups-minimal" ,cups-minimal)
> + ("dbus" ,dbus)
> + ("ffmpeg" ,ffmpeg)
> + ("fontconfig" ,fontconfig)
> + ("harbuzz" ,harfbuzz)
> + ("icu4c" ,icu4c)
> + ("jsoncpp" ,jsoncpp)
> + ("lcms" ,lcms)
> + ("libcap" ,libcap)
> + ("libevent" ,libevent)
> + ("libgcrypt" ,libgcrypt)
> + ("libjpeg" ,libjpeg-turbo)
> + ;; libsrtp not found by qmake. seems to not have config.tests?
> + ("libsrtp" ,libsrtp)

What does it entail? Is libsrtp ignored then?
If there is a problem, please add a "FIXME:" comment or similar.

Toggle quote (11 lines)
> + ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
> + ;; ("libvpx" ,libvpx)
> + ("libwebp" ,libwebp)
> + ("libx11" ,libx11)
> + ("libxcb" ,libxcb)
> + ("libxcomposite" ,libxcomposite)
> + ("libxcursor" ,libxcursor)
> + ("libxi" ,libxi)
> + ("libxkbcommon" ,libxkbcommon)
> + ;; libxml not found due to icu not enabled in libxml?

You mean libxml2?
Is it ignored then?
Same as above, prefix with a FIXME if needed.

Toggle quote (13 lines)
> + ("libxml2" ,libxml2)
> + ("libxrandr" ,libxrandr)
> + ("libxrender" ,libxrender)
> + ("libxslt" ,libxslt)
> + ("libxtst" ,libxtst)
> + ("mesa" ,mesa)
> + ("minizip" ,minizip)
> + ("nss" ,nss)
> + ("opus" ,opus)
> + ("pciutils" ,pciutils)
> + ("protobuf" ,protobuf)
> + ;; ("pulseaudio" ,pulseaudio)

Please explain why you left pulseaudio commented out.

Toggle quote (20 lines)
> + ("qtbase" ,qtbase)
> + ("qtdeclarative" ,qtdeclarative)
> + ("qtmultimedia" ,qtmultimedia)
> + ("qtwebchannel" ,qtwebchannel)
> + ("re2" ,re2)
> + ("snappy" ,snappy)
> + ("udev" ,eudev)
> + ("xcb-util" ,xcb-util)))
> + (arguments
> + (substitute-keyword-arguments (package-arguments qtsvg)
> + ((#:phases phases)
> + `(modify-phases ,phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + ;; Avoids potential race conditions
> + (setenv "PYTHONDONTWRITEBYTECODE" "1")
> + ;; Make build output less verbose
> + (setenv "NINJAFLAGS" "-k1")
> + ;; Use this output translations not qtbase

This comment is not very clear, maybe it could be rephrased, e.g.

"Replace the qtbase translations with those from qtwebengine.

Toggle quote (22 lines)
> + (substitute* "src/core/web_engine_library_info.cpp"
> + (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
> + (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
> + ;; Substitute full dynamic path for nss
> + (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
> + (("libnssckbi.so")
> + (string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
> + ;; Substitute full dynamic path for udev
> + (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
> + (("libudev.so.1")
> + (string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
> + ;; Valid QT_BUILD_PARTS variables are:
> + ;; libs tools tests examples demos docs translations
> + (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
> + "--webengine-printing-and-pdf=no"
> + "--webengine-ffmpeg=system"
> + "--webengine-icu=system"
> + "--webengine-pepper-plugins=no")))))
> + ((#:tests? _ #f) #f)))

No tests?

Toggle quote (9 lines)
> + (native-search-paths
> + (list (search-path-specification
> + (file-type 'regular)
> + (separator #f)
> + (variable "QTWEBENGINEPROCESS_PATH")
> + (files '("lib/qt5/libexec/QtWebEngineProcess")))))
> + (home-page "https://www.qt.io")
> + (synopsis "Qt WebEngine Module")

Probably no capital for "module."

Great work, thanks again!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl37wZQACgkQm9z0l6S7
zH8bdgf+KhuwlDhMjSFEkt8ica7JS7Bb3i+VPFpqcjtNcnGeQFLzG2AoVO6TuhWd
CrA+cHWGslfXX2BnbmKovPLU4tlH5sXyRg+TGqhPGfUF2nIMIoawD4XM4jAk6iNx
kAaCkGmZIW3u4occ19O6ILamXrgPDy1HtNjKLK1BAU319G/djDrK7XM+cwmIllNU
pjtKQ0Orq119n9YFdmfQ9u/zgvyWAWqVdnQxpFiqGgCTrAssK+o2u40rBKv+M5/u
tWDclDBUDdiZ2WVogwNi4lDYYrr/KwsuS7MQNNAJploEI89m1k6mJ7HcqZyjGwia
IaohVqo9RVUBU7gi1QLbF4lDPJTnZg==
=QUz7
-----END PGP SIGNATURE-----

R
R
Ricardo Wurmus wrote on 19 Dec 2019 21:19
(address . mike.rosset@gmail.com)
87d0ckqd96.fsf@elephly.net
Hi Mike,

Toggle quote (4 lines)
> * gnu/packages/qt.scm (qtwebengine): New variable.
>
> This is a new qtwebengine patch with working locales.

Thank you very much for working on this! This doesn’t look like an easy
package.

Toggle quote (3 lines)
> + (description "Qt5WebEngine provides support for web
> +applications using the Chromium browser project.")

Does this include the unmodified Chromium source code? We need to
ensure that the variant we are distributing here does not contain any
misfeatures that Chromium is known for (e.g. DRM support) and that only
free software is included.

Marius and others previously worked very hard on making sure that the
ungoogled-chromium package complied with our expectations for Chromium.
I wonder what work needs to be done on the sources included in this
package to accomplish the same goal.

Did you happen to investigate this?

--
Ricardo
M
M
mike.rosset wrote on 20 Dec 2019 01:02
(name . Ricardo Wurmus)(address . rekado@elephly.net)
874kxv7tjt.fsf@gmail.com
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (8 lines)
>> + (description "Qt5WebEngine provides support for web
>> +applications using the Chromium browser project.")
>
> Does this include the unmodified Chromium source code? We need to
> ensure that the variant we are distributing here does not contain any
> misfeatures that Chromium is known for (e.g. DRM support) and that only
> free software is included.

The chromium source is modified to remove google services etc. quoting

- Binary files are stripped out
- Auxiliary services that talk to Google platforms are stripped out
- The codebase is modularized to allow use of system libraries like OpenSSL

There is also a rebase patch process to allow upgrading to the current
chromium.

Toggle quote (7 lines)
> Marius and others previously worked very hard on making sure that the
> ungoogled-chromium package complied with our expectations for Chromium.
> I wonder what work needs to be done on the sources included in this
> package to accomplish the same goal.
>
> Did you happen to investigate this?

It was proposed that maybe the ungoogled-chrome sources/changes could be
used. But to me it seems to Qt is already doing the right thing
here. I'm just not confident with the size of this code base, and with
the QT specific front end. the ungoogled sources could be dropped in and
expected to work.
M
M
Mike Rosset wrote on 20 Dec 2019 16:52
[PATCH 2/2] gnu: qtwebengine now uses pulseaudio
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20191220155201.12594-1-mike.rosset@gmail.com
This also documents know input issues and improves the package expression
syntax
---
gnu/packages/qt.scm | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)

Toggle diff (95 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 12028fd64c..ae356e533b 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2039,10 +2039,9 @@ time Web content can be enhanced with native controls.")
(method url-fetch)
(uri
(string-append "https://download.qt.io/official_releases/qt/"
- (substring version 0 4)
- "/" version "/submodules/"
- (string-append name "-everywhere-src-" version)
- ".tar.xz"))
+ (version-major+minor version) "/" version
+ "/submodules/" name "-everywhere-src-"
+ version ".tar.xz"))
(sha256
(base32
"08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
@@ -2055,8 +2054,7 @@ time Web content can be enhanced with native controls.")
("perl" ,perl)
("pkg-config" ,pkg-config)
("python-2" ,python-2)
- ("ruby" ,ruby)
- ))
+ ("ruby" ,ruby)))
(inputs
`(("alsa-lib" ,alsa-lib)
("atk" ,atk)
@@ -2072,8 +2070,6 @@ time Web content can be enhanced with native controls.")
("libevent" ,libevent)
("libgcrypt" ,libgcrypt)
("libjpeg" ,libjpeg-turbo)
- ;; libsrtp not found by qmake. seems to not have config.tests?
- ("libsrtp" ,libsrtp)
;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
;; ("libvpx" ,libvpx)
("libwebp" ,libwebp)
@@ -2083,7 +2079,9 @@ time Web content can be enhanced with native controls.")
("libxcursor" ,libxcursor)
("libxi" ,libxi)
("libxkbcommon" ,libxkbcommon)
- ;; libxml not found due to icu not enabled in libxml?
+ ;; FIXME: libxml2 needs to built with icu support though it links to
+ ;; libxml2 configure summary still states. Checking for compatible
+ ;; system libxml2... no
("libxml2" ,libxml2)
("libxrandr" ,libxrandr)
("libxrender" ,libxrender)
@@ -2095,7 +2093,7 @@ time Web content can be enhanced with native controls.")
("opus" ,opus)
("pciutils" ,pciutils)
("protobuf" ,protobuf)
- ;; ("pulseaudio" ,pulseaudio)
+ ("pulseaudio" ,pulseaudio)
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
("qtmultimedia" ,qtmultimedia)
@@ -2112,19 +2110,22 @@ time Web content can be enhanced with native controls.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Avoids potential race conditions
(setenv "PYTHONDONTWRITEBYTECODE" "1")
- ;; Make build output less verbose
+ ;; Make ninja build output less verbose
(setenv "NINJAFLAGS" "-k1")
- ;; Use this output translations not qtbase
+ ;; Qtwebengine is not installed into the same prefix as
+ ;; qtbase. Some qtbase QTLibraryInfo constants will not
+ ;; work. Replace with the full path to the qtwebengine
+ ;; translations and locales in the store.
(substitute* "src/core/web_engine_library_info.cpp"
(("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
(format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
(("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
(format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
- ;; Substitute full dynamic path for nss
+ ;; Substitute full dynamic library path for nss
(substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
(("libnssckbi.so")
(string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
- ;; Substitute full dynamic path for udev
+ ;; Substitute full dynamic library path for udev
(substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
(("libudev.so.1")
(string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
@@ -2143,7 +2144,7 @@ time Web content can be enhanced with native controls.")
(variable "QTWEBENGINEPROCESS_PATH")
(files '("lib/qt5/libexec/QtWebEngineProcess")))))
(home-page "https://www.qt.io")
- (synopsis "Qt WebEngine Module")
+ (synopsis "Qt WebEngine module")
(description "Qt5WebEngine provides support for web
applications using the Chromium browser project.")
(license
--
2.24.1
H
H
Hartmut Goebel wrote on 31 Dec 2019 14:10
Re: [PATCH] gnu: Add qtwebengine.
d7342e03-3f74-902a-b283-656fdaf098ca@crazy-compilers.com
Hi,
in addtion to other remarks:

Am 18.12.19 um 21:45 schrieb Mike Rosset
Toggle quote (8 lines)
> + (uri
> + (string-append "https://download.qt.io/official_releases/qt/"
> + (substring version 0 4)
> + "/" version "/submodules/"
> + (string-append name "-everywhere-src-" version)
> + ".tar.xz"))


Please use the same code and formatting as sued for qtsvg. This helps
keeping the code consistent.

Toggle quote (4 lines)
> + `(modify-phases ,phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + ;; Avoids potential race conditions
I suggest to put this into *two* new phases: `patch-source` (or so)
containing the substitute stuff, and `setup-configure` for setting the
environment variables.


Toggle quote (6 lines)
> + (substitute* "src/core/web_engine_library_info.cpp"
> + (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
> + (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))

I suggest *not* using `format`, as we rarely use it in substitutes and
you are using `string-append` anyway. I also suggest to define a
variable `out` to be used here (same for `nss`, `udev` below) to avoid
having `assic-ref` here, see [0] as an example. Then `format` might even
be beneficial:

+                  (format #f
"QLatin1String(\"~a/share/qt5/translations\")" out)

+                  (string-append "QLatin1String(\"" out
"/share/qt5/translations\")")


[0]

Toggle quote (8 lines)
> + ;; Valid QT_BUILD_PARTS variables are:
> + ;; libs tools tests examples demos docs translations
> + (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
> + "--webengine-printing-and-pdf=no"
> + "--webengine-ffmpeg=system"
> + "--webengine-icu=system"
> + "--webengine-pepper-plugins=no")))))

Would setting `#:configure-flags` with "-DBUILD_TESTS=off" (see e.g.
[1]) work, too, instead of passing "QT_BUILD_PARTS"?


[1]


--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
Attachment: file
M
M
Mike Rosset wrote on 1 Jan 2020 17:03
[PATCH 1/4] gnu: Add qtwebengine.
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200101160355.32604-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (qtwebengine): New variable.

This is a new qtwebengine patch with working locales.
---
gnu/packages/qt.scm | 129 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)

Toggle diff (173 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 795b5e9d2b..2b4b167a14 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -52,30 +52,40 @@
#:use-module (gnu packages flex)
#: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)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages regex)
#:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
@@ -2020,6 +2030,125 @@ time Web content can be enhanced with native controls.")
(license license:lgpl2.1+)))
+(define-public qtwebengine
+ (package (inherit qtsvg)
+ (name "qtwebengine")
+ (version (package-version qtbase))
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://download.qt.io/official_releases/qt/"
+ (substring version 0 4)
+ "/" version "/submodules/"
+ (string-append name "-everywhere-src-" version)
+ ".tar.xz"))
+ (sha256
+ (base32
+ "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("gperf" ,gperf)
+ ("ninja" ,ninja)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python-2" ,python-2)
+ ("ruby" ,ruby)
+ ))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("atk" ,atk)
+ ("cups-minimal" ,cups-minimal)
+ ("dbus" ,dbus)
+ ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("harbuzz" ,harfbuzz)
+ ("icu4c" ,icu4c)
+ ("jsoncpp" ,jsoncpp)
+ ("lcms" ,lcms)
+ ("libcap" ,libcap)
+ ("libevent" ,libevent)
+ ("libgcrypt" ,libgcrypt)
+ ("libjpeg" ,libjpeg-turbo)
+ ;; libsrtp not found by qmake. seems to not have config.tests?
+ ("libsrtp" ,libsrtp)
+ ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
+ ;; ("libvpx" ,libvpx)
+ ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb" ,libxcb)
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("libxi" ,libxi)
+ ("libxkbcommon" ,libxkbcommon)
+ ;; libxml not found due to icu not enabled in libxml?
+ ("libxml2" ,libxml2)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("libxslt" ,libxslt)
+ ("libxtst" ,libxtst)
+ ("mesa" ,mesa)
+ ("minizip" ,minizip)
+ ("nss" ,nss)
+ ("opus" ,opus)
+ ("pciutils" ,pciutils)
+ ("protobuf" ,protobuf)
+ ;; ("pulseaudio" ,pulseaudio)
+ ("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtwebchannel" ,qtwebchannel)
+ ("re2" ,re2)
+ ("snappy" ,snappy)
+ ("udev" ,eudev)
+ ("xcb-util" ,xcb-util)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Avoids potential race conditions
+ (setenv "PYTHONDONTWRITEBYTECODE" "1")
+ ;; Make build output less verbose
+ (setenv "NINJAFLAGS" "-k1")
+ ;; Use this output translations not qtbase
+ (substitute* "src/core/web_engine_library_info.cpp"
+ (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
+ (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
+ (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
+ ;; Substitute full dynamic path for nss
+ (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
+ (("libnssckbi.so")
+ (string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
+ ;; Substitute full dynamic path for udev
+ (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
+ (("libudev.so.1")
+ (string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
+ ;; Valid QT_BUILD_PARTS variables are:
+ ;; libs tools tests examples demos docs translations
+ (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
+ "--webengine-printing-and-pdf=no"
+ "--webengine-ffmpeg=system"
+ "--webengine-icu=system"
+ "--webengine-pepper-plugins=no")))))
+ ((#:tests? _ #f) #f)))
+ (native-search-paths
+ (list (search-path-specification
+ (file-type 'regular)
+ (separator #f)
+ (variable "QTWEBENGINEPROCESS_PATH")
+ (files '("lib/qt5/libexec/QtWebEngineProcess")))))
+ (home-page "https://www.qt.io")
+ (synopsis "Qt WebEngine Module")
+ (description "Qt5WebEngine provides support for web
+applications using the Chromium browser project.")
+ (license
+ (package-license qt))))
+
(define-public dotherside
(package
(name "dotherside")
--
2.24.1
M
M
Mike Rosset wrote on 1 Jan 2020 17:03
[PATCH 2/4] gnu: qtwebengine now uses pulseaudio
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200101160355.32604-2-mike.rosset@gmail.com
This also documents know input issues and improves the package expression
syntax
---
gnu/packages/qt.scm | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)

Toggle diff (95 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 2b4b167a14..456b394230 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2039,10 +2039,9 @@ time Web content can be enhanced with native controls.")
(method url-fetch)
(uri
(string-append "https://download.qt.io/official_releases/qt/"
- (substring version 0 4)
- "/" version "/submodules/"
- (string-append name "-everywhere-src-" version)
- ".tar.xz"))
+ (version-major+minor version) "/" version
+ "/submodules/" name "-everywhere-src-"
+ version ".tar.xz"))
(sha256
(base32
"08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
@@ -2055,8 +2054,7 @@ time Web content can be enhanced with native controls.")
("perl" ,perl)
("pkg-config" ,pkg-config)
("python-2" ,python-2)
- ("ruby" ,ruby)
- ))
+ ("ruby" ,ruby)))
(inputs
`(("alsa-lib" ,alsa-lib)
("atk" ,atk)
@@ -2072,8 +2070,6 @@ time Web content can be enhanced with native controls.")
("libevent" ,libevent)
("libgcrypt" ,libgcrypt)
("libjpeg" ,libjpeg-turbo)
- ;; libsrtp not found by qmake. seems to not have config.tests?
- ("libsrtp" ,libsrtp)
;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
;; ("libvpx" ,libvpx)
("libwebp" ,libwebp)
@@ -2083,7 +2079,9 @@ time Web content can be enhanced with native controls.")
("libxcursor" ,libxcursor)
("libxi" ,libxi)
("libxkbcommon" ,libxkbcommon)
- ;; libxml not found due to icu not enabled in libxml?
+ ;; FIXME: libxml2 needs to built with icu support though it links to
+ ;; libxml2 configure summary still states. Checking for compatible
+ ;; system libxml2... no
("libxml2" ,libxml2)
("libxrandr" ,libxrandr)
("libxrender" ,libxrender)
@@ -2095,7 +2093,7 @@ time Web content can be enhanced with native controls.")
("opus" ,opus)
("pciutils" ,pciutils)
("protobuf" ,protobuf)
- ;; ("pulseaudio" ,pulseaudio)
+ ("pulseaudio" ,pulseaudio)
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
("qtmultimedia" ,qtmultimedia)
@@ -2112,19 +2110,22 @@ time Web content can be enhanced with native controls.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Avoids potential race conditions
(setenv "PYTHONDONTWRITEBYTECODE" "1")
- ;; Make build output less verbose
+ ;; Make ninja build output less verbose
(setenv "NINJAFLAGS" "-k1")
- ;; Use this output translations not qtbase
+ ;; Qtwebengine is not installed into the same prefix as
+ ;; qtbase. Some qtbase QTLibraryInfo constants will not
+ ;; work. Replace with the full path to the qtwebengine
+ ;; translations and locales in the store.
(substitute* "src/core/web_engine_library_info.cpp"
(("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
(format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
(("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
(format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
- ;; Substitute full dynamic path for nss
+ ;; Substitute full dynamic library path for nss
(substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
(("libnssckbi.so")
(string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
- ;; Substitute full dynamic path for udev
+ ;; Substitute full dynamic library path for udev
(substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
(("libudev.so.1")
(string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
@@ -2143,7 +2144,7 @@ time Web content can be enhanced with native controls.")
(variable "QTWEBENGINEPROCESS_PATH")
(files '("lib/qt5/libexec/QtWebEngineProcess")))))
(home-page "https://www.qt.io")
- (synopsis "Qt WebEngine Module")
+ (synopsis "Qt WebEngine module")
(description "Qt5WebEngine provides support for web
applications using the Chromium browser project.")
(license
--
2.24.1
M
M
Mike Rosset wrote on 1 Jan 2020 17:03
[PATCH 3/4] gnu: qtwebengine: now uses system libvpx
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200101160355.32604-3-mike.rosset@gmail.com
* gnu/packages/qt.scm (qtwebengine):

This also documents why qtwebengine test phase is disabled.
---
gnu/packages/qt.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 456b394230..f4908d1f27 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2070,8 +2070,9 @@ time Web content can be enhanced with native controls.")
("libevent" ,libevent)
("libgcrypt" ,libgcrypt)
("libjpeg" ,libjpeg-turbo)
- ;; FIXME: error: ?struct vpx_svc_ref_frame_config? has no member named ?frame_flags?
- ;; ("libvpx" ,libvpx)
+ ("libvpx" ,libvpx)
+ ;; FIXME: configure does not find system lcms
+ ;; ("lcms" ,lcms)
("libwebp" ,libwebp)
("libx11" ,libx11)
("libxcb" ,libxcb)
@@ -2136,6 +2137,9 @@ time Web content can be enhanced with native controls.")
"--webengine-ffmpeg=system"
"--webengine-icu=system"
"--webengine-pepper-plugins=no")))))
+ ;; Tests are disabled due to Could not find QtWebEngineProcess error
+ ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
+ ;; before running tests It's also possible some tests need a network
((#:tests? _ #f) #f)))
(native-search-paths
(list (search-path-specification
--
2.24.1
M
M
Mike Rosset wrote on 1 Jan 2020 17:03
[PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase
(address . 35866@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200101160355.32604-4-mike.rosset@gmail.com
* gnu/packages/qt.scm (qtwebengine)[phases]: This moves the store
substitutions to a substitute-source phase. And now a set-env phase sets
environment build variables.

format is no longer used when substituting translations and data paths
---
gnu/packages/qt.scm | 65 ++++++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 30 deletions(-)

Toggle diff (89 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index f4908d1f27..a4a039dc80 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2034,17 +2034,15 @@ time Web content can be enhanced with native controls.")
(package (inherit qtsvg)
(name "qtwebengine")
(version (package-version qtbase))
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "https://download.qt.io/official_releases/qt/"
- (version-major+minor version) "/" version
- "/submodules/" name "-everywhere-src-"
- version ".tar.xz"))
- (sha256
- (base32
- "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://download.qt.io/official_releases/qt/"
+ (version-major+minor version) "/" version
+ "/submodules/" name "-everywhere-src-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))))
(build-system gnu-build-system)
(native-inputs
`(("bison" ,bison)
@@ -2107,29 +2105,36 @@ time Web content can be enhanced with native controls.")
(substitute-keyword-arguments (package-arguments qtsvg)
((#:phases phases)
`(modify-phases ,phases
- (replace 'configure
+ (add-before 'configure 'substitue-source
(lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (nss (assoc-ref inputs "nss"))
+ (udev (assoc-ref inputs "udev")))
+ ;; Qtwebengine is not installed into the same prefix as
+ ;; qtbase. Some qtbase QTLibraryInfo constants will not
+ ;; work. Replace with the full path to the qtwebengine
+ ;; translations and locales in the store.
+ (substitute* "src/core/web_engine_library_info.cpp"
+ (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
+ (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
+ (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
+ (string-append "QLatin1String(\"" out "/share/qt5\")")))
+ ;; Substitute full dynamic library path for nss
+ (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
+ (("libnssckbi.so")
+ (string-append nss "/lib/nss/libnssckbi.so")))
+ ;; Substitute full dynamic library path for udev
+ (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
+ (("libudev.so.1")
+ (string-append udev "/lib/libudev.so.1"))))))
+ (add-before 'configure 'set-env
+ (lambda _
;; Avoids potential race conditions
(setenv "PYTHONDONTWRITEBYTECODE" "1")
;; Make ninja build output less verbose
- (setenv "NINJAFLAGS" "-k1")
- ;; Qtwebengine is not installed into the same prefix as
- ;; qtbase. Some qtbase QTLibraryInfo constants will not
- ;; work. Replace with the full path to the qtwebengine
- ;; translations and locales in the store.
- (substitute* "src/core/web_engine_library_info.cpp"
- (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
- (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
- (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
- (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
- ;; Substitute full dynamic library path for nss
- (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
- (("libnssckbi.so")
- (string-append (assoc-ref inputs "nss") "/lib/nss/libnssckbi.so")))
- ;; Substitute full dynamic library path for udev
- (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
- (("libudev.so.1")
- (string-append (assoc-ref inputs "udev") "/lib/libudev.so.1")))
+ (setenv "NINJAFLAGS" "-k1")))
+ (replace 'configure
+ (lambda _
;; Valid QT_BUILD_PARTS variables are:
;; libs tools tests examples demos docs translations
(invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
--
2.24.1
M
M
mike.rosset wrote on 1 Jan 2020 17:29
Re: [PATCH] gnu: Add qtwebengine.
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 35866@debbugs.gnu.org)
87v9pvkunc.fsf@gmail.com
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

Toggle quote (38 lines)
> Hi,
> in addtion to other remarks:
>
> Am 18.12.19 um 21:45 schrieb Mike Rosset
>
>
> + (uri
> + (string-append "https://download.qt.io/official_releases/qt/"
> + (substring version 0 4)
> + "/" version "/submodules/"
> + (string-append name "-everywhere-src-" version)
> + ".tar.xz"))
>
> Please use the same code and formatting as sued for qtsvg. This helps keeping the code consistent.
>
> + `(modify-phases ,phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + ;; Avoids potential race conditions
>
> I suggest to put this into *two* new phases: `patch-source` (or so) containing the substitute stuff, and `setup-configure` for setting the environment variables.
>
>
> + (substitute* "src/core/web_engine_library_info.cpp"
> + (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5/translations")))
> + (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
> + (format #f "QLatin1String(\"~a\")" (string-append (assoc-ref outputs "out") "/share/qt5"))))
>
> I suggest *not* using `format`, as we rarely use it in substitutes and you are using `string-append` anyway. I also suggest to define a variable `out` to be used here (same for `nss`, `udev` below) to avoid having `assic-ref` here, see [0] as an example. Then `format` might even be beneficial:
>
> + (format #f "QLatin1String(\"~a/share/qt5/translations\")" out)
>
> + (string-append "QLatin1String(\"" out "/share/qt5/translations\")")
>
> [0]
> <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/qt.scm#n605>

I have made all these changes as requested they should be in 0004 of
series. I've re emailed the complete series. I believe there was an
issue mailing 003.

Toggle quote (13 lines)
>
> + ;; Valid QT_BUILD_PARTS variables are:
> + ;; libs tools tests examples demos docs translations
> + (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
> + "--webengine-printing-and-pdf=no"
> + "--webengine-ffmpeg=system"
> + "--webengine-icu=system"
> + "--webengine-pepper-plugins=no")))))
>
> Would setting `#:configure-flags` with "-DBUILD_TESTS=off" (see e.g. [1]) work, too, instead of passing "QT_BUILD_PARTS"?
>
> [1] <https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/qt.scm#n2119>

It's possible that this might work. But I don't think it's worth the
effort. I kept this in line qtsvg hopefully I can switch the tests on at
one point. I have documented why the tests can not be run as of now.
M
M
mike.rosset wrote on 5 Jan 2020 17:10
Re: qtwenengine anybody?
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)
87v9ppdguz.fsf@gmail.com
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

Toggle quote (18 lines)
> Am 02.01.20 um 21:24 schrieb mike.rosset@gmail.com:
>> Apologies this is probably a failure in my ML workflow. And just my luck
>> I'm in the process of doing some working related moving todoy. Here is a
>> complete diff
>> https://gitlab.com/mike.rosset/guix/compare/master...qtwebengine hope
>> this helps.
>
> Many thanks, this is quite helpful.
>
> For me it looks okay except of two minor points:
>
> - The description should contain at least a brief note about Qt patched
> the embedded chromium to (partially) un-google it. If you know details,
> this would be great. This of course could be enhanced later, since
> changing the description does not force a rebuild of he package.
>
> - Please still honor Ricardo's remark about DRM and phoning home.

Hello Hartmut,

I've upgraded the description field as request see attached. And CC to
35866@debbugs.gnu.org

I've also addressed in depth some Ricardo's concerns.

More then likely you will have problems applying this with git am
again. This final declaration though based on my original
submission. Was moved manually out and back in again. So there is
probably inconsequential git history missing. I could create a new bug
report maybe? Or you can still use the complete diff from
From e67e9e7a6a6b346c9a99759ae75040735e5336d1 Mon Sep 17 00:00:00 2001
From: Mike Rosset <mike.rosset@gmail.com>
Date: Sun, 5 Jan 2020 07:34:47 -0800
Subject: [PATCH 5/5] gnu: qtwebengine: description field now notes source re
base summary
To: 35866@debbugs.gnu.org

* gnu/packages/qt.scm (qtwebengine)[description]: Note Qt Chromium source re
base details.
---
gnu/packages/qt.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a4a039dc80..e199c67c4f 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2154,8 +2154,9 @@ time Web content can be enhanced with native controls.")
(files '("lib/qt5/libexec/QtWebEngineProcess")))))
(home-page "https://www.qt.io")
(synopsis "Qt WebEngine module")
- (description "Qt5WebEngine provides support for web
-applications using the Chromium browser project.")
+ (description "Qt5WebEngine provides support for web applications using the
+Chromium browser project. The Chromium source base has Google services and
+binaries removed along with modular support for system libraries.")
(license
(package-license qt))))
--
2.24.1
Mike
H
H
Hartmut Goebel wrote on 5 Jan 2020 17:47
(address . mike.rosset@gmail.com)
29d9ff25-4674-8125-96e0-a439af1cd04d@crazy-compilers.com
Hi Mike,
Toggle quote (6 lines)
> I've upgraded the description field as request see attached. And CC to
> 35866@debbugs.gnu.org
>
> I've also addressed in depth some Ricardo's concerns.


For me this would be okay. Ricardo needs to state whether his concerns
are covered.

Toggle quote (2 lines)
This was perfectly fine for reviewing. Thanks.


--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
M
M
Mike Rosset wrote on 24 Jan 2020 01:16
Re: Status: [PATCH] gnu: Add qtwebengine.
(name . bug#35866)(address . 35866-done@debbugs.gnu.org)
87pnf9emjl.fsf@gmail.com
merged
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 35866@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35866
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch