aboutsummaryrefslogtreecommitdiff
path: root/irc/bobot++/Makefile
blob: 30002e1fb571e962bbe7cbda45ad68c948167ecc (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
# ex:ts=8
# New ports collection makefile for:	bobot++
# Date created:			Sep 7, 2001
# Whom:				ijliao
#
# $FreeBSD$
#

PORTNAME=	bobotpp
PORTVERSION=	2.2.3
CATEGORIES=	irc
MASTER_SITES=	SAVANNAH

MAINTAINER=	ports@FreeBSD.org
COMMENT=	An IRC bot written in C++

LICENSE=	GPLv2 GPLv3
LICENSE_COMB=	dual

OPTIONS=	GUILE "Use Guile scripts" on

GNU_CONFIGURE=	yes
CONFIGURE_ENV=	LDFLAGS="${LDFLAGS}"

INFO=		bobot++
PORTDOCS=	*
PORTEXAMPLES=	*
PLIST_FILES=	bin/${PORTNAME}

CPPFLAGS=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}

.include <bsd.port.pre.mk>

.if defined(WITHOUT_GUILE)
CONFIGURE_ARGS+=	--disable-scripting
.else
LIB_DEPENDS+=	guile.21:${PORTSDIR}/lang/guile
CONFIGURE_ARGS+=	--enable-scripting
PLIST_FILES+=	share/guile/site/bobotpp/bot.scm \
		%%DATADIR%%/scripts/bobot-utils.scm
PLIST_DIRS+=	%%DATADIR%%/scripts \
		%%DATADIR%% \
		share/guile/site/bobotpp
PLIST_DIRSTRY+=	share/guile/site
.endif

post-patch:
	@${REINPLACE_CMD} -e '/test/s|==|=|g' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's|std::snprintf|snprintf|g' ${WRKSRC}/source/Bot.C

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@(cd ${WRKSRC}/documentation && ${INSTALL_DATA} *.html ${DOCSDIR})
.endif
.if !defined(NOPORTEXAMPLES)
	@${MKDIR} ${EXAMPLESDIR}
	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR})
.endif

.include <bsd.port.post.mk>