all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dave Love <fx@gnu.org>
To: 28673@debbugs.gnu.org
Cc: Dave Love <fx@gnu.org>
Subject: [bug#28673] [PATCH 3/6] gnu: Add cube.
Date: Mon,  2 Oct 2017 21:48:45 +0100	[thread overview]
Message-ID: <20171002204848.23646-3-fx@gnu.org> (raw)
In-Reply-To: <20171002204848.23646-1-fx@gnu.org>

* gnu/packages/profiling.scm(cube): New variable.
* gnu/packages/patches/cube-nocheck.patch: New file.
* gnu/local.mk: Add it.
---
 gnu/local.mk                            |   1 +
 gnu/packages/patches/cube-nocheck.patch |  14 ++++
 gnu/packages/profiling.scm              | 128 +++++++++++++++++++++++++++++++-
 3 files changed, 142 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/cube-nocheck.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 016c46c6c..ed5346474 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -576,6 +576,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/crda-optional-gcrypt.patch		\
   %D%/packages/patches/crossmap-allow-system-pysam.patch	\
   %D%/packages/patches/clucene-contribs-lib.patch               \
+  %D%/packages/patches/cube-nocheck.patch			\
   %D%/packages/patches/curl-bounds-check.patch			\
   %D%/packages/patches/cursynth-wave-rand.patch			\
   %D%/packages/patches/cvs-2017-12836.patch			\
diff --git a/gnu/packages/patches/cube-nocheck.patch b/gnu/packages/patches/cube-nocheck.patch
new file mode 100644
index 000000000..cbfaf0884
--- /dev/null
+++ b/gnu/packages/patches/cube-nocheck.patch
@@ -0,0 +1,14 @@
+diff -u /home/dlove/rpmbuild/BUILD/cube-4.3.4/src/GUI-qt/display/VersionCheckWidget.cpp\~ /home/dlove/rpmbuild/BUILD/cube-4.3.4/src/GUI-qt/display/VersionCheckWidget.cpp
+--- cube-4.3.4/src/GUI-qt/display/VersionCheckWidget.cpp~	2016-04-03 00:05:37.942066948 +0100
++++ cube-4.3.4/src/GUI-qt/display/VersionCheckWidget.cpp	2016-05-06 17:16:31.648143908 +0100
+@@ -52,7 +52,8 @@
+     url              = QUrl( UPDATE_CHECK_URL );
+     download         = NULL;
+     update_Available = false;
+-    bool no_http = env_str2bool( getenv( "CUBE_DISABLE_HTTP_DOCS" ) );
++    // bool no_http = env_str2bool( getenv( "CUBE_DISABLE_HTTP_DOCS" ) );
++    bool no_http = true;
+     if ( !no_http )
+     {
+         updateDescription =   tr( "Check for update is not performed yet." );
+
diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm
index 5eed6ba0d..3f08f7e3d 100644
--- a/gnu/packages/profiling.scm
+++ b/gnu/packages/profiling.scm
@@ -25,12 +25,15 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)      ;for "which"
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fabric-management)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages qt))
 
 ;; Fixme: Separate out lib and fix resulting cycle errors; separate libpfm
 ;; output(?); build libmsr and add that component.
@@ -156,3 +159,126 @@ performance measurement opportunites across the hardware and software stack.")
     (description "The Open Trace Format 2 (OTF2) is a highly scalable, memory efficient event
 trace data format plus support library.")
     (license license:bsd-3)))
