guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add MOSAIK.


From: Ricardo Wurmus
Subject: Re: [PATCH] Add MOSAIK.
Date: Fri, 23 Oct 2015 10:42:49 +0200

> Mosaik fails on all architectures except for x86_64. Should it be disabled
> or are there configure flags to make it work elsewhere?

I think this is caused by ‘includes/linux.inc’, which is unconditionally
included by default.

Disabling the line

    include includes/$(BLD_PLATFORM).inc

should be sufficient to fix this.

Alternatively, we could set BLD_PLATFORM (to something other than just
“linux” on non-x86_64) and patch “include” to read “-include”, so that
it doesn’t cause an error when the file does not exist.

That’s what the attached patch does.

>From 156df9fcf8a7b9a5f61b29db366f6b780082c81a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Fri, 23 Oct 2015 10:35:00 +0200
Subject: [PATCH] gnu: mosaik: Enable optimizations only on x86_64.

* gnu/packages/bioinformatics.scm (mosaik)[arguments]: Set BLD_PLATFORM
  make flag; add build phase to make include optional.
---
 gnu/packages/bioinformatics.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e1ae107..6424dde 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2266,9 +2266,21 @@ viewer.")
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f ; no tests
-         #:make-flags (list "CC=gcc")
+         #:make-flags
+         (list "CC=gcc"
+               (string-append "BLD_PLATFORM="
+                              (let ((system ,(or (%current-target-system)
+                                                 (%current-system))))
+                                (if (string-prefix? "x86_64" system)
+                                    "linux"
+                                    system))))
          #:phases
          (modify-phases %standard-phases
+           (add-after 'unpack 'make-optimization-optional
+            (lambda _
+              (substitute* "src/Makefile"
+                (("^include") "-include"))
+              #t))
            (replace 'configure
                     (lambda _ (chdir "src") #t))
            (replace 'install
-- 
2.1.0


reply via email to

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