From patchwork Wed Jan 1 16:03:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rosset X-Patchwork-Id: 19500 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 15D5A179D5; Wed, 1 Jan 2020 16:05:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED,URI_NOVOWEL autolearn=unavailable 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 9A5C2179D3 for ; Wed, 1 Jan 2020 16:05:17 +0000 (GMT) Received: from localhost ([::1]:59500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgUm-0007bZ-N1 for patchwork@mira.cbaines.net; Wed, 01 Jan 2020 11:05:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48506) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgUb-0007Zf-Ad for guix-patches@gnu.org; Wed, 01 Jan 2020 11:05:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imgUZ-0005JH-Rw for guix-patches@gnu.org; Wed, 01 Jan 2020 11:05:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imgUZ-0005Im-N6 for guix-patches@gnu.org; Wed, 01 Jan 2020 11:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imgUZ-0001Ji-Ik for guix-patches@gnu.org; Wed, 01 Jan 2020 11:05:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#35866] [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase Resent-From: Mike Rosset Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jan 2020 16:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35866@debbugs.gnu.org Cc: mike.rosset@gmail.com Received: via spool by 35866-submit@debbugs.gnu.org id=B35866.15778946634983 (code B ref 35866); Wed, 01 Jan 2020 16:05:03 +0000 Received: (at 35866) by debbugs.gnu.org; 1 Jan 2020 16:04:23 +0000 Received: from localhost ([127.0.0.1]:37415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imgTv-0001IJ-B8 for submit@debbugs.gnu.org; Wed, 01 Jan 2020 11:04:23 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:52482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imgTs-0001Hf-UV for 35866@debbugs.gnu.org; Wed, 01 Jan 2020 11:04:21 -0500 Received: by mail-pj1-f65.google.com with SMTP id a6so2248097pjh.2 for <35866@debbugs.gnu.org>; Wed, 01 Jan 2020 08:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Aaa9N265Hlg6Vpd/fFBbCc3uLzPZUmvA2K6vF0Edas=; b=dCSjpFSHDgPRbdtpGIgS7r/qcoiLup1w3dP/5Mh0JYlx4O1Ot9cUjStMrnyOxXTXUJ 1Ea+8zidNfs+g/v6U/11JBR3l8wzcpB5PZ/bNmyTWNSZKJdogW13Huq+XkaCx6LeWnKG jk1PSh0pWHTddIBbNlMvaNb4pIAO0b0beRstgdPjSgS+oZG/L9e6TriiwT+KY9vuxxlY NqAcLtRRKaw5XRM+P9HQVjtXCbpHrqapYwvu09EGQdg0/5XVFgX5ejuF/quyBtoDhThS T+mfpnefbaJSteaz+cTaD1h3NmPdE75fcmroRtkyLQ2vyR17KNBkpXo1KKzyUO9cXJv0 fewg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Aaa9N265Hlg6Vpd/fFBbCc3uLzPZUmvA2K6vF0Edas=; b=Ehba/cg1k2LlQHH3qxHVOV46Eg8w4aIJAhzBNSAGxbsff+f0+n8+kiBKSBVpzgLddW o4zqD/HZ0opKUkxinJaH7d54RVVUy3idi2YxrcLbtAF9HbIZbXyCEtaFC3ejCjXggk6x l1aG5Q5cSv1z9LlKEXNOGHaHwWenlNk4cOKIv9XFzn/Xn45g3a7uupgC+UDy4qv2i2I/ O2MqWR81gSO9yHUqDPLAwmdUYrJj8LDVJFm/aebKoyJGQWI14u8a/zdVvjAc8/Dz9h0i 1m5lloNlzQyz5dM4ildyMaysyPlxvzJnxPIWGZ7HmL+ceN2dU6bRQ9e+KhWVjlwt2DwT q+QA== X-Gm-Message-State: APjAAAV82k/o1CkbgGgPGirxk+DlvU6VR+fMkLnH8zPsaTtylqOyNf6C 3QJqK60lE6FB0+VSXN0WeVHCMLyiS/M= X-Google-Smtp-Source: APXvYqxQ4QfNha0XjyaTF231KOmzDWkNKueCcOrYmF1mLXvmJ1kFOVHQxdf7OuP6BOjM1D/suYENaA== X-Received: by 2002:a17:902:b596:: with SMTP id a22mr77900266pls.297.1577894655045; Wed, 01 Jan 2020 08:04:15 -0800 (PST) Received: from neutron.telus (node-1w7jr9qlfahmev9dakqkc7if6.ipv6.telus.net. [2001:569:74e0:7d00:c8c3:b228:84c0:5502]) by smtp.gmail.com with ESMTPSA id o14sm54524337pgm.67.2020.01.01.08.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 08:04:14 -0800 (PST) From: Mike Rosset Date: Wed, 1 Jan 2020 08:03:55 -0800 Message-Id: <20200101160355.32604-4-mike.rosset@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200101160355.32604-1-mike.rosset@gmail.com> References: <20200101160355.32604-1-mike.rosset@gmail.com> MIME-Version: 1.0 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-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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" "--"