guix-commits
[Top][All Lists]
Advanced

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

03/09: gnu: smithwaterman: Build and install shared library and headers.


From: guix-commits
Subject: 03/09: gnu: smithwaterman: Build and install shared library and headers.
Date: Thu, 27 Aug 2020 11:20:10 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit afa352223f103388ddbc2d7aae82949a561ec4e1
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Aug 27 18:05:20 2020 +0300

    gnu: smithwaterman: Build and install shared library and headers.
    
    * gnu/packages/bioinformatics.scm (smithwaterman)[arguments]: Add custom
    phase to build PIE objects. Add custom 'build-dynamic phase to build
    dynamic library. Adjust custom 'install phase to install shared library
    and headers.
---
 gnu/packages/bioinformatics.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 5377867..49122aa 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -15454,12 +15454,29 @@ some of the details of opening and jumping in 
tabix-indexed files.")
          #:phases
          (modify-phases %standard-phases
            (delete 'configure) ; There is no configure phase.
+           (add-after 'unpack 'patch-source
+             (lambda _
+               (substitute* "Makefile"
+                 (("-c ") "-c -fPIC "))
+               #t))
+           (add-after 'build 'build-dynamic
+             (lambda _
+               (invoke "g++"
+                       "-shared" "-o" "libsmithwaterman.so"
+                       "smithwaterman.o" "SmithWatermanGotoh.o"
+                       "disorder.o" "BandedSmithWaterman.o"
+                       "LeftAlign.o" "Repeats.o" "IndelAllele.o")))
            (replace 'install
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
                       (bin (string-append out "/bin"))
                       (lib (string-append out "/lib")))
                  (install-file "smithwaterman" bin)
+                 (for-each
+                   (lambda (file)
+                     (install-file file (string-append out 
"/include/smithwaterman")))
+                   (find-files "." "\\.h$"))
+                 (install-file "libsmithwaterman.so" lib)
                  (install-file "libsw.a" lib))
                #t)))))
       (home-page "https://github.com/ekg/smithwaterman";)



reply via email to

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