@@ -409,6 +409,26 @@ def parse_hook_cgal_toolchainopts_precise(ec, eprefix):
409
409
raise EasyBuildError ("CGAL-specific hook triggered for non-CGAL easyconfig?!" )
410
410
411
411
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
+
412
432
def parse_hook_fontconfig_add_fonts (ec , eprefix ):
413
433
"""Inject --with-add-fonts configure option for fontconfig."""
414
434
if ec .name == 'fontconfig' :
@@ -1579,6 +1599,7 @@ def post_easyblock_hook(self, *args, **kwargs):
1579
1599
PARSE_HOOKS = {
1580
1600
'casacore' : parse_hook_casacore_disable_vectorize ,
1581
1601
'CGAL' : parse_hook_cgal_toolchainopts_precise ,
1602
+ 'GRASS' : parse_hook_grass ,
1582
1603
'fontconfig' : parse_hook_fontconfig_add_fonts ,
1583
1604
'FreeImage' : parse_hook_freeimage_aarch64 ,
1584
1605
'grpcio' : parse_hook_grpcio_zlib ,
0 commit comments