diff options
author | mezz <mezz@FreeBSD.org> | 2006-05-11 17:09:01 +0000 |
---|---|---|
committer | mezz <mezz@FreeBSD.org> | 2006-05-11 17:09:01 +0000 |
commit | 2916cf77860b42722424f2ae2eb3fad8daa98421 (patch) | |
tree | 68a59a996a71cfe0072d4d879cda47c66638242e /net | |
parent | 59e6921c97b69cd627a1a907e7f1422522657b29 (diff) | |
download | FreeBSD-ports-2916cf77860b42722424f2ae2eb3fad8daa98421.zip FreeBSD-ports-2916cf77860b42722424f2ae2eb3fad8daa98421.tar.gz |
- Take the maintainship.
- Enable the recv() and send(), I am not sure why it was disabled on FreeBSD
only but allow other OSs. It works great as I have tested it with a few
of applications on FreeBSD 6.0 for a week. If anyone know why, please let
me know. No respone from the author.
- Add install the trickled.conf(.default) with examples. Took from Debian with
a bit tweak.
- Bump the PORTREVISION.
Diffstat (limited to 'net')
-rw-r--r-- | net/trickle/Makefile | 10 | ||||
-rw-r--r-- | net/trickle/files/patch-trickle-overload.c | 55 | ||||
-rw-r--r-- | net/trickle/files/trickled.conf | 12 | ||||
-rw-r--r-- | net/trickle/pkg-plist | 3 |
4 files changed, 78 insertions, 2 deletions
diff --git a/net/trickle/Makefile b/net/trickle/Makefile index dd04ff9..a349bf6 100644 --- a/net/trickle/Makefile +++ b/net/trickle/Makefile @@ -7,11 +7,11 @@ PORTNAME= trickle PORTVERSION= 1.06 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net MASTER_SITES= http://monkey.org/~marius/trickle/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= mezz@FreeBSD.org COMMENT= Lightweight, portable bandwidth shaper LIB_DEPENDS= event-1.1a.1:${PORTSDIR}/devel/libevent @@ -30,6 +30,12 @@ MAN5= trickled.conf.5 MAN8= trickled.8 post-install: + if [ ! -f ${PREFIX}/etc/trickled.conf ]; then \ + ${INSTALL_DATA} ${FILESDIR}/trickled.conf ${PREFIX}/etc/trickled.conf; \ + ${INSTALL_DATA} ${FILESDIR}/trickled.conf ${PREFIX}/etc/trickled.conf.default; \ + else \ + ${INSTALL_DATA} ${FILESDIR}/trickled.conf ${PREFIX}/etc/trickled.conf.default; \ + fi .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} .for i in README diff --git a/net/trickle/files/patch-trickle-overload.c b/net/trickle/files/patch-trickle-overload.c new file mode 100644 index 0000000..268b734 --- /dev/null +++ b/net/trickle/files/patch-trickle-overload.c @@ -0,0 +1,55 @@ +/* + * Enable the recv() and send(), I am not sure why it was disabled on FreeBSD + * only but allow other OSs. It works great as I have tested it with a few + * of applications on FreeBSD 6.0. If anyone know why, please let me know. + */ +--- trickle-overload.c.orig Sun May 7 23:05:43 2006 ++++ trickle-overload.c Sun May 7 23:07:06 2006 +@@ -197,15 +197,11 @@ + + GETADDR(read); + GETADDR(readv); +-#ifndef __FreeBSD__ + GETADDR(recv); +-#endif /* !__FreeBSD__ */ + GETADDR(recvfrom); + + GETADDR(writev); +-#ifndef __FreeBSD__ + GETADDR(send); +-#endif /* !__FreeBSD__ */ + GETADDR(sendto); + + GETADDR(select); +@@ -627,7 +623,6 @@ + return (ret); + } + +-#ifndef __FreeBSD__ + ssize_t + recv(int sock, void *buf, size_t len, int flags) + { +@@ -649,7 +644,6 @@ + + return (ret); + } +-#endif /* !__FreeBSD__ */ + + #ifdef __sun__ + ssize_t +@@ -730,7 +724,6 @@ + return (ret); + } + +-#ifndef __FreeBSD__ + ssize_t + send(int sock, const void *buf, size_t len, int flags) + { +@@ -752,7 +745,6 @@ + + return (ret); + } +-#endif /* !__FreeBSD__ */ + + ssize_t + sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *to, diff --git a/net/trickle/files/trickled.conf b/net/trickle/files/trickled.conf new file mode 100644 index 0000000..613890b --- /dev/null +++ b/net/trickle/files/trickled.conf @@ -0,0 +1,12 @@ +# this file is an example for a system-wide or personal settings file for +# trickle (see manual pages for trickle(1), trickled(8) and trickled.conf(5) +# below are two examples that should be self-explaining + +# [ssh] +# Priority = 1 +# Time-Smoothing = 0.1 +# Length-Smoothing = 2 +# [ftp] +# Priority = 8 +# Time-Smoothing = 5 +# Length-Smoothing = 20 diff --git a/net/trickle/pkg-plist b/net/trickle/pkg-plist index 6383d0f..2769f0b 100644 --- a/net/trickle/pkg-plist +++ b/net/trickle/pkg-plist @@ -1,6 +1,9 @@ bin/trickle bin/tricklectl bin/trickled +@unexec if cmp -s %D/etc/trickled.conf %D/etc/trickled.conf.default; then rm -f %D/etc/trickled.conf; fi +etc/trickled.conf.default +@exec [ -f %B/trickled.conf ] || cp %B/%f %B/trickled.conf lib/trickle/trickle-overload.so %%PORTDOCS%%%%DOCSDIR%%/README @dirrm lib/trickle |