summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-04-04 22:41:54 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-04-04 22:41:54 +0300
commit855c8d9d41ef2f5d8c9a2fc952a27eda32105585 (patch)
tree3ae8b6e44a2c21f0a297478345f1dc6015513477 /gnu/packages
parent9bd4ed3dded7b770f1989f6084d565f7086fdcd3 (diff)
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.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/bioinformatics.scm14
1 files 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.")