View | Details | Raw Unified | Return to bug 222001 | Differences between
and this patch

Collapse All | Expand All

(-)cad/openvsp/Makefile (-4 / +22 lines)
Lines 4-9 Link Here
4
PORTNAME=	openvsp
4
PORTNAME=	openvsp
5
PORTVERSION=	3.13.1
5
PORTVERSION=	3.13.1
6
DISTVERSIONPREFIX=	${GH_PROJECT}_
6
DISTVERSIONPREFIX=	${GH_PROJECT}_
7
PORTREVISION=	1
7
CATEGORIES=	cad
8
CATEGORIES=	cad
8
9
9
MAINTAINER=	fernando.apesteguia@gmail.com
10
MAINTAINER=	fernando.apesteguia@gmail.com
Lines 26-39 Link Here
26
		${LOCALBASE}/include/glm/glm.hpp:math/glm \
27
		${LOCALBASE}/include/glm/glm.hpp:math/glm \
27
		${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
28
		${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
28
29
30
CMAKE_SOURCE_PATH=	${WRKSRC}/SuperProject
31
CMAKE_INSTALL_PREFIX=	${STAGEDIR}${PREFIX}
32
33
USES=		cmake:outsource,noninja jpeg
34
29
USE_GITHUB=	yes
35
USE_GITHUB=	yes
30
GH_PROJECT=	OpenVSP
36
GH_PROJECT=	OpenVSP
31
GH_ACCOUNT=	${GH_PROJECT}
37
GH_ACCOUNT=	${GH_PROJECT}
32
38
33
CMAKE_SOURCE_PATH=	${WRKSRC}/SuperProject
34
CMAKE_INSTALL_PREFIX=	${STAGEDIR}${PREFIX}
35
USES=		cmake:outsource,noninja compiler:gcc-c++11-lib jpeg
36
37
# On FreeBSD < 11 libc++ lacks support for sized delete operators.
39
# On FreeBSD < 11 libc++ lacks support for sized delete operators.
38
# GCC dropped the builtin version of these operators in 6+ by
40
# GCC dropped the builtin version of these operators in 6+ by
39
# defaulting to gnu++14. Force c++11 instead.
41
# defaulting to gnu++14. Force c++11 instead.
Lines 57-62 Link Here
57
USE_GNOME=	libxml2
59
USE_GNOME=	libxml2
58
CFLAGS+=	-I${LOCALBASE}/include/openNURBS
60
CFLAGS+=	-I${LOCALBASE}/include/openNURBS
59
61
62
.include <bsd.port.options.mk>
63
64
# In 12 gcc can not compile the port so switch to clang 5.0.0 in base.
65
# But wait! It crashes while compiling so apply a patch to avoid weird asm code
66
# that makes clang die
67
# For details see:
68
# https://lists.freebsd.org/pipermail/freebsd-hackers/2017-August/051352.html
69
70
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
71
USES+=	compiler:c++11-lib
72
EXTRA_PATCHES=	${FILESDIR}/extra-src_external_angelscript_sdk_angelscript_source_as__callfunc__x86.cpp
73
CFLAGS+=	-I${LOCALBASE}/include
74
.else
75
USES+=	compiler:gcc-c++11-lib
76
.endif
77
60
BUILD_PREFIX=	OpenVSP-prefix/src/OpenVSP-build/_CPack_Packages/FreeBSD/ZIP/OpenVSP-${PORTVERSION}-FreeBSD
78
BUILD_PREFIX=	OpenVSP-prefix/src/OpenVSP-build/_CPack_Packages/FreeBSD/ZIP/OpenVSP-${PORTVERSION}-FreeBSD
61
79
62
do-install:
80
do-install:
(-)cad/openvsp/files/extra-src_external_angelscript_sdk_angelscript_source_as__callfunc__x86.cpp (+164 lines)
Line 0 Link Here
1
--- src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp.orig	2017-08-02 20:09:54 UTC
2
+++ src/external/angelscript/sdk/angelscript/source/as_callfunc_x86.cpp
3
@@ -340,7 +340,7 @@ endcopy:
4
 	volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func)};
5
 
