me
/
guix
Archived
1
0
Fork 0

gnu: gromacs: Update to 2022.4.

* gnu/packages/chemistry.scm (gromacs): Update to 2022.4.
* gnu/packages/patches/gromacs-tinyxml2.patch: Adjust accordingly.
Ludovic Courtès 2023-01-10 10:34:51 +01:00 committed by Ludovic Courtès
parent 9b9004253b
commit 7934e9c556
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 22 additions and 22 deletions

View File

@ -357,14 +357,14 @@ stored with user-specified precision.")
(define-public gromacs (define-public gromacs
(package (package
(name "gromacs") (name "gromacs")
(version "2020.2") (version "2022.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-" (uri (string-append "http://ftp.gromacs.org/pub/gromacs/gromacs-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1wyjgcdl30wy4hy6jvi9lkq53bqs9fgfq6fri52dhnb3c76y8rbl")) "15vjwasxjq0h18dmzacjkdim51zrvr0ni42hbc30557j5xhbw4f5"))
;; Our version of tinyxml2 is far newer than the bundled one and ;; Our version of tinyxml2 is far newer than the bundled one and
;; require fixing `testutils' code. See patch header for more info ;; require fixing `testutils' code. See patch header for more info
(patches (search-patches "gromacs-tinyxml2.patch")))) (patches (search-patches "gromacs-tinyxml2.patch"))))

View File

@ -1,10 +1,7 @@
Unbundling tinyxml2 from gromacs and using our own, which is newer, broke gromacs Unbundling tinyxml2 from gromacs and using our own, which is newer, broke gromacs
build. build.
This patch fixes three issues: This patch fixes this issue:
- cmake now errors out if using multiple target_link_libraries with mixed styles
of signatures.
- Error handling API changed, fix the testutils/refdata_xml.cpp code by using the - Error handling API changed, fix the testutils/refdata_xml.cpp code by using the
new API: document.ErrorStr() & tinyxml2::XML_SUCCESS. new API: document.ErrorStr() & tinyxml2::XML_SUCCESS.
@ -15,22 +12,25 @@ there as long as they still keep the old version bundled.
First hunk has already been requested for merging. Third is in discussion. Second First hunk has already been requested for merging. Third is in discussion. Second
will only be sent if third is OK'ed. will only be sent if third is OK'ed.
diff -ruN gromacs-2020.2/src/testutils/CMakeLists.txt gromacs-2020.2-fixed/src/testutils/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
--- gromacs-2020.2/src/testutils/CMakeLists.txt 2020-04-30 18:33:44.000000000 +0200 index cd748c9..1e90c95 100644
+++ gromacs-2020.2-fixed/src/testutils/CMakeLists.txt 2020-05-01 22:52:16.356000000 +0200 --- a/CMakeLists.txt
@@ -73,7 +73,7 @@ +++ b/CMakeLists.txt
@@ -539,9 +539,6 @@ if(GMX_EXTERNAL_TINYXML2)
if(HAVE_TINYXML2) if(NOT HAVE_TINYXML2)
include_directories(SYSTEM ${TinyXML2_INCLUDE_DIR}) message(FATAL_ERROR "External TinyXML-2 could not be found, please adjust your search paths")
- target_link_libraries(testutils ${TinyXML2_LIBRARIES}) endif()
+ target_link_libraries(testutils PRIVATE ${TinyXML2_LIBRARIES}) - if (TinyXML2_FOUND AND TinyXML2_VERSION VERSION_GREATER "6")
else() - message(FATAL_ERROR "External TinyXML-2 is later than the highest supported version 6. Please adjust your search paths to include a supported version")
include_directories(BEFORE SYSTEM "../external/tinyxml2") - endif()
endif() endif()
diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp
--- gromacs-2020.2/src/testutils/refdata_xml.cpp 2020-04-30 18:33:44.000000000 +0200 option(GMX_EXTRAE "Add support for tracing using EXTRAE" OFF)
+++ gromacs-2020.2-fixed/src/testutils/refdata_xml.cpp 2020-05-01 23:17:09.556000000 +0200 diff --git a/src/testutils/refdata_xml.cpp b/src/testutils/refdata_xml.cpp
@@ -206,21 +206,12 @@ index 0eb2209..57cebff 100644
--- a/src/testutils/refdata_xml.cpp
+++ b/src/testutils/refdata_xml.cpp
@@ -206,21 +206,12 @@ ReferenceDataEntry::EntryPointer readReferenceDataFile(const std::string& path)
document.LoadFile(path.c_str()); document.LoadFile(path.c_str());
if (document.Error()) if (document.Error())
{ {
@ -56,7 +56,7 @@ diff -ruN gromacs-2020.2/src/testutils/refdata_xml.cpp gromacs-2020.2-fixed/src/
GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n." GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n."
+ errorString + "\n")); + errorString + "\n"));
} }
@@ -371,7 +362,7 @@ @@ -371,7 +362,7 @@ void writeReferenceDataFile(const std::string& path, const ReferenceDataEntry& r
XMLElementPtr rootElement = createRootElement(&document); XMLElementPtr rootElement = createRootElement(&document);
createChildElements(rootElement, rootEntry); createChildElements(rootElement, rootEntry);