mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
- 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
This commit is contained in:
parent
61cb0464f0
commit
36125fdcf6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336382
@ -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>
|
||||
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
|
||||
|
||||
.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
|
||||
|
||||
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>
|
||||
|
@ -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 || :
|
||||
|
Loading…
Reference in New Issue
Block a user