]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #26828: convergence EDF: gdal cleanup
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 1 Mar 2022 10:01:26 +0000 (11:01 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 1 Mar 2022 10:01:26 +0000 (11:01 +0100)
products/compil_scripts/gdal-2.4.0.sh
products/env_scripts/netcdf.py

index 483ba9614e18d7e0021ab67ea4741538c9428cb6..d6ed267b1a54d5e59ea775523dba46b64662a3d6 100755 (executable)
@@ -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"
index 62a4a449873bd72cffe555af3a5b0c4ef34e0670..31057638a325ee07a586424015b14164f6b5bdb7 100644 (file)
@@ -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'))