Fix build against boost 1.73, fix pkg-config file
This commit is contained in:
parent
b2188c0318
commit
410eab3c9f
|
@ -37,8 +37,12 @@ Patch4: liblas_CVE-2018-20536.patch
|
|||
Patch5: liblas_CVE-2018-20540.patch
|
||||
|
||||
# Fix incorrect libgeotiff pkgconfig require resulting in broken dependencies
|
||||
# Fix incorrect includedir and libdir paths
|
||||
Patch6: liblas_pkgconfig.patch
|
||||
|
||||
# Fix FTBFS with boost 1.73
|
||||
Patch7: liblas_boost173.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: boost-devel >= 1.53
|
||||
BuildRequires: cmake
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-04-14 20:10:51.253663569 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-04-14 20:10:51.255663566 +0200
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-06-08 11:37:26.871015429 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.873015404 +0200
|
||||
@@ -516,8 +516,9 @@ const GTIF* SpatialReference::GetGTIF()
|
||||
// The '+ 1' accounts for the header itself.
|
||||
int count = (header->numKeys + 1) * 4;
|
||||
|
@ -12,4 +12,4 @@ diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/
|
|||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-04-14 20:10:51.220663610 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-04-14 20:10:51.222663607 +0200
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-06-08 11:37:26.837015849 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.839015824 +0200
|
||||
@@ -522,14 +522,14 @@ const GTIF* SpatialReference::GetGTIF()
|
||||
}
|
||||
|
||||
|
||||
if (uid == record.GetUserId(true).c_str() &&
|
||||
- 34736 == record.GetRecordId())
|
||||
+ 34736 == record.GetRecordId() && !data.empty())
|
||||
|
@ -11,7 +11,7 @@ diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/
|
|||
int count = data.size() / sizeof(double);
|
||||
ST_SetKey(m_tiff, record.GetRecordId(), count, STT_DOUBLE, &(data[0]));
|
||||
}
|
||||
|
||||
|
||||
if (uid == record.GetUserId(true).c_str() &&
|
||||
- 34737 == record.GetRecordId())
|
||||
+ 34737 == record.GetRecordId() && !data.empty())
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-04-14 20:10:51.189663648 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.804016256 +0200
|
||||
@@ -510,12 +510,15 @@ const GTIF* SpatialReference::GetGTIF()
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
ShortKeyHeader *header = (ShortKeyHeader *)data.data();
|
||||
- // Calculate the number of shorts in the VLR data.
|
||||
- // The '+ 1' accounts for the header itself.
|
||||
|
@ -15,10 +15,10 @@ diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/
|
|||
+ // The '+ 1' accounts for the header itself.
|
||||
+ int count = (header->numKeys + 1) * 4;
|
||||
+ short *data_s = reinterpret_cast<short *>( &(data[0]));
|
||||
|
||||
|
||||
- ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s);
|
||||
+ ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
if (uid == record.GetUserId(true).c_str() &&
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp 2020-04-14 20:10:51.287663527 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp 2020-06-08 11:37:26.906014997 +0200
|
||||
@@ -137,7 +137,10 @@ inline std::istream* Open(std::string co
|
||||
{
|
||||
ifs = new std::ifstream();
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/c_api.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/c_api.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/c_api.cpp 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/c_api.cpp 2020-06-08 11:37:26.973014170 +0200
|
||||
@@ -510,7 +510,7 @@ LAS_DLL LASErrorEnum LASReader_SetOutput
|
||||
|
||||
transforms.erase( std::remove_if( transforms.begin(),
|
||||
transforms.end(),
|
||||
- boost::bind( &IsReprojectionTransform, _1 ) ),
|
||||
+ std::bind( &IsReprojectionTransform, std::placeholders::_1 ) ),
|
||||
transforms.end());
|
||||
|
||||
liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
|
||||
@@ -1852,7 +1852,7 @@ LAS_DLL LASErrorEnum LASWriter_SetOutput
|
||||
|
||||
transforms.erase( std::remove_if( transforms.begin(),
|
||||
transforms.end(),
|
||||
- boost::bind( &IsReprojectionTransform, _1 ) ),
|
||||
+ std::bind( &IsReprojectionTransform, std::placeholders::_1 ) ),
|
||||
transforms.end());
|
||||
|
||||
liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
|
||||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/header.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/header.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/header.cpp 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/header.cpp 2020-06-08 11:37:26.973014170 +0200
|
||||
@@ -610,7 +610,7 @@ void Header::DeleteVLRs(std::string cons
|
||||
|
||||
m_vlrs.erase( std::remove_if( m_vlrs.begin(),
|
||||
m_vlrs.end(),
|
||||
- boost::bind( &SameVLRs, name, id, _1 ) ),
|
||||
+ std::bind( &SameVLRs, name, id, std::placeholders::_1 ) ),
|
||||
m_vlrs.end());
|
||||
|
||||
m_recordsCount = static_cast<uint32_t>(m_vlrs.size());
|
|
@ -1,6 +1,6 @@
|
|||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/gt_wkt_srs.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/gt_wkt_srs.cpp
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/gt_wkt_srs.cpp 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/gt_wkt_srs.cpp 2020-04-14 20:10:51.154663692 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/gt_wkt_srs.cpp 2020-06-08 11:37:26.763016762 +0200
|
||||
@@ -299,7 +299,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIF
|
||||
oSRS.SetFromUserInput(pszWKT);
|
||||
oSRS.SetExtension( "PROJCS", "PROJ4",
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
diff -rupN libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/apps/CMakeLists.txt libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt
|
||||
diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/apps/CMakeLists.txt libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt
|
||||
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/apps/CMakeLists.txt 2020-04-05 18:40:29.000000000 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt 2020-05-06 13:26:27.039406880 +0200
|
||||
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt 2020-06-08 11:37:26.939014590 +0200
|
||||
@@ -195,8 +195,8 @@ if(UNIX)
|
||||
if(WITH_PKGCONFIG)
|
||||
|
||||
set(PKGCFG_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
- set(PKGCFG_INC_DIR "${LIBLAS_INCLUDE_SUBDIR}")
|
||||
- set(PKGCFG_LIB_DIR "${LIBLAS_LIB_SUBDIR}")
|
||||
+ set(PKGCFG_INC_DIR "${CMAKE_INSTALL_PREFIX}/${LIBLAS_INCLUDE_SUBDIR}/liblas")
|
||||
+ set(PKGCFG_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${LIBLAS_LIB_SUBDIR}")
|
||||
set(PKGCFG_REQUIRES "")
|
||||
set(PKGCFG_VERSION ${VERSION})
|
||||
set(PKGCFG_LINK_FLAGS "-llas -llas_c")
|
||||
@@ -205,7 +205,7 @@ if(UNIX)
|
||||
set(PKGCFG_REQUIRES "${PKGCFG_REQUIRES} libxml-2.0")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue