From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:51428) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imHIe-0006bY-DU for guix-patches@gnu.org; Tue, 31 Dec 2019 08:11:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imHIc-0005II-MR for guix-patches@gnu.org; Tue, 31 Dec 2019 08:11:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imHIc-0005Gy-FR for guix-patches@gnu.org; Tue, 31 Dec 2019 08:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imHIc-0004dN-9t for guix-patches@gnu.org; Tue, 31 Dec 2019 08:11:02 -0500 Subject: [bug#35866] [PATCH] gnu: Add qtwebengine. Resent-Message-ID: References: <20191218204537.24069-1-mike.rosset@gmail.com> From: Hartmut Goebel Message-ID: Date: Tue, 31 Dec 2019 14:10:08 +0100 MIME-Version: 1.0 In-Reply-To: <20191218204537.24069-1-mike.rosset@gmail.com> Content-Type: multipart/alternative; boundary="------------CA573C5F5E482682A7771D13" Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mike Rosset , 35866@debbugs.gnu.org This is a multi-part message in MIME format. --------------CA573C5F5E482682A7771D13 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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] > + ;; 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] -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | --------------CA573C5F5E482682A7771D13 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
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 |
--------------CA573C5F5E482682A7771D13--