pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/geography/gdal-lib geography/gdal-lib: Replace std::fa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b87e07453c9
branches:  trunk
changeset: 331673:7b87e07453c9
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Fri Mar 22 15:31:11 2019 +0000

description:
geography/gdal-lib: Replace std::fabs workaround with fix from upstream

diffstat:

 geography/gdal-lib/Makefile                            |   4 +-
 geography/gdal-lib/distinfo                            |   4 +-
 geography/gdal-lib/patches/patch-ogr_ogrlinestring.cpp |  21 ++++++++---------
 3 files changed, 14 insertions(+), 15 deletions(-)

diffs (58 lines):

diff -r 406c2474d343 -r 7b87e07453c9 geography/gdal-lib/Makefile
--- a/geography/gdal-lib/Makefile       Fri Mar 22 14:01:07 2019 +0000
+++ b/geography/gdal-lib/Makefile       Fri Mar 22 15:31:11 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.111 2019/03/09 17:39:01 gdt Exp $
+# $NetBSD: Makefile,v 1.112 2019/03/22 15:31:11 gdt Exp $
 
-#PKGREVISION=  0
+PKGREVISION=   1
 .include "../../geography/gdal-lib/Makefile.common"
 PKGNAME=       ${DISTNAME:S/gdal/gdal-lib/}
 
diff -r 406c2474d343 -r 7b87e07453c9 geography/gdal-lib/distinfo
--- a/geography/gdal-lib/distinfo       Fri Mar 22 14:01:07 2019 +0000
+++ b/geography/gdal-lib/distinfo       Fri Mar 22 15:31:11 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2019/03/22 14:00:49 gdt Exp $
+$NetBSD: distinfo,v 1.39 2019/03/22 15:31:11 gdt Exp $
 
 SHA1 (gdal-2.4.1.tar.gz) = cb5dec7fe1a6b6cae44f520724ef3e8ac290d8bd
 RMD160 (gdal-2.4.1.tar.gz) = cb46f21e808f67110f3198cb827822342b94a50c
@@ -6,6 +6,6 @@
 Size (gdal-2.4.1.tar.gz) = 14546610 bytes
 SHA1 (patch-apps_gdalserver.cpp) = 4a2b8bac29582c8fc02920840ee498026d87acca
 SHA1 (patch-frmts_grib_degrib_degrib_myutil.c) = 0e046afa236d7e0d6186fe392cb2da05fa5b42c5
-SHA1 (patch-ogr_ogrlinestring.cpp) = 3fc6dc50d963c995cc0d56e19a569cd97f257551
+SHA1 (patch-ogr_ogrlinestring.cpp) = f42faff9f40bcc554a6a8ffdab7d1ad79a03680a
 SHA1 (patch-ogr_ogrsf__frmts_geojson_libjson_GNUmakefile) = 6a5061b6dd8c3a4fa1ad7c10ddc0b815b41a637d
 SHA1 (patch-port_cpl__conv.cpp) = e0c9d2dac25bc6f69f0af13a2c86ab5f0f521445
diff -r 406c2474d343 -r 7b87e07453c9 geography/gdal-lib/patches/patch-ogr_ogrlinestring.cpp
--- a/geography/gdal-lib/patches/patch-ogr_ogrlinestring.cpp    Fri Mar 22 14:01:07 2019 +0000
+++ b/geography/gdal-lib/patches/patch-ogr_ogrlinestring.cpp    Fri Mar 22 15:31:11 2019 +0000
@@ -1,15 +1,14 @@
-$NetBSD: patch-ogr_ogrlinestring.cpp,v 1.1 2019/03/22 14:00:49 gdt Exp $
+$NetBSD: patch-ogr_ogrlinestring.cpp,v 1.2 2019/03/22 15:31:11 gdt Exp $
 
-fabs is not in std.   Sent upstream via mail
+Include required header for std::fabs.  From upstream.
 
 --- ogr/ogrlinestring.cpp.orig 2019-03-15 12:35:19.000000000 +0000
 +++ ogr/ogrlinestring.cpp
-@@ -2551,7 +2551,7 @@ void OGRSimpleCurve::segmentize( double 
-         const double dfX = paoPoints[i+1].x - paoPoints[i].x;
-         const double dfY = paoPoints[i+1].y - paoPoints[i].y;
-         const double dfSquareDist = dfX * dfX + dfY * dfY;
--        if( std::fabs(dfSquareDist - dfSquareMaxLength) > 1e-5 * dfSquareMaxLength )
-+        if( fabs(dfSquareDist - dfSquareMaxLength) > 1e-5 * dfSquareMaxLength )
-         {
-             const double dfIntermediatePoints =
-                 floor(sqrt(dfSquareDist / dfSquareMaxLength) - 1e-2);
+@@ -31,6 +31,7 @@
+ #include "ogr_geos.h"
+ #include "ogr_p.h"
+ 
++#include <cmath>
+ #include <cstdlib>
+ #include <algorithm>
+ #include <limits>



Home | Main Index | Thread Index | Old Index