guix-commits
[Top][All Lists]
Advanced

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

05/05: gnu: librecad: Fix build.


From: Ricardo Wurmus
Subject: 05/05: gnu: librecad: Fix build.
Date: Wed, 8 Nov 2017 10:34:49 -0500 (EST)

rekado pushed a commit to branch master
in repository guix.

commit 7e3aca2b78cbb563b4817c47b5c71b32333a2099
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Nov 8 16:20:42 2017 +0100

    gnu: librecad: Fix build.
    
    * gnu/packages/engineering.scm (librecad)[arguments]: Add phase
    "patch-boost-error".
---
 gnu/packages/engineering.scm | 50 ++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 32b2f2c..496c1aa 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -96,24 +96,38 @@
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-        (add-after 'unpack 'patch-paths
-         (lambda* (#:key outputs #:allow-other-keys)
-           (let ((out (assoc-ref outputs "out")))
-             (substitute* "librecad/src/lib/engine/rs_system.cpp"
-               (("/usr/share") (string-append out "/share"))))))
-        (replace 'configure
-         (lambda* (#:key inputs #:allow-other-keys)
-           (system* "qmake" (string-append "BOOST_DIR="
-                                           (assoc-ref inputs "boost")))))
-        (replace 'install
-         (lambda* (#:key outputs #:allow-other-keys)
-           (let* ((out   (assoc-ref outputs "out"))
-                  (bin   (string-append out "/bin"))
-                  (share (string-append out "/share/librecad")))
-             (mkdir-p bin)
-             (install-file "unix/librecad" bin)
-             (mkdir-p share)
-             (copy-recursively "unix/resources" share)))))))
+         ;; Without this patch boost complains that "make_array" is not a
+         ;; member of "boost::serialization".
+         (add-after 'unpack 'patch-boost-error
+           (lambda _
+             (substitute* "librecad/src/lib/math/lc_quadratic.h"
+               (("#include \"rs_vector.h\"" line)
+                (string-append line
+                               "\n#include 
<boost/serialization/array_wrapper.hpp>")))
+             (substitute* "librecad/src/lib/math/rs_math.cpp"
+               (("#include <boost/numeric/ublas/matrix.hpp>" line)
+                (string-append "#include 
<boost/serialization/array_wrapper.hpp>\n"
+                               line)))
+             #t))
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "librecad/src/lib/engine/rs_system.cpp"
+                 (("/usr/share") (string-append out "/share"))))))
+         (replace 'configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (system* "qmake" (string-append "BOOST_DIR="
+                                             (assoc-ref inputs "boost")))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin"))
+                    (share (string-append out "/share/librecad")))
+               (mkdir-p bin)
+               (install-file "unix/librecad" bin)
+               (mkdir-p share)
+               (copy-recursively "unix/resources" share))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("muparser" ,muparser)



reply via email to

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