GNU bug report logs - #35866
[PATCH] gnu: Add qtwebengine.

Previous Next

Package: guix-patches;

Reported by: mike rosset <mrosset <at> bufio.org>

Date: Thu, 23 May 2019 14:17:04 UTC

Severity: normal

Tags: patch

Done: Mike Rosset <mike.rosset <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35866 in the body.
You can then email your comments to 35866 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Thu, 23 May 2019 14:17:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to mike rosset <mrosset <at> bufio.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 23 May 2019 14:17:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: mike rosset <mrosset <at> bufio.org>
To: guix-patches <at> gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH] gnu: Add qtwebengine.
Date: Wed, 22 May 2019 23:23:44 -0700
From: mike rosset <mike.rosset <at> gmail.com>

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

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Mon, 27 May 2019 21:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: mike rosset <mrosset <at> bufio.org>
Cc: mike.rosset <at> gmail.com, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Mon, 27 May 2019 23:05:08 +0200
Hello Mike,

mike rosset <mrosset <at> bufio.org> skribis:

> From: mike rosset <mike.rosset <at> 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.  :-)

> +    (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’.




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Tue, 28 May 2019 18:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mrosset <at> bufio.org
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: mike.rosset <at> gmail.com, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Tue, 28 May 2019 10:48:52 -0700
Ludovic Courtès <ludo <at> gnu.org> writes:


Hello Ludovic, thank you for looking at this.

>
> <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 https://savannah.nongnu.org/projects/nomad/ and the main source is
http://git.savannah.nongnu.org/cgit/nomad.git?h=feature-qt. Development
is currently being done on the feature-qt branch.

Nomad is still very much WIP. And some early documentation can be found
here. http://git.savannah.nongnu.org/cgit/nomad.git/tree/org/README.txt?h=feature-qt.

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


>> +    (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
here. https://wiki.qt.io/QtWebEngine/Rebase_on_New_Chromium .

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




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 29 May 2019 23:38:01 GMT) Full text and rfc822 format available.

Message #14 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mrosset <at> bufio.org>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Date: Wed, 29 May 2019 16:37:04 -0700
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






Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 29 May 2019 23:38:02 GMT) Full text and rfc822 format available.

Message #17 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mrosset <at> bufio.org>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com, Mike Rosset <mrosset <at> bufio.org>
Subject: [PATCH] gnu: qtwebengine: Do not use 3rd party libraries.
Date: Wed, 29 May 2019 16:37:05 -0700
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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Fri, 31 May 2019 19:29:01 GMT) Full text and rfc822 format available.

Message #20 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Mike Rosset <mrosset <at> bufio.org>, 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: Re: [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party
 libraries.
Date: Fri, 31 May 2019 21:28:28 +0200
[Message part 1 (text/plain, inline)]
Hi Mike,

Mike Rosset <mrosset <at> bufio.org> writes:

> 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:

<https://gitlab.com/mbakke/guix-chromium/blob/master/chromium/chromium.scm#L52>

Can you give it a try?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Fri, 31 May 2019 23:23:02 GMT) Full text and rfc822 format available.

Message #23 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mrosset <at> bufio.org
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: mike.rosset <at> gmail.com, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party
 libraries.
Date: Fri, 31 May 2019 16:16:54 -0700
Marius Bakke <mbakke <at> fastmail.com> writes:

> 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 




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Sat, 01 Jun 2019 09:47:01 GMT) Full text and rfc822 format available.

Message #26 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: mrosset <at> bufio.org
Cc: mike.rosset <at> gmail.com, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Sat, 01 Jun 2019 11:46:13 +0200
Hello,

mrosset <at> bufio.org skribis:

> 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.

> 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’.




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Thu, 18 Jul 2019 09:27:02 GMT) Full text and rfc822 format available.

Message #29 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: <35866 <at> debbugs.gnu.org>
Cc: mrosset <at> bufio.org
Subject: [PATCH] gnu: Add qtwebengine.
Date: Thu, 18 Jul 2019 11:26:05 +0200
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




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 24 Jul 2019 14:07:03 GMT) Full text and rfc822 format available.

Message #32 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: 35866 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add qtwebengine.
Date: Thu, 25 Jul 2019 00:06:02 +1000
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?







Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Sun, 06 Oct 2019 15:47:01 GMT) Full text and rfc822 format available.

Message #35 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Cc: Marius Bakke <mbakke <at> fastmail.com>, mrosset <at> bufio.org,
 Ludovic Courtès <ludo <at> gnu.org>, mike.rosset <at> gmail.com,
 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Sun, 06 Oct 2019 17:45:58 +0200
