From patchwork Mon Oct 3 00:19:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43123 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 D6CF027BBEB; Mon, 3 Oct 2022 01:50: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 18E8827BBE9 for ; Mon, 3 Oct 2022 01:50:37 +0100 (BST) Received: from localhost ([::1]:57336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fH-0000a9-75 for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0007qX-23 for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Cg-0001xY-IT for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Cg-00073r-4z for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 01/11] gnu: Add fast-float. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641026937 (code B ref 58261); Mon, 03 Oct 2022 00:21:02 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:10 +0000 Received: from localhost ([127.0.0.1]:48349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bq-00070G-Aw for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bn-0006zf-0Z for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7C18B240038 for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756401; bh=oH+kFWRQRZKQx+zU2Fdt/VrHx0Tw8g5mFPuuqFgiR24=; h=From:To:Cc:Subject:Date:From; b=HbOIeOB8pWwrT0LReLryp3+ZuZE7r6h31uq/R1DoK8csFmMCkOaylSE6Vxfoc1bWK ypWDezJby1Y8EH/kb9VHxbWtZstG1ASjVuju/L1oVMWlk7nJ6SQGIMtpXiqeoRDlPQ wyWEaOtQ0KSZe4FA3Q8KLNF1MiO+13pFSrlnSLdAfv3MrZ1ah1PnAxvm4bjz0Ph6b1 StXfTxa/+3sBcXTqgHPIfo1ofac16VjAvr89qsbnfJRoO4rKBStx8QNYuST53G4Rdm RjAYCTCE2PY7R/ETQDAcK3saklDrto0LHJFGJFV5HaA/gXKElVptuLt91yegyhGDyo hiC9ZeOHbmfxg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghL9063Wz9rxD; Mon, 3 Oct 2022 02:20:00 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:46 +0000 Message-Id: <36cffcc5a0f65b1ed2f8fe34efd31a8d08a56d55.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (fast-float): New variable. --- gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index d03e0bc7e1..e597dba40c 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2022 muradm ;;; Copyright © 2022 Attila Lendvai ;;; Copyright © 2022 Arun Isaac +;;; Copyright © 2022 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -1907,3 +1908,26 @@ (define-public cpp-mustache templated string type for compatibility with any STL-like string (std::string, std::wstring, etc).") (license license:boost1.0))) + +(define-public fast-float + (package + (name "fast-float") + (version "3.5.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastfloat/fast_float") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g")))) + (build-system cmake-build-system) + (arguments + ;; Tests require downloading a lot of additional data + (list #:tests? #f)) + (home-page "https://github.com/fastfloat/fast_float") + (synopsis "Fast and exact implementation of the C++ from_chars functions") + (description "@code{fast_float} is a header-only C++ library which provides fast +implementations of the from_chars functions for float and double types.") + (license (list license:asl2.0 license:expat)))) ; dual licensed From patchwork Mon Oct 3 00:19:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43121 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 7061C27BBF0; Mon, 3 Oct 2022 01:50:37 +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 19F4E27BBEA for ; Mon, 3 Oct 2022 01:50:37 +0100 (BST) Received: from localhost ([::1]:57340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fI-0000aE-9G for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:50:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0007qv-1l for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Cg-0001xd-Of for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Cg-00073z-J9 for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 02/11] gnu: Add pocketfft. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641226959 (code B ref 58261); Mon, 03 Oct 2022 00:21:02 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:12 +0000 Received: from localhost ([127.0.0.1]:48355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Br-00070e-Q4 for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:12 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bp-0006zz-U8 for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6E43C24010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756404; bh=fDIjIL5s7XJX8nqp+OIJNwhaGMwowMFqrmbmu1WCrm8=; h=From:To:Cc:Subject:Date:From; b=ODQQbJ7ei2a5v8M2XCeKMBzyLUsDT4Qp5sJCVDX+clTFhLVLnrgIARzqEefQ27qDI 1YTiFcH4nTJUFiLbHqed2i/tN/VaiHxwEbhN+N0tbW5gYnAQnFrdrJKmHHxwU+UdVC yNsp+72MZNyNoACiNKOCmOc2k7XRkMg22kDCD98tIe6DqaYIdiZYE/LLgZczgz1Xjv LHISPNC5JbfINffMgqlFXN4JvP+gFNTlpb5coQNNU7N/DO0IcCcU59TTQWZ7HyiIg4 Tkj/wtRDMMlGPeSYe6p2RoJ/jxLEtc5MbwqCK4EsSARM39jMYkjyUj0m7Hwcno7EhC cxhgJXrPuGE1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLD0Ktwz9rxD; Mon, 3 Oct 2022 02:20:04 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:47 +0000 Message-Id: <885c4723f72f54c6789d62d3b67576a891e85074.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (pocketfft): New variable. --- gnu/packages/cpp.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index e597dba40c..65df317100 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1931,3 +1931,29 @@ (define-public fast-float (description "@code{fast_float} is a header-only C++ library which provides fast implementations of the from_chars functions for float and double types.") (license (list license:asl2.0 license:expat)))) ; dual licensed + +(define-public pocketfft + (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3") (revision "0")) + (package + (name "pocketfft") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mreineck/pocketfft") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan + #~'(("pocketfft_hdronly.h" "include/")))) + (home-page "https://github.com/mreineck/pocketfft") + (synopsis "Heavily modified implementation of FFTPack in C++") + (description "This package contains the single-header PocketFFT library, +which is an reimplementation of FFTPack with several advantages, such as +multidimensional algorithms, different datatypes and vector instructions.") + (license license:bsd-3)))) From patchwork Mon Oct 3 00:19:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43122 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 CDDF027BBEA; Mon, 3 Oct 2022 01:50: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 3B8B627BBEB for ; Mon, 3 Oct 2022 01:50:37 +0100 (BST) Received: from localhost ([::1]:57338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fH-0000aA-2r for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0007rU-GN for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0001xp-8M for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ch-000746-3a for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 03/11] gnu: Add sajson. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641526986 (code B ref 58261); Mon, 03 Oct 2022 00:21:03 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:15 +0000 Received: from localhost ([127.0.0.1]:48361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bu-00070z-4h for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:15 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bq-000701-Nv for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4041024010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756405; bh=pz3UNBUEOR2A/kAGkjDDR9+zVAKKXw/KuEG3w8IjnhU=; h=From:To:Cc:Subject:Date:From; b=Nav2pEWB6o/5hi4DgkINpgjV+b52udpYO42cOH+4g+2oTeV9T9B02EULpCJneWOuw RzYWhiFK663WjlGDeLB+PuEl19h86PPBdelYK3Hszj7RWiG0pDkigoj5NmySkp8onh R4ii0ORbPwPecsgIpOWidXXmz52390iNfZ3HtZa7hKlwLQdFFXggSkQme+dVQ0vS+6 z4L/QDDq6IYSCLRHIEafrTGA0vCKsVmPxK9Wf3iy40PRasdyipDetTpSpSDUruCkfu yDcCgL9YGFUXGehe1VnXXSmd4m/F5fE7Lrc+FAhS6IPu4+PNk3q2AygEMP7sp4jap/ 3wonzgTaxU8XA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLD647Yz6tmX; Mon, 3 Oct 2022 02:20:04 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:48 +0000 Message-Id: <58f8902b3b903cde3a1094fdb888e19ff1cd3ba5.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (sajson): New variable. --- gnu/packages/cpp.scm | 63 +++++++++++++++++++ .../patches/sajson-parse_flags-linking.patch | 45 +++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 gnu/packages/patches/sajson-parse_flags-linking.patch diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 65df317100..7bfa3d6cdf 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -57,6 +57,7 @@ (define-module (gnu packages cpp) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system python) + #:use-module (guix build-system scons) #:use-module (guix modules) #:use-module (guix gexp) #:use-module (gnu packages) @@ -1957,3 +1958,65 @@ (define-public pocketfft which is an reimplementation of FFTPack with several advantages, such as multidimensional algorithms, different datatypes and vector instructions.") (license license:bsd-3)))) + +(define-public sajson + (let ((commit "ec644013e34f9984a3cc9ba568cab97a391db9cd") (revision "0")) + (package + (name "sajson") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/chadaustin/sajson") + (commit commit))) + (file-name (git-file-name name version)) + (patches + (search-patches "sajson-parse_flags-linking.patch")) + (sha256 + (base32 + "0fjag27w7gvkc5pdhq3ad7yc09rabpzahndw1sgsg04ipznidmmq")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "third-party")))) + (build-system scons-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-other-builds + (lambda _ + (substitute* "SConstruct" + (("for name, tools in builds:") + "for name, tools in [('opt', [gcc, opt])]:")) + #t)) + (add-after 'unpack 'use-external-unittest-cpp + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "SConscript" + (("unittestpp_env\\.Library") "_dummy = ") + (("test_env = env.Clone\\(tools=\\[unittestpp, sajson\\]\\)") + (string-append + "test_env = env.Clone(tools=[sajson])\n" + "test_env.Append(CPPPATH='" + (search-input-directory inputs "/include/UnitTest++") + "', LIBPATH='" + (string-append #$(this-package-native-input "unittest-cpp") + "/lib") + "', LIBS=['UnitTest++'])"))) + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "build/opt/test") + (invoke "build/opt/test_unsorted")) + #t)) + (replace 'install + (lambda _ + (let ((out (string-append #$output "/include"))) + (install-file "include/sajson.h" out) + (install-file "include/sajson_ostream.h" out)) + #t))))) + (native-inputs (list unittest-cpp)) + (home-page "https://github.com/chadaustin/sajson") + (synopsis "Lightweight, extremely high-performance JSON parser for C++11") + (description "sajson is a high-performance, in-place JSON parser +header-only library.") + (license license:expat)))) diff --git a/gnu/packages/patches/sajson-parse_flags-linking.patch b/gnu/packages/patches/sajson-parse_flags-linking.patch new file mode 100644 index 0000000000..878706dc79 --- /dev/null +++ b/gnu/packages/patches/sajson-parse_flags-linking.patch @@ -0,0 +1,45 @@ +This patch is from the upstream pull request +https://github.com/chadaustin/sajson/pull/54. +It fixes linking with GCC. + +diff --git a/include/sajson.h b/include/sajson.h +index 8b4e05a..1bd045b 100644 +--- a/include/sajson.h ++++ b/include/sajson.h +@@ -138,12 +138,17 @@ constexpr inline size_t make_element(tag t, size_t value) { + // header. This trick courtesy of Rich Geldreich's Purple JSON parser. + template + struct globals_struct { ++ static const unsigned char parse_flags[256]; ++}; ++typedef globals_struct<> globals; ++ + // clang-format off + + // bit 0 (1) - set if: plain ASCII string character + // bit 1 (2) - set if: whitespace + // bit 4 (0x10) - set if: 0-9 e E . +- constexpr static const uint8_t parse_flags[256] = { ++ template ++ const unsigned char globals_struct::parse_flags[256] = { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, // 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 +@@ -162,15 +167,13 @@ struct globals_struct { + }; + + // clang-format on +-}; +-typedef globals_struct<> globals; + +-constexpr inline bool is_plain_string_character(char c) { ++inline bool is_plain_string_character(char c) { + // return c >= 0x20 && c <= 0x7f && c != 0x22 && c != 0x5c; + return (globals::parse_flags[static_cast(c)] & 1) != 0; + } + +-constexpr inline bool is_whitespace(char c) { ++inline bool is_whitespace(char c) { + // return c == '\r' || c == '\n' || c == '\t' || c == ' '; + return (globals::parse_flags[static_cast(c)] & 2) != 0; + } From patchwork Mon Oct 3 00:19:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43125 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 42D9B27BBF0; Mon, 3 Oct 2022 01:51:09 +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 0D33C27BBEB for ; Mon, 3 Oct 2022 01:51:08 +0100 (BST) Received: from localhost ([::1]:54424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fn-0001EI-6J for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0007sE-0D for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ch-0001xw-Ma for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ch-00074E-Hl for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 04/11] gnu: Add tinydir. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641626999 (code B ref 58261); Mon, 03 Oct 2022 00:21:03 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:16 +0000 Received: from localhost ([127.0.0.1]:48367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bv-00071C-Hi for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Br-000702-H3 for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0C42424010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756406; bh=Q86jFcqeapRFBzeXFYH5IPYv7vqb5jUT9TolKpIlIJE=; h=From:To:Cc:Subject:Date:From; b=GNgzix1OcgiQ9Gmrip0iKo34kd/rSTomayinQkB1L/Eh5oVrIYiQejBI3roLtv3PY TRV9L9YTR9Ck445X19lS44F6lm6We6QWUe9xWuOiImeY0HK/7OAf05ArSkiLEgdHN2 SCV0v04Ii2sVLwWyeshAU1pNhChxaRtd2BK7Pdn4S350kdmWXJuGZZNzIptC2yIWr+ X+DjFrtwshxCQCCKP9VRfIZ274eP0hZ7Dka18O5o1ik+/f88CPZG1mFm9+DdmP1u9Y PWv/l6CitkeXJ6GFNE4FXMg0l+/5DDaJZIj6N7qjOQRTHD33kZb7NsoJ4jWglLZ28P AHGc38wr9KM0A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLF4l1Mz9rxD; Mon, 3 Oct 2022 02:20:05 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:49 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (tinydir): New variable. --- gnu/packages/cpp.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 7bfa3d6cdf..4819f36052 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2020,3 +2020,41 @@ (define-public sajson (description "sajson is a high-performance, in-place JSON parser header-only library.") (license license:expat)))) + +(define-public tinydir + (package + (name "tinydir") + (version "1.2.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cxong/tinydir") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1nprgdfx4i8wzc1idw6chan4fjfa75b5ll8kghdc0q2278pny259")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "tests/cbehave")))) + (build-system cmake-build-system) + (arguments + (list + ;; Tests require cbehave and rlutil + #:tests? #f + #:phases + ;; Build samples instead of tests + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "samples") #t)) + (add-after 'build 'chdir-back + (lambda _ (chdir "..") #t)) + (replace 'install + (lambda _ + (install-file "tinydir.h" (string-append #$output "/include")) + #t))))) + (home-page "https://github.com/cxong/tinydir") + (synopsis "Lightweight, portable and easy to integrate C directory and +file reader") + (description "tinydir is a header-only C library to portably read files +and directories.") + (license license:bsd-2))) From patchwork Mon Oct 3 00:19:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43124 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 45C9D27BBF0; Mon, 3 Oct 2022 01:51:08 +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 A5F4D27BBE9 for ; Mon, 3 Oct 2022 01:51:07 +0100 (BST) Received: from localhost ([::1]:54420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fm-0001DS-LG for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0007se-GF for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0001y2-6E for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ci-00074L-1Z for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 05/11] gnu: Add optionparser. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641727011 (code B ref 58261); Mon, 03 Oct 2022 00:21:04 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:17 +0000 Received: from localhost ([127.0.0.1]:48371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bw-00071Q-BB for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:34411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bs-000704-AV for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CE6E724010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756406; bh=gYnMOh2FiyERh7dOyYlCmlD+UqV1KYV3gyVbsNS0gh4=; h=From:To:Cc:Subject:Date:From; b=LjJAsBqw5Um9KwUr2cKg2D7RjOd1lCVTWSVyOl0h6yiOYkvJSC2Tl1uB681BP92Ht +1wFXaNB3K4raB8mT9Az2vtL6lFQ/arCoN8UtBLkwMWkzgeSIPv9FdR8dNoXKvLTiW Rt4Oel+V/YjbVPMw0ekrOJo7r8VhkVoqUJGFbv8BQPFs3wp+v0J+i5+yz9CF0+J/kv gr5W2IK9HrAVyCiHMt98/yjDRvHj9URu84pO+IB4G3RYcMn0yreQ7yF2TGx7511IIi 7wFHRZk+RkbO8sQJoJ6jx2mqSXlRz1wQT5t+DIDIO3mUW3t/WuRFwQb8rJKpsvjPgc x2cyVZqwPlUdw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLG3JVxz6tmX; Mon, 3 Oct 2022 02:20:06 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:50 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/cpp.scm (optionparser): New variable. --- gnu/packages/cpp.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 4819f36052..b30205109e 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2058,3 +2058,53 @@ (define-public tinydir (description "tinydir is a header-only C library to portably read files and directories.") (license license:bsd-2))) + +(define-public optionparser + (package + (name "optionparser") + (version "1.7") + (source (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/optionparser/optionparser-" + version ".tar.gz")) + (sha256 + (base32 + "04gfxrdzwacaynb8scsz6rr7nh64n6yk6w9dh2qdhrxw4caqr0dk")))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'chdir + (lambda _ (chdir "src") #t)) + (replace 'build + (lambda _ + (invoke "make" "-j" (number->string (parallel-job-count)) + "example_arg" "testparse" "testprintusage" "testodr" + "example") + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (invoke "./example_arg") + (invoke "./testparse") + (invoke "./testprintusage") + (invoke "./testodr") + (invoke "./example")) + (format #t "test suite not run~%")))) + (replace 'install + (lambda _ + (install-file "optionparser.h" (string-append #$output "/include")) + #t)) + (add-after 'install 'chdir-back + (lambda _ (chdir "..") #t))))) + (home-page "https://optionparser.sourceforge.net/") + (synopsis "Header-only C++ library to parse command line options") + (description "The Lean Mean C++ Option Parser handles the program's +command line arguments (argc, argv). It supports the short and long option +formats of getopt(), getopt_long() and getopt_long_only() but has a more +convenient interface.") + (license license:expat))) From patchwork Mon Oct 3 00:19:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43126 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 4E0FE27BBEB; Mon, 3 Oct 2022 01:51:11 +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 31CF327BBEE for ; Mon, 3 Oct 2022 01:51:08 +0100 (BST) Received: from localhost ([::1]:54422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fn-0001Dw-Be for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0007su-Sr for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ci-0001y8-KZ for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ci-00074T-FY for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 06/11] gnu: Add gemmi. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641927031 (code B ref 58261); Mon, 03 Oct 2022 00:21:04 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:19 +0000 Received: from localhost ([127.0.0.1]:48375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9By-00071t-1Y for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:19 -0400 Received: from mout02.posteo.de ([185.67.36.66]:35219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bt-000706-79 for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:14 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B240D24010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756407; bh=lRSMJnHtJuqTH4SAdlPhdJ8sdPy/ZvW08OKyguJU1wI=; h=From:To:Cc:Subject:Date:From; b=cRUoJiXT4Ej6Ozj9IB1sQUuh31BFPM6RQOCrj32NIXi6ISnsCzMqnf0BsJkMafBoH AJAYogQcbv28xaqnVkvn5IZaA8iqJc/Y5p72iTvRpOpfYWUxXOMrBsLC+Kwev8MLmo v/uh8mbZNFdxIvsuNRHLg1ooZ5lAu6M2ShfK3mjszKcqajfZ1dGMaPuRKQglUmK7AG L07gQsBfedD20OnUk6K1gKHef5jfBOFFZOtHsw0Pe292TGwNM/A8tTw1I4GL9dTxAK 8nA10D9DsnDEwLpeUde3qdyc/ybEgYup7ZY5aqHLkp/Y50RDsAE1jB74LJd6uzXx5P SSBRdAvGw+ZeA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLH1xFMz9rxD; Mon, 3 Oct 2022 02:20:07 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:51 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (gemmi): New variable. --- gnu/packages/chemistry.scm | 122 +++++++++++ .../patches/gemmi-fix-sajson-types.patch | 11 + .../sajson-for-gemmi-numbers-as-strings.patch | 195 ++++++++++++++++++ 3 files changed, 328 insertions(+) create mode 100644 gnu/packages/patches/gemmi-fix-sajson-types.patch create mode 100644 gnu/packages/patches/sajson-for-gemmi-numbers-as-strings.patch diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index c517610fe8..f8fd85814f 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 Björn Höfling ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2021 Ricardo Wurmus +;;; Copyright © 2022 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,6 +24,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages chemistry) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) @@ -35,6 +37,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) @@ -50,8 +53,10 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages qt) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) + #:use-module (gnu packages stb) #:use-module (gnu packages xml) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system python)) @@ -566,3 +571,120 @@ (define-public python-pymol used to prepare publication-quality figures, to share interactive results with your colleagues, or to generate pre-rendered animations.") (license license:bsd-3))) + +(define sajson-for-gemmi + (package/inherit sajson + (name "sajson-for-gemmi") + (source (origin + (inherit (package-source sajson)) + (patches (cons + (search-patch + "sajson-for-gemmi-numbers-as-strings.patch") + (origin-patches (package-source sajson)))))) + (build-system copy-build-system) + (arguments + (list + #:install-plan + #~'(("include/sajson.h" "include/") + ("include/sajson_ostream.h" "include/")))))) + +(define-public gemmi + (package + (name "gemmi") + (version "0.5.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/project-gemmi/gemmi") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00km5q726bslrw7xbfwb3f3mrsk19qbimfnl3hvr4wi1y3z8i18a")) + (patches + (search-patches "gemmi-fix-sajson-types.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "include/gemmi/third_party") + (delete-file-recursively "third_party") + #t)))) + (build-system cmake-build-system) + (native-inputs (list optionparser pybind11)) + (propagated-inputs + (list fast-float + pocketfft + sajson-for-gemmi + stb-sprintf + pegtl + tinydir)) + (inputs (list zlib python)) + (outputs '("out" "bin" "python")) + (arguments + (list + #:configure-flags + #~(let* ((python-lib + (string-append + #$output:python "/lib/python" + #$(version-major+minor (package-version python)) + "/site-packages"))) + (list "-DUSE_PYTHON=ON" + (string-append "-DPYTHON_INSTALL_DIR=" python-lib))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-includes + (lambda _ + (substitute* "include/gemmi/sprintf.hpp" + (("") "")) + (substitute* "include/gemmi/dirwalk.hpp" + (("\"third_party/tinydir.h\"") "")) + (substitute* "include/gemmi/cif.hpp" + (("\"third_party/tao/pegtl.hpp\"") "")) + (substitute* "include/gemmi/json.hpp" + (("\"third_party/sajson.h\"") "")) + (substitute* "python/gemmi.cpp" + (("\"gemmi/third_party/tao/pegtl/parse_error.hpp\"") + "")) + (substitute* '("include/gemmi/atof.hpp" + "include/gemmi/numb.hpp") + (("\"third_party/fast_float.h\"") + "")) + (substitute* "include/gemmi/fourier.hpp" + (("\"third_party/pocketfft_hdronly.h\"") + "")) + #t)) + (add-after 'patch-includes 'patch-cif + (lambda _ + (substitute* "include/gemmi/cif.hpp" + (((string-append + "^.*using analyze_t = pegtl::analysis::generic" + ";.*$")) "") + (("TAOCPP_PEGTL_") "TAO_PEGTL_")) + #t)) + (add-after 'unpack 'change-bin-prefix + (lambda _ + (substitute* "CMakeLists.txt" + (("install\\(TARGETS program DESTINATION bin\\)") + (string-append + "install(TARGETS program DESTINATION " + #$output:bin "/bin)"))) + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "../source" + (setenv "PYTHONPATH" "../build") + (invoke "python3" "-m" "unittest" "discover" "-v" + "-s" "tests")))))))) + (home-page "https://gemmi.readthedocs.io/en/latest/") + (synopsis "Macromolecular crystallography library and utilities") + (description "GEMMI is a C++ library for macromolecular crystallography. +It can be used for working with +@enumerate +@item macromolecular models (content of PDB, PDBx/mmCIF and mmJSON files), +@item refinement restraints (CIF files), +@item reflection data (MTZ and mmCIF formats), +@item data on a 3D grid (electron density maps, masks, MRC/CCP4 format) +@item crystallographic symmetry. +@end enumerate") + (license license:mpl2.0))) diff --git a/gnu/packages/patches/gemmi-fix-sajson-types.patch b/gnu/packages/patches/gemmi-fix-sajson-types.patch new file mode 100644 index 0000000000..9633ddac8b --- /dev/null +++ b/gnu/packages/patches/gemmi-fix-sajson-types.patch @@ -0,0 +1,11 @@ +diff -ur a/include/gemmi/json.hpp b/include/gemmi/json.hpp +--- a/include/gemmi/json.hpp ++++ b/include/gemmi/json.hpp +@@ -38,6 +38,7 @@ + + inline std::string as_cif_value(const sajson::value& val) { + switch (val.get_type()) { ++ case sajson::TYPE_INTEGER: + case sajson::TYPE_DOUBLE: + return val.as_string(); + case sajson::TYPE_NULL: diff --git a/gnu/packages/patches/sajson-for-gemmi-numbers-as-strings.patch b/gnu/packages/patches/sajson-for-gemmi-numbers-as-strings.patch new file mode 100644 index 0000000000..6f476b8583 --- /dev/null +++ b/gnu/packages/patches/sajson-for-gemmi-numbers-as-strings.patch @@ -0,0 +1,195 @@ +Patch for gemmi: Keep numbers in JSON file as strings. + +Adapted from this commit of the bundled fork of sajson in gemmi: +https://github.com/project-gemmi/gemmi/commit/fccbca4f6040364ba708613e1429c2251872240d + +diff -ur a/include/sajson.h b/include/sajson.h +--- a/include/sajson.h ++++ b/include/sajson.h +@@ -411,43 +411,6 @@ + }; + } // namespace internal + +-namespace integer_storage { +-enum { word_length = 1 }; +- +-inline int load(const size_t* location) { +- int value; +- memcpy(&value, location, sizeof(value)); +- return value; +-} +- +-inline void store(size_t* location, int value) { +- // NOTE: Most modern compilers optimize away this constant-size +- // memcpy into a single instruction. If any don't, and treat +- // punning through a union as legal, they can be special-cased. +- static_assert( +- sizeof(value) <= sizeof(*location), +- "size_t must not be smaller than int"); +- memcpy(location, &value, sizeof(value)); +-} +-} // namespace integer_storage +- +-namespace double_storage { +-enum { word_length = sizeof(double) / sizeof(size_t) }; +- +-inline double load(const size_t* location) { +- double value; +- memcpy(&value, location, sizeof(double)); +- return value; +-} +- +-inline void store(size_t* location, double value) { +- // NOTE: Most modern compilers optimize away this constant-size +- // memcpy into a single instruction. If any don't, and treat +- // punning through a union as legal, they can be special-cased. +- memcpy(location, &value, sizeof(double)); +-} +-} // namespace double_storage +- + /// Represents a JSON value. First, call get_type() to check its type, + /// which determines which methods are available. + /// +@@ -585,70 +548,10 @@ + return length; + } + +- /// If a numeric value was parsed as a 32-bit integer, returns it. +- /// Only legal if get_type() is TYPE_INTEGER. +- int get_integer_value() const { +- assert_tag(tag::integer); +- return integer_storage::load(payload); +- } +- +- /// If a numeric value was parsed as a double, returns it. +- /// Only legal if get_type() is TYPE_DOUBLE. +- double get_double_value() const { +- assert_tag(tag::double_); +- return double_storage::load(payload); +- } +- +- /// Returns a numeric value as a double-precision float. +- /// Only legal if get_type() is TYPE_INTEGER or TYPE_DOUBLE. +- double get_number_value() const { +- assert_tag_2(tag::integer, tag::double_); +- if (value_tag == tag::integer) { +- return get_integer_value(); +- } else { +- return get_double_value(); +- } +- } +- +- /// Returns true and writes to the output argument if the numeric value +- /// fits in a 53-bit integer. This is useful for timestamps and other +- /// situations where integral values with greater than 32-bit precision +- /// are used, as 64-bit values are not understood by all JSON +- /// implementations or languages. +- /// Returns false if the value is not an integer or not in range. +- /// Only legal if get_type() is TYPE_INTEGER or TYPE_DOUBLE. +- bool get_int53_value(int64_t* out) const { +- // Make sure the output variable is always defined to avoid any +- // possible situation like +- // https://gist.github.com/chadaustin/2c249cb850619ddec05b23ca42cf7a18 +- *out = 0; +- +- assert_tag_2(tag::integer, tag::double_); +- switch (value_tag) { +- case tag::integer: +- *out = get_integer_value(); +- return true; +- case tag::double_: { +- double v = get_double_value(); +- if (v < -(1LL << 53) || v > (1LL << 53)) { +- return false; +- } +- int64_t as_int = static_cast(v); +- if (as_int != v) { +- return false; +- } +- *out = as_int; +- return true; +- } +- default: +- return false; +- } +- } +- + /// Returns the length of the string. + /// Only legal if get_type() is TYPE_STRING. + size_t get_string_length() const { +- assert_tag(tag::string); ++ assert_tag_3(tag::string, tag::integer, tag::double_); + return payload[1] - payload[0]; + } + +@@ -659,7 +562,7 @@ + /// embedded NULs. + /// Only legal if get_type() is TYPE_STRING. + const char* as_cstring() const { +- assert_tag(tag::string); ++ assert_tag_3(tag::string, tag::integer, tag::double_); + return text + payload[0]; + } + +@@ -667,7 +570,7 @@ + /// Returns a string's value as a std::string. + /// Only legal if get_type() is TYPE_STRING. + std::string as_string() const { +- assert_tag(tag::string); ++ assert_tag_3(tag::string, tag::integer, tag::double_); + return std::string(text + payload[0], text + payload[1]); + } + #endif +@@ -690,6 +593,10 @@ + assert(e1 == value_tag || e2 == value_tag); + } + ++ void assert_tag_3(tag e1, tag e2, tag e3) const { ++ assert(e1 == value_tag || e2 == value_tag || e3 == value_tag); ++ } ++ + void assert_in_bounds(size_t i) const { assert(i < get_length()); } + + const tag value_tag; +@@ -2059,6 +1966,8 @@ + std::pair parse_number(char* p) { + using internal::tag; + ++ size_t start = p - input.get_data(); ++ + // Assume 32-bit, two's complement integers. + static constexpr unsigned RISKY = INT_MAX / 10u; + unsigned max_digit_after_risky = INT_MAX % 10u; +@@ -2235,23 +2144,18 @@ + u = 0u - u; + } + } ++ ++ bool success; ++ size_t* out = allocator.reserve(2, &success); ++ if (SAJSON_UNLIKELY(!success)) { ++ return std::make_pair(oom(p, "number"), tag::null); ++ } ++ out[0] = start; ++ out[1] = p - input.get_data(); ++ + if (try_double) { +- bool success; +- size_t* out +- = allocator.reserve(double_storage::word_length, &success); +- if (SAJSON_UNLIKELY(!success)) { +- return std::make_pair(oom(p, "double"), tag::null); +- } +- double_storage::store(out, d); + return std::make_pair(p, tag::double_); + } else { +- bool success; +- size_t* out +- = allocator.reserve(integer_storage::word_length, &success); +- if (SAJSON_UNLIKELY(!success)) { +- return std::make_pair(oom(p, "integer"), tag::null); +- } +- integer_storage::store(out, static_cast(u)); + return std::make_pair(p, tag::integer); + } + } From patchwork Mon Oct 3 00:19:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43131 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 A2F3F27BBEA; Mon, 3 Oct 2022 01:51:24 +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 0CA4827BBE9 for ; Mon, 3 Oct 2022 01:51:24 +0100 (BST) Received: from localhost ([::1]:36510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9g3-0002I8-7X for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ck-0007uN-Lj for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ck-0001yb-D4 for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ck-00074w-8f for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 07/11] gnu: Add freesasa. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475642127061 (code B ref 58261); Mon, 03 Oct 2022 00:21:06 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:21 +0000 Received: from localhost ([127.0.0.1]:48383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9C0-00072I-Aa for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bt-00070D-Uv for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 73EDE240038 for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756408; bh=J+fp/4C7iHaVAeV1RaqmwEYzNn6JEZgZeikOYVzQ6NE=; h=From:To:Cc:Subject:Date:From; b=JBO/hPlDSFUmJ7mbirgkekhoSqeHRxvKgqfuQDDq0uv+aXGD0wI6agXm8GhAIhd80 oGvSkUUGS7WGKfu/JKt8SJnQ6wyWiKEjLoSjNmhZXqAJ14AIrIt7ATK4NCPE1ayLZD M0IwuaTcX0+oPPU28mzFexS8UYelJjEBmd6eGe58UCdItJ65AIrah++HQV7Mr7g38a ICxDsw0DpzF98mS7nzohMKMTxfQSIIs8q+KhxIK0VVvlChu5gmAEzk433M2poWsG31 /WjzaIxOa884BGhclWAO3pu27eA3ubOi22dUIIav5zyOeB6t11cpzCKYdInpMuzLLM StwktcJEXi4oA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLJ0fpFz9rxD; Mon, 3 Oct 2022 02:20:08 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:52 +0000 Message-Id: <254dc3bf26b76bf9fbd2da24c0f11eb6f34bb953.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (freesasa): New variable. --- gnu/packages/chemistry.scm | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index f8fd85814f..223a27a20d 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -34,11 +34,13 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) + #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) #:use-module (gnu packages graphviz) @@ -54,6 +56,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) #:use-module (gnu packages stb) + #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -688,3 +691,81 @@ (define-public gemmi @item crystallographic symmetry. @end enumerate") (license license:mpl2.0))) + +(define-public freesasa + (package + (name "freesasa") + (version "2.1.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mittinatten/freesasa") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "07wdnahf3g355ryaiqvfxd5f4rl54wv8jwxcbn0nia89fqysbv0f")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove C files generated by Flex and Bison + (for-each delete-file + '("src/parser.c" "src/parser.h" + "src/lexer.c" "src/lexer.h")) + #t)))) + (build-system gnu-build-system) + (inputs + (list gemmi json-c libxml2)) + (native-inputs + (list bison flex check autoconf automake pkg-config doxygen perl libtool)) + (outputs '("out" "doc")) + (arguments + (list + #:configure-flags + #~(list "--enable-check" + "--enable-parser-generator" + "CXXFLAGS=-std=c++17" + "--enable-doxygen") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-libc++-linking + (lambda _ + (substitute* "src/Makefile.am" + (("-lc\\+\\+") "")) + #t)) + (add-after 'unpack 'build-shared-library + (lambda _ + (substitute* "src/Makefile.am" + (("lib_LIBRARIES") "lib_LTLIBRARIES") + (("libfreesasa\\.a") "libfreesasa.la") + (("freesasa_LDADD \\+= libfreesasa\\.la" prev) + (string-append prev "\nlibfreesasa_la_LIBADD" + " = -ljson-c ${libxml2_LIBS}\n")) + (("_a_SOURCES") "_la_SOURCES")) + (substitute* "configure.ac" + (("AC_PROG_INSTALL" inst) + (string-append "AM_PROG_LIBTOOL\n" inst))) + (substitute* "tests/Makefile.am" + (("libfreesasa\\.a") "libfreesasa.la")) + #t)) + (add-before 'build 'build-lexer-and-parser + (lambda _ + (with-directory-excursion "src" + (invoke "make" "lexer.h") + (invoke "make" "parser.h")) + #t)) + (add-after 'install 'install-doc + (lambda _ + (copy-recursively + "doc/html" + (string-append #$output:doc "/share/doc/" #$name "-" #$version)) + #t))))) + (home-page "https://freesasa.github.io/") + (synopsis "Library for calculating the solvent accessible surface area +(SASA) of molecules") + (description "FreeSASA is a command line tool and C-library for +calculating solvent accessible surface areas (SASA). By default Lee & +Richards' algorithm is used, but Shrake & Rupley's is also available. Both can +be parameterized to arbitrary precision, and for high resolution versions of +the algorithms, the calculations give identical results.") + (license license:expat))) From patchwork Mon Oct 3 00:19:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43129 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 8487827BBEE; Mon, 3 Oct 2022 01:51:17 +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 DD7A227BBE9 for ; Mon, 3 Oct 2022 01:51:16 +0100 (BST) Received: from localhost ([::1]:36826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fw-0001nw-0C for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Cj-0007tJ-B5 for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49315) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Cj-0001yE-2H for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ci-00074a-UK for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 08/11] gnu: Add maeparser. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475641927038 (code B ref 58261); Mon, 03 Oct 2022 00:21:04 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:19 +0000 Received: from localhost ([127.0.0.1]:48377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bz-00071w-3M for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:19 -0400 Received: from mout01.posteo.de ([185.67.36.65]:34815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bu-00070E-NH for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 38A99240034 for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756409; bh=sGdpBg2OoFF4uYzR2nwqqhN6VeEZ5FYKcX5hojndIRQ=; h=From:To:Cc:Subject:Date:From; b=pSPaL+JKtv0FJudeepGXwYSX2af2yGd0vzT1bvr0+t4JPBrDiBUVZBKjODHfUR9uo nh4tKt1c32tYT1TeF50oYSSWOt4wVoalNs17QL/+aPm25sfMjDqdLUbokMyw+piHUR o1e4lXvV+SxIs8WZqE5iU0y8P1X4GfqOZtwnDFyiQ/GnklWwgH5jzCHL5yNKmKL6pN Xbcr0q06o4SFIK0pxHpbiRAhsbsi/JY4/QSPR4eFyqUUgu44HMZCyzpi9+7oQCU3Pg BQ0VqrFCOEo8ewvazlzQRvlWKDFzJexsBOk6D2FCe0EeBgTprwLa6fDNoCfAoeb4Gb UeURKPRCL6xsQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLJ61Rfz9rxD; Mon, 3 Oct 2022 02:20:08 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:53 +0000 Message-Id: <644d206b9fb0fd074422626f85bfc9f1de8edc70.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (maeparser): New variable. --- gnu/packages/chemistry.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 223a27a20d..4d8ce66230 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -769,3 +769,24 @@ (define-public freesasa be parameterized to arbitrary precision, and for high resolution versions of the algorithms, the calculations give identical results.") (license license:expat))) + +(define-public maeparser + (package + (name "maeparser") + (version "1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/schrodinger/maeparser") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1yv4y5hn49fhylziigsg922bb244lb57p69r7vg9q899zd3l5b7l")))) + (build-system cmake-build-system) + (native-inputs (list boost)) + (inputs (list zlib)) + (home-page "https://github.com/schrodinger/maeparser") + (synopsis "Maestro file parser") + (description "maeparser is a parser for Schrodinger Maestro files.") + (license license:expat))) From patchwork Mon Oct 3 00:19:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43128 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 7696327BBEA; Mon, 3 Oct 2022 01:51:17 +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 E1B0527BBEA for ; Mon, 3 Oct 2022 01:51:16 +0100 (BST) Received: from localhost ([::1]:36822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fv-0001m8-Pf for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Cj-0007tW-Pz for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Cj-0001yK-Hn for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Cj-00074h-Cn for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 09/11] gnu: Add coordgenlibs. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475642027046 (code B ref 58261); Mon, 03 Oct 2022 00:21:05 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:20 +0000 Received: from localhost ([127.0.0.1]:48379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bz-000723-Fb for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:19 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bv-00070H-HQ for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0A461240034 for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756410; bh=Wi3XIZGCXpqwCWUL1rOoBvACS52zhpOMCRULdDB4dvs=; h=From:To:Cc:Subject:Date:From; b=dQU2Mf7REzwEhN5VyATXKm3CfoB+CxXpsLTQ6zzvk6M0gFJp+ocOVo3HMtGsDNYB9 95EcV+G3rXrjA9gtT/nEgQQQBvD723oMz9o7B6cwq90rBgs9cyFRykatIWGRnh52BP 9qimkc9GNl0aahuzduypzIkUead+cZof1JVcNOqD+w82/kFo5whZe/8szFFXBpbWbT OQt0TEQYcIGHg8sfkiWLXoKfq2WhAC+t+k2giPMacml1yXbQhZG/Gqt6pPWnV1xRXs MmrVvpPloDNkBfDxlDmUOxucj76s3uCmA08rzUTFUJl5i7kbZ4QevDoqpCwjF1sAPf P80knaqs8eN9g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLK4W4wz6tmX; Mon, 3 Oct 2022 02:20:09 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:54 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (coordgenlibs): New variable. --- gnu/packages/chemistry.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 4d8ce66230..cc26aa329a 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -790,3 +790,30 @@ (define-public maeparser (synopsis "Maestro file parser") (description "maeparser is a parser for Schrodinger Maestro files.") (license license:expat))) + +(define-public coordgenlibs + (package + (name "coordgenlibs") + (version "3.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/schrodinger/coordgenlibs/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0d09x3v38i9y184bml020bq7xizdrdwng38qmdxlplzfhqkjdidv")))) + (build-system cmake-build-system) + (native-inputs (list boost)) + (inputs (list maeparser)) + (arguments + (list + #:configure-flags + #~(list "-DCOORDGEN_RIGOROUS_BUILD=OFF" + "-DCOORDGEN_USE_MAEPARSER=ON"))) + (home-page "https://github.com/schrodinger/coordgenlibs/") + (synopsis "2D coordinate generation") + (description "@code{coordgenlibs} contains algorithms to generate 2D +coordinates. It has an emphasis on quality rather than speed.") + (license license:bsd-3))) From patchwork Mon Oct 3 00:19:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43130 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 3278327BBE9; Mon, 3 Oct 2022 01:51:18 +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 2459627BBEB for ; Mon, 3 Oct 2022 01:51:17 +0100 (BST) Received: from localhost ([::1]:36824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fw-0001nR-0F for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Ck-0007u0-8U for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ck-0001yR-0M for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Cj-00074p-S0 for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 10/11] gnu: Add yaehmop-tightbind. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475642027053 (code B ref 58261); Mon, 03 Oct 2022 00:21:05 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:20 +0000 Received: from localhost ([127.0.0.1]:48381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bz-00072B-Ro for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9Bw-00070W-9y for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C8B8F24010A for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756410; bh=JXFEynUgVbw+BZqjCMHclQgbR1nHhXHS1ZMiU6a8uIo=; h=From:To:Cc:Subject:Date:From; b=kiOFbXOyYfRNXVqVDDu5lusR0Ue7g76tLmODW1wD3k1S0S2G+s6DKAR7U7cz0cM72 RAUANZoEfrZQGRuu57XRyEL+rCHadf1DS+OaAeXgsWKOzyTngo/OJ4+K+WCeFdvSaE UjBH7SsdVlrwe8cDlVJzQ6R1zbRX6izsnrUUTC1FCbF1J/bwV42c9/AkrwNTVWyE8i ZIeEtRpmkb9S8W3TruclwJ1nVgkctY8BGBtxSQVIfYFiBel2Ja9PlnjIrvwYLoyMBM LTGzgKqxPtCHMQcjhoKjZzekHCXlTtNNrJRoEIO4H2nMdsu0KrHrQrPkx4G+1AW/Dp 2TSI3NCulRcXQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLL327Gz9rxD; Mon, 3 Oct 2022 02:20:10 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:55 +0000 Message-Id: <616241998ff984b1e7c074c0aa89e7187b3cfc72.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (yaehmop-tightbind): New variable. --- gnu/packages/chemistry.scm | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index cc26aa329a..a39deff4bf 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -42,6 +42,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gcc) #:use-module (gnu packages gl) #:use-module (gnu packages graphviz) #:use-module (gnu packages gv) @@ -817,3 +818,84 @@ (define-public coordgenlibs (description "@code{coordgenlibs} contains algorithms to generate 2D coordinates. It has an emphasis on quality rather than speed.") (license license:bsd-3))) + +(define-public yaehmop-tightbind + (package + (name "yaehmop-tightbind") + (version "2022.09.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/greglandrum/yaehmop") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1x0d75m1hgdb411fiv7c5bwq1n4y0swrll0gigh8v5c73kjxrja0")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "docs") + (delete-file-recursively "examples") + (delete-file-recursively "viewkel") + (delete-file-recursively "tightbind/f2c_files") + (delete-file "tightbind/diag.c") + (delete-file "tightbind/cboris.c") + (delete-file "tightbind/abfns.c") + (delete-file "tightbind/lovlap.c") + #t)))) + (build-system cmake-build-system) + (native-inputs (list gfortran)) + (inputs (list openblas)) + (arguments + (list + #:configure-flags + #~(list + "-DUSE_BLAS_LAPACK=ON" + (string-append "-DPARM_FILE_LOC=" #$output + "/share/" #$name "-" #$version "/eht_parms.dat") + "-DBIND_EXE_NAME=yaehmop-bind") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "tightbind") + #t)) + (add-after 'chdir 'patch-fortran-functions + (lambda _ + (substitute* '("mov.c" "prototypes.h") + (("lovlap\\(") "lovlap_(") + (("abfns\\(") "abfns_(")) + #t)) + (add-after 'chdir 'patch-cmake + (lambda _ + (substitute* "CMakeLists.txt" + (("project\\(yaehmop C\\)") "project(yaehmop C Fortran)") + (("abfns.c") "fortran77/abfns.f") + (("lovlap.c") "fortran77/lovlap.f") + (("(set\\(PARM_FILE_LOC.*)\\)" all init) + (string-append init " CACHE STRING \"\")")) + (("add_library\\(yaehmop_eht" lib) + (string-append lib " SHARED ")) + (("target_link_libraries\\(test_eht \\$\\{LAPACK_LIBRARIES\\}.*" + all) + (string-append all "\ntarget_link_libraries(yaehmop_eht " + "${LAPACK_LIBRARIES})\n"))) + #t)) + (add-after 'install 'install-eht-parms + (lambda _ + (install-file "../tightbind/eht_parms.dat" + (string-append #$output "/share/" + #$name "-" #$version)) + #t)) + (delete 'check) + (add-after 'install-eht-parms 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./test_eht")) + #t))))) + (home-page "https://github.com/greglandrum/yaehmop") + (synopsis "Yet Another extended Hueckel Molecular Orbital Package") + (description "@code{YAeHMOP} contains a program and library for performing +extended Hückel calculations.") + (license license:bsd-2))) From patchwork Mon Oct 3 00:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43127 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 AD29C27BBEA; Mon, 3 Oct 2022 01:51:11 +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 03B6827BBE9 for ; Mon, 3 Oct 2022 01:51:09 +0100 (BST) Received: from localhost ([::1]:54418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of9fo-0001Cz-5f for patchwork@mira.cbaines.net; Sun, 02 Oct 2022 20:51:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of9Cl-0007um-5e for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of9Ck-0001yk-SH for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of9Ck-000754-Np for guix-patches@gnu.org; Sun, 02 Oct 2022 20:21:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH 11/11] gnu: Add rdkit. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Oct 2022 00:21:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166475642327074 (code B ref 58261); Mon, 03 Oct 2022 00:21:06 +0000 Received: (at 58261) by debbugs.gnu.org; 3 Oct 2022 00:20:23 +0000 Received: from localhost ([127.0.0.1]:48387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9C2-00072b-JX for submit@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:23 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of9C0-000719-Ib for 58261@debbugs.gnu.org; Sun, 02 Oct 2022 20:20:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F2177240038 for <58261@debbugs.gnu.org>; Mon, 3 Oct 2022 02:20:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664756412; bh=hb9WAlyov2g4eVQJ02XcaPayEJMg0fjb3CF4p6tqTqs=; h=From:To:Cc:Subject:Date:From; b=L2N56gwQQ41vWjOAI6Cg8vOG3S09p11lg9KrvoYgaxIGRP7IZZxFVfbENucpI/rFt 8PETm4oyhXNMjd4awT8LRkge3wQu9m0/Et9c8W7PC8amKvqcEIdXmptUDbGQ59Eigz f/o9+VNDdTzGG+ZQIJ8WYA6pqrjvddA2UKXydNhEYNq9zhhkdIk5f8CaKt6Rp7G7ym KEs5sUTvvYOy93M3otScpDOMZVreojP8GvKeyH3ViOHMyEVKlA02T2Jk4r/o7p+hqa ZBF3JfYo4Qjvtb4+SMf9INo+ii8OccBrWQxyCDHEepQ4HtU0QyEMhax+E0bDw8Va0n swFe+nh80b12A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MghLM3n41z9rxF; Mon, 3 Oct 2022 02:20:11 +0200 (CEST) From: David Elsing Date: Mon, 3 Oct 2022 00:19:56 +0000 Message-Id: <06dceecde661574f95f3a6324285077d0bc6896a.1664725832.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 02 Oct 2022 20:50:23 -0400 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/chemistry.scm (rdkit): New variable. --- gnu/packages/chemistry.scm | 198 ++++++++++++++++++ .../rdkit-cmake-external-dependencies.patch | 102 +++++++++ 2 files changed, 300 insertions(+) create mode 100644 gnu/packages/patches/rdkit-cmake-external-dependencies.patch diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index a39deff4bf..869cf264e3 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -34,6 +34,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) + #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -41,10 +42,12 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) + #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gl) #:use-module (gnu packages graphviz) + #:use-module (gnu packages gtk) #:use-module (gnu packages gv) #:use-module (gnu packages image) #:use-module (gnu packages maths) @@ -56,6 +59,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages qt) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) + #:use-module (gnu packages sqlite) #:use-module (gnu packages stb) #:use-module (gnu packages web) #:use-module (gnu packages xml) @@ -899,3 +903,197 @@ (define-public yaehmop-tightbind (description "@code{YAeHMOP} contains a program and library for performing extended Hückel calculations.") (license license:bsd-2))) + +(define-public rdkit + (package + (name "rdkit") + (version "2022.03.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rdkit/rdkit") + (commit + (string-append + "Release_" (string-replace-substring version "." "_"))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "19idgilabh04cbr1qj6zgrgsfjm248mmfz6fsr0smrd68d0xnml9")) + (patches + (search-patches "rdkit-cmake-external-dependencies.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Remove pickle files (only used in tests), + ;; as they are compiled programs + (for-each + (lambda (name) + (display (string-append name "\n")) + (delete-file name)) + (find-files "." "\\.pkl(\\.gz)?$")) + ;; Remove SQLite data files (can be generated) + (delete-file "Data/RDData.sqlt") + (delete-file "Data/RDTests.sqlt") + #t)))) + (build-system cmake-build-system) + (native-inputs + `(("bison" ,bison) + ("boost" ,boost) + ("catch2" ,catch2) + ("eigen" ,eigen) + ("flex" ,flex) + ("freesasa" ,freesasa) + ("pkg-config" ,pkg-config) + ("rapidjson" ,rapidjson) + ("tar" ,tar) + ("avalontoolkit-src" + ,(let ((version "1.2.0")) + (origin + (method url-fetch) + (uri (string-append + "http://sourceforge.net/projects/avalontoolkit/files/" + "AvalonToolkit_" (substring version 0 3) "/AvalonToolkit_" + version ".source.tar")) + (sha256 + (base32 + "0rnnyy6axs2da7aa4q6l30ldavbk49v6l22llj1adn74h1i67bpv")) + (modules '((guix build utils) (ice-9 ftw) (srfi srfi-26))) + (snippet + #~(begin + (chdir "..") + (delete-file-recursively "StandardFiles") + (delete-file-recursively "SourceDistribution/java") + #t))))) + ("ringdecomposerlib-src" + ,(let ((version "1.1.3")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rareylab/RingDecomposerLib") + (commit (string-append "v" version "_rdkit")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi"))))))) + (inputs + (list cairo + coordgenlibs + font-comic-neue + freetype + inchi + maeparser + python + sqlite + yaehmop-tightbind)) + (propagated-inputs + (list python-numpy python-cairocffi python-pillow)) + (arguments + (list + #:imported-modules (append %cmake-build-system-modules + '((guix build python-build-system))) + #:modules '((guix build cmake-build-system) + (guix build utils) + ((guix build python-build-system) + #:select (add-installed-pythonpath))) + #:configure-flags + #~(list + "-DRDK_BUILD_AVALON_SUPPORT=ON" + "-DRDK_BUILD_CAIRO_SUPPORT=ON" + "-DRDK_BUILD_CPP_TESTS=ON" + "-DRDK_BUILD_FREESASA_SUPPORT=ON" + "-DRDK_BUILD_INCHI_SUPPORT=ON" + "-DRDK_BUILD_YAEHMOP_SUPPORT=ON" + (string-append "-DCATCH_DIR=" + #$(this-package-native-input "catch2") + "/include/catch2") + "-DRDK_INSTALL_DEV_COMPONENT=ON" + "-DRDK_INSTALL_INTREE=OFF" + "-DRDK_INSTALL_STATIC_LIBS=OFF" + (string-append + "-DRDK_OPTIMIZE_POPCNT=" + #$(let ((system (or (%current-target-system) + (%current-system)))) + (cond + ((string-prefix? "x86_64" system) "ON") + ((string-prefix? "i686" system) "ON") + (else "OFF")))) + "-DRDK_USE_BOOST_IOSTREAMS=ON" + "-DRDK_USE_FLEXBISON=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-external-dependencies + (lambda _ + (symlink + (string-append + #$(this-package-input "font-comic-neue") + "/share/fonts/truetype/ComicNeue-Regular.ttf") + "Data/Fonts/ComicNeue-Regular.ttf") + (symlink #$(this-package-native-input "rapidjson") + "External/rapidjson-1.1.0") + (invoke "tar" "xvf" + #$(this-package-native-input "avalontoolkit-src") + "-C" "External/AvalonTools") + (symlink #$(this-package-native-input "ringdecomposerlib-src") + "External/RingFamilies/RingDecomposerLib") + #t)) + (add-after 'copy-external-dependencies 'patch-source + (lambda _ + (with-directory-excursion "External/AvalonTools" + (invoke "patch" "-p0" "-i" + "AvalonToolkit_1.2_patch.txt")) + (substitute* "External/YAeHMOP/EHTTools.cpp" + (("") "")) + #t)) + (add-after 'unpack 'create-sqlite-data-files + (lambda _ + (invoke "sqlite3" "Data/RDData.sqlt" + ".read rdkit/Dbase/test_data/RDData.sqlite") + (invoke "sqlite3" "Data/RDTests.sqlt" + ".read rdkit/Dbase/test_data/RDTests.sqlite") + #t)) + (add-after 'unpack 'fix-inchi-include + (lambda _ + (substitute* "Code/cmake/Modules/FindInchi.cmake" + (("inchi_api.h.*\\)") "inchi/inchi_api.h)") + (("INCHI_LIBRARY NAMES.*\\)") + "INCHI_LIBRARY NAMES inchi PATH_SUFFIXES inchi)") + (("find_library" prev) + (string-append + "list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.1)\n" + prev))) + (substitute* "External/INCHI-API/inchi.cpp" + (("") "")) + #t)) + (add-before 'build 'enable-bytecode-determinism + (lambda _ + (setenv "PYTHONHASHSEED" "0") + (setenv "PYTHONDONTWRITEBYTECODE" "1") + #t)) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs tests? parallel-tests? + #:allow-other-keys) + (when tests? + (let + ((job-count (number->string + (or (and parallel-tests? + (parallel-job-count)) + 1)))) + (setenv "RDBASE" (canonicalize-path "../source")) + (add-installed-pythonpath inputs outputs) + (invoke "ctest" + "-j" job-count + "-E" (string-append + ;; need pickled data + "(pyDiscreteValueVect" "|pySparseIntVect" + "|graphmoltestPickler" "|pyPartialCharges" + "|substructLibraryTest" "|pyFeatures" + "|pythonTestDirML" "|pythonTestDirChem" + ;; Catching Python exception fails + "|pyRanker)")))) + #t))))) + (home-page "https://rdkit.org/") + (synopsis "Open-Source Cheminformatics Software") + (description "RDKit is a collection of cheminformatics and +machine-learning software written in C++ and Python.") + (license license:bsd-3))) diff --git a/gnu/packages/patches/rdkit-cmake-external-dependencies.patch b/gnu/packages/patches/rdkit-cmake-external-dependencies.patch new file mode 100644 index 0000000000..5b73864f51 --- /dev/null +++ b/gnu/packages/patches/rdkit-cmake-external-dependencies.patch @@ -0,0 +1,102 @@ +diff -ur a/External/FreeSASA/CMakeLists.txt b/External/FreeSASA/CMakeLists.txt +--- a/External/FreeSASA/CMakeLists.txt ++++ b/External/FreeSASA/CMakeLists.txt +@@ -10,7 +10,7 @@ + endif() + endif() + +-if(needDownload) ++if(FALSE) + # don't actually use the md5 here + set(FREESASA_VERSION "2.0.3") + set(FREESASA_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/freesasa-${FREESASA_VERSION}") +@@ -66,24 +66,24 @@ + endif() + + set (freesasa_h ${FREESASA_SRC_DIR}/src/freesasa.h) +-file(READ ${freesasa_h} freesasa_h_data) ++#file(READ ${freesasa_h} freesasa_h_data) + string(REGEX REPLACE "(#include )" "\\1\n#include " freesasa_h_data "${freesasa_h_data}") + string(REGEX REPLACE "([^R][^D][^K][^I][^T][^_][^F][^R][^E][^E][^S][^A][^S][^A][^_][^C][^L][^I][^B][^_][^E][^X][^P][^O][^R][^T][^ ])(extern const)" "\\1RDKIT_FREESASA_CLIB_EXPORT \\2" freesasa_h_data "${freesasa_h_data}") +-file(WRITE ${freesasa_h} "${freesasa_h_data}") ++#file(WRITE ${freesasa_h} "${freesasa_h_data}") + + add_definitions(-DUSE_THREADS=0) + add_definitions(-DUSE_JSON=0) + add_definitions(-DUSE_XML=0) +-rdkit_library(freesasa_clib ${freesasa_clib_srcs}) +-target_compile_definitions(freesasa_clib PRIVATE RDKIT_FREESASALIB_BUILD) ++#rdkit_library(freesasa_clib ${freesasa_clib_srcs}) ++#target_compile_definitions(freesasa_clib PRIVATE RDKIT_FREESASALIB_BUILD) + + if((MSVC AND RDK_INSTALL_DLLS_MSVC) OR ((NOT MSVC) AND WIN32)) + set_target_properties(freesasa_clib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() +-include_directories("${FREESASA_SRC_DIR}/src") ++#include_directories("${FREESASA_SRC_DIR}/src") + + rdkit_library(FreeSASALib RDFreeSASA.cpp SHARED +- LINK_LIBRARIES freesasa_clib GraphMol ) ++ LINK_LIBRARIES -lfreesasa GraphMol ) + target_compile_definitions(FreeSASALib PRIVATE RDKIT_FREESASALIB_BUILD) + + rdkit_headers(RDFreeSASA.h DEST GraphMol) +diff -ur a/External/YAeHMOP/CMakeLists.txt b/External/YAeHMOP/CMakeLists.txt +--- a/External/YAeHMOP/CMakeLists.txt ++++ b/External/YAeHMOP/CMakeLists.txt +@@ -18,32 +18,32 @@ + + include_directories( ${RDKit_ExternalDir}/YAeHMOP ) + +-ExternalProject_Add(yaehmop_project +- GIT_REPOSITORY https://github.com/greglandrum/yaehmop.git +- GIT_TAG master +- UPDATE_COMMAND "" +- PATCH_COMMAND "" +- PREFIX ${CMAKE_CURRENT_SOURCE_DIR} +- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop" +- SOURCE_SUBDIR "tightbind" +- CMAKE_ARGS -DUSE_BLAS_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- TEST_COMMAND "") +- +-include_directories(${PROJECT_BINARY_DIR}/include) +-link_directories(${PROJECT_BINARY_DIR}/lib) +-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build) +- +-set(EHT_PARAM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop/tightbind/eht_parms.dat ) +-install(FILES ${EHT_PARAM_FILE} +- DESTINATION ${RDKit_ShareDir}/Data +- COMPONENT data) ++#ExternalProject_Add(yaehmop_project ++# GIT_REPOSITORY https://github.com/greglandrum/yaehmop.git ++# GIT_TAG master ++# UPDATE_COMMAND "" ++# PATCH_COMMAND "" ++# PREFIX ${CMAKE_CURRENT_SOURCE_DIR} ++# SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop" ++# SOURCE_SUBDIR "tightbind" ++# CMAKE_ARGS -DUSE_BLAS_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ++# TEST_COMMAND "") ++ ++#include_directories(${PROJECT_BINARY_DIR}/include) ++#link_directories(${PROJECT_BINARY_DIR}/lib) ++#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build) ++ ++#set(EHT_PARAM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop/tightbind/eht_parms.dat ) ++#install(FILES ${EHT_PARAM_FILE} ++# DESTINATION ${RDKit_ShareDir}/Data ++# COMPONENT data) + +-message("YAeHMOP include_dirs: ${PROJECT_BINARY_DIR}/include") +-message("YAeHMOP link_dirs: ${PROJECT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build") ++#message("YAeHMOP include_dirs: ${PROJECT_BINARY_DIR}/include") ++#message("YAeHMOP link_dirs: ${PROJECT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build") + +-rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES yaehmop_eht GraphMol ) ++rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES -lyaehmop_eht GraphMol ) + target_compile_definitions(EHTLib PRIVATE RDKIT_EHTLIB_BUILD) +-add_dependencies(EHTLib yaehmop_project) ++#add_dependencies(EHTLib yaehmop_project) + rdkit_headers(EHTTools.h DEST GraphMol) + rdkit_catch_test(testEHTLib1 test1.cpp + LINK_LIBRARIES EHTLib FileParsers SmilesParse ) From patchwork Fri Oct 7 15:22:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43201 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 8338127BBEA; Fri, 7 Oct 2022 17:16:33 +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 CBC9C27BBE9 for ; Fri, 7 Oct 2022 17:16:32 +0100 (BST) Received: from localhost ([::1]:50404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogq1X-0001Yl-UR for patchwork@mira.cbaines.net; Fri, 07 Oct 2022 12:16:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpBq-0002ey-W9 for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpBq-0005r4-Nh for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogpBq-0005pC-J5 for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v2 12/13] gnu: Add ringdecomposerlib. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 15:23:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166515616022246 (code B ref 58261); Fri, 07 Oct 2022 15:23:06 +0000 Received: (at 58261) by debbugs.gnu.org; 7 Oct 2022 15:22:40 +0000 Received: from localhost ([127.0.0.1]:37181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBP-0005mk-SS for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:40 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBO-0005lp-0M for 58261@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7418E240104 for <58261@debbugs.gnu.org>; Fri, 7 Oct 2022 17:22:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156152; bh=xvgASLRbXDSfjtdTbobV4JS9ZDc96rJe/74SX55eKkk=; h=From:To:Cc:Subject:Date:From; b=qG4wzsmenGmdG1DPTytmwLNp24CcSd10RZNI4I+HThLBoBpm7O4h5XI8V0cc8AQGU gtPYMqYs04JCiH+CeLq2pJSpMG6JsRmoQfYWA5euZOZCJ1bPeNazaUojS4ERzGrBu3 sfT9IQETHXWX6bVnC5iMCvtpqBs6FE+IgDShACC4vN3dj0ukWujKwFgjK/VZFknHIZ 5namZvqreklsK+TAaWT+7I1FNffZNtJ5Z3zStUj6/lso8+q21lE9xLqQs2KcXIZ2gr R7fSreNpOBhJ58UhUTGVxORK7txpg5MLtMZFxwt50vjLcil9hTr1a+qKcpZ7Xav18G z0ThcYqlXtcJg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkX9g6zBGz9rxP; Fri, 7 Oct 2022 17:22:31 +0200 (CEST) From: David Elsing Date: Fri, 7 Oct 2022 15:22:25 +0000 Message-Id: <20221007152226.362-1-david.elsing@posteo.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chemistry.scm (ringdecomposerlib): New variable. --- gnu/packages/chemistry.scm | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index e52dd2f3b6..43953238cd 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -1021,3 +1021,83 @@ (define-public avalontoolkit canonicalization of SMILES and MOL files, molecular structure fingerprinting and rendering molecules.") (license license:bsd-3))) + +(define-public ringdecomposerlib + (package + (name "ringdecomposerlib") + (version "1.1.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rareylab/RingDecomposerLib") + (commit (string-append "v" version "_rdkit")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DBUILD_PYTHON_WRAPPER=ON" + "-DPYTHON_EXECUTABLE=python3" + (string-append "-DPYTHON_FLAGS=;--prefix=" #$output ";--root=/")) + #:imported-modules (append %cmake-build-system-modules + '((guix build python-build-system))) + #:modules '((guix build cmake-build-system) + (guix build utils) + ((guix build python-build-system) + #:select (add-installed-pythonpath))) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'patch-cmake + (lambda _ + (substitute* (list "src/Test/CMakeLists.txt" + "src/RingDecomposerLib/CMakeLists.txt") + (("build_.*STATIC") "#")) + (substitute* "test/CMakeLists.txt" + (("STATIC_TEST") "SHARED_TEST")) + ;; Link Python library against shared library + (substitute* "src/python/CMakeLists.txt" + (("RingDecomposerLibStatic") "RingDecomposerLib")) + (substitute* "src/python/setup.py.in" + (("static_libs =.*") "static_libs = []\n") + (("shared_libs\\s*=.*") + (string-append + "shared_libs = ['RingDecomposerLib']")) + (("library_dirs\\s*=\\s*\\[\\]") + "library_dirs = ['${CMAKE_BINARY_DIR}/src/RingDecomposerLib']") + (("extra_objects=.*") + (string-append "extra_link_args=['-Wl,-rpath=" #$output "/lib'],\n"))))) + (add-after 'build 'build-doc + (lambda _ + ;; Disable redundant LaTeX documentation + (substitute* "../source/documentation/sphinx/conf.py" + (("^(subprocess.*latex|shutil).*") "")) + (substitute* "../source/documentation/doxygen.cfg" + (("GENERATE_LATEX.*YES") "GENERATE_LATEX = NO")) + ;; Build HTML documentation + (invoke "sphinx-build" "-b" "html" + "../source/documentation/sphinx" "html"))) + (add-after 'install 'install-doc + (lambda _ + ;; Not reproducible + (delete-file-recursively "html/.doctrees") + (copy-recursively "html" + (string-append #$output "/share/doc/" + #$name "-" #$version "/html")))) + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check)) + (add-before 'check 'set-pythonpath + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs)))))) + (inputs (list python)) + (native-inputs (list doxygen python python-cython python-sphinx)) + (home-page "https://github.com/rareylab/RingDecomposerLib") + (synopsis "Library for calculating ring topology descriptions such as +unique ring families") + (description "ringdecomposerlib is a library for the calculation of +unique ring families, relevant cycles, the smallest set of smallest rings and +other ring topology descriptions.") + (license license:bsd-3))) From patchwork Fri Oct 7 15:22:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43197 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 5642527BBEA; Fri, 7 Oct 2022 17:03:49 +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 5455D27BBE9 for ; Fri, 7 Oct 2022 17:03:48 +0100 (BST) Received: from localhost ([::1]:46060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogppD-0000TK-Fy for patchwork@mira.cbaines.net; Fri, 07 Oct 2022 12:03:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpBr-0002g2-Ix for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpBr-0005rB-67 for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogpBr-0005pJ-1f for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v2 13/13] gnu: Add rdkit. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 15:23:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166515616522263 (code B ref 58261); Fri, 07 Oct 2022 15:23:07 +0000 Received: (at 58261) by debbugs.gnu.org; 7 Oct 2022 15:22:45 +0000 Received: from localhost ([127.0.0.1]:37184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBU-0005n1-Cr for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:53329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBS-0005mM-8n for 58261@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:43 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B50B1240028 for <58261@debbugs.gnu.org>; Fri, 7 Oct 2022 17:22:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156156; bh=UO0TEB24lbPfq5qh5fHxSQUZxOutbmYY9XFml3nPFg0=; h=From:To:Cc:Subject:Date:From; b=c/haFPVSCprujF/carsC0xml/jjtN9CgVdpjo5MJ0Q0tD4QCB/BgI/Cm3UVlyh7jl 1Or0o67cp/Q0KTEnQwNmfqCBE+ExiYEkWHKylKM6AXNgb2nyg949AX48DTQs1blpvY +N1dlIgFWPRkT/ZhLpluEKqDn93OtOWamI81vw2KqJckfz6DkBdOnRLKOQjerLdWt2 Oxjc5Gtxe5MmfsBKOVlh6X6c/oD3+PKghEh7+UtWAONtv2uyKIwGQx49+9r1vSbEjr zfq0TXRt3L6Z7ZhZNA8q+IakfM9OnEItyLjcKtd9IUj7POgbIllpW6sYsqnbSB9kgp DcTFCfGmVvMEQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkX9m1Ff1z9rxP; Fri, 7 Oct 2022 17:22:36 +0200 (CEST) From: David Elsing Date: Fri, 7 Oct 2022 15:22:26 +0000 Message-Id: <20221007152226.362-2-david.elsing@posteo.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chemistry.scm (rdkit): New variable. --- gnu/packages/chemistry.scm | 178 ++++++++++++++++++ .../rdkit-cmake-external-dependencies.patch | 102 ++++++++++ 2 files changed, 280 insertions(+) create mode 100644 gnu/packages/patches/rdkit-cmake-external-dependencies.patch diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 43953238cd..4b34a38797 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -34,6 +34,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) + #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -41,10 +42,12 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) + #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gl) #:use-module (gnu packages graphviz) + #:use-module (gnu packages gtk) #:use-module (gnu packages gv) #:use-module (gnu packages image) #:use-module (gnu packages maths) @@ -56,6 +59,7 @@ (define-module (gnu packages chemistry) #:use-module (gnu packages qt) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) + #:use-module (gnu packages sqlite) #:use-module (gnu packages stb) #:use-module (gnu packages tex) #:use-module (gnu packages web) @@ -1101,3 +1105,177 @@ (define-public ringdecomposerlib unique ring families, relevant cycles, the smallest set of smallest rings and other ring topology descriptions.") (license license:bsd-3))) + +(define-public rdkit + (package + (name "rdkit") + (version "2022.03.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rdkit/rdkit") + (commit + (string-append + "Release_" (string-replace-substring version "." "_"))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "19idgilabh04cbr1qj6zgrgsfjm248mmfz6fsr0smrd68d0xnml9")) + (patches + (search-patches "rdkit-cmake-external-dependencies.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Remove pickle files (only used in tests), + ;; as they are compiled programs + (for-each + (lambda (name) + (display (string-append name "\n")) + (delete-file name)) + (find-files "." "\\.pkl(\\.gz)?$")) + ;; Remove SQLite data files (can be generated) + (delete-file "Data/RDData.sqlt") + (delete-file "Data/RDTests.sqlt"))))) + (build-system cmake-build-system) + (arguments + (list + #:imported-modules (append %cmake-build-system-modules + '((guix build python-build-system))) + #:modules '((guix build cmake-build-system) + (guix build utils) + ((guix build python-build-system) + #:select (add-installed-pythonpath))) + #:configure-flags + #~(list + "-DRDK_BUILD_AVALON_SUPPORT=ON" + "-DRDK_BUILD_CAIRO_SUPPORT=ON" + "-DRDK_BUILD_CPP_TESTS=ON" + "-DRDK_BUILD_FREESASA_SUPPORT=ON" + "-DRDK_BUILD_INCHI_SUPPORT=ON" + "-DRDK_BUILD_YAEHMOP_SUPPORT=ON" + (string-append "-DCATCH_DIR=" + #$(this-package-native-input "catch2") + "/include/catch2") + "-DRDK_INSTALL_DEV_COMPONENT=ON" + "-DRDK_INSTALL_INTREE=OFF" + "-DRDK_INSTALL_STATIC_LIBS=OFF" + (string-append + "-DRDK_OPTIMIZE_POPCNT=" + #$(let ((system (or (%current-target-system) + (%current-system)))) + (cond + ((string-prefix? "x86_64" system) "ON") + ((string-prefix? "i686" system) "ON") + (else "OFF")))) + "-DRDK_USE_BOOST_IOSTREAMS=ON" + "-DRDK_USE_FLEXBISON=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-external-dependencies + (lambda _ + (symlink + (string-append + #$(this-package-input "font-comic-neue") + "/share/fonts/truetype/ComicNeue-Regular.ttf") + "Data/Fonts/ComicNeue-Regular.ttf"))) + (add-after 'copy-external-dependencies 'patch-source + (lambda _ + (substitute* "External/AvalonTools/CMakeLists.txt" + (("^if\\(NOT RDK_BUILD" orig) + (string-append "if(0)\n" orig)) + (("include_directories.*AVALON_SRC_PATH.*") + (string-append "endif()\ninclude_directories(" + #$avalontoolkit "/include/avalontoolkit)\n")) + (("LINK_LIBRARIES avalon_clib") + (string-append + "LINK_LIBRARIES -L" #$avalontoolkit "/lib -lavalontoolkit"))) + (let ((port + (open-file "External/RingFamilies/dummy.cpp" "w"))) + (display "" port) + (close port)) + (let ((port + (open-file "External/RingFamilies/CMakeLists.txt" "w"))) + (display (string-append + "rdkit_library(RingDecomposerLib dummy.cpp SHARED" + " LINK_LIBRARIES -lRingDecomposerLib)\n" + "set(RDK_URF_LIBS RingDecomposerLib CACHE STRING \"\" FORCE)\n") + port) + (close port)) + (substitute* "Code/GraphMol/MolInterchange/CMakeLists.txt" + (("if\\(NOT" orig) + (string-append "if(0)\n" orig)) + (("^include_directories.*") "endif()\n")) + (substitute* "External/YAeHMOP/EHTTools.cpp" + (("") "")))) + (add-after 'unpack 'fix-inchi-include + (lambda _ + (substitute* "Code/cmake/Modules/FindInchi.cmake" + (("inchi_api.h.*\\)") "inchi/inchi_api.h)") + (("INCHI_LIBRARY NAMES.*\\)") + "INCHI_LIBRARY NAMES inchi PATH_SUFFIXES inchi)") + (("find_library" prev) + (string-append + "list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.1)\n" + prev))) + (substitute* "External/INCHI-API/inchi.cpp" + (("") "")))) + (add-before 'build 'enable-bytecode-determinism + (lambda _ + (setenv "PYTHONHASHSEED" "0") + (setenv "PYTHONDONTWRITEBYTECODE" "1"))) + (add-after 'install 'pre-check + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion "../source" + (invoke "sqlite3" "Data/RDData.sqlt" + ".read rdkit/Dbase/test_data/RDData.sqlite") + (invoke "sqlite3" "Data/RDTests.sqlt" + ".read rdkit/Dbase/test_data/RDTests.sqlite") + (setenv "RDBASE" (canonicalize-path "."))) + (add-installed-pythonpath inputs outputs))) + (delete 'check) + (add-after 'pre-check 'check + (lambda* (#:key tests? parallel-tests? #:allow-other-keys) + (when tests? + (let ((job-count (number->string + (if parallel-tests? (parallel-job-count) 1)))) + (invoke + "ctest" "-j" job-count + "-E" (string-append + "(" (string-join + '(;; need pickled data + "(pyDiscreteValueVect" "pySparseIntVect" + "graphmoltestPickler" "pyPartialCharges" + "substructLibraryTest" "pyFeatures" + "pythonTestDirML" "pythonTestDirChem" + ;; Catching Python exception fails + "pyRanker)") "|") ")"))))))))) + (native-inputs + (list bison + boost + catch2 + eigen + flex + freesasa + pkg-config + rapidjson + tar)) + (inputs + (list avalontoolkit + cairo + coordgenlibs + font-comic-neue + freetype + inchi + maeparser + python + ringdecomposerlib + sqlite + yaehmop)) + (propagated-inputs + (list python-numpy python-cairocffi python-pillow)) + (home-page "https://rdkit.org/") + (synopsis "Collection of cheminformatics software") + (description "RDKit is a C++ and Python library for cheminformatics, which +includes (among other things) the analysis and modification of molecules in 2D +and 3D and descriptor generation for machine learning.") + (license license:bsd-3))) diff --git a/gnu/packages/patches/rdkit-cmake-external-dependencies.patch b/gnu/packages/patches/rdkit-cmake-external-dependencies.patch new file mode 100644 index 0000000000..5b73864f51 --- /dev/null +++ b/gnu/packages/patches/rdkit-cmake-external-dependencies.patch @@ -0,0 +1,102 @@ +diff -ur a/External/FreeSASA/CMakeLists.txt b/External/FreeSASA/CMakeLists.txt +--- a/External/FreeSASA/CMakeLists.txt ++++ b/External/FreeSASA/CMakeLists.txt +@@ -10,7 +10,7 @@ + endif() + endif() + +-if(needDownload) ++if(FALSE) + # don't actually use the md5 here + set(FREESASA_VERSION "2.0.3") + set(FREESASA_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/freesasa-${FREESASA_VERSION}") +@@ -66,24 +66,24 @@ + endif() + + set (freesasa_h ${FREESASA_SRC_DIR}/src/freesasa.h) +-file(READ ${freesasa_h} freesasa_h_data) ++#file(READ ${freesasa_h} freesasa_h_data) + string(REGEX REPLACE "(#include )" "\\1\n#include " freesasa_h_data "${freesasa_h_data}") + string(REGEX REPLACE "([^R][^D][^K][^I][^T][^_][^F][^R][^E][^E][^S][^A][^S][^A][^_][^C][^L][^I][^B][^_][^E][^X][^P][^O][^R][^T][^ ])(extern const)" "\\1RDKIT_FREESASA_CLIB_EXPORT \\2" freesasa_h_data "${freesasa_h_data}") +-file(WRITE ${freesasa_h} "${freesasa_h_data}") ++#file(WRITE ${freesasa_h} "${freesasa_h_data}") + + add_definitions(-DUSE_THREADS=0) + add_definitions(-DUSE_JSON=0) + add_definitions(-DUSE_XML=0) +-rdkit_library(freesasa_clib ${freesasa_clib_srcs}) +-target_compile_definitions(freesasa_clib PRIVATE RDKIT_FREESASALIB_BUILD) ++#rdkit_library(freesasa_clib ${freesasa_clib_srcs}) ++#target_compile_definitions(freesasa_clib PRIVATE RDKIT_FREESASALIB_BUILD) + + if((MSVC AND RDK_INSTALL_DLLS_MSVC) OR ((NOT MSVC) AND WIN32)) + set_target_properties(freesasa_clib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() +-include_directories("${FREESASA_SRC_DIR}/src") ++#include_directories("${FREESASA_SRC_DIR}/src") + + rdkit_library(FreeSASALib RDFreeSASA.cpp SHARED +- LINK_LIBRARIES freesasa_clib GraphMol ) ++ LINK_LIBRARIES -lfreesasa GraphMol ) + target_compile_definitions(FreeSASALib PRIVATE RDKIT_FREESASALIB_BUILD) + + rdkit_headers(RDFreeSASA.h DEST GraphMol) +diff -ur a/External/YAeHMOP/CMakeLists.txt b/External/YAeHMOP/CMakeLists.txt +--- a/External/YAeHMOP/CMakeLists.txt ++++ b/External/YAeHMOP/CMakeLists.txt +@@ -18,32 +18,32 @@ + + include_directories( ${RDKit_ExternalDir}/YAeHMOP ) + +-ExternalProject_Add(yaehmop_project +- GIT_REPOSITORY https://github.com/greglandrum/yaehmop.git +- GIT_TAG master +- UPDATE_COMMAND "" +- PATCH_COMMAND "" +- PREFIX ${CMAKE_CURRENT_SOURCE_DIR} +- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop" +- SOURCE_SUBDIR "tightbind" +- CMAKE_ARGS -DUSE_BLAS_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +- TEST_COMMAND "") +- +-include_directories(${PROJECT_BINARY_DIR}/include) +-link_directories(${PROJECT_BINARY_DIR}/lib) +-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build) +- +-set(EHT_PARAM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop/tightbind/eht_parms.dat ) +-install(FILES ${EHT_PARAM_FILE} +- DESTINATION ${RDKit_ShareDir}/Data +- COMPONENT data) ++#ExternalProject_Add(yaehmop_project ++# GIT_REPOSITORY https://github.com/greglandrum/yaehmop.git ++# GIT_TAG master ++# UPDATE_COMMAND "" ++# PATCH_COMMAND "" ++# PREFIX ${CMAKE_CURRENT_SOURCE_DIR} ++# SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop" ++# SOURCE_SUBDIR "tightbind" ++# CMAKE_ARGS -DUSE_BLAS_LAPACK=OFF -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ++# TEST_COMMAND "") ++ ++#include_directories(${PROJECT_BINARY_DIR}/include) ++#link_directories(${PROJECT_BINARY_DIR}/lib) ++#link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build) ++ ++#set(EHT_PARAM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop/tightbind/eht_parms.dat ) ++#install(FILES ${EHT_PARAM_FILE} ++# DESTINATION ${RDKit_ShareDir}/Data ++# COMPONENT data) + +-message("YAeHMOP include_dirs: ${PROJECT_BINARY_DIR}/include") +-message("YAeHMOP link_dirs: ${PROJECT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build") ++#message("YAeHMOP include_dirs: ${PROJECT_BINARY_DIR}/include") ++#message("YAeHMOP link_dirs: ${PROJECT_BINARY_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src/yaehmop_project-build") + +-rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES yaehmop_eht GraphMol ) ++rdkit_library(EHTLib EHTTools.cpp SHARED LINK_LIBRARIES -lyaehmop_eht GraphMol ) + target_compile_definitions(EHTLib PRIVATE RDKIT_EHTLIB_BUILD) +-add_dependencies(EHTLib yaehmop_project) ++#add_dependencies(EHTLib yaehmop_project) + rdkit_headers(EHTTools.h DEST GraphMol) + rdkit_catch_test(testEHTLib1 test1.cpp + LINK_LIBRARIES EHTLib FileParsers SmilesParse )