aboutsummaryrefslogtreecommitdiffstats
path: root/math/carve/Makefile
blob: 494cae6c097e8d6419eb8dad8b60530b1ca1edc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: gahr
# $FreeBSD$

PORTNAME=   carve
PORTVERSION=    1.4.0
PORTREVISION=   3
CATEGORIES= math
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}
EXTRACT_SUFX=   .tgz

MAINTAINER= gahr@FreeBSD.org
COMMENT=    A fast, robust constructive solid geometry library

LIB_DEPENDS=    libboost_filesystem.so:${PORTSDIR}/devel/boost-libs

OPTIONS_DEFINE= GUI

USES=       cmake:outsource
USE_GL=     glut
USE_LDCONFIG=   yes

LICENSE=    GPLv2

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGUI}
LIB_DEPENDS+=   libglui.so:${PORTSDIR}/devel/glui
PLIST_SUB+= GUI=""
CMAKE_ARGS+=    -DCARVE_WITH_GUI:BOOL=true
.else
CONFIGURE_ARGS+=--with-gui=no
PLIST_SUB+= GUI="@comment "
CMAKE_ARGS+=    -DCARVE_WITH_GUI:BOOL=false
.endif

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

.include <bsd.port.mk>