aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-02-22 06:30:51 +0800
committerpawel <pawel@FreeBSD.org>2014-02-22 06:30:51 +0800
commitbe026642f2397b63981d0ffe7ab343f559c43bd9 (patch)
tree17e29a3681c746a6ac822444dc8c73683de910ef /net
parent7d54dbf5b41b8ef7e56c677a1b0ee6cd58793605 (diff)
downloadfreebsd-ports-gnome-be026642f2397b63981d0ffe7ab343f559c43bd9.tar.gz
freebsd-ports-gnome-be026642f2397b63981d0ffe7ab343f559c43bd9.tar.zst
freebsd-ports-gnome-be026642f2397b63981d0ffe7ab343f559c43bd9.zip
- Fix build with clang, now no gcc is required on 10+ [1]
- Adapt it to new RAW socket behavior introduced in 10.0 [1] - Support staging [1] - Convert to new options framework - Respect CFLAGS PR: ports/186127 [1] Submitted by: Olivier Cochard-Labbe <olivier@cochard.me>
Diffstat (limited to 'net')
-rw-r--r--net/pimdd/Makefile22
-rw-r--r--net/pimdd/files/patch-Makefile13
-rw-r--r--net/pimdd/files/patch-igmp.c14
-rw-r--r--net/pimdd/files/patch-pim_proto.c11
4 files changed, 45 insertions, 15 deletions
diff --git a/net/pimdd/Makefile b/net/pimdd/Makefile
index 4bba72913a1d..2963a9d59f9b 100644
--- a/net/pimdd/Makefile
+++ b/net/pimdd/Makefile
@@ -3,6 +3,7 @@
PORTNAME= pimdd
PORTVERSION= 0.2.1.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://antc.uoregon.edu/PIMDM/
DISTNAME= pimd-dense
@@ -11,7 +12,6 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= UO Dense Protocol-Independent Multicast (PIM-DM) daemon for IPv4
MAKE_ARGS+= CC="${CC}"
-USE_GCC= any
NO_MAN= yes
@@ -20,22 +20,18 @@ PLIST_FILES= sbin/pimdd \
PORTDOCS= pimd-dense.html README CHANGES RELEASE.NOTES
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+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 ${PREFIX}/sbin/pimdd
- ${INSTALL_DATA} ${WRKSRC}/pimdd.conf ${PREFIX}/etc/pimdd.conf.sample
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
-.for i in ${PORTDOCS}
- ${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}/${i}
-.endfor
-.endif
-
-.include <bsd.port.post.mk>
+ ${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})
+
+.include <bsd.port.mk>
diff --git a/net/pimdd/files/patch-Makefile b/net/pimdd/files/patch-Makefile
index df7f0e9d9b2a..9e68a532833c 100644
--- a/net/pimdd/files/patch-Makefile
+++ b/net/pimdd/files/patch-Makefile
@@ -1,5 +1,14 @@
---- Makefile.orig Fri Sep 29 11:53:31 2006
-+++ Makefile Fri Sep 29 11:53:50 2006
+--- Makefile.orig 1999-11-30 18:58:53.000000000 +0100
++++ Makefile 2013-09-08 09:39:18.947517833 +0200
+@@ -53,7 +53,7 @@
+ # Support for Resource Reservations), currently used by RSVP.
+ RSRRDEF= -DRSRR
+
+-CC = gcc
++#CC = gcc
+ MCAST_INCLUDE= -Iinclude
+ LDFLAGS=
+
@@ -63,7 +63,7 @@
#CONFIGCONFIGCONFIG
### Compilation flags for different platforms. Uncomment only one of them
diff --git a/net/pimdd/files/patch-igmp.c b/net/pimdd/files/patch-igmp.c
new file mode 100644
index 000000000000..bc6ea80785c6
--- /dev/null
+++ b/net/pimdd/files/patch-igmp.c
@@ -0,0 +1,14 @@
+--- 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 @@
+ #ifdef RAW_INPUT_IS_RAW
+ ipdatalen = ntohs(ip->ip_len) - iphdrlen;
+ #else
++ #if __FreeBSD_version >= 1000000
++ ipdatalen = ip->ip_len - iphdrlen;
++ #else
+ ipdatalen = ip->ip_len;
++ #endif
+ #endif
+ if (iphdrlen + ipdatalen != recvlen) {
+ log(LOG_WARNING, 0,
diff --git a/net/pimdd/files/patch-pim_proto.c b/net/pimdd/files/patch-pim_proto.c
new file mode 100644
index 000000000000..c53844747ec0
--- /dev/null
+++ b/net/pimdd/files/patch-pim_proto.c
@@ -0,0 +1,11 @@
+--- 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 @@
+ "\tPRUNE src %s, group %s - scheduling delayed join",
+ inet_fmt(source, s1), inet_fmt(group, s2));
+
+- schedule_delayed_join(mrtentry_ptr, uni_target_addr);
++ schedule_delayed_join(mrtentry_ptr, uni_target_addr.unicast_addr);
+ }
+ }
+