6
 	asm __volatile__(
7
-#ifdef __OPTIMIZE__
8
+#if defined(__OPTIMIZE__) && !defined(__clang__)
9
 		// When compiled with optimizations the stack unwind doesn't work properly, 
10
 		// causing exceptions to crash the application. By adding this prologue
11
 		// and the epilogue below, the stack unwind works as it should. 
12
@@ -385,7 +385,7 @@ endcopy:
13
 		// Pop the alignment bytes
14
 		"popl  %%esp            \n"
15
 		"popl  %%ebx            \n"
16
-#ifdef __OPTIMIZE__
17
+#if defined(__OPTIMIZE__) && !defined(__clang__)
18
 		// Epilogue
19
 		"movl %%ebp, %%esp         \n"
20
 		".cfi_def_cfa_register esp \n"
21
@@ -462,7 +462,7 @@ endcopy:
22
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)};
23
 
24
 	asm __volatile__ (
25
-#ifdef __OPTIMIZE__
26
+#if defined(__OPTIMIZE__) && !defined(__clang__)
27
 		// When compiled with optimizations the stack unwind doesn't work properly, 
28
 		// causing exceptions to crash the application. By adding this prologue
29
 		// and the epilogue below, the stack unwind works as it should. 
30
@@ -508,7 +508,7 @@ endcopy:
31
 		// Pop the alignment bytes
32
 		"popl  %%esp            \n"
33
 		"popl  %%ebx            \n"
34
-#ifdef __OPTIMIZE__
35
+#if defined(__OPTIMIZE__) && !defined(__clang__)
36
 		// Epilogue
37
 		"movl %%ebp, %%esp         \n"
38
 		".cfi_def_cfa_register esp \n"
39
@@ -585,7 +585,7 @@ endcopy:
40
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)};
41
 
42
 	asm __volatile__ (
43
-#ifdef __OPTIMIZE__
44
+#if defined(__OPTIMIZE__) && !defined(__clang__)
45
 		// When compiled with optimizations the stack unwind doesn't work properly, 
46
 		// causing exceptions to crash the application. By adding this prologue
47
 		// and the epilogue below, the stack unwind works as it should. 
48
@@ -631,7 +631,7 @@ endcopy:
49
 		// Pop the alignment bytes
50
 		"popl  %%esp            \n"
51
 		"popl  %%ebx            \n"
52
-#ifdef __OPTIMIZE__
53
+#if defined(__OPTIMIZE__) && !defined(__clang__)
54
 		// Epilogue
55
 		"movl %%ebp, %%esp         \n"
56
 		".cfi_def_cfa_register esp \n"
57
@@ -717,7 +717,7 @@ endcopy:
58
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)};
59
 
60
 	asm __volatile__ (
61
-#ifdef __OPTIMIZE__
62
+#if defined(__OPTIMIZE__) && !defined(__clang__)
63
 		// When compiled with optimizations the stack unwind doesn't work properly, 
64
 		// causing exceptions to crash the application. By adding this prologue
65
 		// and the epilogue below, the stack unwind works as it should. 
66
@@ -767,7 +767,7 @@ endcopy:
67
 		// Pop the alignment bytes
68
 		"popl  %%esp            \n"
69
 		"popl  %%ebx            \n"
70
-#ifdef __OPTIMIZE__
71
+#if defined(__OPTIMIZE__) && !defined(__clang__)
72
 		// Epilogue
73
 		"movl %%ebp, %%esp         \n"
74
 		".cfi_def_cfa_register esp \n"
75
@@ -849,7 +849,7 @@ endcopy:
76
 	volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)};
77
 
78
 	asm __volatile__ (
79
-#ifdef __OPTIMIZE__
80
+#if defined(__OPTIMIZE__) && !defined(__clang__)
81
 		// When compiled with optimizations the stack unwind doesn't work properly, 
82
 		// causing exceptions to crash the application. By adding this prologue
83
 		// and the epilogue below, the stack unwind works as it should. 
84
@@ -896,7 +896,7 @@ endcopy:
85
 		// Pop the alignment bytes
86
 		"popl  %%esp            \n"
87
 		"popl  %%ebx            \n"
88
-#ifdef __OPTIMIZE__
89
+#if defined(__OPTIMIZE__) && !defined(__clang__)
90
 		// Epilogue
91
 		"movl %%ebp, %%esp         \n"
92
 		".cfi_def_cfa_register esp \n"
93
@@ -980,7 +980,7 @@ endcopy:
94
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)};
95
 
