commit:     534ae4eb830063aa768bca0cb6832159cec1d2d9
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 21 08:13:09 2024 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 08:13:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=534ae4eb

sci-chemistry/gromacs: Fix build with gcc-15

Closes: https://bugs.gentoo.org/937696
Closes: https://bugs.gentoo.org/939006
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 sci-chemistry/gromacs/files/gromacs-gcc-15.patch | 36 ++++++++++++++++++++++++
 sci-chemistry/gromacs/gromacs-2024.3.ebuild      |  2 ++
 sci-chemistry/gromacs/gromacs-2024.4.ebuild      |  2 ++
 sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild |  2 ++
 4 files changed, 42 insertions(+)

diff --git a/sci-chemistry/gromacs/files/gromacs-gcc-15.patch 
b/sci-chemistry/gromacs/files/gromacs-gcc-15.patch
new file mode 100644
index 000000000000..45ac82493bec
--- /dev/null
+++ b/sci-chemistry/gromacs/files/gromacs-gcc-15.patch
@@ -0,0 +1,36 @@
+From 9dfaba553cb5aa0c0d689de1555a3bb45ae7dd3a Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <[email protected]>
+Date: Thu, 21 Nov 2024 10:56:17 +0300
+Subject: [PATCH] Fix build with gcc-15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Error is
+energyhistory.h:89:5: error: ‘int64_t’ does not name a type
+   89 |     int64_t             nsteps;       //! The number of steps in the 
history
+      |     ^~~~~~~
+
+Ref: https://bugs.gentoo.org/939006
+
+Signed-off-by: Alexey Shvetsov <[email protected]>
+---
+ src/gromacs/mdtypes/energyhistory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/gromacs/mdtypes/energyhistory.h 
b/src/gromacs/mdtypes/energyhistory.h
+index 0c8fecfae7..f80d4c56b9 100644
+--- a/src/gromacs/mdtypes/energyhistory.h
++++ b/src/gromacs/mdtypes/energyhistory.h
+@@ -47,6 +47,8 @@
+ #ifndef GMX_MDLIB_ENERGYHISTORY_H
+ #define GMX_MDLIB_ENERGYHISTORY_H
+ 
++#include <cstdint>
++
+ #include <memory>
+ #include <vector>
+ 
+-- 
+2.45.2
+

diff --git a/sci-chemistry/gromacs/gromacs-2024.3.ebuild 
b/sci-chemistry/gromacs/gromacs-2024.3.ebuild
index 2101629ebc36..e1c0b648701c 100644
--- a/sci-chemistry/gromacs/gromacs-2024.3.ebuild
+++ b/sci-chemistry/gromacs/gromacs-2024.3.ebuild
@@ -92,6 +92,8 @@ DOCS=( AUTHORS README )
 
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}/${PN}-gcc-15.patch" )
+
 if [[ ${PV} != *9999 ]]; then
        S="${WORKDIR}/${PN}-${PV/_/-}"
 fi

diff --git a/sci-chemistry/gromacs/gromacs-2024.4.ebuild 
b/sci-chemistry/gromacs/gromacs-2024.4.ebuild
index 2101629ebc36..e1c0b648701c 100644
--- a/sci-chemistry/gromacs/gromacs-2024.4.ebuild
+++ b/sci-chemistry/gromacs/gromacs-2024.4.ebuild
@@ -92,6 +92,8 @@ DOCS=( AUTHORS README )
 
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}/${PN}-gcc-15.patch" )
+
 if [[ ${PV} != *9999 ]]; then
        S="${WORKDIR}/${PN}-${PV/_/-}"
 fi

diff --git a/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild 
b/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild
index 4382a7dba81e..aa6eab316c98 100644
--- a/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild
+++ b/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild
@@ -95,6 +95,8 @@ DOCS=( AUTHORS README )
 
 RESTRICT="!test? ( test )"
 
+PATCHES=( "${FILESDIR}/${PN}-gcc-15.patch" )
+
 if [[ ${PV} != *9999 ]]; then
        S="${WORKDIR}/${PN}-${PV/_/-}"
 fi

Reply via email to