From patchwork Sun Jan 29 13:12:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 46513 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7EE4D27BBEB; Sun, 29 Jan 2023 13:13:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EDDC427BBE9 for ; Sun, 29 Jan 2023 13:13:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pM7UW-00037F-Ew; Sun, 29 Jan 2023 08:13:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pM7UV-00035J-8n for guix-patches@gnu.org; Sun, 29 Jan 2023 08:13:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pM7UV-0007jb-0l for guix-patches@gnu.org; Sun, 29 Jan 2023 08:13:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pM7UU-0003Zq-TD for guix-patches@gnu.org; Sun, 29 Jan 2023 08:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61148] [PATCH 2/5] gnu: tabixpp: Update to 1.1.2. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Jan 2023 13:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61148 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61148@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 61148-submit@debbugs.gnu.org id=B61148.167499797513709 (code B ref 61148); Sun, 29 Jan 2023 13:13:02 +0000 Received: (at 61148) by debbugs.gnu.org; 29 Jan 2023 13:12:55 +0000 Received: from localhost ([127.0.0.1]:42427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM7UN-0003Z2-0x for submit@debbugs.gnu.org; Sun, 29 Jan 2023 08:12:55 -0500 Received: from mail-ej1-f49.google.com ([209.85.218.49]:34451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pM7UH-0003YF-Nr for 61148@debbugs.gnu.org; Sun, 29 Jan 2023 08:12:51 -0500 Received: by mail-ej1-f49.google.com with SMTP id k4so19463895eje.1 for <61148@debbugs.gnu.org>; Sun, 29 Jan 2023 05:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=1PCUhE/L0M2H2dena0RELGjSYOKbvsFFB/n1rVIN0Dk=; b=CmtEBItJNxtIRamsPWVO4tGfbskXd/gJJ74MERBd9De2oFVCob4864nag2xc14kgcn cOOWa4wicKrB0eYEzoNp45O4p0Dh6WnfbUpA27PuJB7WlDOGaNfBQzr/qOIzHmJR9nSY HrCSZTiQhHl7BiCjn788ncRaBzjBGepQB/cpflRYrQqLz/V1TNdGIONkwNfFRjBMB91T 15s2Xqf1RyJJbeSyGvri1vQ9PId6YCy9a8/WxT4GY2XOL9a+I8foIWj+5mtEu591Wauh eoQqoEY34GYzj0btXSymUoC26UNhypi6j+I862JMjqN74A4zpXc2ys3DPyKPyPtxokcu m6zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=1PCUhE/L0M2H2dena0RELGjSYOKbvsFFB/n1rVIN0Dk=; b=a/pEWyuEFx0oeT/mt0VHauCvuhsg1PWZpKiPquZ/iplyEVwGU2fOSi3QKBNYZnQgWN JBBmxPun8g+Z01ynzO0mI1LXm8A3RMomPv3rvl48x4ZgjI1CgEa2X8HltDPUYiJpuTqA udy6y3/KcWKUFMc8qzsAKt6PmpAneSPmX3JC/dC8uIwHtC0B60sRgXfin7OrL8ya3ath +Cdzi1qYEBGtO8bXksxJ/9RwP6Ki9BRpOK+PSThhEpXcWTr45onN8OpSedxH3d9Q/kkn yvEM5VNfzMGgFmCfEG4vF0IagCBpZc1eVVdzgjfaQk2M03e75v4VgI8MENWrpRm5Y9jV /wKQ== X-Gm-Message-State: AO0yUKWdKcdIo9JN0WQeQQhhaseDIk3rlBVLzUzhEXuiFpFPDaEcJQB7 1sQzewor7qb6sO4Xwd1mC8eGTWt1ULsX+g== X-Google-Smtp-Source: AK7set97CuT3g56W/01ftZ+48zYLgZnhXeSerTTOqIk1GioU/QgbWKPeMdDnScIKJwUuzIBToGQy3g== X-Received: by 2002:a17:906:9d18:b0:860:5723:a5e5 with SMTP id fn24-20020a1709069d1800b008605723a5e5mr8190663ejc.69.1674997963866; Sun, 29 Jan 2023 05:12:43 -0800 (PST) Received: from localhost ([141.226.15.115]) by smtp.gmail.com with ESMTPSA id lj17-20020a170906f9d100b00888161349e0sm390679ejb.183.2023.01.29.05.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Jan 2023 05:12:43 -0800 (PST) From: Efraim Flashner Date: Sun, 29 Jan 2023 15:12:35 +0200 Message-Id: <29b7080a94dbfdc13c890742a4fabcf1d731617c.1674997469.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2016, 2020, 2021 Roel Janssen -;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner +;;; Copyright © 2016-2023 Efraim Flashner ;;; Copyright © 2016, 2020, 2022 Marius Bakke ;;; Copyright © 2016, 2018 Raoul Bonnal ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice @@ -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