summaryrefslogtreecommitdiff
path: root/graphics/cal3d-examples/Makefile
blob: fcddfde5cb18f10f1014958f5e4aa566dcc25be2 (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
# $NetBSD: Makefile,v 1.5 2005/04/11 21:46:00 tv Exp $
#

PKGNAME=		cal3d-examples-${CAL3D_VERSION}
PKGREVISION=	1

.include "../../graphics/cal3d/Makefile.common"

DISTFILES=		TheCallyDemo-0.9.1b.zip \
			cal3d-${CAL3D_VERSION}${EXTRACT_SUFX}

COMMENT=	        Tools and demos for cal3d library

USE_X11=		YES
CONFIGURE_ARGS+=	--with-cal3d=${PREFIX}
CONFIGURE_ARGS+=	--with-glut=${PREFIX}
CONFIGURE_DIRS=		${WRKSRC}/examples/cally \
			${WRKSRC}/examples/miniviewer_gl \
			${WRKSRC}/tools/converter
CFLAGS+=		-DCAL3D_DATADIR='"${DATADIR}/"'
LDFLAGS+=		-L${X11BASE}/lib
LIBS+=			-lm -lGL -lX11 -lGLU -lXi -lXmu
BUILD_DIRS=		${WRKSRC}/examples/cally \
			${WRKSRC}/examples/miniviewer_gl \
			${WRKSRC}/tools/converter

DATADIR=		${PREFIX}/share/cal3d-examples/data
WRKDATADIR=		${WRKDIR}/thecallydemo-0.9.1b/data
PATCHDATA=		cally.cfg paladin.cfg skeleton.cfg

pre-configure:
	cd ${WRKSRC}/examples/cally && ./autogen.sh
	cd ${WRKSRC}/examples/miniviewer_gl && ./autogen.sh
	${CHMOD} 755 ${WRKSRC}/tools/converter/autogen.sh
	cd ${WRKSRC}/tools/converter && ./autogen.sh

post-patch:
	for f in ${PATCHDATA}; do \
		${CP} ${WRKDATADIR}/$$f ${WRKDATADIR}/$$f.pkgsrc && \
		${SED} -e 's|@@DATADIR@@|${DATADIR}|g' ${WRKDATADIR}/$$f.pkgsrc > \
			${WRKDATADIR}/$$f; && \
		${RM} ${WRKDATADIR}/$$f.pkgsrc; \
		${RM} ${WRKDATADIR}/$$f.orig; \
		done

post-install:
	${INSTALL_DATA_DIR} ${DATADIR}
	cd ${WRKDATADIR} && ${PAX} -rw -pe [a-z]* ${DATADIR}

.include "../../graphics/cal3d/buildlink3.mk"
.include "../../graphics/Mesa/buildlink3.mk"

.include "../../mk/automake.mk"
.include "../../mk/autoconf.mk"
.include "../../mk/bsd.pkg.mk"