From patchwork Sun Mar 30 22:06:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 41041 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 BC41727BBE9; Sun, 30 Mar 2025 23:09:12 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 13DE427BBE2 for ; Sun, 30 Mar 2025 23:09:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tz0q3-0000kN-1d; Sun, 30 Mar 2025 18:09:07 -0400 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 1tz0py-0000jU-Io for guix-patches@gnu.org; Sun, 30 Mar 2025 18:09:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tz0py-0006cP-AL for guix-patches@gnu.org; Sun, 30 Mar 2025 18:09:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=OMSMU891Aoh63Izi2faPBpafesuBPRnJSv1gbZDisGI=; b=oX6SKFOMa0+RgZ4K1zqJxyAADWttXPelfG4hWH49iwt66bMsQlsOm3EgZ0+cVwIhIiXqSqF8mjesr1rqb3kSsSsiZhrqdxMPs3q6SPv8JFNp/Pcblrl7YtXJki63dVBl5m8nWWP9+/5jUZ7AonX/D2Oz5eHnW0wgiAYZLujQcx0SErc407Q1hQracDW4Z1g0U4Uo1kAuENGIWH18e6+OptX5Y72cRqu/3aJjb00DAEFRJOAJsNiRJKgzwq4hzIKuB2BYbN3QCc8slJvAtTBYk0LolfvXXSZlDL96+nfeI2GaNcZLk4DksunuW3gJBwdz5LOFSkcaruJ7j7XkZTZvhA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tz0px-00019y-QX for guix-patches@gnu.org; Sun, 30 Mar 2025 18:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77394] [PATCH 1/5] gnu: inchi: Update to 1.07.3. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 Mar 2025 22:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77394@debbugs.gnu.org Cc: David Elsing Received: via spool by 77394-submit@debbugs.gnu.org id=B77394.17433725004268 (code B ref 77394); Sun, 30 Mar 2025 22:09:01 +0000 Received: (at 77394) by debbugs.gnu.org; 30 Mar 2025 22:08:20 +0000 Received: from localhost ([127.0.0.1]:38348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tz0pH-00016j-Ur for submit@debbugs.gnu.org; Sun, 30 Mar 2025 18:08:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41271) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tz0pE-00015z-FJ for 77394@debbugs.gnu.org; Sun, 30 Mar 2025 18:08:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 112F6240101 for <77394@debbugs.gnu.org>; Mon, 31 Mar 2025 00:08:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1743372489; bh=mJhwDmJNKORS4dC6UmFDRh5ke2e5wkDhG9D2A6rd9QE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=Jzq14Hb2Ts9lL+e6iRfzah4mJCTQadg9q2UBk2E/nDPkKzO3Nkn4ZSNEHGIKH/mbp w7vpneLVX4C4nGnOoEtyZnRe4xncmVeykXZCWO28WtE72xQ7YRWpeb5xyIpEIq+MgO pYPTibZYubBaE6jzMubN3O9D0NE+tXRPtlwUuY8VYlmrvKx4sG2Q+6mEOmNtKko/0u rJYQXE9EqcPbdMxp7ToNwrqzBdKeQGY+y7zf1vvaeUdWsIsEA9jNgvRsa5YE+u+6Od QFc+InZh8RaOudVmfvF90h9+a3YZ3GcTqsuqdWj3ks9x08tbsVIfbKp6gXMpa+MfDz lUXtrsn/7IPYw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ZQpL04MWDz6v0K; Mon, 31 Mar 2025 00:08:08 +0200 (CEST) From: David Elsing Date: Sun, 30 Mar 2025 22:06:54 +0000 Message-ID: <20250330220745.25337-1-david.elsing@posteo.net> In-Reply-To: <20250330220421.24480-1-david.elsing@posteo.net> References: <20250330220421.24480-1-david.elsing@posteo.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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chemistry.scm (inchi): Update to 1.07.3. [source]: Switch to git-fetch. [arguments]: Use gexps. Adjust chdir-to-build-directory, build and install phases. Enable parallel building. [native-inputs]: Remove input label. [license]: Change to Expat license. --- gnu/packages/chemistry.scm | 122 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 63 deletions(-) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index bd27bfad7a..df5048d22e 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -146,68 +146,66 @@ (define-public inchi (package (name "inchi") ;; Update the inchi-doc native input when updating inchi. - (version "1.06") - (source (origin - (method url-fetch) - (uri (string-append "https://www.inchi-trust.org/download/" - (string-join (string-split version #\.) "") - "/INCHI-1-SRC.zip")) - (sha256 - (base32 - "1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28")) - (file-name (string-append name "-" version ".zip")))) + (version "1.07.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/IUPAC-InChI/InChI") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0r32f6i5d8ir96ic3nvqb5lywxrznwrkk6hnz1q0a4bgsw5pmk0n")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "INCHI-1-BIN")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no check target - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-before 'build 'chdir-to-build-directory - (lambda _ (chdir "INCHI_EXE/inchi-1/gcc") #t)) - (add-after 'build 'build-library - (lambda _ - (chdir "../../../INCHI_API/libinchi/gcc") - (invoke "make"))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (doc (string-append out "/share/doc/inchi")) - (include-dir (string-append out "/include/inchi")) - (lib (string-append out "/lib/inchi")) - (inchi-doc (assoc-ref inputs "inchi-doc")) - (unzip (search-input-file inputs "/bin/unzip"))) - (chdir "../../..") - ;; Install binary. - (with-directory-excursion "INCHI_EXE/bin/Linux" - (rename-file "inchi-1" "inchi") - (install-file "inchi" bin)) - ;; Install libraries. - (with-directory-excursion "INCHI_API/bin/Linux" - (for-each (lambda (file) - (install-file file lib)) - (find-files "." "libinchi\\.so\\.1\\.*"))) - ;; Install header files. - (with-directory-excursion "INCHI_BASE/src" - (for-each (lambda (file) - (install-file file include-dir)) - (find-files "." "\\.h$"))) - ;; Install documentation. - (mkdir-p doc) - (invoke unzip "-j" "-d" doc inchi-doc) - #t)))))) - (native-inputs - `(("unzip" ,unzip) - ("inchi-doc" - ,(origin - (method url-fetch) - (uri (string-append "http://www.inchi-trust.org/download/" - (string-join (string-split version #\.) "") - "/INCHI-1-DOC.zip")) - (sha256 - (base32 - "1kyda09i9p89xfq90ninwi7w13k1w3ljpl4gqdhpfhi5g8fgxx7f")) - (file-name (string-append name "-" version ".zip")))))) + (list + #:tests? #f ; no check target + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-after 'unpack 'chdir-to-build-directory + (lambda _ (chdir "INCHI-1-SRC/INCHI_EXE/inchi-1/gcc"))) + (add-after 'build 'build-library + (lambda* (#:key parallel-build? #:allow-other-keys) + (chdir "../../../INCHI_API/libinchi/gcc") + (invoke "make" "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1")))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((bin (string-append #$output "/bin")) + (doc (string-append #$output "/share/doc/inchi")) + (include-dir (string-append #$output "/include/inchi")) + (lib (string-append #$output "/lib/inchi"))) + (chdir "../../..") + ;; Install binary. + (with-directory-excursion "INCHI_EXE/bin/Linux" + (rename-file "inchi-1" "inchi") + (install-file "inchi" bin)) + ;; Install library. + (with-directory-excursion "INCHI_API/bin/Linux" + (let ((libname (basename + (car + (find-files "." "libinchi\\.so\\.1\\.*"))))) + (install-file libname lib) + (with-directory-excursion lib + (symlink libname "libinchi.so.1") + (symlink "libinchi.so.1" "libinchi.so")))) + ;; Install header files. + (with-directory-excursion "INCHI_BASE/src" + (for-each (lambda (file) + (install-file file include-dir)) + (find-files "." "\\.h$"))) + ;; Install documentation. + (with-directory-excursion "../INCHI-1-DOC" + (for-each + (lambda (file) + (install-file file doc)) + (find-files "." "\\.pdf$"))))))))) + (native-inputs (list unzip)) (home-page "https://www.inchi-trust.org") (synopsis "Utility for manipulating machine-readable chemical structures") (description @@ -216,9 +214,7 @@ (define-public inchi unique to the compound they describe and can encode absolute stereochemistry making chemicals and chemistry machine-readable and discoverable. A simple analogy is that InChI is the bar-code for chemistry and chemical structures.") - (license (license:non-copyleft - "file://LICENCE" - "See LICENCE in the distribution.")))) + (license license:expat))) (define-public libmsym (package