summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-19 14:50:22 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-19 14:51:21 +0200
commit9684e30b9b597b93ae9c797ba8f3b40eff893ebe (patch)
tree0731536b42f2f8a5535bc19c7fd2fe6a558b8923 /gnu/packages/maths.scm
parent458480235b85ce31db5485251f94415cfdddeff0 (diff)
downloadpatches-9684e30b9b597b93ae9c797ba8f3b40eff893ebe.tar
patches-9684e30b9b597b93ae9c797ba8f3b40eff893ebe.tar.gz
gnu: flann: Do not install .a files.
* gnu/packages/maths.scm (flann)[arguments]: Add #:phases.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index da7bfa6b76..95240af962 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2214,6 +2214,17 @@ in finite element programs.")
#:strip-directories '("lib" "lib64" "libexec"
"bin" "sbin" "share/flann/octave")
+ ;; Save 12 MiB by not installing .a files. Passing
+ ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'remove-static-libraries
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ (for-each delete-file
+ (find-files lib "\\.a$"))
+ #t))))
+
#:tests? #f)) ; The test data are downloaded from the Internet.
(home-page "http://www.cs.ubc.ca/research/flann/")
(synopsis "Library for approximate nearest neighbors computation")