summaryrefslogtreecommitdiff
path: root/devel/ode/Makefile
blob: 8c7cb64538daca9d494177af33b6434c3be78388 (plain)
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
53
54
55
# Created by: David Yeske <dyeske@yahoo.com>
# $FreeBSD$

PORTNAME=	ode
PORTVERSION=	0.13
PORTREVISION=	4
PORTEPOCH=	1
CATEGORIES=	devel
MASTER_SITES=	SF/opende/ODE/${PORTVERSION}

MAINTAINER=	acm@FreeBSD.org
COMMENT=	Articulated rigid body dynamics library

LICENSE=	LGPL21 BSD3CLAUSE
LICENSE_COMB=	dual

USES=		tar:bzip2 libtool pathfix
USE_GL=		yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-shared
TEST_TARGET=	check

OPTIONS_DEFINE=		GIMPACT DOUBLE OU

GIMPACT_DESC=		Enable gimpact instead of opcode support
DOUBLE_DESC=		Enable double precision (BROKEN with GIMPACT)
OU_DESC=		Enable Thread-local storage (Experimental)

GIMPACT_CONFIGURE_ON=	--with-trimesh=gimpact
GIMPACT_CONFIGURE_OFF=	--with-trimesh=opcode
DOUBLE_CONFIGURE_ENABLE=	double-precision
OU_CONFIGURE_ENABLE=		ou

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGIMPACT} && ${PORT_OPTIONS:MDOUBLE}
IGNORE=		currently double precision is not supported by gimpact
.endif

post-patch:
	@${REINPLACE_CMD} -e '/if test/ s|==|=|' -e 's|^\( *CFLAGS=\)|#\1|;' \
		-e 's|^\( *CPPFLAGS=\)|#\1|' -e 's|^\( *CXXFLAGS=\)|#\1|' \
		-e 's|CPPFLAGS+=" |CPPFLAGS="$$CPPFLAGS |' \
		${WRKSRC}/configure
	@${FIND} ${WRKSRC} -type f -name Makefile.in -print0 | ${XARGS} -0 ${REINPLACE_CMD} \
		-e '/^DEFAULT_INCLUDES/ s|$$| -I$$(top_builddir)/include|' \
		-e '/CFLAGS/ s|-O[12]||'
	@${REINPLACE_CMD} 's|<malloc.h>|<stdlib.h>|g' \
		${WRKSRC}/build/config-default.h ${WRKSRC}/ou/src/ou/malloc.cpp

post-install:
	${SED} -e '/PACKAGE/ s|^|//|; /VERSION/ s|^|//|' ${WRKSRC}/ode/src/config.h \
		> ${STAGEDIR}${PREFIX}/include/ode/config.h

.include <bsd.port.mk>