@@ -784,6 +784,24 @@ def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs):
784
784
raise EasyBuildError ("CUDA-Samples-specific hook triggered for non-CUDA-Samples easyconfig?!" )
785
785
786
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
+
787
805
def pre_configure_hook_score_p (self , * args , ** kwargs ):
788
806
"""
789
807
Pre-configure hook for Score-p
@@ -1604,6 +1622,7 @@ def post_easyblock_hook(self, *args, **kwargs):
1604
1622
'CUDA-Samples' : pre_configure_hook_CUDA_Samples_test_remove ,
1605
1623
'GObject-Introspection' : pre_configure_hook_gobject_introspection ,
1606
1624
'Extrae' : pre_configure_hook_extrae ,
1625
+ 'GRASS' : pre_configure_hook_grass ,
1607
1626
'GROMACS' : pre_configure_hook_gromacs ,
1608
1627
'libfabric' : pre_configure_hook_libfabric_disable_psm3_x86_64_generic ,
1609
1628
'LLVM' : pre_configure_hook_llvm ,
0 commit comments