[Message part 1 (text/plain, inline)]
+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:

--8<---------------cut here---------------start------------->8---
	15:50:10 INFO: Run :adblock-update to get adblock lists.
	15:50:10 CRITICAL: Could not find QtWebEngineProcess
--8<---------------cut here---------------end--------------->8---

Maybe something like this would help?

--8<---------------cut here---------------start------------->8---
    (native-search-paths
     (list (search-path-specification
            (variable "QTWEBENGINEPROCESS_PATH")
            (files '("lib/qt5/libexec/QtWebEngineProcess")))))
--8<---------------cut here---------------end--------------->8---

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Mon, 07 Oct 2019 15:50:02 GMT) Full text and rfc822 format available.

Message #38 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mike.rosset <at> gmail.com
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Marius Bakke <mbakke <at> fastmail.com>,
 Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>,
 Ludovic Courtès <ludo <at> gnu.org>, mrosset <at> bufio.org,
 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Mon, 07 Oct 2019 08:49:35 -0700
Pierre Neidhardt <mail <at> ambrevar.xyz> writes:

> 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
https://gitlab.com/nonguix/nonguix/blob/master/nongnu/packages/qt.scm#L58. Though
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




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Mon, 16 Dec 2019 15:31:01 GMT) Full text and rfc822 format available.

Message #41 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 35866 <at> debbugs.gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, mike.rosset <at> gmail.com
Subject: Re: gnu: Add qtwebengine.
Date: Mon, 16 Dec 2019 16:29:59 +0100
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 <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Mon, 16 Dec 2019 16:03:02 GMT) Full text and rfc822 format available.

Message #44 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mike.rosset <at> gmail.com
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 35866 <at> debbugs.gnu.org
Subject: Re: gnu: Add qtwebengine.
Date: Mon, 16 Dec 2019 08:02:19 -0800
Hartmut Goebel <h.goebel <at> crazy-compilers.com> writes:

> 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




Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Mon, 16 Dec 2019 18:02:02 GMT) Full text and rfc822 format available.

Message #47 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: mike.rosset <at> gmail.com, Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 35866 <at> debbugs.gnu.org
Subject: Re: gnu: Add qtwebengine.
Date: Mon, 16 Dec 2019 19:01:39 +0100
[Message part 1 (text/plain, inline)]
Please do!

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

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 18 Dec 2019 20:33:01 GMT) Full text and rfc822 format available.

Message #50 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH] gnu: Add qtwebengine.
Date: Wed, 18 Dec 2019 12:32:23 -0800
* 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(+)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 18 Dec 2019 20:47:01 GMT) Full text and rfc822 format available.

Message #53 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH] gnu: Add qtwebengine.
Date: Wed, 18 Dec 2019 12:45:37 -0800
* 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(+)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Thu, 19 Dec 2019 18:30:02 GMT) Full text and rfc822 format available.

Message #56 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Mike Rosset <mike.rosset <at> gmail.com>
Cc: 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Thu, 19 Dec 2019 19:29:40 +0100
[Message part 1 (text/plain, inline)]
Looking good!

Comments below:

> 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.