96
 	asm __volatile__ (
97
-#ifdef __OPTIMIZE__
98
+#if defined(__OPTIMIZE__) && !defined(__clang__)
99
 		// When compiled with optimizations the stack unwind doesn't work properly, 
100
 		// causing exceptions to crash the application. By adding this prologue
101
 		// and the epilogue below, the stack unwind works as it should. 
102
@@ -1030,7 +1030,7 @@ endcopy:
103
 		// Pop the alignment bytes
104
 		"popl  %%esp            \n"
105
 		"popl  %%ebx            \n"
106
-#ifdef __OPTIMIZE__
107
+#if defined(__OPTIMIZE__) && !defined(__clang__)
108
 		// Epilogue
109
 		"movl %%ebp, %%esp         \n"
110
 		".cfi_def_cfa_register esp \n"
111
@@ -1102,7 +1102,7 @@ endcopy:
112
 	volatile asPWORD a[] = {asPWORD(args), asPWORD(paramSize), asPWORD(func)};
113
 
114
 	asm __volatile__ (
115
-#ifdef __OPTIMIZE__
116
+#if defined(__OPTIMIZE__) && !defined(__clang__)
117
 		// When compiled with optimizations the stack unwind doesn't work properly, 
118
 		// causing exceptions to crash the application. By adding this prologue
119
 		// and the epilogue below, the stack unwind works as it should. 
120
@@ -1145,7 +1145,7 @@ endcopy:
121
 		// Pop the alignment bytes
122
 		"popl  %%esp            \n"
123
 		"popl  %%ebx            \n"
124
-#ifdef __OPTIMIZE__
125
+#if defined(__OPTIMIZE__) && !defined(__clang__)
126
 		// Epilogue
127
 		"movl %%ebp, %%esp         \n"
128
 		".cfi_def_cfa_register esp \n"
129
@@ -1233,7 +1233,7 @@ endcopy:
130
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func)};
131
 
132
 	asm __volatile__ (
133
-#ifdef __OPTIMIZE__
134
+#if defined(__OPTIMIZE__) && !defined(__clang__)
135
 		// When compiled with optimizations the stack unwind doesn't work properly, 
136
 		// causing exceptions to crash the application. By adding this prologue
137
 		// and the epilogue below, the stack unwind works as it should. 
138
@@ -1285,7 +1285,7 @@ endcopy:
139
 		// Pop the alignment bytes
140
 		"popl  %%esp            \n"
141
 		"popl  %%ebx            \n"
142
-#ifdef __OPTIMIZE__
143
+#if defined(__OPTIMIZE__) && !defined(__clang__)
144
 		// Epilogue
145
 		"movl %%ebp, %%esp         \n"
146
 		".cfi_def_cfa_register esp \n"
147
@@ -1380,7 +1380,7 @@ endcopy:
148
 	volatile asPWORD a[] = {asPWORD(obj), asPWORD(args), asPWORD(paramSize), asPWORD(func), asPWORD(retPtr)};
149
 
150
 	asm __volatile__ (
151
-#ifdef __OPTIMIZE__
152
+#if defined(__OPTIMIZE__) && !defined(__clang__)
153
 		// When compiled with optimizations the stack unwind doesn't work properly, 
154
 		// causing exceptions to crash the application. By adding this prologue
155
 		// and the epilogue below, the stack unwind works as it should. 
156
@@ -1445,7 +1445,7 @@ endcopy:
157
 		// Pop the alignment bytes
158
 		"popl  %%esp           \n"
159
 		"popl  %%ebx           \n"
160
-#ifdef __OPTIMIZE__
161
+#if defined(__OPTIMIZE__) && !defined(__clang__)
162
 		// Epilogue
163
 		"movl %%ebp, %%esp         \n"
164
 		".cfi_def_cfa_register esp \n"

Return to bug 222001