mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
- Add LICENSE.
- Do not override CFLAGS. - Fix some compiler warnings. - Take maintainership.
This commit is contained in:
parent
3419c789d4
commit
7984fcdc8f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=396343
@ -3,35 +3,31 @@
|
||||
|
||||
PORTNAME= pimdd
|
||||
PORTVERSION= 0.2.1.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://antc.uoregon.edu/PIMDM/
|
||||
DISTNAME= pimd-dense
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= UO Dense Protocol-Independent Multicast (PIM-DM) daemon for IPv4
|
||||
|
||||
MAKE_ARGS+= CC="${CC}"
|
||||
|
||||
NO_MAN= yes
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
CPPFLAGS+= -D_PATH_PIMD_CONF=\\\"${PREFIX}/etc/pimd.conf\\\"
|
||||
PLIST_FILES= sbin/pimdd \
|
||||
etc/pimdd.conf.sample
|
||||
|
||||
PORTDOCS= pimd-dense.html README CHANGES RELEASE.NOTES
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-defs.h
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|/etc/pimd.conf|${PREFIX}/etc/pimd.conf|g' ${WRKSRC}/pathnames.h
|
||||
${REINPLACE_CMD} -e 's|-Wall -g|${CFLAGS}|' ${WRKSRC}/Makefile
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/pimdd ${STAGEDIR}${PREFIX}/sbin/pimdd
|
||||
${INSTALL_DATA} ${WRKSRC}/pimdd.conf ${STAGEDIR}${PREFIX}/etc/pimdd.conf.sample
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
|
||||
${INSTALL_DATA} ${WRKSRC}/pimdd.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/pimdd.conf.sample
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,20 +1,23 @@
|
||||
--- Makefile.orig 1999-11-30 18:58:53.000000000 +0100
|
||||
+++ Makefile 2013-09-08 09:39:18.947517833 +0200
|
||||
@@ -53,7 +53,7 @@
|
||||
--- Makefile.orig 1999-11-30 17:58:53 UTC
|
||||
+++ Makefile
|
||||
@@ -53,9 +53,9 @@ PROG_CVS_LAST_VERSION = ${PROG_NAME}_${C
|
||||
# Support for Resource Reservations), currently used by RSVP.
|
||||
RSRRDEF= -DRSRR
|
||||
|
||||
-CC = gcc
|
||||
+#CC = gcc
|
||||
+CC?= gcc
|
||||
MCAST_INCLUDE= -Iinclude
|
||||
LDFLAGS=
|
||||
-LDFLAGS=
|
||||
+LDFLAGS?=
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#CONFIGCONFIGCONFIG
|
||||
PURIFY= purify -cache-dir=/tmp -collector=/import/pkgs/gcc/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/2.7.2.2/ld
|
||||
@@ -63,7 +63,7 @@ PURIFY= purify -cache-dir=/tmp -collect
|
||||
#CONFIGCONFIGCONFIG
|
||||
### Compilation flags for different platforms. Uncomment only one of them
|
||||
## FreeBSD
|
||||
-CFLAGS= -Wall -g -Iinclude/freebsd ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} ${MISCDEFS} -DFreeBSD -DPIM
|
||||
+CFLAGS= -Wall -g ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} ${MISCDEFS} -DFreeBSD -DPIM -Dlog=logit
|
||||
+CFLAGS+= ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} ${MISCDEFS} -DFreeBSD -DPIM -Dlog=logit ${CPPFLAGS}
|
||||
|
||||
## NetBSD -DNetBSD is done by OS
|
||||
#CFLAGS= -Wall -g -Iinclude/netbsd ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} ${MISCDEFS} -DPIM
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- config.c.orig Fri Sep 29 11:55:19 2006
|
||||
+++ config.c Fri Sep 29 11:55:43 2006
|
||||
@@ -343,7 +343,7 @@
|
||||
--- config.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ config.c
|
||||
@@ -343,7 +343,7 @@ parse_phyint(s)
|
||||
v->uv_local_pref = n;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
if(EQUAL((w = next_word(&s)), ""))
|
||||
log(LOG_WARNING, 0,
|
||||
"Missing metric for phyint %s in %s",
|
||||
@@ -361,7 +361,7 @@
|
||||
@@ -361,7 +361,7 @@ parse_phyint(s)
|
||||
inet_fmt(local, s1), n);
|
||||
v->uv_local_metric = n;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- debug.c.orig Fri Sep 29 11:54:42 2006
|
||||
+++ debug.c Fri Sep 29 11:55:06 2006
|
||||
@@ -378,6 +378,7 @@
|
||||
--- debug.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ debug.c
|
||||
@@ -378,6 +378,7 @@ log(int severity, int syserr, char *form
|
||||
static char fmt[211] = "warning - ";
|
||||
char *msg;
|
||||
struct timeval now;
|
||||
@ -8,7 +8,7 @@
|
||||
struct tm *thyme;
|
||||
|
||||
va_start(ap, format);
|
||||
@@ -394,6 +395,7 @@
|
||||
@@ -394,6 +395,7 @@ log(severity, syserr, format, va_alist)
|
||||
char *msg;
|
||||
char tbuf[20];
|
||||
struct timeval now;
|
||||
@ -16,7 +16,7 @@
|
||||
struct tm *thyme;
|
||||
|
||||
va_start(ap);
|
||||
@@ -408,7 +410,8 @@
|
||||
@@ -408,7 +410,8 @@ log(severity, syserr, format, va_alist)
|
||||
*/
|
||||
if (haveterminal && (debug || severity <= LOG_WARNING)) {
|
||||
gettimeofday(&now,NULL);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- defs.h.orig 2012-07-23 13:50:47.000000000 +0100
|
||||
+++ defs.h 2012-07-23 13:35:04.000000000 +0100
|
||||
@@ -262,7 +262,7 @@
|
||||
--- defs.h.orig 1999-11-30 17:58:53 UTC
|
||||
+++ defs.h
|
||||
@@ -262,7 +262,7 @@ extern char * sys_errlist[];
|
||||
|
||||
#ifndef IGMP_MEMBERSHIP_QUERY
|
||||
#define IGMP_MEMBERSHIP_QUERY IGMP_HOST_MEMBERSHIP_QUERY
|
||||
@ -9,7 +9,7 @@
|
||||
#define IGMP_V1_MEMBERSHIP_REPORT IGMP_HOST_MEMBERSHIP_REPORT
|
||||
#define IGMP_V2_MEMBERSHIP_REPORT IGMP_HOST_NEW_MEMBERSHIP_REPORT
|
||||
#else
|
||||
@@ -272,7 +272,7 @@
|
||||
@@ -272,7 +272,7 @@ extern char * sys_errlist[];
|
||||
#define IGMP_V2_LEAVE_GROUP IGMP_HOST_LEAVE_MESSAGE
|
||||
#endif
|
||||
|
@ -1,6 +1,15 @@
|
||||
--- igmp.c.orig 2014-01-22 00:05:49.560452946 +0100
|
||||
+++ igmp.c 2014-01-22 00:06:57.098508699 +0100
|
||||
@@ -168,7 +168,11 @@
|
||||
--- igmp.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ igmp.c
|
||||
@@ -115,7 +115,7 @@ igmp_read(i, rfd)
|
||||
fd_set *rfd;
|
||||
{
|
||||
register int igmp_recvlen;
|
||||
- int dummy = 0;
|
||||
+ socklen_t dummy = 0;
|
||||
|
||||
igmp_recvlen = recvfrom(igmp_socket, igmp_recv_buf, RECV_BUF_SIZE,
|
||||
0, NULL, &dummy);
|
||||
@@ -168,7 +168,11 @@ accept_igmp(recvlen)
|
||||
#ifdef RAW_INPUT_IS_RAW
|
||||
ipdatalen = ntohs(ip->ip_len) - iphdrlen;
|
||||
#else
|
||||
@ -12,3 +21,17 @@
|
||||
#endif
|
||||
if (iphdrlen + ipdatalen != recvlen) {
|
||||
log(LOG_WARNING, 0,
|
||||
@@ -257,11 +261,11 @@ accept_igmp(recvlen)
|
||||
return;
|
||||
|
||||
case DVMRP_INFO_REQUEST:
|
||||
- dvmrp_accept_info_request(src, dst, (char *)(igmp+1), igmpdatalen);
|
||||
+ dvmrp_accept_info_request(src, dst, (u_char *)(igmp+1), igmpdatalen);
|
||||
return;
|
||||
|
||||
case DVMRP_INFO_REPLY:
|
||||
- dvmrp_accept_info_reply(src, dst, (char *)(igmp+1), igmpdatalen);
|
||||
+ dvmrp_accept_info_reply(src, dst, (u_char *)(igmp+1), igmpdatalen);
|
||||
return;
|
||||
|
||||
default:
|
||||
|
12
net/pimdd/files/patch-pathnames.h
Normal file
12
net/pimdd/files/patch-pathnames.h
Normal file
@ -0,0 +1,12 @@
|
||||
--- pathnames.h.orig 1999-11-30 17:58:53 UTC
|
||||
+++ pathnames.h
|
||||
@@ -47,7 +47,9 @@
|
||||
*/
|
||||
|
||||
|
||||
+#ifndef _PATH_PIMD_CONF
|
||||
#define _PATH_PIMD_CONF "/etc/pimd.conf"
|
||||
+#endif
|
||||
|
||||
#if (defined(BSD) && (BSD >= 199103))
|
||||
#define _PATH_PIMD_PID "/var/run/pimdd.pid"
|
@ -1,6 +1,6 @@
|
||||
--- pim.c.orig Fri Sep 29 11:54:13 2006
|
||||
+++ pim.c Fri Sep 29 11:54:28 2006
|
||||
@@ -257,7 +257,6 @@
|
||||
--- pim.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ pim.c
|
||||
@@ -257,7 +257,6 @@ send_pim(buf, src, dst, type, datalen)
|
||||
pim = (pim_header_t *)(buf + sizeof(struct ip));
|
||||
pim->pim_type = type;
|
||||
pim->pim_vers = PIM_PROTOCOL_VERSION;
|
||||
@ -8,7 +8,7 @@
|
||||
pim->pim_cksum = 0;
|
||||
/* TODO: XXX: if start using this code for PIM_REGISTERS, exclude the
|
||||
* encapsulated packet from the checsum.
|
||||
@@ -349,7 +348,6 @@
|
||||
@@ -349,7 +348,6 @@ send_pim_unicast(buf, src, dst, type, da
|
||||
pim = (pim_header_t *)(buf + sizeof(struct ip));
|
||||
pim->pim_vers = PIM_PROTOCOL_VERSION;
|
||||
pim->pim_type = type;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- pim_proto.c.orig 2014-01-26 12:48:37.048478574 +0100
|
||||
+++ pim_proto.c 2014-01-26 12:51:08.180470630 +0100
|
||||
@@ -669,7 +669,7 @@
|
||||
--- pim_proto.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ pim_proto.c
|
||||
@@ -669,7 +669,7 @@ receive_pim_join_prune(src, dst, pim_mes
|
||||
"\tPRUNE src %s, group %s - scheduling delayed join",
|
||||
inet_fmt(source, s1), inet_fmt(group, s2));
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- pimdd.h.orig Fri Sep 29 11:53:56 2006
|
||||
+++ pimdd.h Fri Sep 29 11:54:07 2006
|
||||
@@ -202,7 +202,7 @@
|
||||
--- pimdd.h.orig 1999-11-30 17:58:53 UTC
|
||||
+++ pimdd.h
|
||||
@@ -202,7 +202,7 @@ typedef struct pim_jp_encod_grp_ {
|
||||
|
||||
#define PIM_ASSERT_RPT_BIT 0x80000000
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
/* PIM messages type */
|
||||
#define PIM_HELLO 0
|
||||
#ifndef PIM_REGISTER
|
||||
@@ -215,6 +215,7 @@
|
||||
@@ -215,6 +215,7 @@ typedef struct pim_jp_encod_grp_ {
|
||||
#define PIM_GRAFT 6
|
||||
#define PIM_GRAFT_ACK 7
|
||||
#define PIM_CAND_RP_ADV 8
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- trace.c.orig Fri Sep 29 11:55:16 2006
|
||||
+++ trace.c Fri Sep 29 11:55:35 2006
|
||||
@@ -133,7 +133,7 @@
|
||||
--- trace.c.orig 1999-11-30 17:58:53 UTC
|
||||
+++ trace.c
|
||||
@@ -133,7 +133,7 @@ accept_mtrace(src, dst, group, data, no,
|
||||
/* determine the routing table entry for this traceroute */
|
||||
mrt = find_route(qry->tr_src, group, MRTF_SG | MRTF_WC | MRTF_PMBR,
|
||||
DONT_CREATE);
|
||||
@ -9,7 +9,7 @@
|
||||
if (mrt != (mrtentry_t *)NULL) {
|
||||
if (mrt->upstream != (pim_nbr_entry_t *)NULL)
|
||||
parent_address = mrt->upstream->address;
|
||||
@@ -147,7 +147,7 @@
|
||||
@@ -147,7 +147,7 @@ accept_mtrace(src, dst, group, data, no,
|
||||
*/
|
||||
} else
|
||||
log(LOG_DEBUG, 0, "...no route");
|
||||
|
25
net/pimdd/files/pimdd.in
Normal file
25
net/pimdd/files/pimdd.in
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: pimdd
|
||||
# REQUIRE: netif routing
|
||||
# KEYWORD: nojail
|
||||
|
||||
#
|
||||
# Add the following to /etc/rc.conf[.local] to enable this service
|
||||
#
|
||||
# pimdd_enable="YES"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="pimdd"
|
||||
rcvar="${name}_enable"
|
||||
command="%%PREFIX%%/sbin/${name}"
|
||||
required_files="%%PREFIX%%/etc/${name}.conf"
|
||||
extra_commands=reload
|
||||
|
||||
load_rc_config $name
|
||||
: ${pimdd_enable="NO"}
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user