unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35866] [PATCH] gnu: Add qtwebengine.
@ 2019-05-23  6:23 mike rosset
  2019-05-27 21:05 ` Ludovic Courtès
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: mike rosset @ 2019-05-23  6:23 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
@ 2019-05-27 21:05 ` Ludovic Courtès
  2019-05-28 17:48   ` mrosset
  2019-05-29 23:37 ` [bug#35866] Mike Rosset
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2019-05-27 21:05 UTC (permalink / raw)
  To: mike rosset; +Cc: mike.rosset, 35866

Hello Mike,

mike rosset <mrosset@bufio.org> skribis:

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

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-27 21:05 ` Ludovic Courtès
@ 2019-05-28 17:48   ` mrosset
  2019-06-01  9:46     ` Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: mrosset @ 2019-05-28 17:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: mike.rosset, 35866

Ludovic Courtès <ludo@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866]
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
  2019-05-27 21:05 ` Ludovic Courtès
@ 2019-05-29 23:37 ` Mike Rosset
  2019-05-29 23:37   ` [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries Mike Rosset
  2019-07-18  9:26 ` [bug#35866] [PATCH] gnu: Add qtwebengine Ricardo Wurmus
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Mike Rosset @ 2019-05-29 23:37 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries.
  2019-05-29 23:37 ` [bug#35866] Mike Rosset
@ 2019-05-29 23:37   ` Mike Rosset
  2019-05-31 19:28     ` Marius Bakke
  0 siblings, 1 reply; 27+ messages in thread
From: Mike Rosset @ 2019-05-29 23:37 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries.
  2019-05-29 23:37   ` [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries Mike Rosset
@ 2019-05-31 19:28     ` Marius Bakke
  2019-05-31 23:16       ` mrosset
  0 siblings, 1 reply; 27+ messages in thread
From: Marius Bakke @ 2019-05-31 19:28 UTC (permalink / raw)
  To: Mike Rosset, 35866; +Cc: mike.rosset

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

Hi Mike,

Mike Rosset <mrosset@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?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries.
  2019-05-31 19:28     ` Marius Bakke
@ 2019-05-31 23:16       ` mrosset
  0 siblings, 0 replies; 27+ messages in thread
From: mrosset @ 2019-05-31 23:16 UTC (permalink / raw)
  To: Marius Bakke; +Cc: mike.rosset, 35866

Marius Bakke <mbakke@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 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-28 17:48   ` mrosset
@ 2019-06-01  9:46     ` Ludovic Courtès
  0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2019-06-01  9:46 UTC (permalink / raw)
  To: mrosset; +Cc: mike.rosset, 35866

Hello,

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
  2019-05-27 21:05 ` Ludovic Courtès
  2019-05-29 23:37 ` [bug#35866] Mike Rosset
@ 2019-07-18  9:26 ` Ricardo Wurmus
  2019-10-06 15:45   ` Pierre Neidhardt
  2019-07-24 14:06 ` Brendan Tildesley
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Ricardo Wurmus @ 2019-07-18  9:26 UTC (permalink / raw)
  To: 35866

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (2 preceding siblings ...)
  2019-07-18  9:26 ` [bug#35866] [PATCH] gnu: Add qtwebengine Ricardo Wurmus
@ 2019-07-24 14:06 ` Brendan Tildesley
  2019-12-16 15:29 ` [bug#35866] " Hartmut Goebel
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Brendan Tildesley @ 2019-07-24 14:06 UTC (permalink / raw)
  To: 35866

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?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-07-18  9:26 ` [bug#35866] [PATCH] gnu: Add qtwebengine Ricardo Wurmus
@ 2019-10-06 15:45   ` Pierre Neidhardt
  2019-10-07 15:49     ` mike.rosset
  0 siblings, 1 reply; 27+ messages in thread
From: Pierre Neidhardt @ 2019-10-06 15:45 UTC (permalink / raw)
  To: Ricardo Wurmus
  Cc: Marius Bakke, mrosset, Ludovic Courtès, mike.rosset, 35866

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-10-06 15:45   ` Pierre Neidhardt
@ 2019-10-07 15:49     ` mike.rosset
  0 siblings, 0 replies; 27+ messages in thread
From: mike.rosset @ 2019-10-07 15:49 UTC (permalink / raw)
  To: Pierre Neidhardt
  Cc: Marius Bakke, Ricardo Wurmus, Ludovic Courtès, mrosset,
	35866

Pierre Neidhardt <mail@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (3 preceding siblings ...)
  2019-07-24 14:06 ` Brendan Tildesley
@ 2019-12-16 15:29 ` Hartmut Goebel
  2019-12-16 16:02   ` mike.rosset
  2019-12-18 20:32 ` [bug#35866] [PATCH] " Mike Rosset
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Hartmut Goebel @ 2019-12-16 15:29 UTC (permalink / raw)
  To: 35866; +Cc: Pierre Neidhardt, mike.rosset

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 |

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] gnu: Add qtwebengine.
  2019-12-16 15:29 ` [bug#35866] " Hartmut Goebel
@ 2019-12-16 16:02   ` mike.rosset
  2019-12-16 18:01     ` Pierre Neidhardt
  0 siblings, 1 reply; 27+ messages in thread
From: mike.rosset @ 2019-12-16 16:02 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: Pierre Neidhardt, 35866

Hartmut Goebel <h.goebel@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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] gnu: Add qtwebengine.
  2019-12-16 16:02   ` mike.rosset
@ 2019-12-16 18:01     ` Pierre Neidhardt
  0 siblings, 0 replies; 27+ messages in thread
From: Pierre Neidhardt @ 2019-12-16 18:01 UTC (permalink / raw)
  To: mike.rosset, Hartmut Goebel; +Cc: 35866

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

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/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (4 preceding siblings ...)
  2019-12-16 15:29 ` [bug#35866] " Hartmut Goebel
@ 2019-12-18 20:32 ` Mike Rosset
  2019-12-19 18:29   ` Pierre Neidhardt
  2019-12-19 20:19   ` Ricardo Wurmus
  2019-12-18 20:45 ` Mike Rosset
                   ` (2 subsequent siblings)
  8 siblings, 2 replies; 27+ messages in thread
From: Mike Rosset @ 2019-12-18 20:32 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

* 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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (5 preceding siblings ...)
  2019-12-18 20:32 ` [bug#35866] [PATCH] " Mike Rosset
@ 2019-12-18 20:45 ` Mike Rosset
  2019-12-31 13:10   ` Hartmut Goebel
  2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
  2020-01-24  0:16 ` bug#35866: Status: [PATCH] gnu: Add qtwebengine Mike Rosset
  8 siblings, 1 reply; 27+ messages in thread
From: Mike Rosset @ 2019-12-18 20:45 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

* 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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-12-18 20:32 ` [bug#35866] [PATCH] " Mike Rosset
@ 2019-12-19 18:29   ` Pierre Neidhardt
  2019-12-19 20:19   ` Ricardo Wurmus
  1 sibling, 0 replies; 27+ messages in thread
From: Pierre Neidhardt @ 2019-12-19 18:29 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 35866

[-- Attachment #1: Type: text/plain, Size: 5890 bytes --]

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/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-12-18 20:32 ` [bug#35866] [PATCH] " Mike Rosset
  2019-12-19 18:29   ` Pierre Neidhardt
@ 2019-12-19 20:19   ` Ricardo Wurmus
  2019-12-20  0:02     ` mike.rosset
  1 sibling, 1 reply; 27+ messages in thread
From: Ricardo Wurmus @ 2019-12-19 20:19 UTC (permalink / raw)
  To: mike.rosset; +Cc: Marius Bakke, GNU Guix maintainers, 35866


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

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-12-19 20:19   ` Ricardo Wurmus
@ 2019-12-20  0:02     ` mike.rosset
  0 siblings, 0 replies; 27+ messages in thread
From: mike.rosset @ 2019-12-20  0:02 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Marius Bakke, GNU Guix maintainers, 35866

Ricardo Wurmus <rekado@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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-12-18 20:45 ` Mike Rosset
@ 2019-12-31 13:10   ` Hartmut Goebel
  2020-01-01 16:29     ` mike.rosset
  0 siblings, 1 reply; 27+ messages in thread
From: Hartmut Goebel @ 2019-12-31 13:10 UTC (permalink / raw)
  To: Mike Rosset, 35866

[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]

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@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: Type: text/html, Size: 4457 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH 1/4] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (6 preceding siblings ...)
  2019-12-18 20:45 ` Mike Rosset
@ 2020-01-01 16:03 ` Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 2/4] gnu: qtwebengine now uses pulseaudio Mike Rosset
                     ` (2 more replies)
  2020-01-24  0:16 ` bug#35866: Status: [PATCH] gnu: Add qtwebengine Mike Rosset
  8 siblings, 3 replies; 27+ messages in thread
From: Mike Rosset @ 2020-01-01 16:03 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

* 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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH 2/4] gnu: qtwebengine now uses pulseaudio
  2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
@ 2020-01-01 16:03   ` Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 3/4] gnu: qtwebengine: now uses system libvpx Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase Mike Rosset
  2 siblings, 0 replies; 27+ messages in thread
From: Mike Rosset @ 2020-01-01 16:03 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH 3/4] gnu: qtwebengine: now uses system libvpx
  2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 2/4] gnu: qtwebengine now uses pulseaudio Mike Rosset
@ 2020-01-01 16:03   ` Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase Mike Rosset
  2 siblings, 0 replies; 27+ messages in thread
From: Mike Rosset @ 2020-01-01 16:03 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

* 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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase
  2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 2/4] gnu: qtwebengine now uses pulseaudio Mike Rosset
  2020-01-01 16:03   ` [bug#35866] [PATCH 3/4] gnu: qtwebengine: now uses system libvpx Mike Rosset
@ 2020-01-01 16:03   ` Mike Rosset
  2 siblings, 0 replies; 27+ messages in thread
From: Mike Rosset @ 2020-01-01 16:03 UTC (permalink / raw)
  To: 35866; +Cc: mike.rosset

* 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

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [bug#35866] [PATCH] gnu: Add qtwebengine.
  2019-12-31 13:10   ` Hartmut Goebel
@ 2020-01-01 16:29     ` mike.rosset
  0 siblings, 0 replies; 27+ messages in thread
From: mike.rosset @ 2020-01-01 16:29 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: 35866

Hartmut Goebel <h.goebel@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.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#35866: Status: [PATCH] gnu: Add qtwebengine.
  2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
                   ` (7 preceding siblings ...)
  2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
@ 2020-01-24  0:16 ` Mike Rosset
  8 siblings, 0 replies; 27+ messages in thread
From: Mike Rosset @ 2020-01-24  0:16 UTC (permalink / raw)
  To: bug#35866


merged

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-01-24  0:17 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-23  6:23 [bug#35866] [PATCH] gnu: Add qtwebengine mike rosset
2019-05-27 21:05 ` Ludovic Courtès
2019-05-28 17:48   ` mrosset
2019-06-01  9:46     ` Ludovic Courtès
2019-05-29 23:37 ` [bug#35866] Mike Rosset
2019-05-29 23:37   ` [bug#35866] [PATCH] gnu: qtwebengine: Do not use 3rd party libraries Mike Rosset
2019-05-31 19:28     ` Marius Bakke
2019-05-31 23:16       ` mrosset
2019-07-18  9:26 ` [bug#35866] [PATCH] gnu: Add qtwebengine Ricardo Wurmus
2019-10-06 15:45   ` Pierre Neidhardt
2019-10-07 15:49     ` mike.rosset
2019-07-24 14:06 ` Brendan Tildesley
2019-12-16 15:29 ` [bug#35866] " Hartmut Goebel
2019-12-16 16:02   ` mike.rosset
2019-12-16 18:01     ` Pierre Neidhardt
2019-12-18 20:32 ` [bug#35866] [PATCH] " Mike Rosset
2019-12-19 18:29   ` Pierre Neidhardt
2019-12-19 20:19   ` Ricardo Wurmus
2019-12-20  0:02     ` mike.rosset
2019-12-18 20:45 ` Mike Rosset
2019-12-31 13:10   ` Hartmut Goebel
2020-01-01 16:29     ` mike.rosset
2020-01-01 16:03 ` [bug#35866] [PATCH 1/4] " Mike Rosset
2020-01-01 16:03   ` [bug#35866] [PATCH 2/4] gnu: qtwebengine now uses pulseaudio Mike Rosset
2020-01-01 16:03   ` [bug#35866] [PATCH 3/4] gnu: qtwebengine: now uses system libvpx Mike Rosset
2020-01-01 16:03   ` [bug#35866] [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase Mike Rosset
2020-01-24  0:16 ` bug#35866: Status: [PATCH] gnu: Add qtwebengine Mike Rosset

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).