aboutsummaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2017-08-16 00:02:43 +0800
committerKoop Mast <kwm@rainbow-runner.nl>2018-02-04 05:21:54 +0800
commit9e8845f9e1b21b949601605b58b12b1b0e006d05 (patch)
tree88ee638daae5dd0f93d96b4cd41949ba721cf2b9 /cad
parent8a18a107bc2ea70f260263e5a582f661acd52b3e (diff)
downloadfreebsd-ports-gnome-9e8845f9e1b21b949601605b58b12b1b0e006d05.tar.gz
freebsd-ports-gnome-9e8845f9e1b21b949601605b58b12b1b0e006d05.tar.zst
freebsd-ports-gnome-9e8845f9e1b21b949601605b58b12b1b0e006d05.zip
cad/calculix: attempt to fix build from pkg-fallout.
Attempt to cleanup the multiple min/max definitions at the cost of some macro redefining. The issue has been reported upstream, hopefully they will provide a better cleanup in the future. Either some versions of clang/libc++ are more strict or this may have been causing issues from a while back. Approved by: gerald (implicit)
Diffstat (limited to 'cad')
-rw-r--r--cad/calculix/Makefile2
-rw-r--r--cad/calculix/files/patch-cgx__VER_src_Makefile8
-rw-r--r--cad/calculix/files/patch-cgx__VER_src_extUtil.h27
-rw-r--r--cad/calculix/files/patch-cgx__VER_src_userFunction.c2
4 files changed, 31 insertions, 8 deletions
diff --git a/cad/calculix/Makefile b/cad/calculix/Makefile
index 3fe04397ee0e..7a2f842d1860 100644
--- a/cad/calculix/Makefile
+++ b/cad/calculix/Makefile
@@ -3,7 +3,7 @@
PORTNAME= CalculiX
PORTVERSION= 2.12
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= cad
MASTER_SITES= http://www.dhondt.de/
PKGNAMEPREFIX= CalculiX-
diff --git a/cad/calculix/files/patch-cgx__VER_src_Makefile b/cad/calculix/files/patch-cgx__VER_src_Makefile
index 2ef5cc88fc20..e634ec5a21a1 100644
--- a/cad/calculix/files/patch-cgx__VER_src_Makefile
+++ b/cad/calculix/files/patch-cgx__VER_src_Makefile
@@ -1,11 +1,7 @@
--- cgx_2.12/src/Makefile.orig 2017-03-11 16:25:39 UTC
+++ cgx_2.12/src/Makefile
-@@ -1,14 +1,14 @@
- CFLAGS = -O2 -Wall \
- -I./ \
- -I/usr/include \
-- -I/usr/include/GL \
-+ -I$(LOCALBASE)/include/GL \
+@@ -4,11 +4,11 @@ CFLAGS = -O2 -Wall \
+ -I/usr/include/GL \
-I../../libSNL/src \
-I../../glut-3.5/src \
- -I/usr/X11/include
diff --git a/cad/calculix/files/patch-cgx__VER_src_extUtil.h b/cad/calculix/files/patch-cgx__VER_src_extUtil.h
new file mode 100644
index 000000000000..4e1a73ff44a0
--- /dev/null
+++ b/cad/calculix/files/patch-cgx__VER_src_extUtil.h
@@ -0,0 +1,27 @@
+--- cgx_2.12/src/extUtil.h.orig 2017-04-28 10:12:50 UTC
++++ cgx_2.12/src/extUtil.h
+@@ -9,6 +9,7 @@
+ #else
+ #define DEV_NULL " >/dev/null"
+ #define DEV_NULL2 " 2>/dev/null"
++ #include <sys/param.h>
+ #include <unistd.h>
+ #endif
+
+@@ -52,12 +53,10 @@ void printf_fflush(const char *fmt,...);
+ /* from #include "f2c.h" */
+ #define abs(x) ((x) >= 0 ? (x) : -(x))
+ #define dabs(x) (double)abs(x)
+-#define min(a,b) ((a) <= (b) ? (a) : (b))
+-#define max(a,b) ((a) >= (b) ? (a) : (b))
+-#define smin(a,b) (float)min(a,b)
+-#define smax(a,b) (float)max(a,b)
+-#define dmin(a,b) (double)min(a,b)
+-#define dmax(a,b) (double)max(a,b)
++#define smin(a,b) (float)MIN(a,b)
++#define smax(a,b) (float)MAX(a,b)
++#define dmin(a,b) (double)MIN(a,b)
++#define dmax(a,b) (double)MAX(a,b)
+
+
+ typedef struct {
diff --git a/cad/calculix/files/patch-cgx__VER_src_userFunction.c b/cad/calculix/files/patch-cgx__VER_src_userFunction.c
index c866f006ea5f..d7278504953d 100644
--- a/cad/calculix/files/patch-cgx__VER_src_userFunction.c
+++ b/cad/calculix/files/patch-cgx__VER_src_userFunction.c
@@ -1,4 +1,4 @@
---- cgx_2.12/src/userFunction.c.orig 2017-07-01 17:49:32 UTC
+--- cgx_2.12/src/userFunction.c.orig 2017-04-30 15:13:54 UTC
+++ cgx_2.12/src/userFunction.c
@@ -57,7 +57,12 @@ void sendFacesNodes( char *setname );
/* */