diff options
| author | CoprDistGit <infra@openeuler.org> | 2025-12-19 08:24:01 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2025-12-19 08:24:01 +0000 |
| commit | 798e274c8bba06599dd672737ec1d27729537775 (patch) | |
| tree | 24fd51d5a2e8d6c2b3bd8d0ed4e74620ef509dbb | |
| parent | 4e48927fd1a13f113db27b7a309adedbede30f6e (diff) | |
automatic import of gdalopeneuler24.03_LTS
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | cpl-config.h | 11 | ||||
| -rwxr-xr-x | gdal-config | 11 | ||||
| -rw-r--r-- | gdal.spec | 384 | ||||
| -rw-r--r-- | gdal_incompatible-pointer-types.patch | 21 | ||||
| -rw-r--r-- | gdal_utils.patch | 37 | ||||
| -rw-r--r-- | sources | 2 |
7 files changed, 468 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/gdal-3.10.1.tar.xz +/gdalautotest-3.10.1.tar.gz diff --git a/cpl-config.h b/cpl-config.h new file mode 100644 index 0000000..456693f --- /dev/null +++ b/cpl-config.h @@ -0,0 +1,11 @@ +#include <bits/wordsize.h> + +#if __WORDSIZE == 32 +#include "gdal/cpl_config-32.h" +#else +#if __WORDSIZE == 64 +#include "gdal/cpl_config-64.h" +#else +#error "Unknown word size" +#endif +#endif diff --git a/gdal-config b/gdal-config new file mode 100755 index 0000000..0a258a7 --- /dev/null +++ b/gdal-config @@ -0,0 +1,11 @@ +#!/bin/bash + +ARCH=$(uname -m) +case $ARCH in +x86_64 | ppc64 | ppc64le | ia64 | s390x | sparc64 | alpha | alphaev6 | aarch64 | riscv64 ) +gdal-config-64 ${*} +;; +*) +gdal-config-32 ${*} +;; +esac diff --git a/gdal.spec b/gdal.spec new file mode 100644 index 0000000..92e95b8 --- /dev/null +++ b/gdal.spec @@ -0,0 +1,384 @@ +%global run_tests 0 + +%global bashcompletiondir %(pkg-config --variable=compatdir bash-completion) +%global cpuarch 64 + +%if 0%{?bootstrap} +%global with_mysql 0 +%global mysql --without-mysql +%global with_poppler 0 +%global poppler --without-poppler +%global with_spatialite 0 +%global spatialite --without-spatialite +%else +# https://bugzilla.redhat.com/show_bug.cgi?id=1490492 +%global with_mysql 1 +%global mysql --with-mysql +# https://bugzilla.redhat.com/show_bug.cgi?id=1490492 +%global with_poppler 1 +%global poppler --with-poppler +%global with_spatialite 1 +%global spatialite "--with-spatialite" +%endif + +Name: gdal +Version: 3.10.1 +Release: 3 +Summary: GIS file format library +License: MIT +URL: http://www.gdal.org +Source0: http://download.osgeo.org/gdal/%{version}/gdal-%{version}.tar.xz +Source1: http://download.osgeo.org/%{name}/%{version}/%{name}autotest-%{version}.tar.gz +# Multilib compatible cpl-config.h header +Source2: cpl-config.h +# Multilib compatible gdal-config script +Source3: gdal-config + +# Add some utils to the default install target +Patch0: gdal_utils.patch +Patch1: gdal_incompatible-pointer-types.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gmock-devel + +BuildRequires: armadillo-devel +BuildRequires: bison +BuildRequires: cfitsio-devel +BuildRequires: CharLS-devel +BuildRequires: curl-devel +BuildRequires: expat-devel +BuildRequires: freexl-devel +BuildRequires: geos-devel +BuildRequires: giflib-devel +BuildRequires: gtest-devel +BuildRequires: hdf-devel +BuildRequires: hdf5-devel +BuildRequires: json-c-devel +BuildRequires: libdap-devel +BuildRequires: libgeotiff-devel +BuildRequires: libgta-devel +BuildRequires: libjpeg-devel +# BuildRequires: libkml-devel +# BuildRequires: liblerc-devel +BuildRequires: libpng-devel +BuildRequires: libpq-devel +%if %{with_spatialite} +BuildRequires: libspatialite-devel +%endif +BuildRequires: libtiff-devel +BuildRequires: libtirpc-devel +BuildRequires: libwebp-devel +BuildRequires: libzstd-devel +%if 0%{?with_mysql} +BuildRequires: mariadb-connector-c-devel +%endif +BuildRequires: netcdf-devel +BuildRequires: ogdi-devel +BuildRequires: openexr-devel +BuildRequires: openjpeg2-devel +BuildRequires: pcre2-devel +%if 0%{?with_poppler} +BuildRequires: poppler-devel +%endif +BuildRequires: proj-devel >= 5.2.0 +BuildRequires: qhull-devel +BuildRequires: sqlite-devel +BuildRequires: swig +BuildRequires: unixODBC-devel +BuildRequires: xerces-c-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel + +# Python +BuildRequires: python3-devel +BuildRequires: python3-numpy +BuildRequires: python3-setuptools +BuildRequires: python3-pytest >= 3.6 +BuildRequires: python3-lxml >= 4.5.1 +BuildRequires: python3-filelock +BuildRequires: python3-pyproj + +# Java +# For 'mvn_artifact' and 'mvn_install' +BuildRequires: ant +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: javapackages-local +BuildRequires: jpackage-utils + +# Run time dependency for gpsbabel driver +Requires: gpsbabel +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + + +%description +Geospatial Data Abstraction Library (GDAL/OGR) is a cross platform +C++ translator library for raster and vector geospatial data formats. +As a library, it presents a single abstract data model to the calling +application for all supported formats. It also comes with a variety of +useful commandline utilities for data translation and processing. + +It provides the primary data access engine for many applications. +GDAL/OGR is the most widely used geospatial data access library. + + +%package devel +Summary: Development files for the GDAL file format library +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description devel +This package contains development files for GDAL. + + +%package libs +Summary: GDAL file format library +# See frmts/grib/degrib/README.TXT +Provides: bundled(g2lib) = 1.6.0 +Provides: bundled(degrib) = 2.14 + +%description libs +This package contains the GDAL file format library. + +# No complete java yet in EL8 +%package java +Summary: Java modules for the GDAL file format library +Requires: jpackage-utils +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description java +The GDAL Java modules provide support to handle multiple GIS file formats. + + +%package javadoc +Summary: Javadocs for %{name} +Requires: jpackage-utils +BuildArch: noarch + +%description javadoc +This package contains the API documentation for %{name}. + + +%package -n python3-gdal +%{?python_provide:%python_provide python3-gdal} +Summary: Python modules for the GDAL file format library +Requires: python3-numpy +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description -n python3-gdal +The GDAL Python 3 modules provide support to handle multiple GIS file formats. + + +%package python-tools +Summary: Python tools for the GDAL file format library +Requires: python3-gdal + +%description python-tools +The GDAL Python package provides number of tools for programming and +manipulating GDAL file format library + +%prep +%autosetup -N -p1 -n %{name}-%{version} + +# Delete bundled libraries +rm -rf frmts/zlib +rm -rf frmts/png/libpng +rm -rf frmts/gif/giflib +rm -rf frmts/jpeg/libjpeg +rm -rf frmts/jpeg/libjpeg12 +rm -rf frmts/gtiff/libgeotiff +rm -rf frmts/gtiff/libtiff +rm -rf mrf/LERCV1 +rm -rf third_party/LercLib + +# Setup autotest directory +tar xf %{SOURCE1} +mv %{name}autotest-%{version} autotest + +# Need to patch autotest +# autotest/cpp uses private -O0 where it does not like any level of FORTIFY_SOURCE +sed -i -e 's/-D_FORTIFY_SOURCE=2/%{?_fortify_level_flags}%{!?_fortify_level_flags:-Wp,-D_FORTIFY_SOURCE=2}/g' autotest/cpp/CMakeLists.txt +sed -i "s/ \-O0)/)/g" ./autotest/cpp/CMakeLists.txt + +%build +%cmake \ + -DCMAKE_INSTALL_INCLUDEDIR=include/gdal \ + -DGDAL_JAVA_INSTALL_DIR=%{_jnidir}/%{name} \ + -DGDAL_JAVA_JNI_INSTALL_DIR=%{_jnidir}/%{name} \ + -DGDAL_USE_JPEG12_INTERNAL=OFF \ + -DENABLE_DEFLATE64=OFF \ + -DGDAL_USE_LERC_INTERNAL=OFF +%cmake_build + +%if %{with mingw} +%mingw_cmake \ + -DBUILD_TESTING=OFF \ + -DCMAKE_INSTALL_INCLUDEDIR=include/gdal \ + -DGDAL_USE_JPEG12_INTERNAL=OFF \ + -DENABLE_DEFLATE64=OFF \ + -DGDAL_USE_LERC_INTERNAL=OFF +%mingw_make_build +%endif + + +%install +%cmake_install + +# List of manpages for python scripts +for file in %{buildroot}%{_bindir}/*.py; do + if [ -f %{buildroot}%{_mandir}/man1/`basename ${file/.py/.1*}` ]; then + echo "%{_mandir}/man1/`basename ${file/.py/.1*}`" >> gdal_python_manpages.txt + echo "%exclude %{_mandir}/man1/`basename ${file/.py/.1*}`" >> gdal_python_manpages_excludes.txt + fi +done + +# Multilib +# - cpl_config.h is arch-dependent (contains various SIZEOF defines) +# - gdal-config stores arch-specific information +mv %{buildroot}%{_includedir}/%{name}/cpl_config.h %{buildroot}%{_includedir}/%{name}/cpl_config-%{cpuarch}.h +cp -a %{SOURCE2} %{buildroot}%{_includedir}/%{name}/cpl_config.h +mv %{buildroot}%{_bindir}/%{name}-config %{buildroot}%{_bindir}/%{name}-config-%{cpuarch} +cp -a %{SOURCE3} %{buildroot}%{_bindir}/%{name}-config + + +%if 0%{run_tests} +%check +%ctest || : +%endif + + +%files -f gdal_python_manpages_excludes.txt +%{_bindir}/gdal2tiles +%{_bindir}/gdal2xyz +%{_bindir}/gdal_calc +%{_bindir}/gdal_edit +%{_bindir}/gdal_fillnodata +%{_bindir}/gdal_footprint +%{_bindir}/gdal_merge +%{_bindir}/gdal_pansharpen +%{_bindir}/gdal_polygonize +%{_bindir}/gdal_proximity +%{_bindir}/gdal_retile +%{_bindir}/gdal_sieve +%{_bindir}/gdalattachpct +%{_bindir}/gdalcompare +%{_bindir}/gdalmove +%{_bindir}/ogr_layer_algebra +%{_bindir}/ogrmerge +%{_bindir}/pct2rgb +%{_bindir}/rgb2pct +%{_bindir}/gdal_contour +%{_bindir}/gdal_create +%{_bindir}/gdal_grid +%{_bindir}/gdal_rasterize +%{_bindir}/gdal_translate +%{_bindir}/gdal_viewshed +%{_bindir}/gdaladdo +%{_bindir}/gdalbuildvrt +%{_bindir}/gdaldem +%{_bindir}/gdalenhance +%{_bindir}/gdalinfo +%{_bindir}/gdallocationinfo +%{_bindir}/gdalmanage +%{_bindir}/gdalmdiminfo +%{_bindir}/gdalmdimtranslate +%{_bindir}/gdalsrsinfo +%{_bindir}/gdaltindex +%{_bindir}/gdaltransform +%{_bindir}/gdalwarp +%{_bindir}/gnmanalyse +%{_bindir}/gnmmanage +%{_bindir}/nearblack +%{_bindir}/ogr2ogr +%{_bindir}/ogrinfo +%{_bindir}/ogrlineref +%{_bindir}/ogrtindex +%{_bindir}/sozip +%{_datadir}/bash-completion/completions/* +%exclude %{_datadir}/bash-completion/completions/*.py +%{_mandir}/man1/* +%exclude %{_mandir}/man1/gdal-config.1* +# Python manpages excluded in -f gdal_python_manpages_excludes.txt + +%files libs +%license LICENSE.TXT +%doc NEWS.md PROVENANCE.TXT COMMITTERS +%{_libdir}/libgdal.so.36 +%{_libdir}/libgdal.so.36.* +%{_datadir}/%{name}/ +%{_libdir}/gdalplugins/ + +%files devel +%{_bindir}/%{name}-config +%{_bindir}/%{name}-config-%{cpuarch} +%{_includedir}/%{name}/ +%{_libdir}/lib%{name}.so +%{_libdir}/cmake/gdal/ +%{_libdir}/pkgconfig/%{name}.pc +%{_mandir}/man1/gdal-config.1* + +%files -n python3-gdal +%doc swig/python/README.rst +%{python3_sitearch}/GDAL-%{version}-py*.egg-info/ +%{python3_sitearch}/osgeo/ +%{python3_sitearch}/osgeo_utils/ + +%files python-tools -f gdal_python_manpages.txt +%{_bindir}/gdal_calc.py +%{_bindir}/gdal_edit.py +%{_bindir}/gdal_fillnodata.py +%{_bindir}/gdal_merge.py +%{_bindir}/gdal_pansharpen.py +%{_bindir}/gdal_polygonize.py +%{_bindir}/gdal_proximity.py +%{_bindir}/gdal_retile.py +%{_bindir}/gdal_sieve.py +%{_bindir}/gdal2tiles.py +%{_bindir}/gdal2xyz.py +%{_bindir}/gdalattachpct.py +%{_bindir}/gdalcompare.py +%{_bindir}/gdalmove.py +%{_bindir}/ogr_layer_algebra.py +%{_bindir}/ogrmerge.py +%{_bindir}/pct2rgb.py +%{_bindir}/rgb2pct.py +%{_datadir}/bash-completion/completions/*.py + +%files java +%{_jnidir}/%{name}/gdal-%{version}-sources.jar +%{_jnidir}/%{name}/gdal-%{version}.jar +%{_jnidir}/%{name}/gdal-%{version}.pom +%{_jnidir}/%{name}/libgdalalljni.so + +%files javadoc +%{_jnidir}/%{name}/gdal-%{version}-javadoc.jar + +%changelog +* Mon Mar 3 2025 laokz <zhangkai@iscas.ac.cn> - 3.10.1-3 +- Add riscv64 to gdal-config source + +* Thu Feb 27 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.10.1-2 +- Fix build error with test job out of memory + +* Tue Feb 11 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.10.1-1 +- Update to 3.10.1 + +* Fri Nov 15 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.7.3-2 +- Fix gdal-config-64 missing + +* Tue Nov 5 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.7.3-1 +- Update to 3.7.3 + CheckDependentLibraries.cmake: don't use libjpeg if disabled + frmts/mrf/CMakeLists.txt: ignore HAVE_JPEGTURBO_DUAL_MODE_8_12 if GDAL_USE_JPEG is OFF + FindPostgreSQL.cmake: Update the list of released PgSQL versions + Add support for PoDoFo >= 0.10.0 + Add support for TileDB 2.17 + Fix build with -DRENAME_INTERNAL_SHAPELIB_SYMBOLS=OFF + +* Thu Aug 29 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.7.2-1 +- Update to 3.7.2 + +* Fri Apr 01 2022 tanyulong <tanyulong@kylinos.cn> - 2.3.1-2 +- add config.rpath and remove jasper ,fix compile error + +* Fri Oct 8 2021 zhaoshuang <zhaoshuang@uniontech.com> - 2.3.1-1 +- Init package diff --git a/gdal_incompatible-pointer-types.patch b/gdal_incompatible-pointer-types.patch new file mode 100644 index 0000000..4cbb9f2 --- /dev/null +++ b/gdal_incompatible-pointer-types.patch @@ -0,0 +1,21 @@ +diff -rupN --no-dereference gdal-3.10.1-fedora/port/cpl_vsil_win32.cpp gdal-3.10.1-fedora-new/port/cpl_vsil_win32.cpp +--- gdal-3.10.1-fedora/port/cpl_vsil_win32.cpp 2025-01-08 15:54:06.000000000 +0100 ++++ gdal-3.10.1-fedora-new/port/cpl_vsil_win32.cpp 2025-01-14 22:27:26.805886705 +0100 +@@ -896,7 +896,7 @@ int VSIWin32FilesystemHandler::Stat(cons + pwszFilename[nLen - 1] = 0; + #endif + +- int nResult = _wstat64(pwszFilename, pStatBuf); ++ int nResult = _wstat64(pwszFilename, reinterpret_cast<struct _stat64 *>(pStatBuf)); + + // If _wstat64() fails and the original name is not an extended one, + // then retry with an extended filename +@@ -907,7 +907,7 @@ int VSIWin32FilesystemHandler::Stat(cons + nLastError == ERROR_FILENAME_EXCED_RANGE) + { + VSIWin32TryLongFilename(pwszFilename); +- nResult = _wstat64(pwszFilename, pStatBuf); ++ nResult = _wstat64(pwszFilename, reinterpret_cast<struct _stat64 *>(pStatBuf)); + } + } + diff --git a/gdal_utils.patch b/gdal_utils.patch new file mode 100644 index 0000000..a6f07e7 --- /dev/null +++ b/gdal_utils.patch @@ -0,0 +1,37 @@ +diff -rupN --no-dereference gdal-3.10.1-fedora/frmts/iso8211/CMakeLists.txt gdal-3.10.1-fedora-new/frmts/iso8211/CMakeLists.txt +--- gdal-3.10.1-fedora/frmts/iso8211/CMakeLists.txt 2025-01-08 15:54:06.000000000 +0100 ++++ gdal-3.10.1-fedora-new/frmts/iso8211/CMakeLists.txt 2025-01-14 22:27:26.561168120 +0100 +@@ -14,14 +14,17 @@ target_sources(${GDAL_LIB_TARGET_NAME} P + gdal_standard_includes(gdal_iso8211) + + # Because linking an OBJECT library +-add_executable(8211dump EXCLUDE_FROM_ALL 8211dump.cpp) ++add_executable(8211dump 8211dump.cpp) + target_include_directories(8211dump PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) + target_link_libraries(8211dump PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) ++install(TARGETS 8211dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +-add_executable(8211view EXCLUDE_FROM_ALL 8211view.cpp) ++add_executable(8211view 8211view.cpp) + target_include_directories(8211view PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) + target_link_libraries(8211view PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) ++install(TARGETS 8211view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +-add_executable(8211createfromxml EXCLUDE_FROM_ALL 8211createfromxml.cpp) ++add_executable(8211createfromxml 8211createfromxml.cpp) + target_include_directories(8211createfromxml PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) + target_link_libraries(8211createfromxml PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> gdal_iso8211) ++install(TARGETS 8211createfromxml RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff -rupN --no-dereference gdal-3.10.1-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt gdal-3.10.1-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt +--- gdal-3.10.1-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt 2025-01-08 15:54:06.000000000 +0100 ++++ gdal-3.10.1-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt 2025-01-14 22:27:26.561517435 +0100 +@@ -27,7 +27,8 @@ set_property( + APPEND + PROPERTY RESOURCE "${GDAL_DATA_FILES}") + +-add_executable(s57dump EXCLUDE_FROM_ALL s57dump.cpp) ++add_executable(s57dump s57dump.cpp) + gdal_standard_includes(s57dump) + target_include_directories(s57dump PRIVATE $<TARGET_PROPERTY:gdal_iso8211,SOURCE_DIR>) + target_link_libraries(s57dump PRIVATE $<TARGET_NAME:${GDAL_LIB_TARGET_NAME}> ogr_S57 gdal_iso8211) ++install(TARGETS s57dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -0,0 +1,2 @@ +fba2a0e5d33fdefbe745a3577e156139 gdal-3.10.1.tar.xz +73090432108b896a3d8ab2369ae1c3b6 gdalautotest-3.10.1.tar.gz |
