Update of /cvsroot/fink/dists/10.2-gcc3.3/unstable/main/finkinfo/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31623
Added Files: trickle.info trickle.patch Log Message: New packge from tracker (916927) thanks to Khairulmizam Samsudin --- NEW FILE: trickle.patch --- diff -urN trickle-1.06.ori/trickle-overload.c trickle-1.06/trickle-overload.c --- trickle-1.06.ori/trickle-overload.c Tue Jun 3 00:13:28 2003 +++ trickle-1.06/trickle-overload.c Wed Mar 3 20:26:39 2004 @@ -7,6 +7,7 @@ * $Id: trickle.patch,v 1.1.1.1 2004/03/11 20:14:09 kmbs Exp $ */ +#define _BSD_SOCKLEN_T_ /* Ick. linux sucks. */ #define _GNU_SOURCE @@ -35,7 +36,9 @@ #include <fcntl.h> #include <unistd.h> #include <errno.h> -#include <poll.h> +#ifndef __APPLE__ +#include "poll.h" +#endif /* done below */ #include <limits.h> #include <math.h> #if defined(HAVE_TIME_H) && defined(TIME_WITH_SYS_TIME) @@ -473,10 +476,37 @@ #define POLL_WRMASK (POLLOUT | POLLWRNORM | POLLWRBAND) #define POLL_RDMASK (POLLIN | /* POLLNORM | */ POLLPRI | POLLRDNORM | POLLRDBAND) +#if defined(__APPLE__) +/* Data structure describing a polling request, from fakepoll.h */ +struct pollfd + { + int fd; /* file desc to poll */ + short events; /* events of interest on fd */ + short revents; /* events that occurred on fd */ + }; + +//poll flags +#define POLLIN 0x0001 +#define POLLOUT 0x0004 +#define POLLERR 0x0008 + +// synonyms +#define POLLNORM POLLIN +#define POLLPRI POLLIN +#define POLLRDNORM POLLIN +#define POLLRDBAND POLLIN +#define POLLWRNORM POLLOUT +#define POLLWRBAND POLLOUT + +// ignored +#define POLLHUP 0x0010 +#define POLLNVAL 0x0020 +#endif /*__APPLE__*/ + #if defined(__linux__) || (defined(__svr4__) && defined(__sun__)) int poll(struct pollfd *fds, nfds_t nfds, int __timeout) -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || (defined(__APPLE)) int poll(struct pollfd *fds, unsigned int nfds, int __timeout) #else diff -urN trickle-1.06.ori/trickled.c trickle-1.06/trickled.c --- trickle-1.06.ori/trickled.c Fri May 9 03:16:42 2003 +++ trickle-1.06/trickled.c Wed Mar 3 20:26:39 2004 @@ -19,6 +19,7 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ +#define _BSD_SOCKLEN_T_ #include <sys/tree.h> #include <sys/queue.h> #include <sys/socket.h> diff -urN trickle-1.06.ori/xdr.c trickle-1.06/xdr.c --- trickle-1.06.ori/xdr.c Mon Jun 2 01:07:01 2003 +++ trickle-1.06/xdr.c Wed Mar 3 20:26:39 2004 @@ -8,7 +8,9 @@ */ #include <rpc/rpc.h> - +#ifdef __APPLE__ +#include <stdint.h> +#endif #include "message.h" #define X(x) do { \ --- NEW FILE: trickle.info --- Package: trickle Version: 1.06 Revision: 11 Description: Lightweight userspace bandwidth manager License: BSD Maintainer: Khairulmizam Samsudin <[EMAIL PROTECTED]> # Dependencies Depends: daemonic (>= 20010902-1) BuildDepends: libevent (>= 0.7c) # Unpack Phase Source: http://monkey.org/~marius/trickle/%n-%v.tar.gz Source-MD5: 8e9b7fcdd49ee8fb94700dd1653f5537 # Patch Phase UpdateLibtool: True Patch: %n.patch # Compile Phase ConfigureParams: --mandir=%p/share/man --sysconfdir=%p/etc GCC: 3.3 CompileScript: << #!/bin/sh -ex ./configure %c make << # Install Phase InstallScript: << #!/bin/sh make install prefix=%i mandir=%i/share/man install -d -m 755 %i/etc cat <<END > %i/etc/trickled.conf # this file is an example for a system-wide or personal settings file # for trickle (see manual pages for trickle, trickled and trickled.conf # 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 END << DocFiles: LICENSE README ConfFiles: %p/etc/trickled.conf # Build Phase PostInstScript: << # update daemonic init script if necessary daemonic install trickle << PreRmScript: << # clean up if [ $1 != "upgrade" ]; then daemonic remove trickle fi << DaemonicFile: << <service> <description>trickle userspace bandwidth shaper</description> <message>trickle daemon</message> <daemon name="trickled"> <executable checkexit="true">%p/bin/trickled</executable> #<parameters> -d 10 -u 5</parameters> <configfile>%p/etc/trickled.conf</configfile> <pidfile>%p/var/run/trickled.pid</pidfile> </daemon> </service> << # Additional Data Homepage: www.monkey.org/~provos/trickle/ DescDetail: << Trickle is a voluntary, cooperative bandwidth shaper. trickle works entirely in userland and easy to use. Currently, trickle supports the shaping of any SOCK_STREAM connection established via the socket(2) interface. Furthermore, trickle will not work with statically linked executables, nor with setuid(2) executables. << DescUsage: << trickle(1) can be used with or without a daemon. The daemon, trickled(8) can manage several trickle session at a time. You can start trickled(8) manually, i.e. 'trickled -d 10 -u 20' which limit aggregate trickle(1) download bandwidth consumption to 10 KB/s and upload consumption to 20 KB/s. You can also start trickled(8) during each startup with 'daemonic enable trickle' as root. Edit /sw/etc/daemons/trickle.xml to pass additional option to trickled << DescPackaging: << By default trickle(1) will depend on trickled(8), that is why they are not separated. However, if trickled(8) is not started, trickle(1) will automatically operate in standalone mode. << DescPort: << Patch some file for poll() support & Darwin related header file. Libtool scripts are also updated to build shared libraries << ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ Fink-commits mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-commits