From: Nabil Ghodbane Date: Fri, 1 Apr 2022 07:16:23 +0000 (+0200) Subject: spns #29324: embed gdal on CO8 since system one not compatible with HDF5. Apply gdal... X-Git-Tag: V9_9_0~109 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c632c09c1bafa4eb30f6958a44f9ea8cc99f05aa;p=tools%2Fsat_salome.git spns #29324: embed gdal on CO8 since system one not compatible with HDF5. Apply gdal GNUmakefile patch discussed at this link: https://github.com/OSGeo/gdal/commit/554656a26f248760c7ad64e1b196b47241fc0bb7. See also discussion at this link: https://github.com/OSGeo/gdal/issues/2402 --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 89b8020..72ad724 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -240,6 +240,7 @@ __overwrite__ : 'APPLICATION.products.cminpack' : '1.3.6' 'APPLICATION.products.PyFMI' : {tag: '2.5', base: 'no', section: 'version_2_5_no_pip' } 'APPLICATION.products.statsmodels' : {tag: '0.6.1', base: 'no', section: 'version_0_6_1_no_pip' } + 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_CO8' } # spns #29324 } { __condition__ : "VARS.dist in ['FD32']" diff --git a/products/compil_scripts/gdal-2.4.0.sh b/products/compil_scripts/gdal-2.4.0.sh index bb8ed91..b63abb6 100755 --- a/products/compil_scripts/gdal-2.4.0.sh +++ b/products/compil_scripts/gdal-2.4.0.sh @@ -18,6 +18,11 @@ CONFIGURE_FLAGS+=" --with-threads" CONFIGURE_FLAGS+=" --with-python=${PYTHONBIN}" CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" + +if [[ "$DIST_NAME$DIST_VERSION" == "CO8" ]]; then + CONFIGURE_FLAGS+=" --without-jasper" +fi + if [ ! -z "$LIBXML_ROOT_DIR" ]; then CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" fi diff --git a/products/gdal.pyconf b/products/gdal.pyconf index 95b306c..9662ad7 100644 --- a/products/gdal.pyconf +++ b/products/gdal.pyconf @@ -48,3 +48,11 @@ version_2_4_0_FD32: compil_script : 'gdal-2.4.0.sh' patches : ["gdal.0001-r2000.patch"] } + +version_2_4_0_CO8: +{ + compil_script : 'gdal-2.4.0.sh' + patches : ["gdal.0001-r2000.patch", + "gdal.0002-GNUmakefile-tooLongLine.patch" + ] +} diff --git a/products/patches/gdal.0002-GNUmakefile-tooLongLine.patch b/products/patches/gdal.0002-GNUmakefile-tooLongLine.patch new file mode 100644 index 0000000..696739e --- /dev/null +++ b/products/patches/gdal.0002-GNUmakefile-tooLongLine.patch @@ -0,0 +1,23 @@ +--- gdal-2.4.0-ref/gdal/GNUmakefile 2022-01-10 21:48:46.000000000 +0100 ++++ gdal-2.4.0-new/gdal/GNUmakefile 2022-03-31 18:23:13.203131414 +0200 +@@ -59,9 +59,18 @@ + $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \ + -o $(GDAL_SLIB) + ++# split potentially long lines ++SORTED := $(sort $(wildcard $(GDAL_OBJ:.o=.lo))) ++NSORTED := $(words $(SORTED)) ++# mid left and right indices ++MIDL := $(shell echo $$(( $(NSORTED) / 2 )) ) ++MIDR := $(shell echo $$(( $(MIDL) + 1 )) ) ++ + $(LIBGDAL): $(GDAL_OBJ:.o=.lo) +- $(LD) $(LDFLAGS) $(LIBS) -o $@ $(sort $(wildcard $(GDAL_OBJ:.o=.lo))) \ +- -rpath $(INST_LIB) \ ++ $(LD) $(LDFLAGS) $(LIBS) -o $@ \ ++ $(wordlist 1,$(MIDL),$(SORTED)) \ ++ $(wordlist $(MIDR),$(words $(SORTED)),$(SORTED)) \ ++ -rpath $(INST_LIB) \ + -no-undefined \ + -version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE) + ifeq ($(MACOSX_FRAMEWORK),yes)