all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 61148@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#61148] [PATCH 2/5] gnu: tabixpp: Update to 1.1.2.
Date: Sun, 29 Jan 2023 15:12:35 +0200	[thread overview]
Message-ID: <29b7080a94dbfdc13c890742a4fabcf1d731617c.1674997469.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1674997469.git.efraim@flashner.co.il>

* gnu/packages/bioinformatics.scm (tabixpp): Update to 1.1.2.
[source]: Add snippet to keep library name the same.
[arguments]: Adjust the make-flags to find htslib. Enable the tests.
Remove custom 'build-libraries phase, it is built by default now. Add a
phase to symlink the shared library to a generic .so name. Don't
override the 'install phase. Add a phase after 'install to create a
pkg-config file.
---
 gnu/packages/bioinformatics.scm | 60 ++++++++++++++++++---------------
 1 file changed, 33 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 5cea726f8e..fa0a6c0dd6 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2015, 2016, 2018, 2019, 2020 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016, 2020, 2021 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2016, 2018 Raoul Bonnal <ilpuccio.febo@gmail.com>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -15640,7 +15640,7 @@ (define-public tbsp
 (define-public tabixpp
   (package
    (name "tabixpp")
-   (version "1.1.0")
+   (version "1.1.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
@@ -15648,43 +15648,47 @@ (define-public tabixpp
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
-              (base32 "1k2a3vbq96ic4lw72iwp5s3mwwc4xhdffjj584yn6l9637q9j1yd"))
+              (base32 "00aqs147yn8zcvxims5njwxqsbnlbjv7lnmiwqy80bfdcbhljkqf"))
              (modules '((guix build utils)))
              (snippet
               #~(begin
-                  (delete-file-recursively "htslib")))))
+                  (delete-file-recursively "htslib")
+                  ;; Keep it named tabixpp.
+                  (substitute* "Makefile"
+                    (("libtabix") "libtabixpp"))))))
    (build-system gnu-build-system)
-   (inputs
-    (list bzip2 htslib xz zlib))
    (arguments
     (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
                                (string-append "CXX=" #$(cxx-for-target))
+                               (string-append "AR=" #$(ar-for-target))
                                "HTS_HEADERS="
-                               (string-append "HTS_LIB="
-                                              (search-input-file %build-inputs
-                                                                 "/lib/libhts.a"))
-                               "INCLUDES=")
-          #:tests? #f ; There are no tests to run.
+                               "HTS_LIB="
+                               (string-append
+                                 "INCLUDES= -I"
+                                 (search-input-directory %build-inputs
+                                                         "include/htslib"))
+                               (string-append
+                                 "LIBPATH= -L. -L"
+                                 (dirname
+                                   (search-input-file %build-inputs
+                                                      "/lib/libhts.a")))
+                               (string-append "PREFIX=" #$output)
+                               "DESTDIR=")
+          #:test-target "test"
           #:phases
           #~(modify-phases %standard-phases
               (delete 'configure) ; There is no configure phase.
-              ;; Build shared and static libraries.
-              (add-after 'build 'build-libraries
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (invoke #$(cxx-for-target)
-                          "-shared" "-o" "libtabixpp.so" "tabix.o" "-lhts")
-                  (invoke #$(ar-for-target) "rcs" "libtabixpp.a" "tabix.o")))
-              (replace 'install
+              (add-after 'install 'symlink-shared-library
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (with-directory-excursion
+                    (string-append (assoc-ref outputs "out") "/lib")
+                    (symlink "libtabixpp.so.1" "libtabixpp.so"))))
+              (add-after 'install 'make-pkg-config-file
                 (lambda* (#:key outputs #:allow-other-keys)
                   (let* ((out (assoc-ref outputs "out"))
-                         (lib (string-append out "/lib"))
-                         (bin (string-append out "/bin")))
-                    (install-file "tabix++" bin)
-                    (install-file "libtabixpp.so" lib)
-                    (install-file "libtabixpp.a" lib)
-                    (install-file "tabix.hpp" (string-append out "/include"))
-                    (mkdir-p (string-append lib "/pkgconfig"))
-                    (with-output-to-file (string-append lib "/pkgconfig/tabixpp.pc")
+                         (pkgconfig (string-append out "/lib/pkgconfig")))
+                    (mkdir-p pkgconfig)
+                    (with-output-to-file (string-append pkgconfig "/tabixpp.pc")
                       (lambda _
                         (format #t "prefix=~a~@
                           exec_prefix=${prefix}~@
@@ -15692,12 +15696,14 @@ (define-public tabixpp
                           includedir=${prefix}/include~@
                           ~@
                           ~@
-                          Name: libtabixpp~@
+                          Name: tabixpp~@
                           Version: ~a~@
                           Description: C++ wrapper around tabix project~@
                           Libs: -L${libdir} -ltabixpp~@
                           Cflags: -I${includedir}~%"
                                 out #$version)))))))))
+   (inputs
+    (list bzip2 curl htslib xz zlib))
    (home-page "https://github.com/ekg/tabixpp")
    (synopsis "C++ wrapper around tabix project")
    (description "This is a C++ wrapper around the Tabix project which abstracts
-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





  parent reply	other threads:[~2023-01-29 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 13:09 [bug#61148] [PATCH 0/5] Update vcflib Efraim Flashner
2023-01-29 13:12 ` [bug#61148] [PATCH 1/5] gnu: intervaltree: Update to 0.1-1.aa59377 Efraim Flashner
2023-01-29 13:12 ` Efraim Flashner [this message]
2023-01-29 13:12 ` [bug#61148] [PATCH 3/5] gnu: Add wfa2-lib Efraim Flashner
2023-01-29 13:12 ` [bug#61148] [PATCH 4/5] gnu: Add libvcfh Efraim Flashner
2023-01-29 13:12 ` [bug#61148] [PATCH 5/5] gnu: vcflib: Update to 1.0.6 Efraim Flashner
2023-10-27 12:38 ` [bug#61148] [PATCH 0/5] Update vcflib Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29b7080a94dbfdc13c890742a4fabcf1d731617c.1674997469.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=61148@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.