aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/partio/Makefile
blob: 8756bc42e58fbfda0ef53f1a841edb1c1bce87b0 (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
48
49
50
51
52
# $FreeBSD$

PORTNAME=   partio
PORTVERSION=    1.1.0.20130624
CATEGORIES= graphics math

MAINTAINER= mva@FreeBSD.org
COMMENT=    C++ library for manipulating animation particle formats

LICENSE=    BSD3CLAUSE

USES=       cmake:outsource
USE_XORG=   xmu
USE_GL=     gl glut

USE_GITHUB= yes
GH_ACCOUNT= wdas
GH_PROJECT= partio
GH_TAGNAME= ${GH_COMMIT}
GH_COMMIT=  12428ea

# Workaround until https://github.com/wdas/partio/pull/38
# is accepted
CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

OPTIONS_DEFINE=     DOCS PYTHON
OPTIONS_DEFAULT=    PYTHON

DOCS_BUILD_DEPENDS= doxygen:${PORTSDIR}/devel/doxygen
PYTHON_USE=     PYTHON=2.7+
PYTHON_BUILD_DEPENDS=   swig:${PORTSDIR}/devel/swig13

.include <bsd.port.options.mk>

post-patch:
    @${REINPLACE_CMD} -e 's|python -c|${PYTHON_CMD} -c|; \
        s|lib64/python$${PYTHON_VERSION}/site-packages|${PYTHONPREFIX_SITELIBDIR:S/${PREFIX}\///}|' \
        ${WRKSRC}/src/py/CMakeLists.txt
    @${REINPLACE_CMD} -e '/install(TARGETS/d' \
        ${WRKSRC}/src/tests/CMakeLists.txt
.if !${PORT_OPTIONS:MPYTHON}
    @${REINPLACE_CMD} -e '/ADD_SUBDIRECTORY.*src\/py.*/d' \
        ${WRKSRC}/CMakeLists.txt
.endif

.if ${PORT_OPTIONS:MDOCS}
post-build:
    @(cd ${BUILD_WRKSRC}; make doc)
.endif

.include <bsd.port.mk>