Salome HOME
spns #29324: embed gdal on CO8 since system one not compatible with HDF5. Apply gdal...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 1 Apr 2022 07:16:23 +0000 (09:16 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 1 Apr 2022 07:16:32 +0000 (09:16 +0200)
applications/SALOME-master-native.pyconf
products/compil_scripts/gdal-2.4.0.sh
products/gdal.pyconf
products/patches/gdal.0002-GNUmakefile-tooLongLine.patch [new file with mode: 0644]

index 89b80201c1acba446ceb8c79be11eced07b2b0f6..72ad724e48d0f351cf479f3982b1ca3b88107b9f 100644 (file)
@@ -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']"
index bb8ed914503bc3506aa7e6e412540454073460a6..b63abb69c93eeab46a3aa1cefdf259a925740a8c 100755 (executable)
@@ -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
index 95b306cd805a0a19eff83bab3a63dad3fb5de9f8..9662ad7f7834d4c6e57801680c4e04015fea4ab0 100644 (file)
@@ -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 (file)
index 0000000..696739e
--- /dev/null
@@ -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)