guix-commits
[Top][All Lists]
Advanced

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

01/03: gnu: flann: Move .mex file to a separate "octave" output.


From: Ludovic Courtès
Subject: 01/03: gnu: flann: Move .mex file to a separate "octave" output.
Date: Thu, 6 Apr 2017 18:17:22 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 6b6aca9b363d9c453892b41691734a03fabe1faa
Author: Ludovic Courtès <address@hidden>
Date:   Thu Apr 6 18:13:30 2017 +0200

    gnu: flann: Move .mex file to a separate "octave" output.
    
    That way the closure of flann:out is down from 1 GiB
    to 290 MiB.
    
    * gnu/packages/maths.scm (flann)[outputs]: New field.
    [arguments]: Add 'set-octave-directory' phase.
---
 gnu/packages/maths.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5a06afa..38beb88 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2719,6 +2719,8 @@ in finite element programs.")
           (base32
             "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))))
     (build-system cmake-build-system)
+    (outputs '("out"
+               "octave"))                  ;46 MiB .mex file that pulls Octave
     (native-inputs
      `(("unzip" ,unzip)))
     (inputs
@@ -2736,6 +2738,14 @@ in finite element programs.")
        ;; Save 12 MiB by not installing .a files.  Passing
        ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
        #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'set-octave-directory
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Install the .mex file in the "octave" output.
+                      (let ((out (assoc-ref outputs "octave")))
+                        (substitute* "src/matlab/CMakeLists.txt"
+                          (("share/flann/octave")
+                           (string-append out "/share/flann/octave")))
+                        #t)))
                   (add-after 'install 'remove-static-libraries
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((out (assoc-ref outputs "out"))



reply via email to

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