From patchwork Thu May 23 06:23:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rosset X-Patchwork-Id: 14053 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 03D8517032; Thu, 23 May 2019 15:20:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 611A917016 for ; Thu, 23 May 2019 15:20:27 +0100 (BST) Received: from localhost ([127.0.0.1]:37335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hToa3-0007ke-0H for patchwork@mira.cbaines.net; Thu, 23 May 2019 10:20:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hToWn-0004xv-Tk for guix-patches@gnu.org; Thu, 23 May 2019 10:17:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hToWm-0002Ad-IB for guix-patches@gnu.org; Thu, 23 May 2019 10:17:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hToWm-0002AV-ER for guix-patches@gnu.org; Thu, 23 May 2019 10:17:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hToWm-0005Ev-7P for guix-patches@gnu.org; Thu, 23 May 2019 10:17:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35866] [PATCH] gnu: Add qtwebengine. Resent-From: mike rosset Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 May 2019 14:17:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35866@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155862098320067 (code B ref -1); Thu, 23 May 2019 14:17:04 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2019 14:16:23 +0000 Received: from localhost ([127.0.0.1]:44959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hToW3-0005DV-SR for submit@debbugs.gnu.org; Thu, 23 May 2019 10:16:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hThEQ-0006N9-02 for submit@debbugs.gnu.org; Thu, 23 May 2019 02:29:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:50494) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hThEJ-0006V8-61 for submit@debbugs.gnu.org; Thu, 23 May 2019 02:29:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hThEH-0007Va-Ke for guix-patches@gnu.org; Thu, 23 May 2019 02:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hThEF-0006OU-1o for guix-patches@gnu.org; Thu, 23 May 2019 02:29:28 -0400 Received: from mout.perfora.net ([74.208.4.194]:35603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hThED-0006LR-F7 for guix-patches@gnu.org; Thu, 23 May 2019 02:29:25 -0400 Received: from orion.hitronhub.home ([70.68.94.152]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1MgwK1-1h0Nbl04Mv-00hKb0; Thu, 23 May 2019 08:24:12 +0200 From: mike rosset Date: Wed, 22 May 2019 23:23:44 -0700 Message-Id: <20190523062344.20601-1-mrosset@bufio.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:UKl7mFWA97Zg38sUBZa0Dq5HhHorYCVtTClMnZCILkleOvctL2U aK5MODs82PWA7t6Kx1lm2dWdyLM+Obx6CmYPDnQOhckMTWL6Xk9R4ypiW7umyMsWI0bzQq+ wUcSAXI26NaI9a/tNpccATXk3CQD9WTZkBpNFCdw/WfbjAEkYww+jlhNkRY5hW+WG8vovlj CsWsYiWOu3i/xBKU7LNJg== X-UI-Out-Filterresults: notjunk:1;V03:K0:P4Y1fgSE884=:uosjdkGLCNvzvPMpURjeiz Cvk5WzqvEMywaIYMqLlGW3becrV9mVM96htCddUW9j1VslxwBtx2tCA654H5R7hH8tckUz9Hp V8+/IAMCJdykYunP1h8g3LFJUEdHzh3nMDZqCfVqWDnm9uLNx6qdh6r9Eym8r9DiHQWhUgCA/ tex3EKYr4JVbqYrMYsYxAKdEO7awj7zqUmtnuUv3aDkTmv2rA6Ex4pOos6OAbb2szl/c8pFIX fOHXC6+rm56AfP8DK475vduJEjc5FySFiVAtVWb/1ji+fK/K/6pnpk+2t6IqqplDKfYKNNjDn fSNSkB7plhe0j7BSI95m4lTooRnoHH6OUuXGfwFIERIHKfZObZ+qNPy4jMYOKZQWJDLk5hCH1 iS7Y18yE6bSkVQTEXDIeWa8v0F0tbf0pI9zGcFl8Sto2mtCUpDyNszicBcX0RSX5vXlh57dMr tIM/1UU1oojdo8rpYQ6pfFkj/Y1vnBcq22/uICan37GRTP6wz27NpDeG1/kaoXQ4rrtmLmPud LGwk6Lj930+nOO7E0LYTPXq/aLQ27OGK7MW8H0KGczp81PyfZ0DVPRkb1H7KYAzSkwsiXy6SS D+lkO3Jz/ltflOony+5rXJBZ0o4Ce1WMt4p/FHE8J2RIrdsxcoFXpyAapTxBBFI4XRYrT5X2z uBJJOFYdJDbGmH2TlYiFOyB944aYMx9OOoooUq5XZa/EQYkeK6jQjdzSEGKHFwEn9SWHFVrEc hfzFWW0/MhZDVjBjuz1zDUpXNsc3r9S4cgbCHA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Thu, 23 May 2019 10:16:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Thu, 23 May 2019 10:19:38 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mike.rosset@gmail.com Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: mike rosset * 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))))