From 3983e1894011f5a150ed996da7a20ff3f3f4b162 Mon Sep 17 00:00:00 2001 From: root <root@mbbnode-0-33.local> Date: Mon, 24 Feb 2020 15:13:39 +0100 Subject: [PATCH] adding a gdal modulefile for gdal 3.0.4 --- envfiles/{gdal-2.1.2 => gdal/2.1.2} | 2 +- envfiles/gdal/3.0.4 | 48 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) rename envfiles/{gdal-2.1.2 => gdal/2.1.2} (96%) create mode 100644 envfiles/gdal/3.0.4 diff --git a/envfiles/gdal-2.1.2 b/envfiles/gdal/2.1.2 similarity index 96% rename from envfiles/gdal-2.1.2 rename to envfiles/gdal/2.1.2 index 378675b..e821d3c 100644 --- a/envfiles/gdal-2.1.2 +++ b/envfiles/gdal/2.1.2 @@ -49,4 +49,4 @@ prepend-path PATH $GDAL_CURPATH/bin prepend-path LD_LIBRARY_PATH $GDAL_CURPATH/lib setenv GDAL_DATA $GDAL_CURPATH/share/gdal/ -append-path PE_PRODUCT_LIST GDAL +append-path PE_PRODUCT_LIST GDAL.$GDAL_LEVEL diff --git a/envfiles/gdal/3.0.4 b/envfiles/gdal/3.0.4 new file mode 100644 index 0000000..4901f95 --- /dev/null +++ b/envfiles/gdal/3.0.4 @@ -0,0 +1,48 @@ +#%Module###################################################################### +# +# 20200224 GDAL 3.0.4 modulefile +# + +proc ModulesHelp { } { +puts stderr "This modulefile defines the library paths and" +puts stderr "include paths needed to use GDAL 3.0.4" +puts stderr "The program GDAL 3.0.4" +puts stderr "is added to PATH." +} + +set rel [uname release] +global prodlist + +set prodlist {proj/6.3.1 hdf5/1.10.6-parallel} + +set is_module_rm [module-info mode remove] + +catch {set modulehomes $env(MODULEPATH)} +if { [ module-info mode load ] } { + foreach prod $prodlist { + foreach mfilehome [ split $modulehomes :] { + if { [file exists $mfilehome/$prod] } { + module load $prod + } + } + } +} + +if { [ module-info mode remove ] } { + foreach prod $prodlist { + foreach mfilehome [ split $modulehomes :] { + if { [file exists $mfilehome/$prod] } { + module unload $prod + } + } + } +} + +set GDAL_LEVEL 3.0.4 +set GDAL_CURPATH /share/apps/bin/gdal/$GDAL_LEVEL/ + +prepend-path PATH $GDAL_CURPATH/bin +prepend-path LD_LIBRARY_PATH $GDAL_CURPATH/lib +setenv GDAL_DATA $GDAL_CURPATH/share/gdal/ + +append-path PE_PRODUCT_LIST GDAL.$GDAL_LEVEL -- GitLab