[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit.
From: |
David Elsing |
Subject: |
[bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit. |
Date: |
Thu, 13 Oct 2022 21:04:22 +0000 |
* 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
- [bug#58261] [PATCH v3 02/15] gnu: Add pocketfft-cpp., (continued)
- [bug#58261] [PATCH v3 02/15] gnu: Add pocketfft-cpp., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 01/15] gnu: Add fast-float., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 06/15] gnu: Add optionparser., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 05/15] gnu: Add tinydir., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 03/15] gnu: Add sajson., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 04/15] gnu: Add cbehave., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 07/15] gnu: Add sajson-for-gemmi., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 14/15] gnu: Add ringdecomposerlib., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 09/15] gnu: Add freesasa., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 12/15] gnu: Add yaehmop., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit.,
David Elsing <=
- [bug#58261] [PATCH v3 15/15] gnu: Add rdkit., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 08/15] gnu: Add gemmi., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 11/15] gnu: Add coordgenlibs., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 10/15] gnu: Add maeparser., David Elsing, 2022/10/13
- [bug#58261] [PATCH v2 01/13] gnu: Add fast-float., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 05/13] gnu: Add optionparser., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 08/13] gnu: Add maeparser., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 09/13] gnu: Add coordgenlibs., David Elsing, 2022/10/07