From 849a7ef29a955d6f6dd0e0028cddad1606e604b1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 7 May 2025 12:01:56 +0200 Subject: [PATCH 1/2] adding easyblocks: termreadlinegnu.py --- easybuild/easyblocks/t/termreadlinegnu.py | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 easybuild/easyblocks/t/termreadlinegnu.py diff --git a/easybuild/easyblocks/t/termreadlinegnu.py b/easybuild/easyblocks/t/termreadlinegnu.py new file mode 100644 index 00000000000..8c4b1058ae8 --- /dev/null +++ b/easybuild/easyblocks/t/termreadlinegnu.py @@ -0,0 +1,43 @@ +## +# Copyright 2025 Ghent University +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for installing Term::ReadLine::Gnu. + +@author: Alexander Grund (TU Dresden) +""" + +from easybuild.easyblocks.generic.perlmodule import PerlModule +from easybuild.tools.modules import get_software_root + +class EB_Term_colon__colon_ReadLine_colon__colon_Gnu(PerlModule): + """Support for installing the Term::ReadLine::Gnu Perl module.""" + + def __init__(self, *args, **kwargs): + """Set configopts for dependencies""" + super().__init__(*args, **kwargs) + # Use the custom --prefix option to pass the installation prefixes of all direct dependencies + # to avoid it picking up system libraries. + prefix = ':'.join(get_software_root(dep['name']) for dep in self.cfg.dependencies()) + self.cfg.update('configopts', f"--prefix='{prefix}'") From 0ea934530167ba4770ba4ba1ebd4a0239791f65e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 7 May 2025 12:03:10 +0200 Subject: [PATCH 2/2] Add newline --- easybuild/easyblocks/t/termreadlinegnu.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/t/termreadlinegnu.py b/easybuild/easyblocks/t/termreadlinegnu.py index 8c4b1058ae8..bbb94d46d0e 100644 --- a/easybuild/easyblocks/t/termreadlinegnu.py +++ b/easybuild/easyblocks/t/termreadlinegnu.py @@ -31,6 +31,7 @@ from easybuild.easyblocks.generic.perlmodule import PerlModule from easybuild.tools.modules import get_software_root + class EB_Term_colon__colon_ReadLine_colon__colon_Gnu(PerlModule): """Support for installing the Term::ReadLine::Gnu Perl module."""