- Unbreak on !i386

- rc.d script handle daemonize and run as nobody by default
- Bump PORTREVISION

PR:             ports/149127
Submitted by:   Craig Leres <leres@ee.lbl.gov>
Approved by:    janos.mohacsi@bsd.hu (maintainer)
This commit is contained in:
Philip M. Gollucci 2010-12-15 22:44:42 +00:00
parent ed6b4e991a
commit 42b4f32457
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=266376
5 changed files with 74 additions and 22 deletions

View file

@ -7,16 +7,15 @@
PORTNAME= beacon
PORTVERSION= 1.3
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= net perl5 mbone ipv6
MASTER_SITES= http://dast.nlanr.net/Projects/Beacon/releases/
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= janos.mohacsi@bsd.hu
COMMENT= Beacon active measurement tool to monitor multicast
BUILD_DEPENDS= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net
RUN_DEPENDS= ${BUILD_DEPENDS}
RUN_DEPENDS= ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net
WWW_DIR?= ${PREFIX}/www/
PLIST_SUB+= VERSION=${PORTVERSION}
@ -35,17 +34,12 @@ CONFIGURE_ARGS+= --enable-ipv6
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
BROKEN= Does not compile on !i386
.endif
post-install:
@${ECHO} "Sample config installed at \
${PREFIX}/etc/beacon.conf.sample"
@${ECHO} "Sample config installed at ${PREFIX}/etc/beacon.conf.sample"
@${ECHO} "Copy the customised version to ${PREFIX}/etc/beacon.conf"
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
@${MKDIR} ${DOCSDIR}/
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
.endif
.include <bsd.port.post.mk>

View file

@ -8,23 +8,41 @@
#
# Add the following lines to /etc/rc.conf to enable beacon.
#
# beacon_enable="YES"
beacon_enable=${beacon_enable-"NO"}
# beacon_enable="YES"
#
# Optional settings:
#
# beacon_program (default: %%PREFIX%%/bin/beacon)
# beacon_config (default: %%PREFIX%%/etc/beacon.conf)
# beacon_user (default: daemon)
# beacon_outputdir (default: %%PREFIX%%/www/data-dist/beacon)
#
. /etc/rc.subr
name="beacon"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/${name}"
conffile=%%PREFIX%%/etc/beacon.conf
if [ -f $conffile ]; then
piddir=`grep OUTPUTDIR $conffile | awk '{print $3}'`
fi
pidfile=${piddir}/multicastbeacon.PID
load_rc_config $name
command=${beacon_program:-%%PREFIX%%/bin/${name}}
config=${beacon_config:-%%PREFIX%%/etc/${name}.conf}
buser=${beacon_user:-nobody}
outputdir="${beacon_outputdir:-%%PREFIX%%/www/data-dist/beacon}"
if [ -f ${config} ]; then
toutputdir="`awk '$1 == "OUTPUTDIR" {print $3}' ${config}`"
if [ -d "${toutputdir}" ]; then
outputdir="${toutputdir}"
fi
fi
pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}"
command_interpreter="%%PREFIX%%/bin/perl"
start_cmd="beacon_start"
beacon_start()
{
echo "Starting ${name}."
daemon -u ${buser} -f ${command}
}
run_rc_command "$1"

View file

@ -0,0 +1,11 @@
--- Makefile.in.orig 2005-08-26 13:22:44.000000000 -0700
+++ Makefile.in 2010-07-30 17:37:58.000000000 -0700
@@ -45,7 +45,7 @@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -fPIC -DHAVE_INET_NTOP
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@

View file

@ -0,0 +1,18 @@
--- common-beacon.patch.orig 2005-06-15 18:46:40.000000000 -0700
+++ common-beacon.patch 2010-07-30 17:34:45.000000000 -0700
@@ -46,3 +46,15 @@
#if !defined(WORDS_BIGENDIAN) && !defined(WORDS_SMALLENDIAN)
#error RTP library requires WORDS_BIGENDIAN or WORDS_SMALLENDIAN to be defined.
+--- common/src/net_udp.c 2004-06-29 09:21:37.000000000 -0700
++++ common-beacon/src/net_udp.c 2010-07-30 17:28:06.000000000 -0700
+@@ -44,7 +44,9 @@
+ #include "debug.h"
+ #include "memory.h"
+ #include "inet_pton.h"
++#ifndef HAVE_INET_NTOP
+ #include "inet_ntop.h"
++#endif
+ #include "vsnprintf.h"
+ #include "net_udp.h"
+

View file

@ -0,0 +1,11 @@
--- libbeacon/Makefile.in.orig 2010-07-30 17:13:05.000000000 -0700
+++ libbeacon/Makefile.in 2010-07-30 17:13:12.000000000 -0700
@@ -45,7 +45,7 @@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -fPIC
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@