From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0RLO-0000cl-Fu for guix-patches@gnu.org; Fri, 06 Oct 2017 08:03:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0RLK-0006M7-8G for guix-patches@gnu.org; Fri, 06 Oct 2017 08:03:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0RLK-0006Lz-56 for guix-patches@gnu.org; Fri, 06 Oct 2017 08:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0RLJ-0006dx-TH for guix-patches@gnu.org; Fri, 06 Oct 2017 08:03:01 -0400 Subject: [bug#28719] [PATCH 1/6] gnu: qtbase: Use a more standard directory layout. References: <20171006115951.29431-1-h.goebel@crazy-compilers.com> In-Reply-To: <20171006115951.29431-1-h.goebel@crazy-compilers.com> Resent-Message-ID: From: Hartmut Goebel Date: Fri, 6 Oct 2017 14:02:09 +0200 Message-Id: <20171006120214.29511-1-h.goebel@crazy-compilers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 28719@debbugs.gnu.org From: 宋文武 * gnu/packages/qt.scm (qtbase)[arguments]: Pass docdir, headerdir, archdatadir, datadir and examplesdir to 'configure'. Ajdust the patch-qt_config.prf phase accordingly. [native-search-paths]: Adjust accordingly. (qtwayland)[arguments]: New field. Co-authored-by: Hartmut Goebel --- gnu/packages/qt.scm | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index bc275ebb0..e276eb05b 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -460,6 +460,12 @@ developers using C++ or QML, a CSS & JavaScript like language.") "./configure" "-verbose" "-prefix" out + "-docdir" (string-append out "/share/doc/qt5") + "-headerdir" (string-append out "/include/qt5") + "-archdatadir" (string-append out "/lib/qt5") + "-datadir" (string-append out "/share/qt5") + "-examplesdir" (string-append + out "/share/doc/qt5/examples") "-opensource" "-confirm-license" ;; Do not build examples; if desired, these could go @@ -489,38 +495,31 @@ developers using C++ or QML, a CSS & JavaScript like language.") (add-after 'install 'patch-qt_config.prf (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) + (mkspecs (string-append out "/lib/qt5/mkspecs")) (qt_config.prf (string-append - out "/mkspecs/features/qt_config.prf"))) + mkspecs "/features/qt_config.prf"))) ;; For each Qt module, let `qmake' uses search paths in the ;; module directory instead of all in QT_INSTALL_PREFIX. (substitute* qt_config.prf (("\\$\\$\\[QT_INSTALL_HEADERS\\]") - "$$replace(dir, mkspecs/modules, include)") + "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))") (("\\$\\$\\[QT_INSTALL_LIBS\\]") - "$$replace(dir, mkspecs/modules, lib)") + "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))") (("\\$\\$\\[QT_HOST_LIBS\\]") - "$$replace(dir, mkspecs/modules, lib)") - (("\\$\\$\\[QT_INSTALL_PLUGINS\\]") - "$$replace(dir, mkspecs/modules, plugins)") - (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]") - "$$replace(dir, mkspecs/modules, libexec)") + "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))") (("\\$\\$\\[QT_INSTALL_BINS\\]") - "$$replace(dir, mkspecs/modules, bin)") - (("\\$\\$\\[QT_INSTALL_IMPORTS\\]") - "$$replace(dir, mkspecs/modules, imports)") - (("\\$\\$\\[QT_INSTALL_QML\\]") - "$$replace(dir, mkspecs/modules, qml)")) + "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))")) #t)))))) (native-search-paths (list (search-path-specification (variable "QMAKEPATH") - (files '(""))) + (files '("lib/qt5"))) (search-path-specification (variable "QML2_IMPORT_PATH") - (files '("qml"))) + (files '("lib/qt5/qml"))) (search-path-specification (variable "QT_PLUGIN_PATH") - (files '("plugins"))) + (files '("lib/qt5/plugins"))) (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))) @@ -817,6 +816,18 @@ developers using C++ or QML, a CSS & JavaScript like language.") (snippet ;; The examples try to build and cause the build to fail '(delete-file-recursively "examples")))) + (arguments + (substitute-keyword-arguments (package-arguments qtsvg) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'check 'set-ld-library-path + ;; + ;; + ;; Make the uninstalled libQt5WaylandClient.so.5 available to the + ;; wayland platform plugin. + (lambda _ + (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib")) + #t)))))) (native-inputs `(("glib" ,glib) ("perl" ,perl) -- 2.13.5