Add liblas_gdal3.patch

This commit is contained in:
Sandro Mani 2020-03-03 17:42:46 +01:00
parent 2c361ba030
commit fd6e01e0e2
2 changed files with 25 additions and 0 deletions

View File

@ -9,6 +9,11 @@ Source0: https://download.osgeo.org/%{name}/libLAS-%{version}.tar.bz2
# https://github.com/libLAS/libLAS/issues/140 for both:
Patch0001: https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-geosciences/liblas/files/liblas-1.8.1-fix-overload-call.patch
Patch0002: https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-geosciences/liblas/files/liblas-1.8.0_remove-std-c++98.patch
# Fix build against recent gdal3+
# https://github.com/libLAS/libLAS/issues/164
# From https://github.com/OSGeo/gdal/blob/master/gdal/MIGRATION_GUIDE.TXT:
# removal of OSRFixup() and OSRFixupOrdering(): no longer needed since objects constructed are always valid
Patch0003: liblas_gdal3.patch
BuildRequires: gcc-c++
BuildRequires: boost-devel >= 1.53

20
liblas_gdal3.patch Normal file
View File

@ -0,0 +1,20 @@
diff -rupN libLAS-1.8.1/src/gt_wkt_srs.cpp libLAS-1.8.1-new/src/gt_wkt_srs.cpp
--- libLAS-1.8.1/src/gt_wkt_srs.cpp 2016-08-22 15:06:34.000000000 +0200
+++ libLAS-1.8.1-new/src/gt_wkt_srs.cpp 2020-03-03 17:40:34.745324349 +0100
@@ -489,7 +489,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIF
{
char *pszWKT;
oSRS.morphFromESRI();
- oSRS.FixupOrdering();
if( oSRS.exportToWkt( &pszWKT ) == OGRERR_NONE )
return pszWKT;
}
@@ -1090,8 +1089,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIF
/* ==================================================================== */
char *pszWKT;
- oSRS.FixupOrdering();
-
if( oSRS.exportToWkt( &pszWKT ) == OGRERR_NONE )
return pszWKT;
else