Hi ports, Brian,

> http://build-failures.rhaalovely.net//powerpc/2019-02-04/math/veusz.log

The same issue can be found in x11/kde4/marble's patches, it should
use cmath instead of using math.h, and std::.

Testing: 

- macppc: The build and tests are fine [1], i did the tutorial without
  issues [2]
- amd64: The build and tests are fine as well [3] 


Comments (especially because TIMTOWTDI) and feedback are welcome! 

Charlène. 


[1] http://ix.io/1DhU
[2] https://bsd.network/@julianaito/101737076440210681
[3] http://ix.io/1DhV


Index: Makefile
===================================================================
RCS file: /cvs/ports/math/veusz/Makefile,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 Makefile
--- Makefile    8 Mar 2019 20:00:47 -0000       1.20
+++ Makefile    12 Mar 2019 10:21:51 -0000
@@ -4,7 +4,7 @@ COMMENT =       scientific plotting and graphi
 MODPY_EGG_VERSION =    3.0.1
 DISTNAME =     veusz-${MODPY_EGG_VERSION}
 CATEGORIES =   math graphics
-REVISION =     0
+REVISION =     1
 
 HOMEPAGE =     https://veusz.github.io/
 MAINTAINER =   Brian Callahan <bcal...@openbsd.org>
Index: patches/patch-veusz_helpers_src_qtloops_isnan_h
===================================================================
RCS file: 
/cvs/ports/math/veusz/patches/patch-veusz_helpers_src_qtloops_isnan_h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-veusz_helpers_src_qtloops_isnan_h
--- patches/patch-veusz_helpers_src_qtloops_isnan_h     24 Apr 2018 15:24:59 
-0000      1.2
+++ patches/patch-veusz_helpers_src_qtloops_isnan_h     12 Mar 2019 10:21:51 
-0000
@@ -2,25 +2,38 @@ $OpenBSD: patch-veusz_helpers_src_qtloop
 clang is better at encapsulating C files, so we don't have a macro for isfinite
 or isnan, hence the tests fail!
 
-
+Also, unbreak the build on ports-gcc by using cmath and std namespace.
 Index: veusz/helpers/src/qtloops/isnan.h
 --- veusz/helpers/src/qtloops/isnan.h.orig
 +++ veusz/helpers/src/qtloops/isnan.h
-@@ -33,7 +33,7 @@
+@@ -23,7 +23,7 @@
+  */
+ 
+ #include <float.h>
+-#include <math.h>
++#include <cmath>
+ /* You might try changing the above to <cmath> if you have problems.
+  * Whether you use math.h or cmath, you may need to edit the .cpp file
+  * and/or other .h files to use the same header file.
+@@ -33,8 +33,8 @@
  # define isNaN(_a) (__isnan(_a))      /* MacOSX/Darwin definition < 10.4 */
  #elif defined(WIN32) || defined(_isnan) || defined(_MSC_VER)
  # define isNaN(_a) (_isnan(_a))       /* Win32 definition */
 -#elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__)
+-# define isNaN(_a) (isnan(_a))                /* GNU definition */
 +#elif defined(isnan) || defined(__FreeBSD__) || defined(__OpenBSD__) || 
defined(__osf__)
- # define isNaN(_a) (isnan(_a))                /* GNU definition */
++# define isNaN(_a) (std::isnan(_a))           /* GNU definition */
  #else
  # define isNaN(_a) (std::isnan(_a))
-@@ -50,7 +50,7 @@
+ #endif
+@@ -50,8 +50,8 @@
  # define isFinite(_a) (_finite(_a))   /* Win32 definition */
  #elif defined(__sgi)
  # define isFinite(_a) (_isfinite(_a))
 -#elif defined(isfinite) || defined(__FreeBSD__)
+-# define isFinite(_a) (isfinite(_a))
 +#elif defined(isfinite) || defined(__FreeBSD__) || defined(__OpenBSD__)
- # define isFinite(_a) (isfinite(_a))
++# define isFinite(_a) (std::isfinite(_a))
  #elif defined(__osf__)
  # define isFinite(_a) (finite(_a) && !isNaN(_a))
+ #else

 

Reply via email to