From patchwork Tue Apr 26 12:46:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 38904 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 72F9F27BBEA; Tue, 26 Apr 2022 13:48:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 F3F7C27BBE9 for ; Tue, 26 Apr 2022 13:48:37 +0100 (BST) Received: from localhost ([::1]:49262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njKcP-00087Z-4S for patchwork@mira.cbaines.net; Tue, 26 Apr 2022 08:48:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njKav-0007BA-7A for guix-patches@gnu.org; Tue, 26 Apr 2022 08:47:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njKau-0007VD-BA for guix-patches@gnu.org; Tue, 26 Apr 2022 08:47:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njKau-0004l5-7t for guix-patches@gnu.org; Tue, 26 Apr 2022 08:47:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55125] [PATCH 5/9] gnu: fastahack: Use G-expressions. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Apr 2022 12:47:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55125 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55125@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 55125-submit@debbugs.gnu.org id=B55125.165097721517797 (code B ref 55125); Tue, 26 Apr 2022 12:47:04 +0000 Received: (at 55125) by debbugs.gnu.org; 26 Apr 2022 12:46:55 +0000 Received: from localhost ([127.0.0.1]:37543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njKak-0004cc-Ie for submit@debbugs.gnu.org; Tue, 26 Apr 2022 08:46:54 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:36282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njKac-0004V4-4h for 55125@debbugs.gnu.org; Tue, 26 Apr 2022 08:46:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0FkPZ8GPnrHAKpDs0RM7Bkd07hRZN1tm6anGmR2R9Ow=; b=TKpgJK3FtVqfTua+U3IEykZ+xW AxFvsnmRm80xRrjkvdJPl+FQJ7ydB427P2KQXpHyBzh7eAY3DZhKGsu5C/KcdPhBghauEIFEkjSnh PT6KTlwXiqUr+hHBMWPGQQ4gtiINV4G9m6Xr4V4O+MKW7EBdXePSsAVZE47HGr+CwNppyG1BM5obM n00SawMeBwaerf4EhtCct0BirUBAEnbKqACxbpSucIQ1dUjlWR0pQA99Qi6CUJWYpCX/6Tx0/0rnI LB6VF64Cwr4bbZHRK2XFBU93/TDclBqX3Q7Zp+wjZGI1FaNIBu9oOhLHaU50aPiDbcFxnElKvFv71 w2STqDyA==; Received: from [192.168.2.1] (port=53438 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1njKaa-000HJN-0P; Tue, 26 Apr 2022 18:16:44 +0530 From: Arun Isaac Date: Tue, 26 Apr 2022 18:16:35 +0530 Message-Id: <20220426124639.17159-5-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220426124639.17159-1-arunisaac@systemreboot.net> References: <20220426124639.17159-1-arunisaac@systemreboot.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bioinformatics.scm (fastahack)[arguments]: Rewrite using G-expressions. Do not return #t from custom phases. --- gnu/packages/bioinformatics.scm | 60 ++++++++++++++++----------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7cdbb748ef..699a4eaf47 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14483,36 +14483,35 @@ (define-public fastahack (base32 "0rp1blskhzxf7vbh253ibpxbgl9wwgyzf1wbkxndi08d3j4vcss9")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; Unclear how to run tests: https://github.com/ekg/fastahack/issues/15 - #: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" "libfastahack.so" - "Fasta.o" "FastaHack.o" "split.o" "disorder.o"))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (bin (string-append out "/bin"))) - (mkdir-p (string-append out "/include/fastahack")) - (for-each - (lambda (file) - (install-file file (string-append out "/include/fastahack"))) - (find-files "." "\\.h$")) - (install-file "fastahack" bin) - (install-file "libfastahack.so" lib) - (mkdir-p (string-append lib "/pkgconfig")) - (with-output-to-file (string-append lib "/pkgconfig/fastahack.pc") + (list #:tests? #f ; Unclear how to run tests: https://github.com/ekg/fastahack/issues/15 + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ; There is no configure phase. + (add-after 'unpack 'patch-source (lambda _ - (format #t "prefix=~a~@ + (substitute* "Makefile" + (("-c ") "-c -fPIC ")))) + (add-after 'build 'build-dynamic + (lambda _ + (invoke "g++" + "-shared" "-o" "libfastahack.so" + "Fasta.o" "FastaHack.o" "split.o" "disorder.o"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (bin (string-append out "/bin"))) + (mkdir-p (string-append out "/include/fastahack")) + (for-each + (lambda (file) + (install-file file (string-append out "/include/fastahack"))) + (find-files "." "\\.h$")) + (install-file "fastahack" bin) + (install-file "libfastahack.so" lib) + (mkdir-p (string-append lib "/pkgconfig")) + (with-output-to-file (string-append lib "/pkgconfig/fastahack.pc") + (lambda _ + (format #t "prefix=~a~@ exec_prefix=${prefix}~@ libdir=${exec_prefix}/lib~@ includedir=${prefix}/include/fastahack~@ @@ -14523,8 +14522,7 @@ (define-public fastahack Description: Indexing and sequence extraction from FASTA files~@ Libs: -L${libdir} -lfastahack~@ Cflags: -I${includedir}~%" - out ,version)))) - #t))))) + out #$version))))))))) (home-page "https://github.com/ekg/fastahack") (synopsis "Indexing and sequence extraction from FASTA files") (description "Fastahack is a small application for indexing and