Bug 185814 - [PATCH] security/broccoli: Fix PYTHON for BRO_PREFIX case
Summary: [PATCH] security/broccoli: Fix PYTHON for BRO_PREFIX case
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Carlo Strub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 22:30 UTC by Craig Leres
Modified: 2014-02-02 20:50 UTC (History)
1 user (show)

See Also:


Attachments
patch.txt (2.06 KB, text/plain)
2014-01-15 22:30 UTC, Craig Leres
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 2014-01-15 22:30:00 UTC
	Fix make package when BRO_PREFIX is defined and PYTHON is
	enabled.

Fix: Install the python module in BRO_PREFIX and create links
	in PYTHON_SITELIBDIR.

	Also:

	    Update LICENSE
	    Use new *_DEPENDS format
	    Clean up possible .pyc file

How-To-Repeat: 	If BRO_PREFIX is set to /usr/local/bro-2.2 in /etc/make.conf,
	the stage directory has files in PYTHONPREFIX_LIBDIR which
	is outside of what PREFIX is set to for this case.
Comment 1 Carlo Strub freebsd_committer 2014-01-31 20:20:54 UTC
Responsible Changed
From-To: freebsd-ports-bugs->cs

I'll take it
Comment 2 dfilter freebsd_committer 2014-01-31 21:19:24 UTC
Author: cs
Date: Fri Jan 31 21:19:16 2014
New Revision: 342076
URL: http://svnweb.freebsd.org/changeset/ports/342076
QAT: https://qat.redports.org/buildarchive/r342076/

Log:
  Fix make package when BRO_PREFIX is defined and PYTHON is
  enabled.
  
  PR:		ports/185814
  Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)
  MFH:		2014Q1

Modified:
  head/security/broccoli/Makefile
  head/security/broccoli/pkg-plist

Modified: head/security/broccoli/Makefile
==============================================================================
--- head/security/broccoli/Makefile	Fri Jan 31 21:17:09 2014	(r342075)
+++ head/security/broccoli/Makefile	Fri Jan 31 21:19:16 2014	(r342076)
@@ -3,7 +3,7 @@
 
 PORTNAME=	broccoli
 PORTVERSION=	2.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	http://www.bro.org/downloads/release/
 DISTNAME=	bro-${PORTVERSION}
@@ -11,10 +11,10 @@ DISTNAME=	bro-${PORTVERSION}
 MAINTAINER=	leres@ee.lbl.gov
 COMMENT=	The Bro Client Communications Library
 
-LICENSE=	BSD
+LICENSE=	BSD3CLAUSE
 
-BUILD_DEPENDS=	bison:${PORTSDIR}/devel/bison \
-		swig:${PORTSDIR}/devel/swig13
+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
@@ -57,6 +57,10 @@ post-install::
 	# 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)

Modified: head/security/broccoli/pkg-plist
==============================================================================
--- head/security/broccoli/pkg-plist	Fri Jan 31 21:17:09 2014	(r342075)
+++ head/security/broccoli/pkg-plist	Fri Jan 31 21:19:16 2014	(r342076)
@@ -8,7 +8,12 @@ lib/libbroccoli.so
 lib/libbroccoli.so.5
 lib/libbroccoli.so.5.1.0
 %%PYTHON%%%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
+%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
 %%PYTHON%%%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/broccoli.py %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.pyc
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/connection.rb
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/event.rb
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/record.rb
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Carlo Strub freebsd_committer 2014-01-31 21:19:32 UTC
State Changed
From-To: open->closed

Committed. Thank you very much.
Comment 4 dfilter freebsd_committer 2014-02-02 20:45:24 UTC
Author: cs
Date: Sun Feb  2 20:45:16 2014
New Revision: 342364
URL: http://svnweb.freebsd.org/changeset/ports/342364
QAT: https://qat.redports.org/buildarchive/r342364/

Log:
  MFH: r342076
  
  Fix make package when BRO_PREFIX is defined and PYTHON is
  enabled.
  
  PR:		ports/185814
  Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)
  Approved by:	portmgr

Modified:
  branches/2014Q1/security/broccoli/Makefile
  branches/2014Q1/security/broccoli/pkg-plist
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/security/broccoli/Makefile
==============================================================================
--- branches/2014Q1/security/broccoli/Makefile	Sun Feb  2 20:16:51 2014	(r342363)
+++ branches/2014Q1/security/broccoli/Makefile	Sun Feb  2 20:45:16 2014	(r342364)
@@ -3,7 +3,7 @@
 
 PORTNAME=	broccoli
 PORTVERSION=	2.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	http://www.bro.org/downloads/release/
 DISTNAME=	bro-${PORTVERSION}
@@ -11,10 +11,10 @@ DISTNAME=	bro-${PORTVERSION}
 MAINTAINER=	leres@ee.lbl.gov
 COMMENT=	The Bro Client Communications Library
 
-LICENSE=	BSD
+LICENSE=	BSD3CLAUSE
 
-BUILD_DEPENDS=	bison:${PORTSDIR}/devel/bison \
-		swig:${PORTSDIR}/devel/swig13
+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
@@ -57,6 +57,10 @@ post-install::
 	# 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 defined(BRO_PREFIX)

Modified: branches/2014Q1/security/broccoli/pkg-plist
==============================================================================
--- branches/2014Q1/security/broccoli/pkg-plist	Sun Feb  2 20:16:51 2014	(r342363)
+++ branches/2014Q1/security/broccoli/pkg-plist	Sun Feb  2 20:45:16 2014	(r342364)
@@ -8,7 +8,12 @@ lib/libbroccoli.so
 lib/libbroccoli.so.5
 lib/libbroccoli.so.5.1.0
 %%PYTHON%%%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
+%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
 %%PYTHON%%%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/broccoli.py %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
+%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.pyc
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/connection.rb
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/event.rb
 %%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/record.rb
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"