initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2024-05-18 10:28:50 +02:00
commit 5e9d42be9c
7 changed files with 1819 additions and 0 deletions

View File

@ -0,0 +1,38 @@
gdal-1.9.1.tar.gz re-pack for Fedora

All files with pending legal questions are stripped from the original tarball,
to form this tarball. Legal information is mainly from PROVENANCE.TXT


No files are manipulated.

Please see the cleaning script clean-gdal.sh!

This leaves GDAL short of a few formats, coordinate systems and the PHP bindings.

Volker Fröhlich <volker27@gmx.at>

* updated to 1.9.1 by Volker Fröhlich <volker27@gmx.at>
* updated to 1.9.0 by Volker Fröhlich <volker27@gmx.at>
* updated to 1.7.3 by Viji V Nair <viji@fedoraproject.org>
* updated to 1.7.2 by Sven Lankes <sven@lank.es>
* updated to 1.7.1 by Balint Crisitan <cristian.balint@gmail.com>
* updated to 1.6.1 by Dan Horak <dan@danny.cz>


Removed files:
========================================
# due to uncertain license issues
and derivative copy from ESRI (TM) and CubeWerx (TM):

data/cubewerx_extra.wkt
data/esri_extra.wkt
data/ecw_cs.wkt

Removed folders plus its contents:
========================================
# due to uncertain license issues these formats
are removed and not suported in fedora pack:

frmts/bsb <-- http://www.osgeo.org/pipermail/gdal-dev/2003-September/001097.html
swig/php <-- PHP license, incompatible mixture

11
SOURCES/cpl-config.h Normal file
View File

@ -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

37
SOURCES/gdal-cleaner.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash

if [ $# -lt 1 ]; then
echo "Usage: $0 version"
exit 1
fi

VERSION="$1"
PRE="$2"

if [ ! -f "gdal-"${VERSION}${PRE}".tar.xz" ]; then
wget https://download.osgeo.org/gdal/${VERSION}/gdal-${VERSION}${PRE}.tar.xz
fi

if [ -d gdal-"${VERSION}" ] || [ -d gdal-"${VERSION}"-fedora ]; then
echo "gdal-${VERSION} or gdal-${VERSION}-fedora in the way, please remove and rerun this script"
exit 1
fi

tar xvf gdal-"${VERSION}${PRE}".tar.xz
mv gdal-"${VERSION}"{,-fedora} && pushd gdal-"${VERSION}"-fedora

rm data/cubewerx_extra.wkt
rm data/esri_StatePlane_extra.wkt
rm data/ecw_cs.wkt


sed -i 's|data/cubewerx_extra.wkt||' gdal.cmake
sed -i 's|data/esri_StatePlane_extra.wkt||' gdal.cmake
sed -i 's|data/ecw_cs.wkt||' gdal.cmake

popd


#TODO: Insert Provenance file

tar cvfJ gdal-"${VERSION}${PRE}"-fedora.tar.xz gdal-"${VERSION}"-fedora

11
SOURCES/gdal-config Executable file
View File

@ -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

View File

@ -0,0 +1,21 @@
diff -rupN --no-dereference gdal-3.9.0-fedora/port/cpl_vsil_win32.cpp gdal-3.9.0-fedora-new/port/cpl_vsil_win32.cpp
--- gdal-3.9.0-fedora/port/cpl_vsil_win32.cpp 2024-05-07 14:53:29.000000000 +0200
+++ gdal-3.9.0-fedora-new/port/cpl_vsil_win32.cpp 2024-05-11 23:30:58.675477427 +0200
@@ -859,7 +859,7 @@ int VSIWin32FilesystemHandler::Stat(cons
return nResult;
}
- 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
@@ -870,7 +870,7 @@ int VSIWin32FilesystemHandler::Stat(cons
nLastError == ERROR_FILENAME_EXCED_RANGE)
{
VSIWin32TryLongFilename(pwszFilename);
- nResult = _wstat64(pwszFilename, pStatBuf);
+ nResult = _wstat64(pwszFilename, reinterpret_cast<struct _stat64 *>(pStatBuf));
}
}

37
SOURCES/gdal_utils.patch Normal file
View File

@ -0,0 +1,37 @@
diff -rupN --no-dereference gdal-3.9.0-fedora/frmts/iso8211/CMakeLists.txt gdal-3.9.0-fedora-new/frmts/iso8211/CMakeLists.txt
--- gdal-3.9.0-fedora/frmts/iso8211/CMakeLists.txt 2024-05-07 14:53:28.000000000 +0200
+++ gdal-3.9.0-fedora-new/frmts/iso8211/CMakeLists.txt 2024-05-11 23:30:58.442485524 +0200
@@ -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.9.0-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt gdal-3.9.0-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt
--- gdal-3.9.0-fedora/ogr/ogrsf_frmts/s57/CMakeLists.txt 2024-05-07 14:53:29.000000000 +0200
+++ gdal-3.9.0-fedora-new/ogr/ogrsf_frmts/s57/CMakeLists.txt 2024-05-11 23:30:58.442485524 +0200
@@ -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})

1664
SPECS/gdal.spec Normal file

File diff suppressed because it is too large Load Diff