From cc3433d490b281dd483613ec5e5dd9dc2a87a583 Mon Sep 17 00:00:00 2001 From: cwen Date: Fri, 10 Jan 2020 23:10:38 +0000 Subject: [PATCH] kst: improve the previous fix by adding only functions we need in the global scope. Impacts !clang archs only. Safety REVISION bump needed as kst has been built at least on powerpc (confirmed by sthen@, thanks!). OK rsadowski@ and pirofti@ (who proposed the change) --- math/kst/Makefile | 4 ++-- math/kst/patches/patch-src_libkst_math_kst_h | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/math/kst/Makefile b/math/kst/Makefile index 21e43868a65..c5558122d5b 100644 --- a/math/kst/Makefile +++ b/math/kst/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.39 2020/01/09 17:20:47 cwen Exp $ +# $OpenBSD: Makefile,v 1.40 2020/01/10 23:10:38 cwen Exp $ COMMENT= data viewing/plotting tool GH_ACCOUNT = Kst-plot GH_PROJECT = kst GH_TAGNAME = v2.0.8 -REVISION = 3 +REVISION = 4 SHARED_LIBS += kst2core 0.0 # 2.0 SHARED_LIBS += kst2math 0.0 # 2.0 diff --git a/math/kst/patches/patch-src_libkst_math_kst_h b/math/kst/patches/patch-src_libkst_math_kst_h index 90bc5709cb2..c5b9a4aeb0c 100644 --- a/math/kst/patches/patch-src_libkst_math_kst_h +++ b/math/kst/patches/patch-src_libkst_math_kst_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-src_libkst_math_kst_h,v 1.1 2020/01/09 17:20:47 cwen Exp $ +$OpenBSD: patch-src_libkst_math_kst_h,v 1.2 2020/01/10 23:10:38 cwen Exp $ ports-gcc: fix out of scope errors, from https://github.com/Kst-plot/kst/pull/18 @@ -6,13 +6,15 @@ https://github.com/Kst-plot/kst/pull/18 Index: src/libkst/math_kst.h --- src/libkst/math_kst.h.orig +++ src/libkst/math_kst.h -@@ -31,6 +31,11 @@ inline double pow(float a, double b) { return pow((dou +@@ -31,6 +31,13 @@ inline double pow(float a, double b) { return pow((dou inline double pow(int a, qreal b) { return pow((double)a, (double)b); } #endif +#if defined(__OpenBSD__) && !defined(__clang__) +#include -+using namespace std; ++using std::isnan; ++using std::isinf; ++using std::isfinite; +#endif + namespace Kst {