From 574128f605823198abfe271c2c40d9621abd28f9 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 1 Mar 2022 11:01:26 +0100 Subject: [PATCH] spns #26828: convergence EDF: gdal cleanup --- products/compil_scripts/gdal-2.4.0.sh | 33 ++++++--------------------- products/env_scripts/netcdf.py | 1 + 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/products/compil_scripts/gdal-2.4.0.sh b/products/compil_scripts/gdal-2.4.0.sh index 483ba96..d6ed267 100755 --- a/products/compil_scripts/gdal-2.4.0.sh +++ b/products/compil_scripts/gdal-2.4.0.sh @@ -4,29 +4,6 @@ echo "########################################################################## echo "gdal" $VERSION echo "##########################################################################" -CONFIGURE_FLAGS= -CONFIGURE_FLAGS+=" --with-threads" -CONFIGURE_FLAGS+=" --with-python=${PYTHONBIN}" -CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" -CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" -CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" - -./configure --prefix=$CURRENT_SOFTWARE_INSTALL_DIR -LDFLAGS= -LDFLAGS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" -LDFLAGS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" - -HDF5_CFLAGS= -HDF5_CFLAGS+=" -I${HDF5_ROOT_DIR}/include -L${HDF5_ROOT_DIR}/lib/ -lhdf5" -HDF5_CFLAGS+=" -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" - -LIBS= -LIBS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" -LIBS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" - -HDF5_LIBS="-L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" -HDF5_INCLUDE="-I${HDF5_ROOT_DIR}/include" - CONFIGURE_FLAGS= CONFIGURE_FLAGS+=" --with-pcraster=internal" CONFIGURE_FLAGS+=" --with-png=internal" @@ -37,16 +14,20 @@ CONFIGURE_FLAGS+=" --with-gif=internal" CONFIGURE_FLAGS+=" --with-python=yes" CONFIGURE_FLAGS+=" --with-geos=yes" CONFIGURE_FLAGS+=" --with-sqlite3=yes" +CONFIGURE_FLAGS+=" --with-threads" +CONFIGURE_FLAGS+=" --with-python=${PYTHONBIN}" +CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" echo -echo "*** configure $CONFIGURE_FLAGS" +echo "*** configure $CONFIGURE_FLAGS LDFLAGS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_ROOT_DIR}/lib -lnetcdf\" HDF5_CFLAGS=\"-I${HDF5HOME}/include -L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl\" LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf\" HDF5_LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl \" HDF5_INCLUDE=\"-I${HDF5HOME}/include\"" rm -rf $BUILD_DIR mkdir -p $BUILD_DIR -cd $SOURCE_DIR/gdal -./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS +cp -r $SOURCE_DIR/gdal $BUILD_DIR/gdal +cd $BUILD_DIR/gdal +./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS LDFLAGS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf" HDF5_CFLAGS="-I${HDF5HOME}/include -L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl" LIBS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf" HDF5_LIBS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl " HDF5_INCLUDE="-I${HDF5HOME}/include" if [ $? -ne 0 ] then echo "ERROR on configure" diff --git a/products/env_scripts/netcdf.py b/products/env_scripts/netcdf.py index 62a4a44..3105763 100644 --- a/products/env_scripts/netcdf.py +++ b/products/env_scripts/netcdf.py @@ -3,6 +3,7 @@ import os.path def set_env(env, prereq_dir, version): env.set('NETCDF_ROOT_DIR', prereq_dir) + env.set('NETCDF_INSTALL_DIR', prereq_dir) env.set('NETCDF_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) -- 2.39.2