aboutsummaryrefslogtreecommitdiff
path: root/math/carve
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2014-02-13 16:57:34 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2014-02-13 16:57:34 +0000
commitc8eb38bb311bd6c47147ce5f2ca5494673b58b67 (patch)
tree02417fc6b79809b596543b91cc0ba20afc9063a4 /math/carve
parent56b95c7070bb2ec89723f7f4d31990fe1e438a95 (diff)
downloadports-c8eb38bb311bd6c47147ce5f2ca5494673b58b67.tar.gz
ports-c8eb38bb311bd6c47147ce5f2ca5494673b58b67.zip
- STAGE-clean
- Fix build
Notes
Notes: svn path=/head/; revision=344131
Diffstat (limited to 'math/carve')
-rw-r--r--math/carve/Makefile24
-rw-r--r--math/carve/files/patch-common_scene.cpp13
-rw-r--r--math/carve/pkg-plist2
3 files changed, 26 insertions, 13 deletions
diff --git a/math/carve/Makefile b/math/carve/Makefile
index 494cae6c097e..adf0e29f797d 100644
--- a/math/carve/Makefile
+++ b/math/carve/Makefile
@@ -11,20 +11,22 @@ EXTRACT_SUFX= .tgz
MAINTAINER= gahr@FreeBSD.org
COMMENT= A fast, robust constructive solid geometry library
+LICENSE= GPLv2
+
LIB_DEPENDS= libboost_filesystem.so:${PORTSDIR}/devel/boost-libs
-OPTIONS_DEFINE= GUI
+OPTIONS_DEFINE= DOCS GUI
-USES= cmake:outsource
+USES= cmake:outsource compiler:c++11-lib
USE_GL= glut
USE_LDCONFIG= yes
-LICENSE= GPLv2
+PORTDOCS= *
CFLAGS+= -I${LOCALBASE}/include
+CXXFLAGS+= -std=c++11
LDFLAGS+= -L${LOCALBASE}/lib
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGUI}
@@ -37,11 +39,15 @@ PLIST_SUB+= GUI="@comment "
CMAKE_ARGS+= -DCARVE_WITH_GUI:BOOL=false
.endif
+post-patch:
+ ${FIND} ${WRKSRC} -name "*.cpp" -o -name "*.h" -o -name "*.hpp" | ${XARGS} \
+ ${REINPLACE_CMD} -e 's|::tr1||g'
+ ${REINPLACE_CMD} -e '/gtest/s|^|#|; /tests/s|^|#|' ${WRKSRC}/CMakeLists.txt
+ ${REINPLACE_CMD} -e 's|__is_heap|is_heap|' ${WRKSRC}/lib/triangulator.cpp
+
post-install:
- ${LN} -sf libcarve.so.${PORTVERSION} ${PREFIX}/lib/libcarve.so.${PORTVERSION:R:R}
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/carve.pdf ${DOCSDIR}
-.endif
+ ${LN} -sf libcarve.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcarve.so.${PORTVERSION:R:R}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/carve.pdf ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/math/carve/files/patch-common_scene.cpp b/math/carve/files/patch-common_scene.cpp
index 4b1bdc8c498c..b90557ecb9a6 100644
--- a/math/carve/files/patch-common_scene.cpp
+++ b/math/carve/files/patch-common_scene.cpp
@@ -1,5 +1,14 @@
---- common/scene.cpp.orig 2011-12-01 12:05:53.000000000 +0100
-+++ common/scene.cpp 2011-12-01 12:05:22.000000000 +0100
+--- common/scene.cpp.orig 2011-08-26 22:17:26.000000000 +0200
++++ common/scene.cpp 2014-02-13 15:16:11.000000000 +0100
+@@ -31,7 +31,7 @@
+ static int lastbutton = 0;
+
+ static Scene *g_scene = NULL;
+-static int g_mainWindow = NULL;
++static int g_mainWindow = 0;
+ static GLUI *g_rightPanel = NULL;
+ static double near_plane = 0.2;
+ static double far_plane = 200;
@@ -412,7 +412,7 @@
GLUI_Master.set_glutKeyboardFunc(s_key);
GLUI_Master.set_glutSpecialFunc(NULL);
diff --git a/math/carve/pkg-plist b/math/carve/pkg-plist
index c85252940234..6aced3c74d01 100644
--- a/math/carve/pkg-plist
+++ b/math/carve/pkg-plist
@@ -74,8 +74,6 @@ include/carve/vertex_decl.hpp
include/carve/vertex_impl.hpp
include/carve/win32.h
include/carve/xcode_config.h
-%%PORTDOCS%%%%DOCSDIR%%/carve.pdf
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm include/carve/external
@dirrm include/carve/collection/unordered
@dirrm include/carve/collection