aboutsummaryrefslogtreecommitdiff
path: root/net/netselect
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2015-03-09 06:48:12 +0000
committerMikhail Teterin <mi@FreeBSD.org>2015-03-09 06:48:12 +0000
commitbdd6a2717bb39be8ae3cb5f5f66d260de7ca0d4d (patch)
treec163acaaf5d0893c2dcc0b952f164a07d6265460 /net/netselect
parent337793a270047bfb6d0e8a3131b4df88a10155c7 (diff)
downloadports-bdd6a2717bb39be8ae3cb5f5f66d260de7ca0d4d.tar.gz
ports-bdd6a2717bb39be8ae3cb5f5f66d260de7ca0d4d.zip
Unbreak -- seems to work for me, no errors quoted in the BROKEN-message
appear. While here resolve a worning and arrange for installing the author's README-file, if DOCS-option is on.
Notes
Notes: svn path=/head/; revision=380835
Diffstat (limited to 'net/netselect')
-rw-r--r--net/netselect/Makefile14
-rw-r--r--net/netselect/files/patch-netselect.c19
-rw-r--r--net/netselect/pkg-plist1
3 files changed, 28 insertions, 6 deletions
diff --git a/net/netselect/Makefile b/net/netselect/Makefile
index 1d881985ea34..dd047898198a 100644
--- a/net/netselect/Makefile
+++ b/net/netselect/Makefile
@@ -12,18 +12,24 @@ COMMENT= Ultrafast implementation of ping
LICENSE= BSD3CLAUSE
-BROKEN= Does not work (sendto: Invalid argument)
-
-OPTIONS_DEFINE= SUID
+OPTIONS_DEFINE= SUID DOCS
OPTIONS_SUB= yes
-SUID_DESC= Install with the setuid bit (mode 4110)
+SUID_DESC= Install with the setuid bit to allow use by non-root users
+EXTRACT_AFTER_ARGS=netselect/netselect.c netselect/README
WRKSRC= ${WRKDIR}/${PORTNAME}
do-build:
${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
+ ${REINPLACE_CMD} -E -i "" -e 's|[[:blank:]]+$$||' ${WRKSRC}/README
+
+.include <bsd.port.options.mk>
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
+.endif
.include <bsd.port.mk>
diff --git a/net/netselect/files/patch-netselect.c b/net/netselect/files/patch-netselect.c
index 6e7f1cacca48..6717a97234aa 100644
--- a/net/netselect/files/patch-netselect.c
+++ b/net/netselect/files/patch-netselect.c
@@ -1,5 +1,5 @@
---- netselect.c.orig 2006-07-14 22:59:18.000000000 +0200
-+++ netselect.c 2006-07-14 22:57:22.000000000 +0200
+--- netselect.c 2001-08-29 05:18:57.000000000 -0400
++++ netselect.c 2015-03-09 02:31:02.000000000 -0400
@@ -39,14 +39,13 @@
* hey, great! Let me know. -- apenwarr
*/
@@ -53,3 +53,18 @@
ip->ip_ttl = ttl;
ip->ip_v = IPVERSION;
ip->ip_id = htons(ident + seq);
+@@ -771,12 +776,8 @@
+ int cc = 0;
+ time_t msec_used;
+ HostData *host;
+-
+-#if !defined(__GLIBC__)
+- int fromlen = sizeof(from);
+-#else /* __GLIBC__ */
+- size_t fromlen = sizeof(from);
+-#endif /* __GLIBC__ */
++
++ socklen_t fromlen = sizeof(from);
+
+ FD_ZERO(&fds);
+ FD_SET(sock, &fds);
diff --git a/net/netselect/pkg-plist b/net/netselect/pkg-plist
index b5ddfc583a9b..7a520d7b93c1 100644
--- a/net/netselect/pkg-plist
+++ b/net/netselect/pkg-plist
@@ -1,2 +1,3 @@
%%SUID%%@(root,wheel,4110) bin/netselect
%%NO_SUID%%@(root,wheel,100) bin/netselect
+%%PORTDOCS%%%%DOCSDIR%%/README