GNU bug report logs - #68790
[PATCH 0/9] Update rdkit and its dependencies

Previous Next

Package: guix-patches;

Reported by: David Elsing <david.elsing <at> posteo.net>

Date: Sun, 28 Jan 2024 23:01:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68790 in the body.
You can then email your comments to 68790 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Elsing <david.elsing <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 28 Jan 2024 23:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 0/9] Update rdkit and its dependencies
Date: Sun, 28 Jan 2024 22:59:20 +0000
This patch series updates rdkit and some of its dependencies.

I incorporated the patch from [1], which was addressed upstream, but is
not in a new release yet.

It seems like RDKit is only tested on 64 bit systems upstream and
several tests fail on i686 (including one due to a known bug in
Boost.Python [2]), therefore I set supported-systems to
%64bit-supported-systems.

Avalon Toolkit moved to a new repository [3], which was forked for RDKit
[4]. As the changes in the fork are small and only fixes, I put them in
a patch and use [3] as upstream.

[1] https://issues.guix.gnu.org/64559
[2] https://github.com/boostorg/python/issues/312
[3] https://github.com/rohdebe1/ava-formake
[4] https://github.com/rdkit/ava-formake

David Elsing (9):
  gnu: tinydir: Update to 1.2.6.
  gnu: fast-float: Update to 6.0.0.
  gnu: gemmi: Update to 0.6.4.
  gnu: maeparser: Update to 1.3.1.
  gnu: coordgenlibs: Update to 3.0.2.
  gnu: yaehmop: Update to 2023.03.1.
  gnu: avalon-toolkit: Update to 2.0.5a.
  gnu: freesasa: Fix memerr tests.
  gnu: rdkit: Update to 2023.09.4.

 gnu/local.mk                                  |   2 +
 gnu/packages/c.scm                            |   6 +-
 gnu/packages/chemistry.scm                    | 175 +++++++--------
 gnu/packages/cpp.scm                          |  10 +-
 .../patches/avalon-toolkit-rdkit-fixes.patch  | 110 +++++++++
 ...rdkit-unbundle-external-dependencies.patch | 208 ++++++++++--------
 .../patches/tinydir-fix-cbehave-test.patch    |  16 +-
 7 files changed, 330 insertions(+), 197 deletions(-)
 create mode 100644 gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch

-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 1/9] gnu: tinydir: Update to 1.2.6.
Date: Sun, 28 Jan 2024 23:01:54 +0000
* gnu/packages/c.scm (tinydir): Update to 1.2.6.
* gnu/packages/patches/tinydir-fix-cbehave-test.patch: Adjust patch.
---
 gnu/packages/c.scm                               |  6 +++---
 .../patches/tinydir-fix-cbehave-test.patch       | 16 ++++++++++++++--
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 1346605c71..b558145ea0 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -20,7 +20,7 @@
 ;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
 ;;; Copyright © 2023 zamfofex <zamfofex <at> twdb.moe>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello <at> foundationdevices.com>
-;;; Copyright © 2023 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2023, 2024 David Elsing <david.elsing <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1349,7 +1349,7 @@ (define target-machine #$(and=> (%current-target-system)
 (define-public tinydir
   (package
     (name "tinydir")
-    (version "1.2.5")
+    (version "1.2.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1358,7 +1358,7 @@ (define-public tinydir
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1nprgdfx4i8wzc1idw6chan4fjfa75b5ll8kghdc0q2278pny259"))
+                "143n6yabznxk032gv5g2k8glf0kzicarg9cx0714zsbfmzj8lr07"))
               (patches (search-patches "tinydir-fix-cbehave-test.patch"))
               (modules '((guix build utils)))
               (snippet '(delete-file-recursively "tests/cbehave"))))
diff --git a/gnu/packages/patches/tinydir-fix-cbehave-test.patch b/gnu/packages/patches/tinydir-fix-cbehave-test.patch
index 84ecee12c2..1cad42c7a0 100644
--- a/gnu/packages/patches/tinydir-fix-cbehave-test.patch
+++ b/gnu/packages/patches/tinydir-fix-cbehave-test.patch
@@ -2,10 +2,22 @@ Make test work with upstream cbehave
 (tinydir bundles a modified version)
 
 diff --git a/tests/file_open_test.c b/tests/file_open_test.c
-index 3e659bc..9f6f88d 100644
+index 09b856e..92b13ca 100644
 --- a/tests/file_open_test.c
 +++ b/tests/file_open_test.c
-@@ -19,4 +19,7 @@ FEATURE(file_open, "File open")
+@@ -4,6 +4,11 @@
+ #include "cbehave.h"
+ #include "util.h"
+ 
++#define ASSERT(cond, ret) \
++if (!(cond)) {\
++    cbehave_feature_return(__FILE__, __LINE__, ret, _state); \
++    goto _feature_over; \
++}\
+ 
+ FEATURE(file_open, "File open")
+ 	SCENARIO("Open file in current directory")
+@@ -34,4 +39,7 @@ FEATURE(file_open, "File open")
  	SCENARIO_END
  FEATURE_END
  
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 2/9] gnu: fast-float: Update to 6.0.0.
Date: Sun, 28 Jan 2024 23:01:55 +0000
* gnu/packages/cpp.scm (fast-float): Update to 6.0.0.
[arguments]: Adjust path to test files.
---
 gnu/packages/cpp.scm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 44175231af..71c170a48b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,7 +29,7 @@
 ;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;; Copyright © 2022 Attila Lendvai <attila <at> lendvai.name>
 ;;; Copyright © 2022 Arun Isaac <arunisaac <at> systemreboot.net>
-;;; Copyright © 2022, 2023 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing <at> posteo.net>
 ;;; Copyright © 2022, 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Antero Mejr <antero <at> mailbox.org>
@@ -2449,7 +2449,7 @@ (define fast-float-test-files
 (define-public fast-float
   (package
     (name "fast-float")
-    (version "3.5.1")
+    (version "6.0.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2458,7 +2458,7 @@ (define-public fast-float
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
+                "1xf4gbllha760cr0ri53zsja46dypj45lj070ijb5f78xavfd8f8"))))
     (build-system cmake-build-system)
     (arguments
      (list
@@ -2474,9 +2474,7 @@ (define-public fast-float
                 (("if\\(NOT supplemental_test_files_POPULATED.*")
                  (string-append
                   "set(supplemental_test_files_BINARY_DIR "
-                  (search-input-directory (or native-inputs inputs)
-                                          "data")
-                  ")\nif(0)\n"))))))))
+                  #$fast-float-test-files ")\nif(0)\n"))))))))
     (native-inputs (list doctest fast-float-test-files))
     (home-page "https://github.com/fastfloat/fast_float")
     (synopsis "Floating point number parser for C++")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 3/9] gnu: gemmi: Update to 0.6.4.
