aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2006-05-16 13:19:27 +0800
committerkuriyama <kuriyama@FreeBSD.org>2006-05-16 13:19:27 +0800
commit9c60112882c832a5826a649b394cebc7e6358ea7 (patch)
tree047ba3a131c3b8ee5f5cf8ec4e45e0868debf3c1 /www
parent8dcf5dbdbd96d63de2f351aa62b5f2422179f99c (diff)
downloadfreebsd-ports-gnome-9c60112882c832a5826a649b394cebc7e6358ea7.tar.gz
freebsd-ports-gnome-9c60112882c832a5826a649b394cebc7e6358ea7.tar.zst
freebsd-ports-gnome-9c60112882c832a5826a649b394cebc7e6358ea7.zip
- Upgrade to 0.7.
- Fix compilation with apache-2.0 (actually apr-0.9). - Add a patch for my debugging...
Diffstat (limited to 'www')
-rw-r--r--www/mod_bw/Makefile11
-rw-r--r--www/mod_bw/distinfo6
-rw-r--r--www/mod_bw/files/patch-mod_bw.c38
3 files changed, 47 insertions, 8 deletions
diff --git a/www/mod_bw/Makefile b/www/mod_bw/Makefile
index fdf61557ffe8..cc3bc22766be 100644
--- a/www/mod_bw/Makefile
+++ b/www/mod_bw/Makefile
@@ -6,22 +6,23 @@
#
PORTNAME= mod_bw
-PORTVERSION= 0.6
+PORTVERSION= 0.7
CATEGORIES= www
-MASTER_SITES= http://www.ivn.cl/apache/
-DISTNAME= bw_mod-${PORTVERSION}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= bwmod
EXTRACT_SUFX= .tgz
DIST_SUBDIR= apache2
MAINTAINER= apache@FreeBSD.org
COMMENT= Bandwidth and Connection control per Virtual Host or Directory
+WRKSRC= ${WRKDIR}/mod_bw
USE_APACHE= 20+
AP_FAST_BUILD= YES
AP_GENPLIST= YES
-SRC_FILE= bw_mod-0.6.c
-PORTDOCS= APACHE2-LICENSE LICENSE bw_mod-0.6.txt
+SRC_FILE= mod_bw.c
+PORTDOCS= LICENSE mod_bw.txt
post-install:
@${MKDIR} ${DOCSDIR}
diff --git a/www/mod_bw/distinfo b/www/mod_bw/distinfo
index ba91d5fa9bb3..c61a36775a03 100644
--- a/www/mod_bw/distinfo
+++ b/www/mod_bw/distinfo
@@ -1,3 +1,3 @@
-MD5 (apache2/bw_mod-0.6.tgz) = 0c92fa6344f487321291a592dbb49856
-SHA256 (apache2/bw_mod-0.6.tgz) = 7b99f80cfc1ad2ec895ef7acb1bc2bbea53153057106790e79a2459ec77bab8c
-SIZE (apache2/bw_mod-0.6.tgz) = 50298
+MD5 (apache2/mod_bw-0.7.tgz) = 84b43c95fedabfa93be6b6af2e5f5672
+SHA256 (apache2/mod_bw-0.7.tgz) = 21fe083874ee427887c4d2c3dac630e760aa8c6b97b2f1cbf09c2d853a1c87aa
+SIZE (apache2/mod_bw-0.7.tgz) = 18585
diff --git a/www/mod_bw/files/patch-mod_bw.c b/www/mod_bw/files/patch-mod_bw.c
new file mode 100644
index 000000000000..94ae7bc4954f
--- /dev/null
+++ b/www/mod_bw/files/patch-mod_bw.c
@@ -0,0 +1,38 @@
+--- mod_bw.c.orig Mon Apr 24 03:10:44 2006
++++ mod_bw.c Tue May 16 14:01:56 2006
+@@ -51,6 +51,14 @@
+ #include "http_core.h"
+ #include "scoreboard.h"
+
++#if APR_MAJOR_VERSION == 0
++#define apr_atomic_set32(mem,val) (atomic_set_32(mem,val),mem)
++#define apr_atomic_inc32(mem) (atomic_add_32(mem,1),mem)
++#define apr_atomic_dec32(mem) (atomic_subtract_32(mem,1),mem)
++#define apr_atomic_add32(mem,val) (atomic_add_32(mem,val),mem)
++#define apr_atomic_cas32 apr_atomic_cas
++#endif
++
+ #define MIN_BW 256 /* Minimal bandwidth 256 bytes */
+ #define PACKET 8192 /* Default packet at 8192 bytes */
+
+@@ -715,8 +723,10 @@
+
+ /* If we are too busy, deny connection */
+ confid = get_maxconn(r, conf->maxconnection);
+- if ((bwstat->connection_count >= confid) && (confid > 0))
++ if ((bwstat->connection_count >= confid) && (confid > 0)) {
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "exceed lmit (error=%d, count=%d, confid=%d)", conf->error, bwstat->connection_count, confid);
+ return conf->error;
++ }
+ }
+
+ /* Add the Filter, if in forced mode */
+@@ -810,7 +820,7 @@
+
+ /* Verbose Output */
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+- "ID: %ld Directory : %s Rate : %ld Minimum : %ld Size rate : %ld",
++ "ID: %d Directory : %s Rate : %ld Minimum : %ld Size rate : %ld",
+ confid, conf->directory, bw_rate, bw_min, bw_f_rate);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "clients : %d/%d rate/min : %ld,%ld", bwmaxconn->connection_count,