> +(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.

> +                       "/" 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.

> +    (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.

> +       ;; 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.

> +       ("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.

> +       ("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.

> +               (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?

> +    (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
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Thu, 19 Dec 2019 20:21:01 GMT) Full text and rfc822 format available.

Message #59 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: mike.rosset <at> gmail.com
Cc: Marius Bakke <mbakke <at> fastmail.com>,
 GNU Guix maintainers <guix-maintainers <at> gnu.org>, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Thu, 19 Dec 2019 21:19:49 +0100
Hi Mike,

> * 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.

> +    (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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Fri, 20 Dec 2019 00:03:02 GMT) Full text and rfc822 format available.

Message #62 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mike.rosset <at> gmail.com
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Marius Bakke <mbakke <at> fastmail.com>,
 GNU Guix maintainers <guix-maintainers <at> gnu.org>, 35866 <at> debbugs.gnu.org
Subject: Re: [bug#35866] [PATCH] gnu: Add qtwebengine.
Date: Thu, 19 Dec 2019 16:02:46 -0800
Ricardo Wurmus <rekado <at> elephly.net> writes:

>> +    (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
from https://wiki.qt.io/QtWebEngine.

- 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.

> 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.








Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Fri, 20 Dec 2019 15:53:01 GMT) Full text and rfc822 format available.

Message #65 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH 2/2] gnu: qtwebengine now uses pulseaudio
Date: Fri, 20 Dec 2019 07:52:01 -0800
This also documents know input issues and improves the package expression
syntax
---
 gnu/packages/qt.scm | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Tue, 31 Dec 2019 13:11:02 GMT) Full text and rfc822 format available.

Message #68 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Mike Rosset <mike.rosset <at> gmail.com>, 35866 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add qtwebengine.
Date: Tue, 31 Dec 2019 14:10:08 +0100
[Message part 1 (text/plain, inline)]
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>

> +               ;; 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>


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 01 Jan 2020 16:05:02 GMT) Full text and rfc822 format available.

Message #71 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH 1/4] gnu: Add qtwebengine.
Date: Wed,  1 Jan 2020 08:03:52 -0800
* 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(+)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 01 Jan 2020 16:05:02 GMT) Full text and rfc822 format available.

Message #74 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH 2/4] gnu: qtwebengine now uses pulseaudio
Date: Wed,  1 Jan 2020 08:03:53 -0800
This also documents know input issues and improves the package expression
syntax
---
 gnu/packages/qt.scm | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 01 Jan 2020 16:05:03 GMT) Full text and rfc822 format available.

Message #77 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH 3/4] gnu: qtwebengine: now uses system libvpx
Date: Wed,  1 Jan 2020 08:03:54 -0800
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 01 Jan 2020 16:05:03 GMT) Full text and rfc822 format available.

Message #80 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: 35866 <at> debbugs.gnu.org
Cc: mike.rosset <at> gmail.com
Subject: [PATCH 4/4] gnu: qtwebengine: separate substitution and configure
 phase
Date: Wed,  1 Jan 2020 08:03:55 -0800
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Wed, 01 Jan 2020 16:30:02 GMT) Full text and rfc822 format available.

Message #83 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mike.rosset <at> gmail.com
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 35866 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add qtwebengine.
Date: Wed, 01 Jan 2020 08:29:11 -0800
Hartmut Goebel <h.goebel <at> crazy-compilers.com> writes:

> 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.

>  
> +               ;; 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.







Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Sun, 05 Jan 2020 16:11:02 GMT) Full text and rfc822 format available.

Message #86 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: mike.rosset <at> gmail.com
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: Guix-devel <guix-devel <at> gnu.org>, Pierre Neidhardt <mail <at> ambrevar.xyz>,
 35866 <at> debbugs.gnu.org
Subject: Re: qtwenengine anybody?
Date: Sun, 05 Jan 2020 08:10:12 -0800
[Message part 1 (text/plain, inline)]
Hartmut Goebel <h.goebel <at> crazy-compilers.com> writes:

> Am 02.01.20 um 21:24 schrieb mike.rosset <at> 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 <at> 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
https://gitlab.com/mike.rosset/guix/compare/master...qtwebengine

[0005-gnu-qtwebengine-description-field-now-notes-source-r.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Mike

Information forwarded to guix-patches <at> gnu.org:
bug#35866; Package guix-patches. (Sun, 05 Jan 2020 16:48:01 GMT) Full text and rfc822 format available.

Message #89 received at 35866 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: mike.rosset <at> gmail.com
Cc: Guix-devel <guix-devel <at> gnu.org>, Pierre Neidhardt <mail <at> ambrevar.xyz>,
 35866 <at> debbugs.gnu.org
Subject: Re: qtwenengine anybody?
Date: Sun, 5 Jan 2020 17:47:49 +0100
Hi Mike,
> I've upgraded the description field as request see attached. And CC to
> 35866 <at> 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.

> https://gitlab.com/mike.rosset/guix/compare/master...qtwebengine

This was perfectly fine for reviewing. Thanks.


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Reply sent to Mike Rosset <mike.rosset <at> gmail.com>:
You have taken responsibility. (Fri, 24 Jan 2020 00:17:01 GMT) Full text and rfc822 format available.

Notification sent to mike rosset <mrosset <at> bufio.org>:
bug acknowledged by developer. (Fri, 24 Jan 2020 00:17:01 GMT) Full text and rfc822 format available.

Message #94 received at 35866-done <at> debbugs.gnu.org (full text, mbox):

From: Mike Rosset <mike.rosset <at> gmail.com>
To: bug#35866 <35866-done <at> debbugs.gnu.org>
Subject: Re: Status: [PATCH] gnu: Add qtwebengine.
Date: Thu, 23 Jan 2020 16:16:30 -0800
merged




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.