ports/149127: [PATCH] net/beacon: allow compilation on non-i386 architectures

Craig Leres leres at ee.lbl.gov
Thu Oct 7 03:30:06 UTC 2010


The following reply was made to PR ports/149127; it has been noted by GNATS.

From: Craig Leres <leres at ee.lbl.gov>
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: ports/149127: [PATCH] net/beacon: allow compilation on non-i386
 architectures
Date: Wed, 06 Oct 2010 20:26:48 -0700

 This is a multi-part message in MIME format.
 --------------010308010001040606040409
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 New patch set.
 
 Old features:
 
     - compile on !i386 (circa July 2010)
 
 New features:
 
     - rc.d script: "parameterize"
     - rc.d script: "daemonize"
     - rc.d script: run as "nobody" by default
 
 The last change is safer but will result in some breakage to already
 installed configurations; OUTPUTDIR will need to be user or group
 wriable by nobody.
 
 		Craig
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (FreeBSD)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAkytPfgACgkQWxlAhAje3JuQMACfePcYgp35txD92t8Xjaxb8MK8
 Ky8An2KkqhQZDCQ6f2Q1pLygJblHyXnS
 =bcRT
 -----END PGP SIGNATURE-----
 
 --------------010308010001040606040409
 Content-Type: text/plain;
  name="patch-Makefile"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-Makefile"
 
 --- Makefile.orig	2010-10-06 19:54:40.000000000 -0700
 +++ Makefile	2010-10-06 19:55:30.000000000 -0700
 @@ -7,7 +7,7 @@
  
  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}
 @@ -35,10 +35,6 @@
  
  .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"
 
 --------------010308010001040606040409
 Content-Type: text/plain;
  name="patch-files-beacon.in"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-files-beacon.in"
 
 --- beacon.in.orig	2010-03-27 04:26:55.000000000 -0700
 +++ beacon.in	2010-10-06 19:57:16.000000000 -0700
 @@ -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}'`
 +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=${piddir}/multicastbeacon.PID
 +pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}"
 +command_interpreter="%%PREFIX%%/bin/perl"
  
 -load_rc_config $name
 +start_cmd="beacon_start"
 +
 +beacon_start()
 +{
 +	echo "Starting ${name}."
 +	daemon -u ${buser} -f ${command}
 +}
  
  run_rc_command "$1"
 
 --------------010308010001040606040409
 Content-Type: text/plain;
  name="patch-files-patch-Makefile.in"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-files-patch-Makefile.in"
 
 --- /dev/null	2010-07-30 17:38:36.000000000 -0700
 +++ files/patch-Makefile.in	2010-07-30 17:38:13.000000000 -0700
 @@ -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@
 
 --------------010308010001040606040409
 Content-Type: text/plain;
  name="patch-files-patch-common-beacon.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-files-patch-common-beacon.patch"
 
 --- /dev/null	2010-07-30 17:38:36.000000000 -0700
 +++ files/patch-common-beacon.patch	2010-07-30 17:35:17.000000000 -0700
 @@ -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"
 ++ 
 
 --------------010308010001040606040409
 Content-Type: text/plain;
  name="patch-files-patch-libbeacon-Makefile.in"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-files-patch-libbeacon-Makefile.in"
 
 --- /dev/null	2010-07-30 17:38:36.000000000 -0700
 +++ files/patch-libbeacon-Makefile.in	2010-07-30 17:14:39.000000000 -0700
 @@ -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@
 
 --------------010308010001040606040409
 Content-Type: application/octet-stream;
  name="patch-Makefile.sig"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="patch-Makefile.sig"
 
 iEYEABECAAYFAkytPfgACgkQWxlAhAje3JsEQACeOv7EKitKO8AngXT87G0DUu/7KBcAn2mA
 k8n926yNY6oQHkimjGvTJ474
 --------------010308010001040606040409
 Content-Type: application/octet-stream;
  name="patch-files-beacon.in.sig"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="patch-files-beacon.in.sig"
 
 iEYEABECAAYFAkytPfgACgkQWxlAhAje3JvrxgCfeS6kYHOLlMdqxnDJPiFYNDffk48An2jM
 i6KLJkMedPnt9ef1BTULDWoN
 --------------010308010001040606040409
 Content-Type: application/octet-stream;
  name="patch-files-patch-Makefile.in.sig"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="patch-files-patch-Makefile.in.sig"
 
 iEYEABECAAYFAkytPfgACgkQWxlAhAje3Jvf3ACff30Z2mULx3KLVxkEmW1S56Pv2NoAnAkB
 7DUk5EGX8GmqKDUseU3o5EKY
 --------------010308010001040606040409
 Content-Type: application/octet-stream;
  name="patch-files-patch-common-beacon.patch.sig"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="patch-files-patch-common-beacon.patch.sig"
 
 iEYEABECAAYFAkytPfgACgkQWxlAhAje3JtGuACffMlLdrPw/1wZRWLRU74kKGj1NhoAnjWh
 YOsb0ZSOnwUd4u8OHQ9jNy79
 --------------010308010001040606040409
 Content-Type: application/octet-stream;
  name="patch-files-patch-libbeacon-Makefile.in.sig"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="patch-files-patch-libbeacon-Makefile.in.sig"
 
 iEYEABECAAYFAkytPfgACgkQWxlAhAje3JvlggCgiXVvoNbfX4v9+nZpHS8AihATWGQAmgIz
 gU1HhaiwdJVIY2o5qw9atRD8
 --------------010308010001040606040409--



More information about the freebsd-ports-bugs mailing list