aboutsummaryrefslogtreecommitdiff
path: root/cad/openvsp/Makefile
diff options
context:
space:
mode:
authorCarlos J. Puga Medina <cpm@FreeBSD.org>2017-09-05 23:49:46 +0000
committerCarlos J. Puga Medina <cpm@FreeBSD.org>2017-09-05 23:49:46 +0000
commit910590f7117284dfc962002ddc4bbfade9506728 (patch)
tree3f301615323b7c9a2b03b01af7ae97246cae79fa /cad/openvsp/Makefile
parentf6259f1b8ede2031bf00932033a30ce5b5230c5a (diff)
Notes
Diffstat (limited to 'cad/openvsp/Makefile')
-rw-r--r--cad/openvsp/Makefile26
1 files changed, 22 insertions, 4 deletions
diff --git a/cad/openvsp/Makefile b/cad/openvsp/Makefile
index a45fced3684e..9306e0909a10 100644
--- a/cad/openvsp/Makefile
+++ b/cad/openvsp/Makefile
@@ -4,6 +4,7 @@
PORTNAME= openvsp
PORTVERSION= 3.13.1
DISTVERSIONPREFIX= ${GH_PROJECT}_
+PORTREVISION= 1
CATEGORIES= cad
MAINTAINER= fernando.apesteguia@gmail.com
@@ -26,14 +27,15 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libopenNURBS.a:graphics/opennurbs \
${LOCALBASE}/include/glm/glm.hpp:math/glm \
${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs
+CMAKE_SOURCE_PATH= ${WRKSRC}/SuperProject
+CMAKE_INSTALL_PREFIX= ${STAGEDIR}${PREFIX}
+
+USES= cmake:outsource,noninja jpeg
+
USE_GITHUB= yes
GH_PROJECT= OpenVSP
GH_ACCOUNT= ${GH_PROJECT}
-CMAKE_SOURCE_PATH= ${WRKSRC}/SuperProject
-CMAKE_INSTALL_PREFIX= ${STAGEDIR}${PREFIX}
-USES= cmake:outsource,noninja compiler:gcc-c++11-lib jpeg
-
# On FreeBSD < 11 libc++ lacks support for sized delete operators.
# GCC dropped the builtin version of these operators in 6+ by
# defaulting to gnu++14. Force c++11 instead.
@@ -57,6 +59,22 @@ USE_GL= gl glu
USE_GNOME= libxml2
CFLAGS+= -I${LOCALBASE}/include/openNURBS
+.include <bsd.port.options.mk>
+
+# In 12 gcc can not compile the port so switch to clang 5.0.0 in base.
+# But wait! It crashes while compiling so apply a patch to avoid weird asm code
+# that makes clang die
+# For details see:
+# https://lists.freebsd.org/pipermail/freebsd-hackers/2017-August/051352.html
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000
+USES+= compiler:c++11-lib
+EXTRA_PATCHES= ${FILESDIR}/extra-src_external_angelscript_sdk_angelscript_source_as__callfunc__x86.cpp
+CFLAGS+= -I${LOCALBASE}/include
+.else
+USES+= compiler:gcc-c++11-lib
+.endif
+
BUILD_PREFIX= OpenVSP-prefix/src/OpenVSP-build/_CPack_Packages/FreeBSD/ZIP/OpenVSP-${PORTVERSION}-FreeBSD
do-install: