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: Sun, 03 Sep 2017 19:46:45 +0800 Message-ID: <87y3pw9f8a.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> <87o9r3iqh7.fsf@member.fsf.org> <0f97b74f-282d-9996-aa61-d3084e164b09@crazy-compilers.com> <878thwbcpv.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]:59431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doTMl-0001BK-Qd for guix-devel@gnu.org; Sun, 03 Sep 2017 07:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doTMg-0004nb-Tw for guix-devel@gnu.org; Sun, 03 Sep 2017 07:47:03 -0400 Received: from rezeros.cc ([2001:19f0:7001:2f3e:5400:ff:fe84:e55d]:40528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1doTMg-0004lR-E2 for guix-devel@gnu.org; Sun, 03 Sep 2017 07:46:58 -0400 In-Reply-To: <878thwbcpv.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Sun, 03 Sep 2017 12:58:04 +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 , Thomas Danckaert --=-=-= Content-Type: text/plain > [...] > And vlc fails to build due to can't find headers of Qt5X11Extras. > Indeed, the pkg-config output of Qt5X11Extras seems wrong: > $ pkg-config --cflags --libs Qt5X11Extras > -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtGui -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtCore -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5/QtX11Extras -I/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/include/qt5 -L/gnu/store/l8xp2i57plmdd3pprhznc8r03ha3sv2s-qtbase-5.9.1/lib -lQt5X11Extras -lQt5Gui -lQt5Core > I can try fix this pkg-config issue. Here is it: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-qt-Fix-install-paths-in-submodules.patch >From b2f4822b3a1c8f76d2c6dcf39590d3810d3510bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sun, 3 Sep 2017 17:38:57 +0800 Subject: [PATCH 2/2] gnu: qt: Fix install paths in submodules. Before this, the paths in pkg-config (.pc) and libtool (.la) files of submodules are all pointing to qtbase. * gnu/packages/qt.scm (qtsvg)[arguments]: Use a customized qt.conf to override install paths to $out. --- gnu/packages/qt.scm | 57 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 80508f058..771a03bd5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -554,25 +554,48 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(#:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (qtbase (assoc-ref inputs "qtbase")) + (tmpdir (string-append (getenv "TMPDIR"))) + (qmake (string-append tmpdir "/qmake")) + (qt.conf (string-append tmpdir "/qt.conf"))) + ;; Use qmake with a customized qt.conf to override install + ;; paths to $out. + (symlink (which "qmake") qmake) + (with-output-to-file qt.conf + (lambda () + ;; Thoese must be kept in sync with qtbase. + (format #t "[Paths] +Prefix=~a +ArchData=lib/qt5 +Data=share/qt5 +Documentation=share/doc/qt5 +Headers=include/qt5 +Libraries=lib +LibraryExecutables=lib/qt5/libexec +Binaries=bin +Tests=tests +Plugins=lib/qt5/plugins +Imports=lib/qt5/imports +Qml2Imports=lib/qt5/qml +Translations=share/qt5/translations +Settings=etc/xdg +Examples=share/doc/qt5/examples +HostPrefix=~a +HostData=lib/qt5 +HostBinaries=bin +HostLibrariesPath=lib +" out qtbase))) + ;; Valid QT_BUILD_PARTS variables are: ;; libs tools tests examples demos docs translations - (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests" - (string-append "PREFIX=" out)))))) - (add-before 'install 'fix-Makefiles - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (qtbase (assoc-ref inputs "qtbase"))) - (substitute* (find-files "." "Makefile") - (((string-append "INSTALL_ROOT)" qtbase)) - (string-append "INSTALL_ROOT)" out))) - #t))) - (add-before 'check 'set-display - (lambda _ - ;; make Qt render "offscreen", required for tests - (setenv "QT_QPA_PLATFORM" "offscreen") - #t))))))) + (zero? (system* qmake "QT_BUILD_PARTS = libs tools tests"))))) + (add-before 'check 'set-display + (lambda _ + ;; make Qt render "offscreen", required for tests + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))))))) (define-public qtimageformats (package (inherit qtsvg) -- 2.13.3 --=-=-= Content-Type: text/plain This fixes the pkg-config files of various qt submodules, and gets vlc built. I think remaining non-KDE things to fix are qt-utils.scm, sddm, greenisland and cool-retro-term. --=-=-=--