aboutsummaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2017-08-16 00:02:43 +0800
committerpfg <pfg@FreeBSD.org>2017-08-16 00:02:43 +0800
commitb560d55e1c7f5e6f009ac0fad4e168661854faa3 (patch)
treee35a4d980220eb79c7619e827a67a2cee0cf0b24 /cad
parent164a045a67ae4dc6fc072ced1af6efe5e058a115 (diff)
downloadfreebsd-ports-gnome-b560d55e1c7f5e6f009ac0fad4e168661854faa3.tar.gz
freebsd-ports-gnome-b560d55e1c7f5e6f009ac0fad4e168661854faa3.tar.zst
freebsd-ports-gnome-b560d55e1c7f5e6f009ac0fad4e168661854faa3.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 );
/* */