[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: smithwaterman: Fix cross-compiling.
From: |
guix-commits |
Subject: |
01/02: gnu: smithwaterman: Fix cross-compiling. |
Date: |
Mon, 4 Apr 2022 15:51:01 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit 855c8d9d41ef2f5d8c9a2fc952a27eda32105585
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Apr 4 22:41:54 2022 +0300
gnu: smithwaterman: Fix cross-compiling.
* gnu/packages/bioinformatics.scm (smithwaterman)[arguments]: Add
make-flag to use cxx-for-target. Adjust custom 'patch-source and
'build-dynamic phases to use cross toolchain binaries when cross
compiling. Remove trailing #t from phases.
---
gnu/packages/bioinformatics.scm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index fd7d70c6b4..b52fa1a61a 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14182,7 +14182,8 @@ some of the details of opening and jumping in
tabix-indexed files.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; There are no tests to run.
- #:make-flags '("libsw.a" "all")
+ #:make-flags (list (string-append "CXX=" ,(cxx-for-target))
+ "libsw.a" "all")
#:phases
(modify-phases %standard-phases
(delete 'configure) ; There is no configure phase.
@@ -14190,10 +14191,14 @@ some of the details of opening and jumping in
tabix-indexed files.")
(lambda _
(substitute* "Makefile"
(("-c ") "-c -fPIC "))
- #t))
+ ,@(if (%current-target-system)
+ `((substitute* "Makefile"
+ (("ld") (string-append ,(%current-target-system) "-ld"))
+ (("ar") (string-append ,(%current-target-system)
"-ar"))))
+ '())))
(add-after 'build 'build-dynamic
(lambda _
- (invoke "g++"
+ (invoke ,(cxx-for-target)
"-shared" "-o" "libsmithwaterman.so"
"smithwaterman.o" "SmithWatermanGotoh.o"
"disorder.o" "BandedSmithWaterman.o"
@@ -14224,8 +14229,7 @@ some of the details of opening and jumping in
tabix-indexed files.")
Description: smith-waterman-gotoh alignment
algorithm~@
Libs: -L${libdir} -lsmithwaterman~@
Cflags: -I${includedir}~%"
- out ,version))))
- #t)))))
+ out ,version)))))))))
(home-page "https://github.com/ekg/smithwaterman")
(synopsis "Implementation of the Smith-Waterman algorithm")
(description "Implementation of the Smith-Waterman algorithm.")