diff options
author | Jeremy Messenger <mezz@FreeBSD.org> | 2006-05-11 17:09:01 +0000 |
---|---|---|
committer | Jeremy Messenger <mezz@FreeBSD.org> | 2006-05-11 17:09:01 +0000 |
commit | 4d313e4841034b614223befdb0bdb0d992b590f7 (patch) | |
tree | 0114b3b4b5898f737b88aad0274b34808394048f /net/trickle | |
parent | f19cf202355343b705e63f7338e06d021941547b (diff) | |
download | ports-4d313e4841034b614223befdb0bdb0d992b590f7.tar.gz ports-4d313e4841034b614223befdb0bdb0d992b590f7.zip |
Notes
Diffstat (limited to 'net/trickle')
-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 dd04ff91944a..a349bf6d16f6 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 000000000000..268b73403a0c --- /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 000000000000..613890bead44 --- /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 6383d0f7283c..2769f0b24c12 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 |