guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28673] [PATCH 3/6] gnu: Add cube.


From: Ludovic Courtès
Subject: [bug#28673] [PATCH 3/6] gnu: Add cube.
Date: Tue, 03 Oct 2017 16:44:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Dave Love <address@hidden> skribis:

> * gnu/packages/profiling.scm(cube): New variable.
> * gnu/packages/patches/cube-nocheck.patch: New file.
> * gnu/local.mk: Add it.

Applied with the changes below, thanks!

Ludo’.

diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm
index 300c6fc94..598633c3e 100644
--- a/gnu/packages/profiling.scm
+++ b/gnu/packages/profiling.scm
@@ -34,6 +34,7 @@
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt))
 
@@ -198,7 +199,6 @@ and hybrid codes.  It surrounds OpenMP directives and 
runtime library calls
 with calls to the POMP2 measurement interface.")
     (license license:bsd-3)))
 
-;; FIXME: The doc is 14MB, but adding a doc output results in a cycle
 (define-public cube
   (package
     (name "cube")
@@ -210,16 +210,17 @@ with calls to the POMP2 measurement interface.")
              "http://apps.fz-juelich.de/scalasca/releases/cube/4.3/dist/cube-";
              version ".tar.gz"))
        (sha256 (base32 "04irflia4rfw02093w9nx7rr98r640y4q8hisjywvd4b7r3nzhhx"))
-       (patches (search-patches
-                 ;; Disable network check for new versions (from Fedora)
-                 "cube-nocheck.patch"))))
+       (patches (search-patches "cube-nocheck.patch"))))
     (inputs `(("dbus" ,dbus)
               ("zlib" ,zlib)))
     (native-inputs `(("perl" ,perl)
-                     ("qtbase" ,qtbase) ; native because of qmake
+                     ("qtbase" ,qtbase)           ; native because of qmake
                      ("which" ,which)))
-    (outputs '("out" ;"doc"
+
+    ;; FIXME: The doc is 14MB, but adding a doc output results in a cycle.
+    (outputs '("out"                              ;"doc"
                "lib"))
