From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 11:04:23 2020 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 To: 35866@debbugs.gnu.org Subject: [PATCH 4/4] gnu: qtwebengine: separate substitution and configure phase 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 35866 Cc: mike.rosset@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) * 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