From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: QT install and search paths Date: Sat, 26 Aug 2017 00:04:04 +0800 Message-ID: <87o9r3iqh7.fsf@member.fsf.org> References: <42cac0e9-d948-3ea1-7312-d003751fd6a8@crazy-compilers.com> <874lsxi3bx.fsf@member.fsf.org> <4a1d7083-eb0a-9c79-fd54-686b822da5ed@crazy-compilers.com> <87378fkeho.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlH5w-0003Qk-3H for guix-devel@gnu.org; Fri, 25 Aug 2017 12:04:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlH5r-0002sg-Gz for guix-devel@gnu.org; Fri, 25 Aug 2017 12:04:27 -0400 Received: from rezeros.cc ([45.76.207.221]:50416) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dlH5r-0002ql-2D for guix-devel@gnu.org; Fri, 25 Aug 2017 12:04:23 -0400 In-Reply-To: <87378fkeho.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Fri, 25 Aug 2017 20:40:03 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel --=-=-= Content-Type: text/plain Here is a patch to adjust the directory layout of qtbase: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-qtbase-Use-a-more-standard-directory-layout.patch >From b264ccfdec5c7334ef7e428c8b483bc673edc393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Fri, 25 Aug 2017 22:52:41 +0800 Subject: [PATCH] gnu: qtbase: Use a more standard directory layout. * 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. --- gnu/packages/qt.scm | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3e3588a50..2d7c83ae5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -459,6 +459,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 @@ -488,38 +494,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"))) -- 2.13.3 --=-=-= Content-Type: text/plain I have built qtscript with it, which looks fine so far. --=-=-=--