[43731] trunk/dports/net/throttled

jmr at macports.org jmr at macports.org
Sat Dec 13 19:45:44 PST 2008


Revision: 43731
          http://trac.macports.org/changeset/43731
Author:   jmr at macports.org
Date:     2008-12-13 19:45:43 -0800 (Sat, 13 Dec 2008)
Log Message:
-----------
throttled: fix building on Leopard by not building universal (#13933); remove unused files

Modified Paths:
--------------
    trunk/dports/net/throttled/Portfile

Added Paths:
-----------
    trunk/dports/net/throttled/files/patch-src_Makefile.diff

Removed Paths:
-------------
    trunk/dports/net/throttled/files/patch-throttled-startup.diff
    trunk/dports/net/throttled/files/throttled.sh

Modified: trunk/dports/net/throttled/Portfile
===================================================================
--- trunk/dports/net/throttled/Portfile	2008-12-14 02:58:49 UTC (rev 43730)
+++ trunk/dports/net/throttled/Portfile	2008-12-14 03:45:43 UTC (rev 43731)
@@ -23,6 +23,8 @@
 startupitem.name        throttled
 startupitem.executable  ${prefix}/sbin/throttled
 
+patchfiles      patch-src_Makefile.diff
+
 post-patch {
     reinplace "s|/usr/local|${prefix}|g" \
         ${worksrcpath}/Makefile \
@@ -43,9 +45,3 @@
     xinstall -m 644 -W ${worksrcpath} README.txt COPYING.txt \
         ${destroot}${prefix}/share/doc/${name}
 }
-
-platform darwin 9 {
-        pre-fetch {
-                return -code error "Sorry, throttled does not currently work on Mac OS X 10.5 Leopard."
-        }
-}

Added: trunk/dports/net/throttled/files/patch-src_Makefile.diff
===================================================================
--- trunk/dports/net/throttled/files/patch-src_Makefile.diff	                        (rev 0)
+++ trunk/dports/net/throttled/files/patch-src_Makefile.diff	2008-12-14 03:45:43 UTC (rev 43731)
@@ -0,0 +1,12 @@
+--- src/Makefile.orig	2006-09-28 06:08:41.000000000 +1000
++++ src/Makefile	2008-12-14 14:34:30.000000000 +1100
+@@ -3,8 +3,7 @@
+ 
+ # Normal Compilation
+ # CPPFLAGS = -O3
+-# Universal Binary for OS X
+-CPPFLAGS = -O3 -arch ppc -arch ppc64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
++CPPFLAGS = -O3
+ CPP = c++
+ 
+ SRCS = throttled.cpp

Deleted: trunk/dports/net/throttled/files/patch-throttled-startup.diff
===================================================================
--- trunk/dports/net/throttled/files/patch-throttled-startup.diff	2008-12-14 02:58:49 UTC (rev 43730)
+++ trunk/dports/net/throttled/files/patch-throttled-startup.diff	2008-12-14 03:45:43 UTC (rev 43731)
@@ -1,142 +0,0 @@
---- throttled-startup	Sat Jun 12 14:02:15 2004
-+++ throttled-startup.new	Sat Jun 12 14:10:47 2004
-@@ -1,6 +1,6 @@
--#!/bin/sh
--
- # this is the main configuration file for throttled. 
-+THROTTLED=__PREFIX__/sbin/throttled
-+IPFW=/sbin/ipfw
- 
- # set your network interface 
- # this is osx specific
-@@ -38,7 +38,7 @@
- # this throttled instance has 2 priorities, this allows us to prioritize low 
- # bandwidth services. 
- # You will understand this more when you look how the rules are setup below.
--/usr/local/sbin/throttled -s $MAXSPEED -d 17778 -p 1 -d 17777 -p 2
-+$THROTTLED -s $MAXSPEED -d 17778 -p 1 -d 17777 -p 2
- 
- # all rules below are for ipfw, there is many ways you can set this up.
- # we have simplified this for new users by removing ip specific ipfw rules.
-@@ -60,45 +60,45 @@
- # and minimizes lag in response driven services.
- 
- # prioritize http/https
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 80 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 443 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 80 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 443 out xmit $INTERFACE
- 
- # prioritize ssh and telnet
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 22 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 23 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 22 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 23 out xmit $INTERFACE
- 
- # prioritize imap and smtp
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 143 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 25 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 143 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 25 out xmit $INTERFACE
- 
- # prioritize ftp directory listings
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 21 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 21 out xmit $INTERFACE
- 
- # prioritize aim or iChat
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 5190 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 5190 out xmit $INTERFACE
- 
- # prioritize msn
--# /sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 1863 out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17778 tcp from $IP to any 1863 out xmit $INTERFACE
- 
- # prioritize pop3
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 110 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 110 out xmit $INTERFACE
- 
- # prioritize irc and sirc
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 6667 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 6668 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 9999 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 6667 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 6668 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 9999 out xmit $INTERFACE
- 
- # prioritize hotline, carracho, wired "listing" ports (client end)
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 5500 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 6700 out xmit $INTERFACE
--/sbin/ipfw add $RULENUM divert 17778 tcp from $IP to any 2000 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 5500 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 6700 out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17778 tcp from $IP to any 2000 out xmit $INTERFACE
- 
- # prioritize hotline and carracho "listing" ports (server end)
--# /sbin/ipfw add $RULENUM divert 17778 tcp from $IP 5500 to any out xmit $INTERFACE
--# /sbin/ipfw add $RULENUM divert 17778 tcp from $IP 6700 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17778 tcp from $IP 5500 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17778 tcp from $IP 6700 to any out xmit $INTERFACE
- 
- # bind to throttle low priority services.
--/sbin/ipfw add $RULENUM divert 17777 tcp from $IP to any out xmit $INTERFACE
-+$IPFW add $RULENUM divert 17777 tcp from $IP to any out xmit $INTERFACE
- 
- # if your only interested in capping one service, or specific services 
- # use the rules below. if you are using these make sure to remove
-@@ -106,41 +106,41 @@
- # ipfw divert lines. you have been warned. 
- 
- # bind for kdx server
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 10700 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 10700 to any out xmit $INTERFACE
- 
- # bind for kdx client uploads
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP to any 10700 out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP to any 10700 out xmit $INTERFACE
- 
- # bind for carracho server
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 6701 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 6701 to any out xmit $INTERFACE
- 
- # bind for carracho client uploads
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP to any 6701 out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP to any 6701 out xmit $INTERFACE
- 
- # bind for hotline server
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 5501 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 5501 to any out xmit $INTERFACE
- 
- # bind for hotline client uploads
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP to any 5501 out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP to any 5501 out xmit $INTERFACE
- 
- # bind for Limewire
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 6346 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 6346 to any out xmit $INTERFACE
- 
- # bind for Aquisition
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 5634 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 5634 to any out xmit $INTERFACE
- 
- # bind for mldonkey
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 4662 to any out xmit $INTERFACE
--# /sbin/ipfw add $RULENUM divert 17777 udp from $IP 4666 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 4662 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 udp from $IP 4666 to any out xmit $INTERFACE
- 
- # bind ports for bittorrent
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 6881-6889 to any out xmit $INTERFACE
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP to any 6881-6889 out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 6881-6889 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP to any 6881-6889 out xmit $INTERFACE
- 
- # bind a few ports for dcc connections
--# /sbin/ipfw add $RULENUM divert 17777 tcp from $IP 1024-1028 to any out xmit $INTERFACE
-+# $IPFW add $RULENUM divert 17777 tcp from $IP 1024-1028 to any out xmit $INTERFACE
- 
- # sample second throttle with divert port 5555 and throttle of 5k/sec
- # use this if you want to cap another service at a different speed
--# /usr/local/sbin/throttled -s 5120 -d 5555 
--# /sbin/ipfw add $RULENUM divert 5555 tcp from $IP 80 to any out xmit $INTERFACE
-+# $THROTTLED -s 5120 -d 5555 
-+# $IPFW add $RULENUM divert 5555 tcp from $IP 80 to any out xmit $INTERFACE

Deleted: trunk/dports/net/throttled/files/throttled.sh
===================================================================
--- trunk/dports/net/throttled/files/throttled.sh	2008-12-14 02:58:49 UTC (rev 43730)
+++ trunk/dports/net/throttled/files/throttled.sh	2008-12-14 03:45:43 UTC (rev 43731)
@@ -1,24 +0,0 @@
-#!/bin/sh
-CONF=__PREFIX__/etc/throttled.conf
-
-case $1 in
- 
-start)
-	/sbin/ipfw -f flush && sh $THROTTLED && echo -n ' throttled'
-	;;
-
-stop)
-	pid=`ps ax | awk '{if (match($5, ".*/throttled$") || $5 == "throttled") print $1}'`
-	if test "$pid" != ""; then
-		kill -HUP ${pid}
-	fi
-	;;
-
-restart)
-	${0} stop && ${0} start
-	;;
-
-*)
-	echo "Usage: `basename ${0}` {start|stop|restart}"
-	;;
-esac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081213/3d1f3dbf/attachment.html>


More information about the macports-changes mailing list