+
+;; FIXME: The doc is 14MB, but adding a doc output results in a cycle
+(define-public cube
+  (package
+    (name "cube")
+    (version "4.3.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "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"))))
+    (inputs `(("dbus" ,dbus)
+              ("zlib" ,zlib)))
+    (native-inputs `(("perl" ,perl)
+                     ("qtbase" ,qtbase) ; native because of qmake
+                     ("which" ,which)))
+    (outputs '("out" ;"doc"
+               "lib"))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `("--enable-shared" "--disable-static" "--disable-silent-rules"
+         ,(string-append "LDFLAGS=-L" (assoc-ref %outputs "lib") "/lib"))
+       #:parallel-tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'rpath
+           ;; Account for moving GUI stuff
+           (lambda _
+             (let ((wl (string-append "-Wl,-rpath=" %output "/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))))))
+         (add-before 'install 'includes-cube
+           ;; It tries to install here before include exists.
+           (lambda _
+             (let ((inc (string-append (assoc-ref %outputs "lib") "/include")))
+               (mkdir-p (string-append inc "/cube"))
+               (mkdir-p (string-append inc "/cubew")))))
+         (add-after 'install 'licence
+           (lambda _
+             (let ((doc (string-append (assoc-ref %outputs "lib") "/share/doc")))
+               (mkdir-p doc)
+               (install-file "COPYING" doc)
+               #t)))
+         ;; FIXME: cycle
+         ;; (add-after 'install 'doc
+         ;;   (lambda _
+         ;;     (let ((share (string-append (assoc-ref %outputs "doc")
+         ;;                                 "/share")))
+         ;;       (mkdir-p share)
+         ;;       (rename-file (string-append %output "/share/doc")
+         ;;                    (string-append share "/doc")))))
+         (add-after 'install 'gui-stuff
+           ;; Get the Qt horror dependencies out of the lib closure
+           (lambda _
+             (let ((outlib (string-append (assoc-ref %outputs "out") "/lib"))
+                   (lib (string-append (assoc-ref %outputs "lib") "/lib")))
+               (mkdir-p outlib)
+               (rename-file (string-append lib "/cube-plugins")
+                            (string-append outlib "/cube-plugins"))
+               (for-each (lambda (file)
+                           (rename-file
+                            file (string-append outlib "/" (basename file))))
+                         (append (find-files lib "libgraphwidgetcommon-plugin.*")
+                                 (find-files lib "libcube4gui.so.*"))))))
+         (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")))
+               (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
+         ;; 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"))
+         ;;            (libbin (string-append lib "/bin")))
+         ;;       (mkdir-p libbin)
+         ;;       (system (string-append "mv " (assoc-ref %outputs "out")
+         ;;                              "/bin/cube-config* " libbin))
+         ;;       (substitute* (list (string-append libbin "/cube-config"))
+         ;;         (("^prefix=.*") (string-append "prefix=" lib))
+         ;;         (("^exec_prefix=\"\\$\\{prefix\\}\"")
+         ;;          (string-append "exec_prefix=" lib))))))
+         (add-after 'install 'cube-config
+           (lambda _
+             (let* ((lib (assoc-ref %outputs "lib"))
+                    (libbin (string-append lib "/bin")))
+               (mkdir-p libbin)
+               (install-file (string-append %output "/bin/cube-config") libbin)
+               (install-file (string-append %output "/bin/cube-config-backend")
+                             libbin)
+               (substitute* (list (string-append libbin "/cube-config"))
+                 (("^source .*frontend.*$") "")
+                 ((%output) lib))))))))
+    (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.")
+    (license license:bsd-3)))
-- 
2.11.0

  parent reply	other threads:[~2017-10-02 20:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 20:48 [bug#28673] [PATCH 1/6] gnu: Add papi Dave Love
2017-10-02 20:48 ` [bug#28673] [PATCH 2/6] gnu: Add otf2 Dave Love
2017-10-03 14:09   ` Ludovic Courtès
2017-10-02 20:48 ` Dave Love [this message]
2017-10-03 14:44   ` [bug#28673] [PATCH 3/6] gnu: Add cube Ludovic Courtès
2017-10-02 20:48 ` [bug#28673] [PATCH 4/6] gnu: Add opari2 Dave Love
2017-10-03 14:13   ` Ludovic Courtès
2017-10-02 20:48 ` [bug#28673] [PATCH 5/6] gnu: libunwind: Merge update and test changes Dave Love
2017-10-03 14:46   ` Ludovic Courtès
2017-11-16  9:47     ` bug#28673: " Ludovic Courtès
2017-10-02 20:48 ` [bug#28673] [PATCH 6/6] gnu: Add scorep-openmpi Dave Love
2017-10-03 15:07   ` Ludovic Courtès
2017-10-03 13:43 ` [bug#28673] [PATCH 1/6] gnu: Add papi Ludovic Courtès

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=20171002204848.23646-3-fx@gnu.org \
    --to=fx@gnu.org \
    --cc=28673@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.