From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aAK8Go9+SGOULgEAbAwnHQ (envelope-from ) for ; Thu, 13 Oct 2022 23:09:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ICXNGo9+SGMXxQAA9RJhRA (envelope-from ) for ; Thu, 13 Oct 2022 23:09:35 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 36B547F93 for ; Thu, 13 Oct 2022 23:09:35 +0200 (CEST) Received: from localhost ([::1]:59114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj5SQ-0007Q0-CN for larch@yhetil.org; Thu, 13 Oct 2022 17:09:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oj5P7-00033t-5G for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36098) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oj5P5-0007VD-AX for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oj5P4-0005nn-WB for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 21:06: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.166569512122153 (code B ref 58261); Thu, 13 Oct 2022 21:06:06 +0000 Received: (at 58261) by debbugs.gnu.org; 13 Oct 2022 21:05:21 +0000 Received: from localhost ([127.0.0.1]:35161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5OL-0005l8-6C for submit@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]:41571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5O0-0005hf-HX for 58261@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0F0F1240027 for <58261@debbugs.gnu.org>; Thu, 13 Oct 2022 23:04:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665695095; bh=wl1BKsrz+eoAxE6R3d/THFqWqbcOoKEVh7637CuoC+o=; h=From:To:Cc:Subject:Date:From; b=kwpZoLM359qko766kDce9cs0K3xTdL7sLMYGDmrKqp+U9VFti2y29qHxdw7uXhQBb FGduoMk5N55pVtjTnWEc6F3Ot1wu/q/ILfohG10A8wRvo6M2KFmKWAvYX9cmftezzq 8Y/4xNmcZG/VKFmhh2irwCKWTajlK4VT/g11MGwgBsEVOfcEMZc53AzZX5ZNLV7PLh 4sXnb2++y82J49qvJlKGdVC5LHFId/cxHmOl+HXFixuILUKi08fgu1qEGmqI/ALbln /9jKwu/r0ucIjGtl98C9jCAa1G2lIGXTySZVognU4NMzXOqky7gfAB8W3+J4HUsAP6 +76Pk2eiPjG3Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpMTy4hKjz6tnG; Thu, 13 Oct 2022 23:04:54 +0200 (CEST) From: David Elsing Date: Thu, 13 Oct 2022 21:04:22 +0000 Message-Id: <20221013210424.993-14-david.elsing@posteo.net> In-Reply-To: <20221007152148.32591-1-david.elsing@posteo.net> References: <20221007152148.32591-1-david.elsing@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665695375; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HTlZTC4f4S2HxwopUy0MOs1FMYmEyebaGpA+yHsa7/U=; b=Bw13ifmhXLeHQnTtvpT/P8kVBbav5llwPpkRH4tR/yPHEXZXQeJ2YHiOSqketMQy6brKJ7 oH5XWsNJT6223h3B40kfBs42AefgRnUizYFSAeW5yKsj9I2LNlKhsLvvfXBJOtNndW1rKO uiM97wI2iUqLrx0z8tRvd2IfjmuGfQ3/D7zGf/MJ+bmGNiz+Pdg7UEDchD4kPUuKrRmuOQ GEIq1ahUC7rlLWQDGBGs/h6g4aZaE4apf2ppcC/r51sGPT5jWkBAgVzpG8DV7atoSRVkVc GOQq3KGaJsje0xxigzpzLCG6ldBrtXOJ2aUgLXy6Ez3AisUOZWPRUBKXkslLKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665695375; a=rsa-sha256; cv=none; b=FzEvLRoOxhQpQZp/xADIP9Ckss3Nevu9XVZoEkWo84ppvWs2WHpXdNSub98fjrk73M15ui x0aPWiETFTx8mVzK+ujOD+APEEOdEi0ZBeWHT0UDibu5AzVc4+Bj4S3Pz4/kZtUsX4az29 n8Z/zDzGZDNL8X3yVg3U3J9sRrE5ZK+uI7PjA6lJ+Zr+xT/sPi8fhTCvq1Yzzqk9OcxqkS Wq0zA9COzxv2dFMEy5Ncz7gyYi4MGabkiQOq9YR4IbAjbuN885CywblYOH4WyDpWkL6e3M 1uozPJzVx2QK6kOQWeABDWsP0wi5X+1eph7P5yeJE3cooTiP94NF1fNolXw3Tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=kwpZoLM3; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=kwpZoLM3; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 36B547F93 X-Spam-Score: 7.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: g91SvI8uhs6K * gnu/packages/chemistry.scm (avalon-toolkit): New variable. --- gnu/packages/chemistry.scm | 96 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index a1c1dbfa1b..82bc3ae29e 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -926,3 +926,99 @@ (define-public yaehmop Orbital Package} contains a program and library for performing extended Hückel calculations and analyzing the results.") (license license:bsd-2))) + +(define-public avalon-toolkit + (package + (name "avalon-toolkit") + (version "1.2.0") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/avalontoolkit/" + "AvalonToolkit_" (substring version 0 3) "/AvalonToolkit_" + version ".source.tar")) + (sha256 + (base32 + "0rnnyy6axs2da7aa4q6l30ldavbk49v6l22llj1adn74h1i67bpv")) + (modules '((guix build utils) (ice-9 ftw))) + (snippet + #~(begin + (delete-file-recursively "../SourceDistribution/java"))))) + (build-system gnu-build-system) + (arguments + (list + ;; There are no intended tests + #:tests? #f + #:phases + #~(let ((programs '("canonizer" "matchtest" "sketch" "smi2mol" "struchk"))) + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'remove-free + (lambda _ + ;; Remove incorrect free of getenv result (patch also in rdkit) + (substitute* "common/reaccsio.c" + (("MyFree.*tempdir.*") "")))) + ;; The makefile has incorrect compiler flags and is missing some + ;; object files, so we build it ourselves. + (replace 'build + (lambda _ + (chdir "common") + (let* ((parts + (list + "aacheck" "casutils" "denormal" "depictutil" "didepict" + "fixcharges" "forio" "geometry" "graph" "hashcode" + "layout" "local" "pattern" "perceive" "reaccsio" + "rtutils" "set" "shortcut" "sketch" "ssmatch" "stereo" + "symbol_lists" "symboltable" "utilities")) + (objects (map (lambda (name) (string-append name ".o")) + parts))) + (for-each + (lambda (name) + (display (string-append "Compiling " name ".c\n")) + (invoke "gcc" "-c" "-fPIC" "-O2" + (string-append name ".c") + "-o" (string-append name ".o"))) + parts) + (display "Building shared library\n") + (apply invoke "gcc" "-fPIC" "-shared" "-lm" + "-o" "libavalontoolkit.so" "canonizer.c" "smi2mol.c" + "struchk.c" "patclean.c" objects) + ;; patclean is not built here as there is an undeclared + ;; variable in main(). + (for-each + (lambda (program) + (display (string-append "Building " program "\n")) + (invoke "gcc" "-L." "-lavalontoolkit" "-lm" "-O2" + (string-append "-Wl,-rpath=" #$output "/lib") + "-DMAIN" (string-append program ".c") "-o" program)) + programs)))) + (replace 'install + (lambda _ + ;; Executables + (for-each + (lambda (program) + (install-file program (string-append #$output "/bin"))) + programs) + (for-each + (lambda (name) + (symlink (string-append #$output "/bin/smi2mol") + (string-append #$output "/bin/" name))) + '("mol2smi" "rdf2smi" "mol2tbl" "mol2sma" "smi2rdf")) + ;; Library + (install-file "libavalontoolkit.so" + (string-append #$output "/lib")) + (for-each + (lambda (file) + (install-file file (string-append #$output + "/include/avalontoolkit"))) + (find-files "." "\\.h$")) + (install-file "../license.txt" + (string-append #$output "/share/doc/" + #$name "-" #$version "/")))))))) + (home-page "https://sourceforge.net/projects/avalontoolkit/") + (synopsis "Tools for SMILES and MOL files and for structure fingerprinting") + (description "This package contains a library and programs for +canonicalization of SMILES and MOL files, molecular structure fingerprinting +and rendering molecules.") + (license license:bsd-3))) -- 2.37.0