geography/geos: Add workaround for Solaris compiler

The smartos bulk build reported a failure due to not resolving
sqrt(5).  Add a patch which is part of a change upstream just merged
to deal with this: change 5 to 5.0.
This commit is contained in:
gdt 2022-06-22 11:42:22 +00:00
parent 0e68d3e63e
commit 40da57852c
3 changed files with 23 additions and 2 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.42 2022/06/03 20:01:32 gdt Exp $
# $NetBSD: Makefile,v 1.43 2022/06/22 11:42:22 gdt Exp $
DISTNAME= geos-3.10.3
PKGREVISION= 1
CATEGORIES= geography
MASTER_SITES= http://download.osgeo.org/geos/
EXTRACT_SUFX= .tar.bz2

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.43 2022/06/03 20:01:32 gdt Exp $
$NetBSD: distinfo,v 1.44 2022/06/22 11:42:22 gdt Exp $
BLAKE2s (geos-3.10.3.tar.bz2) = 6453d24761e52d77ec4f3c5c3ccc4784f274c614a235af7fbdee629e2fc800de
SHA512 (geos-3.10.3.tar.bz2) = d6df49193ab006e8d0ddc86c58cfd3d3ee8f42c0a1b325fbe3f77e4d98abce8e7cce283343b81355aa96a5212b740fe04f7cbaca0106b02a9688e9fa78818e34
Size (geos-3.10.3.tar.bz2) = 6720568 bytes
SHA1 (patch-ae) = 253ae5cf5c2705a80d89d996507e3e94f2a11296
SHA1 (patch-src_noding_snap_SnappingNoder.cpp) = 9d9cc766750b9d546f2c42cb011dbd483f2e31fc
SHA1 (patch-util_geosop_cxxopts.hpp) = 6da706852b026df7275be0a3caddadd1315f6e81

View file

@ -0,0 +1,19 @@
$NetBSD: patch-src_noding_snap_SnappingNoder.cpp,v 1.1 2022/06/22 11:42:22 gdt Exp $
Work around Solaris compiler behavior, which fails to resolve the
C++-required sqrt for integral types, by changing 5 to 5.0.
Reported upstream via email, and a larger fix has been merged:
https://github.com/libgeos/geos/pull/641
--- src/noding/snap/SnappingNoder.cpp.orig 2022-06-03 16:04:49.000000000 +0000
+++ src/noding/snap/SnappingNoder.cpp
@@ -63,7 +63,7 @@ SnappingNoder::snapVertices(std::vector<
void
SnappingNoder::seedSnapIndex(std::vector<SegmentString*>& segStrings)
{
- double PHI_INV = (sqrt(5) - 1.0) / 2.0;
+ double PHI_INV = (sqrt(5.0) - 1.0) / 2.0;
for (SegmentString* ss: segStrings) {
CoordinateSequence* cs = ss->getCoordinates();