Bug 186127 - net/pimdd remove GCC deps, stagify and fix RAW socket API changes
Summary: net/pimdd remove GCC deps, stagify and fix RAW socket API changes
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: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-26 12:20 UTC by olivier
Modified: 2014-02-21 22:40 UTC (History)
0 users

See Also:


Attachments
file.diff (3.85 KB, patch)
2014-01-26 12:20 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2014-01-26 12:20:00 UTC
here is a patch that:
 - Remove GCC deps (and fix the only clang error)
 - Stagify
 - adapt it to new RAW socket behavior introduced in 10.0 (cf http://lists.freebsd.org/pipermail/freebsd-net/2014-January/037512.html).

But even with a 10.0 PIM patched I didn't reach to see PIM neighbor :-(

Fix: Patch attached with submission follows:
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2014-02-21 22:18:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-02-21 22:30:59 UTC
Author: pawel
Date: Fri Feb 21 22:30:51 2014
New Revision: 345558
URL: http://svnweb.freebsd.org/changeset/ports/345558
QAT: https://qat.redports.org/buildarchive/r345558/

Log:
  - 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>

Added:
  head/net/pimdd/files/patch-igmp.c   (contents, props changed)
  head/net/pimdd/files/patch-pim_proto.c   (contents, props changed)
Modified:
  head/net/pimdd/Makefile
  head/net/pimdd/files/patch-Makefile

Modified: head/net/pimdd/Makefile
==============================================================================
--- head/net/pimdd/Makefile	Fri Feb 21 22:19:59 2014	(r345557)
+++ head/net/pimdd/Makefile	Fri Feb 21 22:30:51 2014	(r345558)
@@ -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
+	${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.post.mk>
+.include <bsd.port.mk>

Modified: head/net/pimdd/files/patch-Makefile
==============================================================================
--- head/net/pimdd/files/patch-Makefile	Fri Feb 21 22:19:59 2014	(r345557)
+++ head/net/pimdd/files/patch-Makefile	Fri Feb 21 22:30:51 2014	(r345558)
@@ -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

Added: head/net/pimdd/files/patch-igmp.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/pimdd/files/patch-igmp.c	Fri Feb 21 22:30:51 2014	(r345558)
@@ -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,

Added: head/net/pimdd/files/patch-pim_proto.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/pimdd/files/patch-pim_proto.c	Fri Feb 21 22:30:51 2014	(r345558)
@@ -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);
+ 		}
+ 	    }
+ 
_______________________________________________
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 Pawel Pekala freebsd_committer freebsd_triage 2014-02-21 22:31:03 UTC
State Changed
From-To: open->closed

Committed. Thanks!