[packages/liblas] - added cxxstd (upgrade C++ standard to c++11, as required by gdal); release 2
qboosh
qboosh at pld-linux.org
Sun Sep 10 13:22:32 CEST 2023
commit c96e37b0f8cc693faea4a78feb12ef5ccf81f102
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 10 13:23:57 2023 +0200
- added cxxstd (upgrade C++ standard to c++11, as required by gdal); release 2
liblas-cxxstd.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
liblas.spec | 7 ++++++-
2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/liblas.spec b/liblas.spec
index a57b1cd..e83ee17 100644
--- a/liblas.spec
+++ b/liblas.spec
@@ -8,7 +8,7 @@ Summary: LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset
Summary(pl.UTF-8): Narzędzia do tłumaczenia danych LiDARowych ASPRS LAS 1.0/1.1/1.2
Name: liblas
Version: 1.8.1
-Release: 1
+Release: 2
License: BSD with Boost v1.0 and MIT parts
Group: Libraries
Source0: http://download.osgeo.org/liblas/libLAS-%{version}.tar.bz2
@@ -28,6 +28,7 @@ Patch5: %{name}-CVE-2018-20537.patch
# https://github.com/libLAS/libLAS/issues/181, modified
Patch6: %{name}-CVE-2018-20540.patch
Patch7: %{name}-pkgconfig.patch
+Patch8: %{name}-cxxstd.patch
URL: https://liblas.org/
BuildRequires: boost-devel >= 1.38
BuildRequires: cmake >= 2.6.0
@@ -98,6 +99,7 @@ Dokumentacja API biblioteki libLAS.
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%build
install -d build
@@ -139,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT
%doc AUTHORS LICENSE.txt
%attr(755,root,root) %{_bindir}/las2col
%attr(755,root,root) %{_bindir}/las2las
+%if %{with gdal}
+%attr(755,root,root) %{_bindir}/las2ogr
+%endif
%attr(755,root,root) %{_bindir}/las2pg
%attr(755,root,root) %{_bindir}/las2txt
%attr(755,root,root) %{_bindir}/lasblock
diff --git a/liblas-cxxstd.patch b/liblas-cxxstd.patch
new file mode 100644
index 0000000..e6a780b
--- /dev/null
+++ b/liblas-cxxstd.patch
@@ -0,0 +1,44 @@
+--- libLAS-1.8.1/CMakeLists.txt.orig 2016-08-22 15:07:43.000000000 +0200
++++ libLAS-1.8.1/CMakeLists.txt 2023-09-10 12:15:23.194884934 +0200
+@@ -155,7 +155,7 @@ else()
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
+ if (CMAKE_COMPILER_IS_GNUCXX)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -ansi")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
+--- libLAS-1.8.1/src/gt_citation.cpp.orig 2016-08-22 15:06:34.000000000 +0200
++++ libLAS-1.8.1/src/gt_citation.cpp 2023-09-10 12:56:50.392630898 +0200
+@@ -155,7 +155,7 @@ char* ImagineCitationTranslation(char* p
+ if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
+ p1 --;
+ p2 = p1 - 1;
+- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
++ while( (p2 != nullptr) && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ p2--;
+ if(p2 != p1 - 1)
+ p1 = p2;
+@@ -198,7 +198,7 @@ char* ImagineCitationTranslation(char* p
+ if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
+ p1 --;
+ char* p2 = p1 - 1;
+- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
++ while( (p2 != nullptr) && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ p2--;
+ if(p2 != p1 - 1)
+ p1 = p2;
+@@ -387,10 +387,10 @@ void SetGeogCSCitation(GTIF * psGTIF, OG
+ osCitation += primemName;
+ bRewriteGeogCitation = TRUE;
+
+- double primemValue = poSRS->GetPrimeMeridian(NULL);
++ double primemValue = poSRS->GetPrimeMeridian(nullptr);
+ if(angUnitName && !EQUAL(angUnitName, "Degree"))
+ {
+- double aUnit = poSRS->GetAngularUnits(NULL);
++ double aUnit = poSRS->GetAngularUnits(nullptr);
+ primemValue *= aUnit;
+ }
+ GTIFKeySet( psGTIF, GeogPrimeMeridianLongGeoKey, TYPE_DOUBLE, 1,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/liblas.git/commitdiff/c96e37b0f8cc693faea4a78feb12ef5ccf81f102
More information about the pld-cvs-commit
mailing list