diff options
author | obrien <obrien@FreeBSD.org> | 2001-11-11 01:26:40 +0800 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-11-11 01:26:40 +0800 |
commit | bda4448448499a88758539a4a4c34c3d7bd9ab73 (patch) | |
tree | 5cd66593a3851264ab45ab0068ce5f0cc7214d33 /www/junkbuster/files | |
parent | 8dfe286532113be2a4b45bdde296e33b2b7496e5 (diff) | |
download | freebsd-ports-gnome-bda4448448499a88758539a4a4c34c3d7bd9ab73.tar.gz freebsd-ports-gnome-bda4448448499a88758539a4a4c34c3d7bd9ab73.tar.zst freebsd-ports-gnome-bda4448448499a88758539a4a4c34c3d7bd9ab73.zip |
Add the compression enhancement from junkbuster-zlib (I see zero reason
to have to have a seperate port rather than enhance this one).
This patched version of Junkbuster now has the ability to automatically
compress text/html and text/plain documents to save downstream modem/network
bandwidth. It also allows one to specify appearance of blocked GIFs.
Diffstat (limited to 'www/junkbuster/files')
-rw-r--r-- | www/junkbuster/files/junkbuster.sh.in | 18 | ||||
-rw-r--r-- | www/junkbuster/files/patch-aa | 27 | ||||
-rw-r--r-- | www/junkbuster/files/patch-ag | 14 | ||||
-rw-r--r-- | www/junkbuster/files/patch-al | 18 | ||||
-rw-r--r-- | www/junkbuster/files/patch-an | 11 | ||||
-rw-r--r-- | www/junkbuster/files/patch-jcc.c | 28 |
6 files changed, 77 insertions, 39 deletions
diff --git a/www/junkbuster/files/junkbuster.sh.in b/www/junkbuster/files/junkbuster.sh.in index e4e4f199ec6f..387ce84eeed6 100644 --- a/www/junkbuster/files/junkbuster.sh.in +++ b/www/junkbuster/files/junkbuster.sh.in @@ -1,11 +1,21 @@ #!/bin/sh +# $CVSHeader$ case $1 in start) - test -d JDIR -a -x PREFIX/sbin/junkbuster -a -f JDIR/configfile || exit 1 - cd JDIR - su -m nobody -c "PREFIX/sbin/junkbuster configfile &" - echo -n " junkbuster" + if [ -d %%JDIR%% \ + -a -x %%PREFIX%%/sbin/junkbuster \ + -a -f %%JDIR%%/configfile ]; then + : seems OK + else + echo >&2 "$0: missing files!" + exit 1 + fi + cd %%JDIR%% + su -m nobody -c "%%PREFIX%%/sbin/junkbuster configfile &" \ + >/dev/null \ + && echo -n " junkbuster" \ + || echo " junkbuster FAILED TO START" ;; stop) killall junkbuster && echo -n " junkbuster" diff --git a/www/junkbuster/files/patch-aa b/www/junkbuster/files/patch-aa index 08cddfae34e0..59a1478d4e9d 100644 --- a/www/junkbuster/files/patch-aa +++ b/www/junkbuster/files/patch-aa @@ -1,20 +1,31 @@ -diff -ruN /usr/ports/www/ijb/work/ijb20/Makefile ./Makefile ---- /usr/ports/www/ijb/work/ijb20/Makefile Mon Feb 28 02:35:10 2000 -+++ ./Makefile Mon Feb 28 02:37:39 2000 -@@ -8,10 +8,11 @@ +--- Makefile.orig Fri Aug 4 15:40:15 2000 ++++ Makefile Fri Nov 3 12:23:48 2000 +@@ -5,20 +5,20 @@ + + # set include and library paths for the zlib compression library + # +-ZLIB_INC_FLAGS=-I../zlib +-ZLIB_LIB_FLAGS=-L ../zlib ++#ZLIB_INC_FLAGS=-I../zlib ++#ZLIB_LIB_FLAGS=-L ../zlib + + DEFAULT_CFLAGS = -I. $(ZLIB_INC_FLAGS) $(REGEX) -DSTDC_HEADERS -DHAVE_STRING + PROG = junkbuster O = o RM = rm -f -MORE_CFLAGS = -g +MORE_CFLAGS = + LD = $(CC) $(CFLAGS) $(ZLIB_LIB) + LDFLAGS = -lz # use this for Solaris 2.x - #LDFLAGS = -lnsl -lsocket +-#LDFLAGS = -lnsl -lsocket -lz +LDFLAGS += -lgnuregex # use these for SunOS 4.x - #LDFLAGS = -nsl -@@ -47,10 +48,10 @@ + #LDFLAGS = -nsl -lz +@@ -63,10 +63,10 @@ #MORE_CFLAGS = -relax_pointers #LDFLAGS = -map junkbuster.xMAP @@ -26,4 +37,4 @@ diff -ruN /usr/ports/www/ijb/work/ijb20/Makefile ./Makefile + encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) win32.$(O) $(PROG): $(OBJS) - $(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS) + $(LD) -o $(PROG) $(ZLIB_LIB_FLAGS) $(OBJS) $(LDFLAGS) diff --git a/www/junkbuster/files/patch-ag b/www/junkbuster/files/patch-ag index 7850ba53c513..c8e942b32401 100644 --- a/www/junkbuster/files/patch-ag +++ b/www/junkbuster/files/patch-ag @@ -1,7 +1,6 @@ -diff -ruN /usr/ports/www/ijb/work/ijb20/jcc.c ./jcc.c ---- /usr/ports/www/ijb/work/ijb20/jcc.c Mon Feb 28 02:35:10 2000 -+++ ./jcc.c Mon Feb 28 02:31:06 2000 -@@ -39,7 +39,7 @@ +--- jcc.c.orig Fri Nov 3 12:28:39 2000 ++++ jcc.c Fri Nov 3 12:31:58 2000 +@@ -39,11 +39,12 @@ #endif #ifdef REGEX @@ -10,4 +9,9 @@ diff -ruN /usr/ports/www/ijb/work/ijb20/jcc.c ./jcc.c #endif #include "jcc.h" -Binary files /usr/ports/www/ijb/work/ijb20/junkbuster and ./junkbuster differ +-#include "zutil.h" ++#include "zlib.h" ++#define DEF_MEM_LEVEL 8 + + char *prog; + diff --git a/www/junkbuster/files/patch-al b/www/junkbuster/files/patch-al index 6b78b5f1a731..98010e51f392 100644 --- a/www/junkbuster/files/patch-al +++ b/www/junkbuster/files/patch-al @@ -1,12 +1,14 @@ -diff -ruN /usr/ports/www/ijb/work/ijb20/ssplit.c ./ssplit.c ---- /usr/ports/www/ijb/work/ijb20/ssplit.c Mon Feb 28 02:35:10 2000 -+++ ./ssplit.c Mon Feb 28 02:31:06 2000 -@@ -18,6 +18,8 @@ +--- ssplit.c.orig Fri Aug 4 09:39:24 2000 ++++ ssplit.c Fri Nov 3 12:24:59 2000 +@@ -22,9 +22,10 @@ * l = flag indicating whether to ignore leading field separators */ +#include "loaders.h" -+#include <stdlib.h> - #include <string.h> - - int ssplit(char *s, char *c, char *v[], int n, int m, int l) + #include <stdlib.h> /* For free() */ + #include <stdio.h> /* Required by jcc.h */ +-#include "gnu_regex.h" ++#include "gnuregex.h" + #include "jcc.h" /* For zalloc() */ + #undef DEBUG /* DEBUG macro use in this file is not */ + /* consistent with use in jcc.h */ diff --git a/www/junkbuster/files/patch-an b/www/junkbuster/files/patch-an new file mode 100644 index 000000000000..cc89552a1df2 --- /dev/null +++ b/www/junkbuster/files/patch-an @@ -0,0 +1,11 @@ +--- bind.c 2000/11/03 10:27:18 1.1 ++++ bind.c 2000/11/03 10:27:22 +@@ -37,7 +37,7 @@ + #endif + + #ifdef REGEX +-#include <gnu_regex.h> ++#include <gnuregex.h> + #endif + + #include "jcc.h" /* For atoip() */ diff --git a/www/junkbuster/files/patch-jcc.c b/www/junkbuster/files/patch-jcc.c index d921d4c01faa..ae80b57ac806 100644 --- a/www/junkbuster/files/patch-jcc.c +++ b/www/junkbuster/files/patch-jcc.c @@ -1,6 +1,6 @@ ---- jcc.c.orig Fri Oct 30 22:58:48 1998 -+++ jcc.c Sat Mar 11 11:42:32 2000 -@@ -96,9 +96,27 @@ +--- jcc.c.orig Sun Sep 23 10:38:37 2001 ++++ jcc.c Sun Sep 23 10:39:23 2001 +@@ -100,9 +100,27 @@ char DEFAULT_USER_AGENT[] ="User-Agent: Mozilla/3.01Gold (Macintosh; I; 68K)"; @@ -26,19 +26,19 @@ int hideConsole = 0; +int tinygif = 0; - #ifdef _WIN32 - #define sleep(N) Sleep(((N) * 1000)) -@@ -198,6 +216,9 @@ - struct cookie_spec *cs; - struct gateway *gw; + char *logfile = NULL; + FILE *logfp; +@@ -351,6 +369,9 @@ struct http_request *http; -+ char *my_image_regexp = ".*(\\.gif|\\.jpe?g|\\gif$|\\jpe?g$)"; -+ regex_t my_regexp; -+ int errcode; + char *iob_buf; + int iob_len; ++ char *my_image_regexp = ".*(\\.gif|\\.jpe?g|\\gif$|\\jpe?g$)"; ++ regex_t my_regexp; ++ int errcode; - http = csp->http; -@@ -328,7 +349,21 @@ + http = csp->http; +@@ -493,7 +514,21 @@ prog, http->hostport, http->path); } @@ -61,7 +61,7 @@ if(DEBUG(LOG)) fwrite(p, strlen(p), 1, logfp); -@@ -704,6 +739,11 @@ +@@ -926,6 +961,11 @@ if(strcmp(cmd, "debug") == 0) { debug |= atoi(arg); |