@@ -409,26 +409,6 @@ 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
-
432
412
def parse_hook_fontconfig_add_fonts (ec , eprefix ):
433
413
"""Inject --with-add-fonts configure option for fontconfig."""
434
414
if ec .name == 'fontconfig' :
@@ -804,6 +784,24 @@ def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs):
804
784
raise EasyBuildError ("CUDA-Samples-specific hook triggered for non-CUDA-Samples easyconfig?!" )
805
785
806
786
787
+ def pre_configure_hook_grass (self , * args , ** kwargs ):
788
+ """
789
+ Pre-configure hook for GRASS to remove filtered deps specific configopts lines for readline, zlib, and bzlib
790
+ """
791
+ if self .name == 'GRASS' :
792
+ # determine path to Prefix installation in compat layer via $EPREFIX
793
+ eprefix = get_eessi_envvar ('EPREFIX' )
794
+
795
+ # Dependencies for which the configuration options need to be replaced
796
+ filtered_deps = ['readline' , 'zlib' , 'bzlib' ]
797
+ for dep in filtered_deps :
798
+ self .cfg ['configopts' ] = re .sub (fr'--with-{ dep } -includes=\S*' , f'--with-{ dep } -includes=$EPREFIX/usr/include' , self .cfg ['configopts' ])
799
+ self .cfg ['configopts' ] = re .sub (fr'--with-{ dep } -libs=\S*' , f'--with-{ dep } -libs=$EPREFIX/usr/lib64' , self .cfg ['configopts' ])
800
+ print_msg ("Using custom configure options for %s" , self .name )
801
+ else :
802
+ raise EasyBuildError ("GRASS-specific hook triggered for non-GRASS easyconfig?!" )
803
+
804
+
807
805
def pre_configure_hook_score_p (self , * args , ** kwargs ):
808
806
"""
809
807
Pre-configure hook for Score-p
@@ -1599,7 +1597,6 @@ def post_easyblock_hook(self, *args, **kwargs):
1599
1597
PARSE_HOOKS = {
1600
1598
'casacore' : parse_hook_casacore_disable_vectorize ,
1601
1599
'CGAL' : parse_hook_cgal_toolchainopts_precise ,
1602
- 'GRASS' : parse_hook_grass ,
1603
1600
'fontconfig' : parse_hook_fontconfig_add_fonts ,
1604
1601
'FreeImage' : parse_hook_freeimage_aarch64 ,
1605
1602
'grpcio' : parse_hook_grpcio_zlib ,
@@ -1625,6 +1622,7 @@ def post_easyblock_hook(self, *args, **kwargs):
1625
1622
'CUDA-Samples' : pre_configure_hook_CUDA_Samples_test_remove ,
1626
1623
'GObject-Introspection' : pre_configure_hook_gobject_introspection ,
1627
1624
'Extrae' : pre_configure_hook_extrae ,
1625
+ 'GRASS' : pre_configure_hook_grass ,
1628
1626
'GROMACS' : pre_configure_hook_gromacs ,
1629
1627
'libfabric' : pre_configure_hook_libfabric_disable_psm3_x86_64_generic ,
1630
1628
'LLVM' : pre_configure_hook_llvm ,
0 commit comments