diff mbox series

[bug#46337] Attempt to fix the build

Message ID 878s3w5cpz.fsf@sarg.org.ru
State Accepted
Headers show
Series [bug#46337] Attempt to fix the build | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Sergey Trofimov May 30, 2021, 5:54 p.m. UTC
Hey there, it seems that qtwebengine build script just lacks the 
`-system-openh264` flag.
In attempt to fix that I just slap the needed GN arg to the end of 
`src/buildtools/config/linux.pri`
I've checked that the configure phase succeeds, but the full build 
takes too long on my machine.

Please find attached the proposed patch.

Comments

Leo Famulari June 7, 2021, 9:01 p.m. UTC | #1
On Sun, May 30, 2021 at 07:54:33PM +0200, Sergey Trofimov wrote:
> 
> Hey there, it seems that qtwebengine build script just lacks the
> `-system-openh264` flag.
> In attempt to fix that I just slap the needed GN arg to the end of
> `src/buildtools/config/linux.pri`
> I've checked that the configure phase succeeds, but the full build takes too
> long on my machine.
> 
> Please find attached the proposed patch.
> 

> From 553a37f4af401f2a53575c0f2d77cb5030344f40 Mon Sep 17 00:00:00 2001
> From: Sergey Trofimov <sarg@sarg.org.ru>
> Date: Sun, 30 May 2021 14:39:15 +0200
> Subject: [PATCH] qtwebengine with openh264

Thanks! I wrote a commit message and pushed as
68dcdf6ea76cddc4f9e53aabe7c1a5724d5508b2
diff mbox series

Patch

From 553a37f4af401f2a53575c0f2d77cb5030344f40 Mon Sep 17 00:00:00 2001
From: Sergey Trofimov <sarg@sarg.org.ru>
Date: Sun, 30 May 2021 14:39:15 +0200
Subject: [PATCH] qtwebengine with openh264

---
 gnu/packages/qt.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 55855fb68a..6bb1281570 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1547,6 +1547,7 @@  using the Enchant spell-checking library.")
                     "third_party/modp_b64"
                     "third_party/nasm"
                     "third_party/one_euro_filter"
+                    "third_party/openh264/src/codec/api/svc"
                     "third_party/opus"
                     "third_party/ots"
                     "third_party/pdfium"
@@ -1724,6 +1725,7 @@  using the Enchant spell-checking library.")
        ;; libxml2 configure summary still states "Checking for compatible
        ;; system libxml2... no"
        ("libxml2" ,libxml2)
+       ("openh264" ,openh264)
        ("libxrandr" ,libxrandr)
        ("libxrender" ,libxrender)
        ("libxslt" ,libxslt)
@@ -1747,6 +1749,10 @@  using the Enchant spell-checking library.")
        ("xcb-util" ,xcb-util)))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:modules modules '())
+        `((guix build gnu-build-system)
+          (guix build utils)
+          (ice-9 textual-ports)))
        ((#:phases phases)
         `(modify-phases ,phases
            (add-before 'configure 'substitute-source
@@ -1754,6 +1760,10 @@  using the Enchant spell-checking library.")
                (let ((out (assoc-ref outputs "out"))
                      (nss (assoc-ref inputs "nss"))
                      (udev (assoc-ref inputs "udev")))
+                 (with-atomic-file-replacement "src/buildtools/config/linux.pri"
+                   (lambda (in out)
+                     (display (get-string-all in) out)
+                     (display "\ngn_args += use_system_openh264=true\n" out)))
                  ;; 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
@@ -1789,7 +1799,8 @@  using the Enchant spell-checking library.")
                        "--webengine-printing-and-pdf=no"
                        "--webengine-ffmpeg=system"
                        "--webengine-icu=system"
-                       "--webengine-pepper-plugins=no")))))
+                       "--webengine-pepper-plugins=no"
+                       "-webengine-proprietary-codecs")))))
        ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
        ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
        ;; before running tests.
-- 
2.31.1