[ports-gcc] Unbreak math/kst

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ports-gcc] Unbreak math/kst

Charlene Wendling

> http://build-failures.rhaalovely.net/powerpc/last/math/kst.log
(Qt5 hasn't been built on sparc64)

There are 2 issues here:

- math functions being out of scope, most of the new patches
  are because of this.
- it uses "-lrt", breaking the build later, so i've removed it.

Once again i've been conservative here, it will help future
maintenance.

Testing:

- macppc: it builds fine [1], i have been able to follow the basic
  tutorial [2] without issues as well
- amd64: nothing bad to report as well [3]

Any comment?

Charlène.


[1] http://0x0.st/z8el.txt
[2] https://bsd.network/@julianaito/101773875372524149
[3] http://0x0.st/z8e0.txt


Index: Makefile
===================================================================
RCS file: /cvs/ports/math/kst/Makefile,v
retrieving revision 1.37
diff -u -p -u -p -r1.37 Makefile
--- Makefile 8 Mar 2019 20:00:47 -0000 1.37
+++ Makefile 18 Mar 2019 21:44:32 -0000
@@ -5,7 +5,7 @@ COMMENT= data viewing/plotting tool
 GH_ACCOUNT = Kst-plot
 GH_PROJECT = kst
 GH_TAGNAME = v2.0.8
-REVISION = 2
+REVISION = 3
 
 SHARED_LIBS +=  kst2core                  0.0 # 2.0
 SHARED_LIBS +=  kst2math                  0.0 # 2.0
Index: patches/patch-src_libkst_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_libkst_CMakeLists_txt
diff -N patches/patch-src_libkst_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkst_CMakeLists_txt 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+ports-gcc: we don't need -lrt
+
+Index: src/libkst/CMakeLists.txt
+--- src/libkst/CMakeLists.txt.orig
++++ src/libkst/CMakeLists.txt
+@@ -7,7 +7,7 @@ kst_files_ignore(stdinsource timezones)
+ if(WIN32 OR APPLE OR QNX OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ kst_files_ignore(sysinfo psversion)
+ else()
+-    if(NOT kst_clang)
++    if(NOT kst_clang AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lrt")
+     endif()
+ endif()
Index: patches/patch-src_libkst_matrix_cpp
===================================================================
RCS file: patches/patch-src_libkst_matrix_cpp
diff -N patches/patch-src_libkst_matrix_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkst_matrix_cpp 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+ports-gcc: fix out of scope errors
+
+Index: src/libkst/matrix.cpp
+--- src/libkst/matrix.cpp.orig
++++ src/libkst/matrix.cpp
+@@ -20,7 +20,13 @@
+
+ #include "matrix.h"
+
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isnan std::isnan
++#define isfinite std::isfinite
++#else
+ #include <math.h>
++#endif
+ #include <QDebug>
+ #include <QXmlStreamWriter>
+
Index: patches/patch-src_libkst_vector_cpp
===================================================================
RCS file: patches/patch-src_libkst_vector_cpp
diff -N patches/patch-src_libkst_vector_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkst_vector_cpp 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+ports-gcc: fix out of scope errors
+
+Index: src/libkst/vector.cpp
+--- src/libkst/vector.cpp.orig
++++ src/libkst/vector.cpp
+@@ -19,7 +19,13 @@
+ #include "vector.h"
+
+ #include <assert.h>
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isnan std::isnan
++#define isfinite std::isfinite
++#else
+ #include <math.h>
++#endif
+ #include <stdlib.h>
+
+ #include <QDebug>
Index: patches/patch-src_libkstapp_plotaxis_cpp
===================================================================
RCS file: patches/patch-src_libkstapp_plotaxis_cpp
diff -N patches/patch-src_libkstapp_plotaxis_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkstapp_plotaxis_cpp 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+ports-gcc: fix out of scope errors
+
+Index: src/libkstapp/plotaxis.cpp
+--- src/libkstapp/plotaxis.cpp.orig
++++ src/libkstapp/plotaxis.cpp
+@@ -15,6 +15,11 @@
+ #include "math_kst.h"
+ #include "dialogdefaults.h"
+
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isnan std::isnan
++#endif
++
+ #include <QDate>
+
+ #define MAJOR_TICK_DEBUG 0
Index: patches/patch-src_libkstmath_curve_cpp
===================================================================
RCS file: patches/patch-src_libkstmath_curve_cpp
diff -N patches/patch-src_libkstmath_curve_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkstmath_curve_cpp 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+ports-gcc: fix out of scope errors
+
+Index: src/libkstmath/curve.cpp
+--- src/libkstmath/curve.cpp.orig
++++ src/libkstmath/curve.cpp
+@@ -37,6 +37,11 @@
+ #include <time.h>
+ #include <iostream>
+
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isinf std::isinf
++#endif
++
+ // #define DEBUG_VECTOR_CURVE
+ // #define BENCHMARK
+
Index: patches/patch-src_libkstmath_image_cpp
===================================================================
RCS file: patches/patch-src_libkstmath_image_cpp
diff -N patches/patch-src_libkstmath_image_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_libkstmath_image_cpp 18 Mar 2019 21:44:32 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+ports-gcc: fix out of scope errors
+
+Index: src/libkstmath/image.cpp
+--- src/libkstmath/image.cpp.orig
++++ src/libkstmath/image.cpp
+@@ -26,7 +26,13 @@
+ #include <QPainter>
+ #include <QXmlStreamWriter>
+
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isfinite std::isfinite
++#else
+ #include <math.h>
++#endif
++
+
+ //#define BENCHMARK
+