From 855c8d9d41ef2f5d8c9a2fc952a27eda32105585 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 4 Apr 2022 22:41:54 +0300 Subject: 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(-) (limited to 'gnu/packages/bioinformatics.scm') 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 @@ (define-public smithwaterman (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 @@ (define-public smithwaterman (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 @@ (define-public smithwaterman 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.") -- cgit v1.2.3