+
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -230,27 +231,30 @@ with calls to the POMP2 measurement interface.")
        (modify-phases %standard-phases
          (add-after 'configure 'rpath
            ;; Account for moving GUI stuff
-           (lambda _
-             (let ((wl (string-append "-Wl,-rpath=" %output "/lib")))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((wl (string-append "-Wl,-rpath=" (assoc-ref outputs "out")
+                                      "/lib")))
                (substitute* "build-backend/Makefile"
                  (("^cube_LDFLAGS =") (string-append "cube_LDFLAGS = " wl))
                  (("^libheatmap_plugin_la_LDFLAGS =")
                   (string-append "libheatmap_plugin_la_LDFLAGS = " wl))
                  (("^libbarplot_plugin_la_LDFLAGS =")
-                  (string-append "libbarplot_plugin_la_LDFLAGS = " wl))))))
+                  (string-append "libbarplot_plugin_la_LDFLAGS = " wl)))
+               #t)))
          (add-before 'install 'includes-cube
            ;; It tries to install here before include exists.
-           (lambda _
-             (let ((inc (string-append (assoc-ref %outputs "lib") "/include")))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((inc (string-append (assoc-ref outputs "lib") "/include")))
                (mkdir-p (string-append inc "/cube"))
-               (mkdir-p (string-append inc "/cubew")))))
+               (mkdir-p (string-append inc "/cubew"))
+               #t)))
          (add-after 'install 'licence
-           (lambda _
-             (let ((doc (string-append (assoc-ref %outputs "lib") 
"/share/doc")))
-               (mkdir-p doc)
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((doc (string-append (assoc-ref outputs "lib")
+                                       "/share/doc/cube")))
                (install-file "COPYING" doc)
                #t)))
-         ;; FIXME: cycle
+         ;; XXX: Commented due to cycle (see comment above.)
          ;; (add-after 'install 'doc
          ;;   (lambda _
          ;;     (let ((share (string-append (assoc-ref %outputs "doc")
@@ -269,23 +273,28 @@ with calls to the POMP2 measurement interface.")
                (for-each (lambda (file)
                            (rename-file
                             file (string-append outlib "/" (basename file))))
-                         (append (find-files lib 
"libgraphwidgetcommon-plugin.*")
-                                 (find-files lib "libcube4gui.so.*"))))))
+                         (append (find-files lib 
"libgraphwidgetcommon-plugin\\..*")
+                                 (find-files lib "libcube4gui\\.so.*")))
+               #t)))
          (add-after 'install 'move-include
            ;; Most of the headers end up under %output for some reason,
            ;; despite --includedir in configure.
-           (lambda _
-             (let ((outinc (string-append %output "/include"))
-                   (libinc (string-append (assoc-ref %outputs "lib") 
"/include")))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((outinc (string-append (assoc-ref outputs "out")
+                                          "/include"))
+                   (libinc (string-append (assoc-ref outputs "lib")
+                                          "/include")))
                (for-each (lambda (file)
                            (let ((from (string-append outinc "/" file)))
                              (copy-recursively from libinc)
                              (delete-file-recursively from)))
-                         '("cube" "cubew")))))
-         ;; FIXME: This doesn't work because cube-config, which is needed for
+                         '("cube" "cubew"))
+               #t)))
+
+         ;; XXX: This doesn't work because cube-config, which is needed for
          ;; building stuff, sources cube-config-frontend.  We don't want that
          ;; in the lib output because it pulls in >1GB via QT.
-
+         ;;
          ;; (add-after 'install 'cube-config
          ;;   (lambda _
          ;;     (let* ((lib (assoc-ref %outputs "lib"))
@@ -298,8 +307,8 @@ with calls to the POMP2 measurement interface.")
          ;;         (("^exec_prefix=\"\\$\\{prefix\\}\"")
          ;;          (string-append "exec_prefix=" lib))))))
          (add-after 'install 'cube-config
-           (lambda _
-             (let* ((lib (assoc-ref %outputs "lib"))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((lib (assoc-ref outputs "lib"))
                     (libbin (string-append lib "/bin")))
                (mkdir-p libbin)
                (install-file (string-append %output "/bin/cube-config") libbin)
@@ -307,16 +316,17 @@ with calls to the POMP2 measurement interface.")
                              libbin)
                (substitute* (list (string-append libbin "/cube-config"))
                  (("^source .*frontend.*$") "")
-                 ((%output) lib))))))))
+                 (((assoc-ref outputs "out")) lib))
+               #t))))))
     (home-page "http://www.scalasca.org/software/cube-4.x/download.html";)
-    (synopsis "CUBE Uniform Behavioral Encoding generic presentation 
component")
-    (description "CUBE (CUBE Uniform Behavioral Encoding) is a generic 
presentation component
-suitable for displaying a wide variety of performance metrics for parallel
-programs including MPI and OpenMP applications.  CUBE allows interactive
-exploration of a multidimensional performance space in a scalable fashion.
-Scalability is achieved in two ways: hierarchical decomposition of individual
-dimensions and aggregation across different dimensions.  All performance
-metrics are uniformly accommodated in the same display and thus provide the
-ability to easily compare the effects of different kinds of performance
-behavior.")
+    (synopsis "Performance report explorer for parallel programs")
+    (description
+     "CUBE (CUBE Uniform Behavioral Encoding) is a tool to display a variety
+of performance metrics for parallel programs including MPI and OpenMP
+applications.  CUBE allows interactive exploration of a multidimensional
+performance space in a scalable fashion.  Scalability is achieved in two ways:
+hierarchical decomposition of individual dimensions and aggregation across
+different dimensions.  All performance metrics are uniformly accommodated in
+the same display and thus provide the ability to easily compare the effects of
+different kinds of performance behavior.")
     (license license:bsd-3)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]