Skip to content

Commit d5e1b1a

Browse files
author
Richard Top
committed
changes required for GRASS
1 parent 93ed6c6 commit d5e1b1a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

eb_hooks.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,26 @@ def parse_hook_cgal_toolchainopts_precise(ec, eprefix):
409409
raise EasyBuildError("CGAL-specific hook triggered for non-CGAL easyconfig?!")
410410

411411

412+
def parse_hook_grass(ec, *args, **kwargs):
413+
"""
414+
Parse hook to remove filtered deps specific configopts lines for readline, zlib, and bzlib
415+
"""
416+
if ec.name == 'GRASS':
417+
# Configuration options to remove
418+
options_to_remove = [
419+
'--with-readline-libs=$EBROOTLIBREADLINE/lib --with-readline-includes=$EBROOTLIBREADLINE/include ',
420+
'--with-zlib-libs=$EBROOTZLIB/lib --with-zlib-includes=$EBROOTZLIB/include ',
421+
'--with-bzlib --with-bzlib-libs=$EBROOTBZIP2/lib --with-bzlib-includes=$EBROOTBZIP2/include '
422+
]
423+
current_configopts = ec.get('configopts', '')
424+
for option in options_to_remove:
425+
current_configopts = current_configopts.replace(option, '')
426+
ec['configopts'] = current_configopts.strip()
427+
print_msg("Using custom configure options for %s", ec.name)
428+
else:
429+
raise EasyBuildError("GRASS-specific hook triggered for non-GRASS easyconfig?!")
430+
431+
412432
def parse_hook_fontconfig_add_fonts(ec, eprefix):
413433
"""Inject --with-add-fonts configure option for fontconfig."""
414434
if ec.name == 'fontconfig':
@@ -1579,6 +1599,7 @@ def post_easyblock_hook(self, *args, **kwargs):
15791599
PARSE_HOOKS = {
15801600
'casacore': parse_hook_casacore_disable_vectorize,
15811601
'CGAL': parse_hook_cgal_toolchainopts_precise,
1602+
'GRASS': parse_hook_grass,
15821603
'fontconfig': parse_hook_fontconfig_add_fonts,
15831604
'FreeImage': parse_hook_freeimage_aarch64,
15841605
'grpcio': parse_hook_grpcio_zlib,

0 commit comments

Comments
 (0)