aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2013-12-14 07:25:36 +0800
committermat <mat@FreeBSD.org>2013-12-14 07:25:36 +0800
commitb5aa0b0f5c9afdbe2e46216a96bc75bfbede552c (patch)
tree100c821a52d3652e5cbc761fdf0fcc951e76e8f5 /security
parent1180a5b3fd31975d60bdfc45f4b69cf7cb138483 (diff)
downloadfreebsd-ports-gnome-b5aa0b0f5c9afdbe2e46216a96bc75bfbede552c.tar.gz
freebsd-ports-gnome-b5aa0b0f5c9afdbe2e46216a96bc75bfbede552c.tar.zst
freebsd-ports-gnome-b5aa0b0f5c9afdbe2e46216a96bc75bfbede552c.zip
- Install python bits in a sensible place.
- Install ruby bits in a sensible place. - Convert to new OPTIONS framework. - Remove dependency on Perl, nothing in the sources needs it. - Use new LIB_DEPENDS format. PR: ports/184519 Submitted by: mat Approved by: maintainer
Diffstat (limited to 'security')
-rw-r--r--security/broccoli/Makefile57
-rw-r--r--security/broccoli/pkg-plist20
2 files changed, 42 insertions, 35 deletions
diff --git a/security/broccoli/Makefile b/security/broccoli/Makefile
index 68008217767e..68aef0682bb5 100644
--- a/security/broccoli/Makefile
+++ b/security/broccoli/Makefile
@@ -3,6 +3,7 @@
PORTNAME= broccoli
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.bro.org/downloads/release/
DISTNAME= bro-${PORTVERSION}
@@ -14,59 +15,53 @@ LICENSE= BSD
BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison \
swig:${PORTSDIR}/devel/swig13
-LIB_DEPENDS= GeoIP:${PORTSDIR}/net/GeoIP
+LIB_DEPENDS= libGeoIP.so:${PORTSDIR}/net/GeoIP
-EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli
+EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli
-USES= cmake:outsource perl5
+USES= cmake:outsource
USE_LDCONFIG= yes
-NO_MTREE= yes
CMAKE_SOURCE_PATH= ${WRKSRC}/aux/broccoli
.if defined(BRO_PREFIX)
-PREFIX=${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 \
- -D PY_MOD_INSTALL_DIR:PATH=${PREFIX}
+ -D BRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc
OPTIONS_DEFINE= DEBUG PYTHON RUBY
+OPTIONS_SUB=
DEBUG_DESC= Compile in debugging mode
PYTHON_DESC= Build python bindings for broccoli
RUBY_DESC= Build ruby bindings for broccoli
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDEBUG}
-CMAKE_ARGS+= -D ENABLE_DEBUG:BOOL=true
-.endif
-
-.if ${PORT_OPTIONS:MPYTHON}
-USE_PYTHON= yes
-PLIST_SUB+= PYTHON=""
-.else
-CMAKE_ARGS+= -D DISABLE_PYTHON_BINDINGS:BOOL=true
-PLIST_SUB+= PYTHON="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MRUBY}
-USE_RUBY= yes
-PLIST_SUB+= RUBY=""
-.else
-CMAKE_ARGS+= -D DISABLE_RUBY_BINDINGS:BOOL=true
-PLIST_SUB+= RUBY="@comment "
-.endif
+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-stage::
-.if defined(BRO_PREFIX)
+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
@${MKDIR} ${STAGEDIR}${PREFIX}/etc
- @${INSTALL_SCRIPT} ${WRKSRC}/aux/broccoli/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example
+ @${MV} ${STAGEDIR}${PREFIX}/etc/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example
+.if defined(BRO_PREFIX)
+ # bsd.python.mk isn't PREFIX-safe yet.
+ @${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PYTHON_LIBDIR:S/${LOCALBASE}/${PREFIX}/}
+.endif
.include <bsd.port.mk>
diff --git a/security/broccoli/pkg-plist b/security/broccoli/pkg-plist
index 8ce3f844fb06..3348fb387c6b 100644
--- a/security/broccoli/pkg-plist
+++ b/security/broccoli/pkg-plist
@@ -7,11 +7,23 @@ lib/libbroccoli.a
lib/libbroccoli.so
lib/libbroccoli.so.5
lib/libbroccoli.so.5.1.0
-%%PYTHON%%lib/python/_broccoli_intern.so
-%%PYTHON%%lib/python/broccoli.py
-%%RUBY%%lib/ruby/broccoli_ext.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/broccoli.py
+%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/connection.rb
+%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/event.rb
+%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/record.rb
+%%RUBY%%%%RUBY_SITELIBDIR%%/broccoli.rb
+%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/broccoli_ext.so
+%%RUBY%%@dirrmtry %%RUBY_SITELIBDIR%%/Broccoli
+%%CLEANUP_PREFIX%%%%PORTDOCS%%@dirrmtry share
+%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby/1.9/i386-freebsd9
+%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby/1.9
+%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby/site_ruby
+%%CLEANUP_PREFIX%%%%RUBY%%@dirrmtry lib/ruby
+%%CLEANUP_PREFIX%%%%PYTHON%%@dirrmtry lib/python2.7/site-packages
+%%CLEANUP_PREFIX%%%%PYTHON%%@dirrmtry lib/python2.7
%%CLEANUP_PREFIX%%@dirrmtry lib
%%CLEANUP_PREFIX%%@dirrmtry include
%%CLEANUP_PREFIX%%@dirrmtry etc
%%CLEANUP_PREFIX%%@dirrmtry bin
-%%CLEANUP_PREFIX%%@dirrmtry %D
+%%CLEANUP_PREFIX%%@unexec rmdir %D || :