blob: 35f10f29643b4e34b7ea9e3161b8da922e3f3db2 (
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
|
# Created by: Craig Leres <leres@ee.lbl.gov>
# $FreeBSD$
PORTNAME= broccoli
PORTVERSION= 2.2
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.bro.org/downloads/release/
DISTNAME= bro-${PORTVERSION}
MAINTAINER= leres@ee.lbl.gov
COMMENT= The Bro Client Communications Library
LICENSE= BSD3CLAUSE
BUILD_DEPENDS= ${LOCALBASE}/bin/bison:${PORTSDIR}/devel/bison \
${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13
LIB_DEPENDS= libGeoIP.so:${PORTSDIR}/net/GeoIP
EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli
USES= cmake:outsource
USE_LDCONFIG= yes
CMAKE_SOURCE_PATH= ${WRKSRC}/aux/broccoli
.if defined(BRO_PREFIX)
PREFIX= ${BRO_PREFIX}
PLIST_SUB+= CLEANUP_PREFIX=""
.if ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
NEED_ROOT= yes
.endif
NO_MTREE= yes
.else
PLIST_SUB+= CLEANUP_PREFIX="@comment "
.endif
CMAKE_ARGS+= -D CMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
-D BRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc
OPTIONS_DEFINE= DEBUG PYTHON RUBY DOCS
OPTIONS_SUB=
DEBUG_DESC= Compile in debugging mode
PYTHON_DESC= Build python bindings for broccoli
RUBY_DESC= Build ruby bindings for broccoli
DEBUG_CMAKE_ON= -D ENABLE_DEBUG:BOOL=true
PYTHON_USE= python=yes
PYTHON_CMAKE_ON= -D PY_MOD_INSTALL_DIR:PATH=${PYTHON_SITELIBDIR}
PYTHON_CMAKE_OFF= -D DISABLE_PYTHON_BINDINGS:BOOL=true
RUBY_USE= ruby=yes
RUBY_CMAKE_ON= -D RB_INSTALL_DIR:PATH=${RUBY_SITELIBDIR} \
-D RB_ARCH_INSTALL_DIR:PATH=${RUBY_SITEARCHLIBDIR}
RUBY_CMAKE_OFF= -D DISABLE_RUBY_BINDINGS:BOOL=true
post-install::
.if defined(BRO_PREFIX) && ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
# pkg_install needs PREFIX in order to make a package from STAGEDIR/PREFIX.
@${MKDIR} ${PREFIX}
.endif
.if defined(BRO_PREFIX) && empty(${PORT_OPTIONS:MPYTHON})
# Move lib/pythonX.X tree into BRO_PREFIX
${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PREFIX}/lib
.endif
@${MKDIR} ${STAGEDIR}${PREFIX}/etc
@${MV} ${STAGEDIR}${PREFIX}/etc/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example
.if !empty(${PORT_OPTIONS:MPYTHON}) && defined(BRO_PREFIX)
# bsd.python.mk isn't PREFIX-safe yet.
@${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PYTHONPREFIX_LIBDIR}
.endif
.include <bsd.port.mk>
|