Merged
[sync] PR-10: Update to 3.7.2 #12
AtomGit-BotAdd on Aug 30, 2024
[sync] PR-10: Update to 3.7.2 #12
Merged
Merged fromsync-pr10-master-to-openEuler-24.09intoopenEuler-24.09
Total: 14 files changed+363-694
| @@ -0,0 +1,44 @@ | |||
| 1 | +From befb52ff36b58582c8afb262041eeab718f6a013 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: desert-sailor <dongxing.wang_a@thundersoft.com> | ||
| 3 | +Date: Fri, 22 Mar 2024 10:08:42 +0800 | ||
| 4 | +Subject: [PATCH 1/2] Fix build error with libxml2 2.12 | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + gcore/gdaljp2metadatagenerator.cpp | 7 ++++++- | ||
| 8 | + port/cpl_xml_validate.cpp | 2 +- | ||
| 9 | + 2 files changed, 7 insertions(+), 2 deletions(-) | ||
| 10 | + | ||
| 11 | +diff --git a/gcore/gdaljp2metadatagenerator.cpp b/gcore/gdaljp2metadatagenerator.cpp | ||
| 12 | +index b6caa2d..751fa3d 100644 | ||
| 13 | +--- a/gcore/gdaljp2metadatagenerator.cpp | ||
| 14 | ++++ b/gcore/gdaljp2metadatagenerator.cpp | ||
| 15 | +@@ -357,7 +357,12 @@ static CPLString GDALGMLJP2EvalExpr(const CPLString &osTemplate, | ||
| 16 | + /************************************************************************/ | ||
| 17 | + | ||
| 18 | + static void GDALGMLJP2XPathErrorHandler(void * /* userData */, | ||
| 19 | +- xmlErrorPtr error) | ||
| 20 | ++#if LIBXML_VERSION >= 21200 | ||
| 21 | ++ const xmlError *error | ||
| 22 | ++#else | ||
| 23 | ++ xmlErrorPtr error | ||
| 24 | ++#endif | ||
| 25 | ++) | ||
| 26 | + { | ||
| 27 | + if (error->domain == XML_FROM_XPATH && error->str1 != nullptr && | ||
| 28 | + error->int1 < static_cast<int>(strlen(error->str1))) | ||
| 29 | +diff --git a/port/cpl_xml_validate.cpp b/port/cpl_xml_validate.cpp | ||
| 30 | +index 7eb49ff..29070d9 100644 | ||
| 31 | +--- a/port/cpl_xml_validate.cpp | ||
| 32 | ++++ b/port/cpl_xml_validate.cpp | ||
| 33 | +@@ -914,7 +914,7 @@ static void CPLLibXMLWarningErrorCallback(void *ctx, const char *msg, ...) | ||
| 34 | + | ||
| 35 | + if (strstr(pszStr, "since this namespace was already imported") == nullptr) | ||
| 36 | + { | ||
| 37 | +- xmlErrorPtr pErrorPtr = xmlGetLastError(); | ||
| 38 | ++ const xmlError *pErrorPtr = xmlGetLastError(); | ||
| 39 | + const char *pszFilename = static_cast<char *>(ctx); | ||
| 40 | + char *pszStrDup = CPLStrdup(pszStr); | ||
| 41 | + int nLen = static_cast<int>(strlen(pszStrDup)); | ||
| 42 | +-- | ||
| 43 | +2.43.0 | ||
| 44 | + | ||
| @@ -0,0 +1,55 @@ | |||
| 1 | +From 83075c1bd26890ef8e5a1186246e965db89b487b Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: desert-sailor <dongxing.wang_a@thundersoft.com> | ||
| 3 | +Date: Fri, 22 Mar 2024 11:26:53 +0800 | ||
| 4 | +Subject: [PATCH 2/2] Fix build error with pre-installed version in the PATH | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + swig/python/CMakeLists.txt | 7 ++++++- | ||
| 8 | + swig/python/install_python.cmake.in | 9 +++++++-- | ||
| 9 | + 2 files changed, 13 insertions(+), 3 deletions(-) | ||
| 10 | + | ||
| 11 | +diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt | ||
| 12 | +index b9c35c9..ca2bd0e 100644 | ||
| 13 | +--- a/swig/python/CMakeLists.txt | ||
| 14 | ++++ b/swig/python/CMakeLists.txt | ||
| 15 | +@@ -270,9 +270,14 @@ if (Python_Interpreter_FOUND) | ||
| 16 | + set(GDAL_LIB_DEP_FOR_PY_SO "${GDAL_LIB_TARGET_NAME}") | ||
| 17 | + endif() | ||
| 18 | + | ||
| 19 | ++ if(WIN32) | ||
| 20 | ++ set(PATH_SEP ";") | ||
| 21 | ++ else() | ||
| 22 | ++ set(PATH_SEP ":") | ||
| 23 | ++ endif() | ||
| 24 | + add_custom_command( | ||
| 25 | + OUTPUT ${PY_SO_LIST} | ||
| 26 | +- COMMAND ${CMAKE_COMMAND} ${WERROR_DEV_FLAG} -P "${BUILD_EXT_FILENAME}" | ||
| 27 | ++ COMMAND ${CMAKE_COMMAND} -E env "\"PATH=${PROJECT_BINARY_DIR}/apps${PATH_SEP}$ENV{PATH}\"" ${CMAKE_COMMAND} ${WERROR_DEV_FLAG} -P "${BUILD_EXT_FILENAME}" | ||
| 28 | + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| 29 | + DEPENDS ${GDAL_LIB_DEP_FOR_PY_SO} ${GDAL_PYTHON_PYSOURCES} ${GDAL_PYTHON_CSOURCES} "${BUILD_EXT_FILENAME}" | ||
| 30 | + ${PROJECT_SOURCE_DIR}/gcore/gdal_priv.h) | ||
| 31 | +diff --git a/swig/python/install_python.cmake.in b/swig/python/install_python.cmake.in | ||
| 32 | +index 7c812b5..f24bd19 100644 | ||
| 33 | +--- a/swig/python/install_python.cmake.in | ||
| 34 | ++++ b/swig/python/install_python.cmake.in | ||
| 35 | +@@ -17,10 +17,15 @@ endif() | ||
| 36 | + if(NOT "@SETUPTOOLS_USE_DISTUTILS@x" STREQUAL "x") | ||
| 37 | + set(ENV{SETUPTOOLS_USE_DISTUTILS} @SETUPTOOLS_USE_DISTUTILS@) | ||
| 38 | + endif() | ||
| 39 | ++if(WIN32) | ||
| 40 | ++ set(PATH_SEP ";") | ||
| 41 | ++else() | ||
| 42 | ++ set(PATH_SEP ":") | ||
| 43 | ++endif() | ||
| 44 | + if(DEFINED INSTALL_PREFIX) | ||
| 45 | +- execute_process(COMMAND "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" install ${ROOT_DIR_ARG} @INSTALL_ARGS@ "${INSTALL_PREFIX}" | ||
| 46 | ++ execute_process(COMMAND ${CMAKE_COMMAND} -E env "PATH=@PROJECT_BINARY_DIR@/apps${PATH_SEP}$ENV{PATH}" "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" install ${ROOT_DIR_ARG} @INSTALL_ARGS@ "${INSTALL_PREFIX}" | ||
| 47 | + WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@") | ||
| 48 | + else() | ||
| 49 | +- execute_process(COMMAND "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" install ${ROOT_DIR_ARG} @INSTALL_ARGS@ | ||
| 50 | ++ execute_process(COMMAND ${CMAKE_COMMAND} -E env "PATH=@PROJECT_BINARY_DIR@/apps${PATH_SEP}$ENV{PATH}" "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" install ${ROOT_DIR_ARG} @INSTALL_ARGS@ | ||
| 51 | + WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@") | ||
| 52 | + endif() | ||
| 53 | +-- | ||
| 54 | +2.43.0 | ||
| 55 | + | ||
| @@ -0,0 +1,11 @@ | |||
| 1 | +#include <bits/wordsize.h> | ||
| 2 | + | ||
| 3 | +#if __WORDSIZE == 32 | ||
| 4 | +#include "gdal/cpl_config-32.h" | ||
| 5 | +#else | ||
| 6 | +#if __WORDSIZE == 64 | ||
| 7 | +#include "gdal/cpl_config-64.h" | ||
| 8 | +#else | ||
| 9 | +#error "Unknown word size" | ||
| 10 | +#endif | ||
| 11 | +#endif | ||
| @@ -1,12 +0,0 @@ | |||
| 1 | -diff --git a/gdal/swig/java/java.opt b/gdal/swig/java/java.opt | ||
| 2 | -index 6aba3e6..4b88fc6 100644 | ||
| 3 | ---- a/gdal/swig/java/java.opt | ||
| 4 | -+++ b/gdal/swig/java/java.opt | ||
| 5 | -@@ -7,6 +7,6 @@ JAVADOC=$(JAVA_HOME)/bin/javadoc | ||
| 6 | - JAVAC=$(JAVA_HOME)/bin/javac | ||
| 7 | - JAVA=$(JAVA_HOME)/bin/java | ||
| 8 | - JAR=$(JAVA_HOME)/bin/jar | ||
| 9 | --JAVA_INCLUDE=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux | ||
| 10 | -+JAVA_INCLUDE=-I/usr/lib/jvm/java/include/ -I/usr/lib/jvm/java/include/linux | ||
| 11 | - | ||
| 12 | - | ||
| @@ -1,13 +0,0 @@ | |||
| 1 | -diff --git a/gdal/frmts/mrf/mrf_band.cpp b/gdal/frmts/mrf/mrf_band.cpp | ||
| 2 | -index 95caf6e..2cdb730 100644 | ||
| 3 | ---- a/gdal/frmts/mrf/mrf_band.cpp | ||
| 4 | -+++ b/gdal/frmts/mrf/mrf_band.cpp | ||
| 5 | -@@ -49,7 +49,7 @@ | ||
| 6 | - | ||
| 7 | - #include <vector> | ||
| 8 | - #include <assert.h> | ||
| 9 | --#include "../zlib/zlib.h" | ||
| 10 | -+#include <zlib.h> | ||
| 11 | - | ||
| 12 | - CPL_CVSID("$Id$") | ||
| 13 | - | ||
| @@ -1,29 +0,0 @@ | |||
| 1 | -diff --git a/gdal/swig/perl/GNUmakefile b/gdal/swig/perl/GNUmakefile | ||
| 2 | -index 68d389d..2dfd533 100644 | ||
| 3 | ---- a/gdal/swig/perl/GNUmakefile | ||
| 4 | -+++ b/gdal/swig/perl/GNUmakefile | ||
| 5 | -@@ -20,16 +20,14 @@ generate: ${WRAPPERS} | ||
| 6 | - if [ -f OSR.pm ]; then mv OSR.pm lib/Geo; fi | ||
| 7 | - if [ -f GNM.pm ]; then mv GNM.pm lib/Geo; fi | ||
| 8 | - | ||
| 9 | --build: gdal_wrap.cc Makefile_Geo__GDAL | ||
| 10 | -+build: Makefile_Geo__GDAL | ||
| 11 | - $(MAKE) -f Makefile_Geo__GDAL | ||
| 12 | - $(MAKE) -f Makefile_Geo__GDAL__Const | ||
| 13 | - $(MAKE) -f Makefile_Geo__OSR | ||
| 14 | - if [ -f Makefile_Geo__OGR ]; then $(MAKE) -f Makefile_Geo__OGR; fi | ||
| 15 | - if [ -f Makefile_Geo__GNM ]; then $(MAKE) -f Makefile_Geo__GNM; fi | ||
| 16 | - | ||
| 17 | --gdal_wrap.cc: generate | ||
| 18 | -- | ||
| 19 | --Makefile_Geo__GDAL: gdal_wrap.cc | ||
| 20 | -+Makefile_Geo__GDAL: Makefile.PL | ||
| 21 | - perl Makefile.PL INSTALL_BASE=$(INST_PREFIX) | ||
| 22 | - | ||
| 23 | - test: build | ||
| 24 | -@@ -66,3 +64,5 @@ doc: .FORCE | ||
| 25 | - | ||
| 26 | - .FORCE: | ||
| 27 | - perl parse-for-doxygen.pl > all.pm; doxygen; rm -f all.pm | ||
| 28 | -+ | ||
| 29 | -+.PHONY: generate | ||
Binary files do not support preview
| @@ -1,13 +0,0 @@ | |||
| 1 | -diff --git a/gdal/scripts/GNUmakefile b/gdal/scripts/GNUmakefile | ||
| 2 | -index 8f039e4..fd1115a 100644 | ||
| 3 | ---- a/gdal/scripts/GNUmakefile | ||
| 4 | -+++ b/gdal/scripts/GNUmakefile | ||
| 5 | -@@ -5,6 +5,6 @@ completion: | ||
| 6 | - | ||
| 7 | - install: | ||
| 8 | - if test "x`pkg-config --version 2>/dev/null`" != "x" -a "x`pkg-config --variable=compatdir bash-completion`" != "x"; then \ | ||
| 9 | -- $(INSTALL_DIR) $(DESTDIR)${prefix}`pkg-config --variable=compatdir bash-completion` ; \ | ||
| 10 | -- cp gdal-bash-completion.sh $(DESTDIR)${prefix}`pkg-config --variable=compatdir bash-completion`; \ | ||
| 11 | -+ $(INSTALL_DIR) $(DESTDIR)`pkg-config --variable=compatdir bash-completion` ; \ | ||
| 12 | -+ $(INSTALL_DATA) gdal-bash-completion.sh $(DESTDIR)`pkg-config --variable=compatdir bash-completion`/gdal; \ | ||
| 13 | - fi | ||
| @@ -0,0 +1,11 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +ARCH=$(uname -m) | ||
| 4 | +case $ARCH in | ||
| 5 | +x86_64 | ppc64 | ppc64le | ia64 | s390x | sparc64 | alpha | alphaev6 | aarch64 ) | ||
| 6 | +gdal-config-64 ${*} | ||
| 7 | +;; | ||
| 8 | +*) | ||
| 9 | +gdal-config-32 ${*} | ||
| 10 | +;; | ||
| 11 | +esac | ||
| @@ -1,15 +0,0 @@ | |||
| 1 | -diff --git a/gdal/frmts/pdf/pdfsdk_headers.h b/gdal/frmts/pdf/pdfsdk_headers.h | ||
| 2 | -index 9150b0f..3f5ed9b 100644 | ||
| 3 | ---- a/gdal/frmts/pdf/pdfsdk_headers.h | ||
| 4 | -+++ b/gdal/frmts/pdf/pdfsdk_headers.h | ||
| 5 | -@@ -50,8 +50,8 @@ | ||
| 6 | - #pragma warning( disable : 4244 ) /* conversion from 'const int' to 'Guchar', possible loss of data */ | ||
| 7 | - #endif | ||
| 8 | - | ||
| 9 | --#include <goo/gtypes.h> | ||
| 10 | --#include <goo/GooList.h> | ||
| 11 | -+#include <poppler/goo/gtypes.h> | ||
| 12 | -+#include <poppler/goo/GooList.h> | ||
| 13 | - | ||
| 14 | - /* begin of poppler xpdf includes */ | ||
| 15 | - #include <poppler/Object.h> | ||
| @@ -0,0 +1,39 @@ | |||
| 1 | +diff -rupN --no-dereference gdal-3.7.2-fedora/frmts/iso8211/CMakeLists.txt gdal-3.7.2-fedora-new/frmts/iso8211/CMakeLists.txt | ||
| 2 | +--- gdal-3.7.2-fedora/frmts/iso8211/CMakeLists.txt 2023-09-05 11:06:01.000000000 +0200 | ||
| 3 | ++++ gdal-3.7.2-fedora-new/frmts/iso8211/CMakeLists.txt 2023-09-13 18:08:12.415548075 +0200 | ||
| 4 | +@@ -15,15 +15,18 @@ gdal_standard_includes(gdal_iso8211) | ||
| 5 | + | ||
| 6 | + # Because linking an OBJECT library | ||
| 7 | + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) | ||
| 8 | +- add_executable(8211dump EXCLUDE_FROM_ALL 8211dump.cpp) | ||
| 9 | ++ add_executable(8211dump 8211dump.cpp) | ||
| 10 | + target_include_directories(8211dump PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) | ||
| 11 | + target_link_libraries(8211dump PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) | ||
| 12 | ++ install(TARGETS 8211dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| 13 | + | ||
| 14 | +- add_executable(8211view EXCLUDE_FROM_ALL 8211view.cpp) | ||
| 15 | ++ add_executable(8211view 8211view.cpp) | ||
| 16 | + target_include_directories(8211view PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) | ||
| 17 | + target_link_libraries(8211view PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) | ||
| 18 | ++ install(TARGETS 8211view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| 19 | + | ||
| 20 | +- add_executable(8211createfromxml EXCLUDE_FROM_ALL 8211createfromxml.cpp) | ||
| 21 | ++ add_executable(8211createfromxml 8211createfromxml.cpp) | ||
| 22 | + target_include_directories(8211createfromxml PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) | ||
| 23 | + target_link_libraries(8211createfromxml PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) | ||
| 24 | ++ install(TARGETS 8211createfromxml RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| 25 | + endif () | ||
| 26 | +diff -rupN --no-dereference gdal-3.7.2-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt gdal-3.7.2-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt | ||
| 27 | +--- gdal-3.7.2-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt 2023-09-05 11:06:01.000000000 +0200 | ||
| 28 | ++++ gdal-3.7.2-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt 2023-09-13 18:08:12.417548017 +0200 | ||
| 29 | +@@ -17,8 +17,9 @@ target_include_directories(ogr_S57 PRIVA | ||
| 30 | + gdal_standard_includes(ogr_S57) | ||
| 31 | + | ||
| 32 | + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) | ||
| 33 | +- add_executable(s57dump EXCLUDE_FROM_ALL s57dump.cpp) | ||
| 34 | ++ add_executable(s57dump s57dump.cpp) | ||
| 35 | + gdal_standard_includes(s57dump) | ||
| 36 | + target_include_directories(s57dump PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) | ||
| 37 | + target_link_libraries(s57dump PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> ogr_S57 gdal_iso8211) | ||
| 38 | ++ install(TARGETS s57dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| 39 | + endif () | ||
Binary files do not support preview