summaryrefslogtreecommitdiff
path: root/graphics/crystalentitylayer/Makefile
blob: 59b28f364340fd1fc0f0d1da8c27e443ca79b398 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# New ports collection makefile for:	Crystal Entity Layer
# Date created:		2005-10-02
# Whom:			Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#

PORTNAME=	crystalentitylayer
PORTVERSION=	1.0.2
CATEGORIES=	graphics
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	cel
DISTNAME=	cel-src-${PORTVERSION}
DIST_SUBDIR=	crystalspace

MAINTAINER=	acm@FreeBSD.org
COMMENT=	CEL is a layer that sits on top of Crystal Space 3D Engine

BUILD_DEPENDS=	jam:${PORTSDIR}/devel/jam \
		cs-config:${PORTSDIR}/graphics/crystalspace

CONFLICTS=	crystalentitylayer-devel-[0-9]*

USE_BZIP2=	yes
GNU_CONFIGURE=	yes

LDFLAGS=	-L${LOCALBASE}/lib -L${X11BASE}/lib
CPPFLAGS=	-I${LOCALBASE}/include -I${X11BASE}/include
CONFIGURE_ARGS+=	--with-cs-prefix=${LOCALBASE}
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
MAKE_ENV=	CC="${CC}" CFLAGS="${CFLAGS} ${CXX}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
DOCSDIR=	share/doc/cel-${PORTVERSION}
DATADIR=	share/cel
PLIST_SUB+=	DOCSDIR=${DOCSDIR} \
		DATADIR=${DATADIR}

JAM_CMD=	${LOCALBASE}/bin/jam
JAM_ARGS=	-qa

OPTIONS=	DEBUG	"Build with debugging information"	off \
		PYTHON	"Python Behaviour Layer"	on \
		CPPUNIT	"The C++ Unit Test Library"	on \
		BFD	"Universal BFD library from the GNU binutils"	on

.include <bsd.port.pre.mk>

.if !defined(WITH_DEBUG)
CONFIGURE_ARGS+=	--enable-debug=no
.else
CONFIGURE_ARGS+=	--enable-debug=yes
.endif

.if!defined(WITHOUT_PYTHON)
USE_PYTHON=	-2.4
.include <${PORTSDIR}/Mk/bsd.python.mk>
.else
CONFIGURE_ARGS+=	--without-python
.endif

.if!defined(WITHOUT_CPPUNIT)
LIB_DEPENDS+=	cppunit-1.10:${PORTSDIR}/devel/cppunit
.else
CONFIGURE_ARGS+=	--without-cppunit
.endif

.if!defined(WITHOUT_BFD)
BUILD_DEPENDS+=	${LOCALBASE}/lib/libbfd.a:${PORTSDIR}/devel/libbfd
.else
CONFIGURE_ARGS+=	--without-bfd
.endif

post-configure:
.if defined(NOPORTDOCS)
	@${REINPLACE_CMD} -e 63d ${WRKSRC}/Jamfile
.endif

do-build:
	@cd ${WRKSRC} && \
		${SETENV} ${MAKE_ENV} ${JAM_CMD} ${JAM_ARGS}

do-install:
	@cd ${WRKSRC} && \
		${JAM_CMD} install

.include <bsd.port.post.mk>