Date: Sun, 28 Jan 2024 23:01:56 +0000
* gnu/packages/chemistry.scm (gemmi): Update to 0.6.4.
[arguments]: Adjust include/gemmi/sprintf.hpp -> src/sprintf.cpp.
(freesasa)[arguments]: Link to gemmi_cpp explicitly.
---
 gnu/packages/chemistry.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index df96a2f5c1..5129470e1e 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -589,7 +589,7 @@ (define-public python-pymol
 (define-public gemmi
   (package
     (name "gemmi")
-    (version "0.5.7")
+    (version "0.6.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -598,7 +598,7 @@ (define-public gemmi
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "00km5q726bslrw7xbfwb3f3mrsk19qbimfnl3hvr4wi1y3z8i18a"))
+                "0wciqqswc4p4v4kglfv36gnvyyimqn4lnywdzd0pgrjn443i860y"))
               (patches
                (search-patches "gemmi-fix-sajson-types.patch"
                                "gemmi-fix-pegtl-usage.patch"))
@@ -625,7 +625,7 @@ (define-public gemmi
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-includes
             (lambda _
-              (substitute* (list "include/gemmi/sprintf.hpp"
+              (substitute* (list "src/sprintf.cpp"
                                  "include/gemmi/dirwalk.hpp"
                                  "include/gemmi/cif.hpp"
                                  "include/gemmi/json.hpp"
@@ -722,7 +722,7 @@ (define-public freesasa
                 (("libfreesasa\\.a") "libfreesasa.la")
                 (("freesasa_LDADD \\+= libfreesasa\\.la" prev)
                  (string-append prev "\nlibfreesasa_la_LIBADD"
-                                " = -ljson-c ${libxml2_LIBS}\n"))
+                                " = -ljson-c -lgemmi_cpp ${libxml2_LIBS}\n"))
                 (("_a_SOURCES") "_la_SOURCES"))
               (substitute* "configure.ac"
                 (("AC_PROG_INSTALL" inst)
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:03:03 GMT) Full text and rfc822 format available.

Message #17 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 4/9] gnu: maeparser: Update to 1.3.1.
Date: Sun, 28 Jan 2024 23:01:57 +0000
* gnu/packages/chemistry.scm (maeparser): Update to 1.3.1.
---
 gnu/packages/chemistry.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 5129470e1e..9086d659cc 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -765,7 +765,7 @@ (define-public freesasa
 (define-public maeparser
   (package
     (name "maeparser")
-    (version "1.3.0")
+    (version "1.3.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -774,7 +774,7 @@ (define-public maeparser
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1yv4y5hn49fhylziigsg922bb244lb57p69r7vg9q899zd3l5b7l"))))
+                "0mr5glg4br04ql5grby8yqni9fqq1l1cc75wyc159a1b9lwr7q7r"))))
     (build-system cmake-build-system)
     (inputs (list boost zlib))
     (home-page "https://github.com/schrodinger/maeparser")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:03:03 GMT) Full text and rfc822 format available.

Message #20 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 6/9] gnu: yaehmop: Update to 2023.03.1.
Date: Sun, 28 Jan 2024 23:01:59 +0000
* gnu/packages/chemistry.scm (yaehmop): Update to 2023.03.1.
---
 gnu/packages/chemistry.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 44833d9c3f..4a9dd97c5b 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -812,7 +812,7 @@ (define-public coordgenlibs
 (define-public yaehmop
   (package
     (name "yaehmop")
-    (version "2022.09.1")
+    (version "2023.03.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -821,7 +821,7 @@ (define-public yaehmop
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1x0d75m1hgdb411fiv7c5bwq1n4y0swrll0gigh8v5c73kjxrja0"))
+                "18xnxqn8i7vswy3iffapfh9q2iimpnd23ps45hn4xxbs6dqgzprb"))
               (modules '((guix build utils)))
               (snippet
                '(begin
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 7/9] gnu: avalon-toolkit: Update to 2.0.5a.
Date: Sun, 28 Jan 2024 23:02:00 +0000
The bug freeing static memory and the makefile have been improved upstream, so
we don't have to work around them anymore. Now, two static libraries are built
instead.

* gnu/packages/chemistry.scm (avalon-toolkit): Update to 2.0.5a.
[source]: Switch to git reference from GitHub. Adjust snippet. Add patch from
the RDKit fork.
[arguments]: Remove 'dont-free-static-memory phase. Use provided
makefile. Adjust 'install phase.
* gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   2 +
 gnu/packages/chemistry.scm                    | 131 ++++++++----------
 .../patches/avalon-toolkit-rdkit-fixes.patch  | 110 +++++++++++++++
 3 files changed, 166 insertions(+), 77 deletions(-)
 create mode 100644 gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ab63bd5881..b5d61eb4dd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -63,6 +63,7 @@
 # Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
 # Copyright © 2023 Herman Rimm <herman <at> rimm.ee>
 # Copyright © 2023 Troy Figiel <troy <at> troyfigiel.com>
+# Copyright © 2024 David Elsing <david.elsing <at> posteo.net>
 #
 # This file is part of GNU Guix.
 #
@@ -952,6 +953,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/audiofile-function-signature.patch	\
   %D%/packages/patches/automake-skip-amhello-tests.patch	\
   %D%/packages/patches/avahi-localstatedir.patch		\
+  %D%/packages/patches/avalon-toolkit-rdkit-fixes.patch		\
   %D%/packages/patches/avidemux-install-to-lib.patch		\
   %D%/packages/patches/awesome-reproducible-png.patch		\
   %D%/packages/patches/awesome-4.3-fno-common.patch		\
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 4a9dd97c5b..5e19bdf182 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -917,90 +917,67 @@ (define-public yaehmop
 (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")))))
+    (version "2.0.5a")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rohdebe1/ava-formake")
+                    (commit (string-append "AvalonToolkit_" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1mfg40y5xc17sm59zdfc5sk22n9zm5zk0z1aw47chvl6hp465szk"))
+              (patches
+               (search-patches "avalon-toolkit-rdkit-fixes.patch"))
+              (modules '((guix build utils) (ice-9 ftw)))
+              (snippet
+               #~(begin
+                   (delete-file-recursively "src/main/java")
+                   (delete-file-recursively "src/test/target")))))
     (build-system gnu-build-system)
     (arguments
      (list
-      ;; There are no intended tests
+      ;; There is only one test, which is missing a file
       #:tests? #f
       #:phases
-      #~(let ((programs '("canonizer" "matchtest" "sketch" "smi2mol" "struchk")))
-          (modify-phases %standard-phases
-            (add-after 'unpack 'chdir
-              (lambda _ (chdir "common")))
-            (delete 'configure)
-            (add-before 'build 'dont-free-static-memory
-              (lambda _
-                (substitute* "reaccsio.c"
-                  (("MyFree\\(.*tempdir\\)" m)
-                   (string-append "/* freeing memory from getenv is bad */"
-                                  "// " m)))))
-            ;; The makefile has incorrect compiler flags and is missing some
-            ;; object files, so we build it ourselves.
-            (replace 'build
-              (lambda _
-                (for-each
-                 (lambda (part)
-                   (format #t "Compiling ~a.c ~~> ~a.o~%" part part)
-                   (invoke #$(cc-for-target) "-c" "-fPIC" "-O2"
-                           (string-append part ".c")
-                           "-o" (string-append part ".o")))
-                 (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"))
-                (display "Building libavalontoolkit.so\n")
-                (apply invoke "gcc" "-fPIC" "-shared" "-lm"
-                       "-o" "libavalontoolkit.so" "canonizer.c" "smi2mol.c"
-                       "struchk.c" "patclean.c" (find-files "." "\\.o$"))
-                ;; 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
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'build
+            (lambda* (#:key parallel-build? #:allow-other-keys)
+              (mkdir "build")
+              (mkdir-p "target/executables")
+              (mkdir-p "target/libraries")
+              (invoke "make" "programs" "-j"
+                      (if parallel-build?
+                          (number->string (parallel-job-count))
+                          "1"))))
+          (replace 'install
+            (lambda _
+              ;; Executables
+              (let ((programs '("canonizer" "matchtest" "smi2mol" "struchk")))
                 (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 "/"))))))))
+                   (install-file (string-append "target/executables/" 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 "target/libraries/libavalon_tools.a"
+                            (string-append #$output "/lib"))
+              (install-file "target/libraries/libavalon4rdkit.a"
+                            (string-append #$output "/lib"))
+              (for-each
+               (lambda (file)
+                 (install-file file (string-append #$output
+                                                   "/include/avalontoolkit")))
+               (find-files "src/main/C/include" "\\.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
diff --git a/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch b/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch
new file mode 100644
index 0000000000..c93a9869ed
--- /dev/null
+++ b/gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch
@@ -0,0 +1,110 @@
+Patches taken from the rdkit fork at this commit (there version
+AvalonToolkit_2.0.6-pre.2):
+https://github.com/rdkit/ava-formake/commit/d05bee0382b8f4696b2b4b05b0038fb7d559520a
+
+diff -ur a/src/main/C/common/reaccsio.c b/src/main/C/common/reaccsio.c
+--- a/src/main/C/common/reaccsio.c
++++ b/src/main/C/common/reaccsio.c
+@@ -322,34 +322,49 @@
+       fprintf(fp,"\n");
+ }
+ 
++#define MAX_BONDLINE_FIELDS 7
++#define BONDLINE_FIELD_LEN 3
++
+ int ReadREACCSBond(Fortran_FILE *fp, struct reaccs_bond_t *bp)
+ {
+-   int nitems, i;
+-   char buffer[MAX_BUFFER+1];
++   int nitems, i, j, k;
++   int bond_line_len, n_chars, pos;
++   int *ptrarray[MAX_BONDLINE_FIELDS];
++   char c;
++   char buffer[BONDLINE_FIELD_LEN+1];
+ 
+    if (fp->status != FORTRAN_NORMAL) return(fp->status);
+ 
+-   strncpy(buffer,fp->buffer,MAX_BUFFER);
+-   /* zero pad only atom numbers! */
+-   for (i=0; i<6; i++) if (buffer[i] == ' ') buffer[i] = '0';
+-
+    bp->stereo_symbol = 0;
+    bp->dummy = 0;
+    bp->topography = 0;
+    bp->reaction_mark = NONE;
+-   // make sure spaces are interpreted the Fortran-way
+-   for (i=9; i<strlen(buffer)  &&  i<21; i+=3)
+-   {
+-       if ((i+1)<strlen(buffer)  &&  buffer[i+1]==' ') buffer[i+1] = '0';
+-       if ((i+2)<strlen(buffer)  &&  buffer[i+2]==' ') buffer[i+2] = '0';
++   ptrarray[0] = &bp->atoms[0];
++   ptrarray[1] = &bp->atoms[1];
++   ptrarray[2] = &bp->bond_type;
++   ptrarray[3] = &bp->stereo_symbol;
++   ptrarray[4] = &bp->dummy;
++   ptrarray[5] = &bp->topography;
++   ptrarray[6] = &bp->reaction_mark;
++   bond_line_len = strlen(fp->buffer);
++   nitems = bond_line_len ? (bond_line_len - 1) / BONDLINE_FIELD_LEN + 1 : 0;
++   if (nitems > MAX_BONDLINE_FIELDS)
++      nitems = MAX_BONDLINE_FIELDS;
++   for (i = 0; i < nitems; ++i)
++   {
++      pos = i * BONDLINE_FIELD_LEN;
++      memset(buffer, 0, BONDLINE_FIELD_LEN + 1);
++      n_chars = bond_line_len - pos;
++      if (n_chars > BONDLINE_FIELD_LEN)
++         n_chars = BONDLINE_FIELD_LEN;
++      for (j = 0, k = 0; j < n_chars; ++j)
++      {
++         c = fp->buffer[pos + j];
++         if (c != ' ')
++            buffer[k++] = c;
++      }
++      sscanf(buffer, "%3d", ptrarray[i]);
+    }
+-   nitems = sscanf(buffer,
+-                   "%3d%3d%3d%3d%3d%3d%3d",
+-                   &bp->atoms[0],   &bp->atoms[1],
+-                   &bp->bond_type,  &bp->stereo_symbol,
+-                   &bp->dummy,
+-                   &bp->topography, &bp->reaction_mark);
+-
+    if (nitems >= 3)
+    {
+       GetBuffer(fp);
+@@ -1582,6 +1597,8 @@
+ 
+    PrintREACCSMolecule(fp, mp,"");
+ 
++   fputc('\0', fp);
++   fflush(fp);
+    rewind(fp);
+ 
+    MolStr = _ReadFile(fp);
+diff -ur a/src/main/C/programs/struchk.c b/src/main/C/programs/struchk.c
+--- a/src/main/C/programs/struchk.c
++++ b/src/main/C/programs/struchk.c
+@@ -1581,6 +1581,22 @@
+ 
+    if ((result & SIZE_CHECK_FAILED) == 0)
+    {
++      for (i = 0; i < mp->n_bonds; ++i) {
++         for (j = 0; j < 2; ++j) {
++            if (mp->bond_array[i].atoms[j] < 1 || mp->bond_array[i].atoms[j] > mp->n_atoms)
++            {
++               snprintf(msg_buffer, MAXMSG,
++                  "%10s    : illegal atom # (%d, max allowed is %d) in bond %d",
++                  mp->name, mp->bond_array[i].atoms[j], mp->n_atoms, i + 1);
++               AddMsgToList(msg_buffer);
++               result |= SIZE_CHECK_FAILED;
++            }
++         }
++      }
++   }
++
++   if ((result & SIZE_CHECK_FAILED) == 0)
++   {
+       if (convert_atom_texts)
+       {
+          tmp = ConvertAtomAliases(mp);
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:04:02 GMT) Full text and rfc822 format available.

Message #26 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 5/9] gnu: coordgenlibs: Update to 3.0.2.
Date: Sun, 28 Jan 2024 23:01:58 +0000
* gnu/packages/chemistry.scm (coordgenlibs): Update to 3.0.2.
---
 gnu/packages/chemistry.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 9086d659cc..44833d9c3f 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado <at> elephly.net>
-;;; Copyright © 2022, 2023 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -785,7 +785,7 @@ (define-public maeparser
 (define-public coordgenlibs
   (package
     (name "coordgenlibs")
-    (version "3.0.1")
+    (version "3.0.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -794,7 +794,7 @@ (define-public coordgenlibs
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0d09x3v38i9y184bml020bq7xizdrdwng38qmdxlplzfhqkjdidv"))))
+                "1wjaxwaihjy9xm5ys23f5abl50zcar1h9pww5ajdkgygsqy0bavi"))))
     (build-system cmake-build-system)
     (arguments
      (list
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:04:03 GMT) Full text and rfc822 format available.

Message #29 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 8/9] gnu: freesasa: Fix memerr tests.
Date: Sun, 28 Jan 2024 23:02:01 +0000
* gnu/packages/chemistry.scm (freesasa)[arguments]: Add
"CFLAGS=-fno-builtin-malloc" to #:configure-flags.
---
 gnu/packages/chemistry.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 5e19bdf182..98141737ac 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -708,7 +708,12 @@ (define-public freesasa
       #~(list "--enable-check"
               "--enable-parser-generator"
               "CXXFLAGS=-std=c++17"
-              "--enable-doxygen")
+              "--enable-doxygen"
+              ;; Some tests rely on replacing malloc with a wrapper which
+              ;; fails in a controlled way, but this does not work if the call
+              ;; is replaced. This was fixed upstream, remove once there is a
+              ;; new release.
+              "CFLAGS=-fno-builtin-malloc")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'remove-libc++-linking
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Sun, 28 Jan 2024 23:04:03 GMT) Full text and rfc822 format available.

Message #32 received at 68790 <at> debbugs.gnu.org (full text, mbox):

From: David Elsing <david.elsing <at> posteo.net>
To: 68790 <at> debbugs.gnu.org
Cc: David Elsing <david.elsing <at> posteo.net>
Subject: [PATCH 9/9] gnu: rdkit: Update to 2023.09.4.
Date: Sun, 28 Jan 2024 23:02:02 +0000
* gnu/packages/chemistry.scm (rdkit): Update to 2023.09.4.
[arguments]: Skip testConrec test in check phase.
[native-inputs]: Replace catch2 with catch2-3.
* gnu/packages/patches/rdkit-unbundle-external-dependencies.patch: Adjust
patch.
[supported-systems]: New field.
---
 gnu/packages/chemistry.scm                    |  15 +-
 ...rdkit-unbundle-external-dependencies.patch | 208 ++++++++++--------
 2 files changed, 126 insertions(+), 97 deletions(-)

diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index 98141737ac..bd27bfad7a 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -1073,7 +1073,7 @@ (define-public ringdecomposerlib
 (define-public rdkit
   (package
     (name "rdkit")
-    (version "2022.03.5")
+    (version "2023.09.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1084,7 +1084,7 @@ (define-public rdkit
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "19idgilabh04cbr1qj6zgrgsfjm248mmfz6fsr0smrd68d0xnml9"))
+                "1lgcgijlzzwpfxndsdlx13npdfk7hcii11zg25cvpmzhbpn6vyn8"))
               (patches
                (search-patches "rdkit-unbundle-external-dependencies.patch"))
               (modules '((guix build utils)))
@@ -1183,7 +1183,10 @@ (define-public rdkit
                             "substructLibraryTest" "pyFeatures"
                             "pythonTestDirML" "pythonTestDirChem"
                             ;; Catching Python exception fails
-                            "pyRanker") "|")
+                            "pyRanker"
+                            ;; Flaky test depending on floating point rounding
+                            "testConrec"
+                            ) "|")
                          ")")))))))))
     (inputs
      (list avalon-toolkit
@@ -1200,7 +1203,7 @@ (define-public rdkit
     (native-inputs
      (list bison
            boost
-           catch2
+           catch2-3
            eigen
            flex
            freesasa
@@ -1214,4 +1217,8 @@ (define-public rdkit
     (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.")
+    ;; For 32 bit systems, there is a bug in Boost.Python:
+    ;; https://github.com/boostorg/python/issues/312. Additionally, several
+    ;; other test fail.
+    (supported-systems %64bit-supported-systems)
     (license license:bsd-3)))
diff --git a/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch b/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch
index 8ee0611d3b..e22ff57ee0 100644
--- a/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch
+++ b/gnu/packages/patches/rdkit-unbundle-external-dependencies.patch
@@ -58,99 +58,82 @@ diff --git a/External/AvalonTools/CMakeLists.txt b/External/AvalonTools/CMakeLis
 index 3e31195fc..314ba35b5 100644
 --- a/External/AvalonTools/CMakeLists.txt
 +++ b/External/AvalonTools/CMakeLists.txt
-@@ -2,107 +2,14 @@ if(NOT RDK_BUILD_AVALON_SUPPORT)
+@@ -2,90 +2,8 @@ if(NOT RDK_BUILD_AVALON_SUPPORT)
    return()
  endif(NOT RDK_BUILD_AVALON_SUPPORT)
  
+-set(AVALON_VERSION "2.0.5-pre.3")
 -if(NOT DEFINED AVALONTOOLS_DIR)
--  set(AVALONTOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/SourceDistribution")
--  set(fileToPatch "${CMAKE_CURRENT_SOURCE_DIR}/SourceDistribution/common/reaccsio.c")
+-  set(AVALONTOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ava-formake-AvalonToolkit_${AVALON_VERSION}")
+-  set(fileToCheck "${AVALONTOOLS_DIR}/src/main/C/common/reaccsio.c")
 -  set(needDownload "TRUE")
--  if(EXISTS "${fileToPatch}")
--    file(READ "${fileToPatch}" buffer)
--    if("${buffer}" MATCHES "//MyFree\\(\\(char \\*\\)tempdir\\);")
--      set(needDownload "FALSE")
--    endif()
+-  if(EXISTS "${fileToCheck}")
+-    set(needDownload "FALSE")
 -  endif()
 -else()
 -  string(REGEX REPLACE "\\\\" "/" AVALONTOOLS_DIR ${AVALONTOOLS_DIR})
 -  set(needDownload "FALSE")
 -endif()
 -
--set(AVALON_SRC_PATH ${AVALONTOOLS_DIR}/common)
+-set(AVALON_SRC_PATH "${AVALONTOOLS_DIR}/src/main/C")
+-set(AVALON_COMMON_PATH "${AVALON_SRC_PATH}/common")
+-set(AVALON_INCLUDE_PATH "${AVALON_SRC_PATH}/include")
+-set(AVALON_PROGRAMS_PATH "${AVALON_SRC_PATH}/programs")
 -
 -if(needDownload)
 -  if(NOT DEFINED AVALONTOOLS_URL)
--    set(AVALONTOOLS_URL "https://sourceforge.net/projects/avalontoolkit/files/AvalonToolkit_1.2/AvalonToolkit_1.2.0.source.tar")
+-    set(AVALONTOOLS_URL "https://github.com/rdkit/ava-formake/archive/refs/tags/AvalonToolkit_${AVALON_VERSION}.tar.gz")
 -  endif()
 -  if(NOT DEFINED AVALONTOOLS_MD5SUM)
--    set(AVALONTOOLS_MD5SUM "092a94f421873f038aa67d4a6cc8cb54")
+-    set(AVALONTOOLS_MD5SUM "7a20c25a7e79f3344e0f9f49afa03351")
 -  endif()
 -  if(NOT DEFINED AVALONTOOLS_BASE)
 -    string(REGEX REPLACE "^.*/" "" AVALONTOOLS_BASE "${AVALONTOOLS_URL}")
 -  endif()
 -  downloadAndCheckMD5(${AVALONTOOLS_URL} "${CMAKE_CURRENT_SOURCE_DIR}/${AVALONTOOLS_BASE}" ${AVALONTOOLS_MD5SUM})
--  execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf
--    ${CMAKE_CURRENT_SOURCE_DIR}/AvalonToolkit_1.2.0.source.tar
+-  execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf
+-    ${CMAKE_CURRENT_SOURCE_DIR}/AvalonToolkit_${AVALON_VERSION}.tar.gz
 -    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
--  # apply patch to AvalonTools
--  configure_file("${fileToPatch}" "${fileToPatch}.orig" COPYONLY)
--  file(READ "${fileToPatch}" buffer)
--  string(REGEX REPLACE "MyFree\\(\\(char \\*\\)tempdir\\);"
--    "//MyFree((char *)tempdir);" buffer "${buffer}")
--  file(WRITE "${fileToPatch}" "${buffer}")
--endif()
- 
- if (MSVC)
-   add_definitions("/D_CRT_SECURE_NO_WARNINGS")
-   add_compile_options(/wd4224 /wd4101 /wd4018 /wd4996 /wd4244 /wd4305 /wd4013 /wd4146 /wd4334 /wd4715 /wd4715 /nologo)
- endif(MSVC)
- 
--set(avalon_clib_srcs ${AVALON_SRC_PATH}/layout.c
--	${AVALON_SRC_PATH}/symboltable.c
--	${AVALON_SRC_PATH}/patclean.c
--	${AVALON_SRC_PATH}/utilities.c
--	${AVALON_SRC_PATH}/symbol_lists.c
--	${AVALON_SRC_PATH}/stereo.c
--	${AVALON_SRC_PATH}/set.c
--	${AVALON_SRC_PATH}/perceive.c
--	${AVALON_SRC_PATH}/local.c
--	${AVALON_SRC_PATH}/graph.c
--	${AVALON_SRC_PATH}/geometry.c
--	${AVALON_SRC_PATH}/forio.c
--	${AVALON_SRC_PATH}/depictutil.c
--	${AVALON_SRC_PATH}/denormal.c
--	${AVALON_SRC_PATH}/casutils.c
--	${AVALON_SRC_PATH}/ssmatch.c
--	${AVALON_SRC_PATH}/rtutils.c
--	${AVALON_SRC_PATH}/smi2mol.c
--	${AVALON_SRC_PATH}/didepict.c
--	${AVALON_SRC_PATH}/pattern.c
--	${AVALON_SRC_PATH}/canonizer.c
--	${AVALON_SRC_PATH}/aacheck.c
--	${AVALON_SRC_PATH}/fixcharges.c
--	${AVALON_SRC_PATH}/struchk.c
--	${AVALON_SRC_PATH}/reaccsio.c
--	${AVALON_SRC_PATH}/hashcode.c
--  )
--
--# we need this to ensure that builds continue
--# to work on linux systems with older versions
--# of glibc when we're building with gcc-4.1.
--# Without this flag, we'll endup requiring
--# glibc 2.7.
--if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
--    add_definitions(-D_GNU_SOURCE=1)
 -endif()
 -
--if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
--  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-return-type -Wno-implicit-function-declaration -Wno-absolute-value -Wno-parentheses -Wno-logical-op-parentheses -Wno-dangling-else -Wno-format")
+-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+-  add_compile_options(-Wno-format-security -Wformat=0 -Wstringop-overflow=0 -Wformat-overflow=0 -Wno-unused-result )
 -endif()
--if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
--  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result -Wformat-overflow=0 -Wformat=0 -Wno-format-security -Wno-implicit-function-declaration")
+-if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+-  add_compile_options(-Wno-absolute-value -Wno-return-type -Wno-tautological-overlap-compare)
 -endif()
+-if (MSVC)
+-  add_definitions("/D_CRT_SECURE_NO_WARNINGS")
+-  add_compile_options(/wd4018 /wd4101 /wd4146 /wd4334 /wd4477 /wd4715 /wd4716 /wd4996 /nologo)
+-endif(MSVC)
 -
--
+-set(avalon_clib_srcs ${AVALON_COMMON_PATH}/layout.c
+-	${AVALON_COMMON_PATH}/symboltable.c
+-	${AVALON_COMMON_PATH}/patclean.c
+-	${AVALON_COMMON_PATH}/utilities.c
+-	${AVALON_COMMON_PATH}/symbol_lists.c
+-	${AVALON_COMMON_PATH}/stereo.c
+-	${AVALON_COMMON_PATH}/set.c
+-	${AVALON_COMMON_PATH}/perceive.c
+-	${AVALON_COMMON_PATH}/local.c
+-	${AVALON_COMMON_PATH}/graph.c
+-	${AVALON_COMMON_PATH}/geometry.c
+-	${AVALON_COMMON_PATH}/forio.c
+-	${AVALON_COMMON_PATH}/depictutil.c
+-	${AVALON_COMMON_PATH}/denormal.c
+-	${AVALON_COMMON_PATH}/casutils.c
+-	${AVALON_COMMON_PATH}/ssmatch.c
+-	${AVALON_COMMON_PATH}/rtutils.c
+-	${AVALON_COMMON_PATH}/smi2mol.c
+-	${AVALON_COMMON_PATH}/didepict.c
+-	${AVALON_COMMON_PATH}/pattern.c
+-	${AVALON_COMMON_PATH}/canonizer.c
+-	${AVALON_COMMON_PATH}/aacheck.c
+-	${AVALON_COMMON_PATH}/fixcharges.c
+-	${AVALON_PROGRAMS_PATH}/struchk.c
+-	${AVALON_COMMON_PATH}/reaccsio.c
+-	${AVALON_COMMON_PATH}/hashcode.c
+-  )
 -
 -rdkit_library(avalon_clib ${avalon_clib_srcs})
 -target_compile_definitions(avalon_clib PRIVATE RDKIT_AVALONLIB_BUILD)
@@ -159,11 +142,11 @@ index 3e31195fc..314ba35b5 100644
 -endif()
 -
 -include_directories(${CMAKE_CURRENT_SOURCE_DIR})
--include_directories(${AVALON_SRC_PATH})
+-include_directories(${AVALON_INCLUDE_PATH})
 -
  rdkit_library(AvalonLib AvalonTools.cpp SHARED 
 -     LINK_LIBRARIES avalon_clib SubstructMatch FileParsers SmilesParse GraphMol DataStructs  )
-+     LINK_LIBRARIES -lavalontoolkit SubstructMatch FileParsers SmilesParse GraphMol DataStructs  )
++     LINK_LIBRARIES -lavalon4rdkit SubstructMatch FileParsers SmilesParse GraphMol DataStructs  )
  target_compile_definitions(AvalonLib PRIVATE RDKIT_AVALONLIB_BUILD)
  rdkit_headers(AvalonTools.h DEST GraphMol)
  rdkit_test(testAvalonLib1 test1.cpp
@@ -278,7 +261,7 @@ diff --git a/External/RingFamilies/CMakeLists.txt b/External/RingFamilies/CMakeL
 index 08dd1fe04..66ecd5834 100644
 --- a/External/RingFamilies/CMakeLists.txt
 +++ b/External/RingFamilies/CMakeLists.txt
-@@ -1,47 +1,6 @@
+@@ -1,47 +1,7 @@
 -add_custom_target(ringdecomposerlib_support ALL)
 -
  if(NOT RDK_USE_URF)
@@ -324,10 +307,9 @@ index 08dd1fe04..66ecd5834 100644
 -rdkit_headers(${URFLIB_DIR}/RingDecomposerLib.h DEST "")
 -
 -
--set(RDK_URF_LIBS RingDecomposerLib
--    CACHE STRING "the libraries for the URF calculation" FORCE)
 +rdkit_library(RingDecomposerLib dummy.cpp SHARED LINK_LIBRARIES -lRingDecomposerLib)
-+set(RDK_URF_LIBS RingDecomposerLib CACHE STRING "" FORCE)
+ set(RDK_URF_LIBS RingDecomposerLib
+     CACHE STRING "the libraries for the URF calculation" FORCE)
 diff --git a/External/RingFamilies/dummy.cpp b/External/RingFamilies/dummy.cpp
 new file mode 100644
 index 000000000..e69de29bb
@@ -335,40 +317,60 @@ diff --git a/External/YAeHMOP/CMakeLists.txt b/External/YAeHMOP/CMakeLists.txt
 index f1027b3bd..8bee2f910 100644
 --- a/External/YAeHMOP/CMakeLists.txt
 +++ b/External/YAeHMOP/CMakeLists.txt
-@@ -18,32 +18,8 @@ endif()
+@@ -4,52 +4,7 @@ endif(NOT RDK_BUILD_YAEHMOP_SUPPORT)
  
- include_directories( ${RDKit_ExternalDir}/YAeHMOP )
+ add_definitions(-DRDK_BUILD_YAEHMOP_SUPPORT)
  
--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)
+-if(NOT DEFINED YAEHMOP_DIR)
+-  set(YAEHMOP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop")
+-endif()
+-
+-if(NOT EXISTS "${YAEHMOP_DIR}/tightbind/bind.h")
+-    set(RELEASE_NO "2023.03.1")
+-    set(MD5 "e6450f13e02c54d024233b993c3c7ff6")
+-    downloadAndCheckMD5("https://github.com/greglandrum/yaehmop/archive/refs/tags/v${RELEASE_NO}.tar.gz"
+-          "${CMAKE_CURRENT_SOURCE_DIR}/yaehmop-${RELEASE_NO}.tar.gz" ${MD5})
+-    execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf
+-      ${CMAKE_CURRENT_SOURCE_DIR}/yaehmop-${RELEASE_NO}.tar.gz
+-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+-
+-    file(RENAME "yaehmop-${RELEASE_NO}" "${YAEHMOP_DIR}")
+-else()
+-  message("-- Found YAeHMOP source in ${YAEHMOP_DIR}")
+-endif()
+-
+-set(yaehmop_INCLUDE_DIRS ${YAEHMOP_DIR}/..
+-     CACHE STRING "yaehmop Include File" FORCE)
+-include_directories(${yaehmop_INCLUDE_DIRS})
+-
+-if(CMAKE_COMPILER_IS_GNUCXX AND NOT CYGWIN)
+-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+-endif()
+-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+-endif()
+-
+-# bring in the eHT code, but skip the targets (we'll get yaehmop_eht anyway because it's a dependency)
+-add_subdirectory(yaehmop/tightbind EXCLUDE_FROM_ALL True)
+-
+-# set install dir for the yaehmop library:
+-INSTALL(TARGETS yaehmop_eht EXPORT rdkit-targets
+-        DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST}
+-        COMPONENT runtime )
+-
+-
+-
 -
 -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")
--
 -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)
  rdkit_headers(EHTTools.h DEST GraphMol)
  rdkit_catch_test(testEHTLib1 test1.cpp
-            LINK_LIBRARIES EHTLib FileParsers SmilesParse )
 diff --git a/External/YAeHMOP/EHTTools.cpp b/External/YAeHMOP/EHTTools.cpp
 index 7a229f51f..71033dc5c 100644
 --- a/External/YAeHMOP/EHTTools.cpp
@@ -382,3 +384,23 @@ index 7a229f51f..71033dc5c 100644
  }
  
  namespace RDKit {
+@@ -160,4 +160,4 @@ bool runMol(const ROMol &mol, EHTResults &results, int confId,
+ }
+ 
+ }  // end of namespace EHTTools
+-}  // end of namespace RDKit
+\ No newline at end of file
++}  // end of namespace RDKit
+diff --git a/External/YAeHMOP/Wrap/CMakeLists.txt b/External/YAeHMOP/Wrap/CMakeLists.txt
+index 759a9f360..114d24532 100644
+--- a/External/YAeHMOP/Wrap/CMakeLists.txt
++++ b/External/YAeHMOP/Wrap/CMakeLists.txt
+@@ -4,6 +4,8 @@ rdkit_python_extension(rdEHTTools
+                        DEST Chem
+                        LINK_LIBRARIES
+                        EHTLib )
++
++target_include_directories(rdEHTTools PRIVATE ${RDKit_ExternalDir}/YAeHMOP)
+                        
+ add_pytest(pyEHTTools
+          ${CMAKE_CURRENT_SOURCE_DIR}/testEHTTools.py)
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68790; Package guix-patches. (Tue, 13 Feb 2024 12:20:01 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: David Elsing <david.elsing <at> posteo.net>
Cc: 68790-done <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#68790] [PATCH 0/9] Update rdkit and its dependencies
Date: Tue, 13 Feb 2024 12:18:15 +0000
[Message part 1 (text/plain, inline)]
David Elsing <david.elsing <at> posteo.net> writes:

> This patch series updates rdkit and some of its dependencies.
>
> I incorporated the patch from [1], which was addressed upstream, but is
> not in a new release yet.
>
> It seems like RDKit is only tested on 64 bit systems upstream and
> several tests fail on i686 (including one due to a known bug in
> Boost.Python [2]), therefore I set supported-systems to
> %64bit-supported-systems.
>
> Avalon Toolkit moved to a new repository [3], which was forked for RDKit
> [4]. As the changes in the fork are small and only fixes, I put them in
> a patch and use [3] as upstream.
>
> [1] https://issues.guix.gnu.org/64559
> [2] https://github.com/boostorg/python/issues/312
> [3] https://github.com/rohdebe1/ava-formake
> [4] https://github.com/rdkit/ava-formake
>
> David Elsing (9):
>   gnu: tinydir: Update to 1.2.6.
>   gnu: fast-float: Update to 6.0.0.
>   gnu: gemmi: Update to 0.6.4.
>   gnu: maeparser: Update to 1.3.1.
>   gnu: coordgenlibs: Update to 3.0.2.
>   gnu: yaehmop: Update to 2023.03.1.
>   gnu: avalon-toolkit: Update to 2.0.5a.
>   gnu: freesasa: Fix memerr tests.
>   gnu: rdkit: Update to 2023.09.4.

Thanks for the patches David, they look good to me so I've pushed them
all to master as e5bfc462dd695a570fe88c4c6d6efee808fd1a56.

Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Tue, 13 Feb 2024 12:20:02 GMT) Full text and rfc822 format available.

Notification sent to David Elsing <david.elsing <at> posteo.net>:
bug acknowledged by developer. (Tue, 13 Feb 2024 12:20:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Mar 2024 11:24:20 GMT) Full text and rfc822 format available.

This bug report was last modified 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.