|
| 1 | +## |
| 2 | +# Copyright 2025 Ghent University |
| 3 | +# |
| 4 | +# This file is part of EasyBuild, |
| 5 | +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), |
| 6 | +# with support of Ghent University (http://ugent.be/hpc), |
| 7 | +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), |
| 8 | +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) |
| 9 | +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). |
| 10 | +# |
| 11 | +# https://github.com/easybuilders/easybuild |
| 12 | +# |
| 13 | +# EasyBuild is free software: you can redistribute it and/or modify |
| 14 | +# it under the terms of the GNU General Public License as published by |
| 15 | +# the Free Software Foundation v2. |
| 16 | +# |
| 17 | +# EasyBuild is distributed in the hope that it will be useful, |
| 18 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | +# GNU General Public License for more details. |
| 21 | +# |
| 22 | +# You should have received a copy of the GNU General Public License |
| 23 | +# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>. |
| 24 | +## |
| 25 | +""" |
| 26 | +EasyBuild support for installing Term::ReadLine::Gnu. |
| 27 | +
|
| 28 | +@author: Alexander Grund (TU Dresden) |
| 29 | +""" |
| 30 | + |
| 31 | +from easybuild.easyblocks.generic.perlmodule import PerlModule |
| 32 | +from easybuild.tools.modules import get_software_root |
| 33 | + |
| 34 | + |
| 35 | +class EB_Term_colon__colon_ReadLine_colon__colon_Gnu(PerlModule): |
| 36 | + """Support for installing the Term::ReadLine::Gnu Perl module.""" |
| 37 | + |
| 38 | + def __init__(self, *args, **kwargs): |
| 39 | + """Set configopts for dependencies""" |
| 40 | + super().__init__(*args, **kwargs) |
| 41 | + # Use the custom --prefix option to pass the installation prefixes of all direct dependencies |
| 42 | + # to avoid it picking up system libraries. |
| 43 | + prefix = ':'.join(get_software_root(dep['name']) for dep in self.cfg.dependencies()) |
| 44 | + self.cfg.update('configopts', f"--prefix='{prefix}'") |
0 commit comments