commit: d6cd065661beb82495f60504b83d6b5ea506cdde Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> AuthorDate: Tue Dec 10 16:19:07 2024 +0000 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> CommitDate: Tue Dec 10 16:19:38 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6cd0656
sci-chemistry/gromacs: Fix man build with upstream patch Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org> .../files/gromacs-2025.0-beta-fix-man-build.patch | 41 ++++++++++++++++++++++ sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild | 11 +++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/sci-chemistry/gromacs/files/gromacs-2025.0-beta-fix-man-build.patch b/sci-chemistry/gromacs/files/gromacs-2025.0-beta-fix-man-build.patch new file mode 100644 index 000000000000..2eb2d45035a2 --- /dev/null +++ b/sci-chemistry/gromacs/files/gromacs-2025.0-beta-fix-man-build.patch @@ -0,0 +1,41 @@ +From 5c9a86c6c6ae3e9202e2feb0e1d33df40818c251 Mon Sep 17 00:00:00 2001 +From: Andrey Alekseenko <[email protected]> +Date: Tue, 10 Dec 2024 16:21:55 +0100 +Subject: [PATCH] Don't require GMXAPI for building man pages + +Refs #4767 +Fixes #5241 +--- + docs/conf.cmakein.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/docs/conf.cmakein.py b/docs/conf.cmakein.py +index 577bcba9bd8..46986adbc07 100644 +--- a/docs/conf.cmakein.py ++++ b/docs/conf.cmakein.py +@@ -55,7 +55,12 @@ gmxapi_staging_path = "@GMXAPI_PYTHON_STAGING_DIR@" + if gmxapi_staging_path and os.path.isdir(gmxapi_staging_path): + sys.path.append(gmxapi_staging_path) + +-import gmxapi ++try: ++ import gmxapi ++except ImportError: ++ gmxapi_version_string = "N/A" ++else: ++ gmxapi_version_string = gmxapi.__version__ + + gmx_admin_scripts_path = "@GMX_ADMIN_DIR@" + gmx_containers_path = "@GMX_ADMIN_DIR@/containers" +@@ -277,7 +282,7 @@ rst_epilog += """ + .. |thisyear| replace:: {thisyear_string} + """.format( + gmx_version_string=gmx_version_string, +- gmxapi_version_string=gmxapi.__version__, ++ gmxapi_version_string=gmxapi_version_string, + regressiontest_version=regressiontest_version, + thisyear_string=thisyear_string, + ) +-- +GitLab + diff --git a/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild b/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild index 972995fab90d..275d0db9a29b 100644 --- a/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild +++ b/sci-chemistry/gromacs/gromacs-2025.0_beta.ebuild @@ -94,7 +94,10 @@ DOCS=( AUTHORS README ) RESTRICT="!test? ( test )" -PATCHES=( "${FILESDIR}/${PN}-gcc-15.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-gcc-15.patch" + "${FILESDIR}/${PN}-2025.0-beta-fix-man-build.patch" +) if [[ ${PV} != *9999 ]]; then S="${WORKDIR}/${PN}-${PV/_/-}" @@ -241,7 +244,7 @@ src_configure() { -DGMX_USE_HDF5=off -DGMX_HWLOC=$(usex hwloc) -DGMX_DEFAULT_SUFFIX=off - #-DGMX_BUILD_HELP=on + -DGMX_BUILD_HELP=on -DGMX_SIMD="$acce" -DGMX_NNPOT="$nnpot" -DGMX_VMD_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/vmd/plugins/*/molfile/" @@ -286,8 +289,8 @@ src_compile() { einfo "Compiling for ${x} precision" BUILD_DIR="${WORKDIR}/${P}_${x}"\ cmake_src_compile - #BUILD_DIR="${WORKDIR}/${P}_${x}"\ - # cmake_src_compile man + BUILD_DIR="${WORKDIR}/${P}_${x}"\ + cmake_src_compile man if use python; then BUILD_DIR="${WORKDIR}/${P}_${x}"\ cmake_src_compile python_packaging/all
