all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 28719@debbugs.gnu.org
Subject: [bug#28719] [PATCH 1/6] gnu: qtbase: Use a more standard directory layout.
Date: Fri,  6 Oct 2017 14:02:09 +0200	[thread overview]
Message-ID: <20171006120214.29511-1-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20171006115951.29431-1-h.goebel@crazy-compilers.com>

From: 宋文武 <iyzsong@member.fsf.org>

* 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 <h.goebel@crazy-compilers.com>
---
 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
+             ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
+             ;;
+             ;; 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

  reply	other threads:[~2017-10-06 12:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 11:59 [bug#28719] [PATCH 0/6] Qt: Use a more standard directory layout Hartmut Goebel
2017-10-06 12:02 ` Hartmut Goebel [this message]
2017-10-06 12:02   ` [bug#28719] [PATCH 2/6] gnu: qt: Fix install paths in submodules Hartmut Goebel
2017-10-10 11:01     ` 宋文武
2017-10-06 12:02   ` [bug#28719] [PATCH 3/6] gnu: qwt: Adjust installation directory layout Hartmut Goebel
2017-10-06 12:02   ` [bug#28719] [PATCH 4/6] gnu: qtwebkit: Fix rpath for the qmlwebkit plugins Hartmut Goebel
2017-10-06 12:02   ` [bug#28719] [PATCH 5/6] gnu: qscintilla: Adjust installation directory layout Hartmut Goebel
2017-10-10 11:05     ` 宋文武
2017-10-10 14:43       ` Hartmut Goebel
2017-10-10 15:39       ` Hartmut Goebel
2017-10-12 11:27         ` 宋文武
2017-10-13 13:37           ` bug#28719: " Hartmut Goebel
2017-10-14  6:30             ` [bug#28719] " 宋文武
2017-10-06 12:02   ` [bug#28719] [PATCH 6/6] gnu: kde-framworks: Fix installation directories Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171006120214.29511-1-h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=28719@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.