From 67821a25457676edb757db0475df225998756c98 Mon Sep 17 00:00:00 2001 From: jbeich Date: Wed, 22 Apr 2015 17:14:59 +0000 Subject: Unbreak build on platforms using libstdc++ after r383466 Force C++11 mode and fix incompatibility with NULL being defined as nullptr on FreeBSD. PR: 199600 Reported by: pkg-fallout, DPorts Approved by: Rainer Hurling (maintainer) --- math/saga/Makefile | 1 + ...-src__modules__io__io_shapes_las__las_export.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 math/saga/files/patch-src__modules__io__io_shapes_las__las_export.cpp (limited to 'math') diff --git a/math/saga/Makefile b/math/saga/Makefile index 0467e8da60f8..3812c0618f41 100644 --- a/math/saga/Makefile +++ b/math/saga/Makefile @@ -31,6 +31,7 @@ CFLAGS+= -I${LOCALBASE}/include GNU_CONFIGURE= yes LDFLAGS+= -L${LOCALBASE}/lib -lopencv_contrib USE_LDCONFIG= yes +USE_CXXSTD= c++11 USE_WX= 3.0+ USES= autoreconf compiler:gcc-c++11-lib iconv:wchar_t dos2unix libtool python:2 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} diff --git a/math/saga/files/patch-src__modules__io__io_shapes_las__las_export.cpp b/math/saga/files/patch-src__modules__io__io_shapes_las__las_export.cpp new file mode 100644 index 000000000000..4f914226c576 --- /dev/null +++ b/math/saga/files/patch-src__modules__io__io_shapes_las__las_export.cpp @@ -0,0 +1,21 @@ +--- src/modules/io/io_shapes_las/las_export.cpp.orig 2014-01-09 10:24:11 UTC ++++ src/modules/io/io_shapes_las/las_export.cpp +@@ -333,12 +333,12 @@ bool CLAS_Export::On_Execute(void) + y = pPoints->Get_Y(i); + z = pPoints->Get_Z(i); + +- x < xmin ? xmin = x : NULL; +- x > xmax ? xmax = x : NULL; +- y < ymin ? ymin = y : NULL; +- y > ymax ? ymax = y : NULL; +- z < zmin ? zmin = z : NULL; +- z > zmax ? zmax = z : NULL; ++ x < xmin ? xmin = x : 0.0; ++ x > xmax ? xmax = x : 0.0; ++ y < ymin ? ymin = y : 0.0; ++ y > ymax ? ymax = y : 0.0; ++ z < zmin ? zmin = z : 0.0; ++ z > zmax ? zmax = z : 0.0; + + point.SetCoordinates(x, y, z); + -- cgit