aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2017-06-30 17:55:41 +0200
committerLudovic Courtès <ludo@gnu.org>2017-06-30 18:44:41 +0200
commit798b7678a08f11ce8648facbf0b866996ce85b9e (patch)
treebda7e77a18fc2316c8b12dde11a975c3276e39aa
parent7eb9f31cd9bda7c8293f0a8a35d68f8ecf323b7e (diff)
downloadguix-798b7678a08f11ce8648facbf0b866996ce85b9e.tar.gz
guix-798b7678a08f11ce8648facbf0b866996ce85b9e.zip
gnu: hwloc: Add "lib" and "debug" outputs.
* gnu/packages/mpi.scm (hwloc)[outputs]: New field. [arguments]: Add 'avoid-circular-references' phase. (openmpi)[inputs]: Use the "lib" output of HWLOC. * gnu/packages/parallel.scm (slurm)[inputs]: Likewise.
-rw-r--r--gnu/packages/mpi.scm33
-rw-r--r--gnu/packages/parallel.scm2
2 files changed, 23 insertions, 12 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 277a2d5f58..3b1ba003c6 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -51,6 +51,9 @@
(base32
"0acph1mf7588hfx8ds26ncr6nw5fd9x92adm11fwin7f93i10sdb"))))
(build-system gnu-build-system)
+ (outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc.
+ "lib" ;small closure
+ "debug"))
(inputs
`(("libx11" ,libx11)
("cairo" ,cairo)
@@ -70,16 +73,24 @@
`(#:configure-flags '("--localstatedir=/var")
#:phases
(modify-phases %standard-phases
- (add-after
- 'install 'refine-libnuma
- ;; Give -L arguments for libraries to avoid propagation
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (numa (assoc-ref inputs "numactl")))
- (substitute* (map (lambda (f) (string-append out "/" f))
- '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
- (("-lnuma" lib)
- (string-append "-L" numa "/lib " lib)))))))))
+ (add-after 'install 'refine-libnuma
+ ;; Give -L arguments for libraries to avoid propagation
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "lib"))
+ (numa (assoc-ref inputs "numactl")))
+ (substitute* (map (lambda (f) (string-append out "/" f))
+ '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
+ (("-lnuma" lib)
+ (string-append "-L" numa "/lib " lib))))))
+ (add-after 'install 'avoid-circular-references
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (assoc-ref outputs "lib")))
+ ;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
+ ;; "lib" output doesn't refer to "out".
+ (substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
+ (("^.*prefix=.*$")
+ ""))
+ #t))))))
(home-page "https://www.open-mpi.org/projects/hwloc/")
(synopsis "Abstraction of hardware architectures")
(description
@@ -111,7 +122,7 @@ bind processes, and much more.")
"0k95ri9f8kzx5vhzrdbzn59rn2324fs4a96w5v8jy20j8dkbp13l"))))
(build-system gnu-build-system)
(inputs
- `(("hwloc" ,hwloc)
+ `(("hwloc" ,hwloc "lib")
("gfortran" ,gfortran)
("valgrind" ,valgrind)))
(native-inputs
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index c1f962a4b6..37126040af 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -113,7 +113,7 @@ and they are executed on lists of files, hosts, users or other items.")
;; in particular mysql and gtk+.
(inputs `(("expect" ,expect)
("freeipmi" ,freeipmi)
- ("hwloc" ,hwloc)
+ ("hwloc" ,hwloc "lib")
("json-c" ,json-c)
("linux-pam" , linux-pam)
("munge" ,munge)