summaryrefslogtreecommitdiffstats
path: root/www/p5-HTTP-Proxy
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2004-03-23 17:02:07 +0000
committermat <mat@FreeBSD.org>2004-03-23 17:02:07 +0000
commitd7aa3b5ea333857853b0f7ba3b5d6a41065759ca (patch)
treeb9961170ea00e6124769fcaf8b9cccce0b7395e2 /www/p5-HTTP-Proxy
parent2b62c3a47ce9fca0e7a0e0369685ae421f16d37d (diff)
downloadFreeBSD-ports-d7aa3b5ea333857853b0f7ba3b5d6a41065759ca.zip
FreeBSD-ports-d7aa3b5ea333857853b0f7ba3b5d6a41065759ca.tar.gz
Add p5-HTTP-Proxy 0.13, a pure Perl HTTP proxy.
Diffstat (limited to 'www/p5-HTTP-Proxy')
-rw-r--r--www/p5-HTTP-Proxy/Makefile42
-rw-r--r--www/p5-HTTP-Proxy/distinfo2
-rw-r--r--www/p5-HTTP-Proxy/files/5.005-Makefile.PL24
-rw-r--r--www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy.pm11
-rw-r--r--www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy::BodyFilter::htmltext.pm11
-rw-r--r--www/p5-HTTP-Proxy/pkg-descr7
-rw-r--r--www/p5-HTTP-Proxy/pkg-plist17
7 files changed, 114 insertions, 0 deletions
diff --git a/www/p5-HTTP-Proxy/Makefile b/www/p5-HTTP-Proxy/Makefile
new file mode 100644
index 0000000..f2118ed
--- /dev/null
+++ b/www/p5-HTTP-Proxy/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: p5-HTTP-Proxy
+# Date created: 16 April 2003
+# Whom: mat
+#
+# $FreeBSD$
+#
+
+PORTNAME= HTTP-Proxy
+PORTVERSION= 0.13
+CATEGORIES= www perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= HTTP
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= mat@FreeBSD.org
+COMMENT= A pure Perl HTTP proxy
+
+BUILD_DEPENDS= ${SITE_PERL}/LWP/UserAgent.pm:${PORTSDIR}/www/p5-libwww
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+PERL_CONFIGURE= yes
+
+MAN3= \
+ HTTP::Proxy.3 \
+ HTTP::Proxy::BodyFilter.3 \
+ HTTP::Proxy::BodyFilter::htmlparser.3 \
+ HTTP::Proxy::BodyFilter::htmltext.3 \
+ HTTP::Proxy::BodyFilter::lines.3 \
+ HTTP::Proxy::BodyFilter::simple.3 \
+ HTTP::Proxy::BodyFilter::tags.3 \
+ HTTP::Proxy::HeaderFilter.3 \
+ HTTP::Proxy::HeaderFilter::simple.3 \
+ HTTP::Proxy::HeaderFilter::standard.3
+
+.include <bsd.port.pre.mk>
+
+.if ${PERL_LEVEL} < 500600
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/IO/Socket/INET.pm:${PORTSDIR}/devel/p5-IO
+EXTRA_PATCHES= ${PATCHDIR}/5.005-Makefile.PL ${PATCHDIR}/5.005-lib::HTTP::Proxy.pm ${PATCHDIR}/5.005-lib::HTTP::Proxy::BodyFilter::htmltext.pm
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/www/p5-HTTP-Proxy/distinfo b/www/p5-HTTP-Proxy/distinfo
new file mode 100644
index 0000000..9647e78
--- /dev/null
+++ b/www/p5-HTTP-Proxy/distinfo
@@ -0,0 +1,2 @@
+MD5 (HTTP-Proxy-0.13.tar.gz) = 377756e947cee91d93c12927a78d88c8
+SIZE (HTTP-Proxy-0.13.tar.gz) = 38958
diff --git a/www/p5-HTTP-Proxy/files/5.005-Makefile.PL b/www/p5-HTTP-Proxy/files/5.005-Makefile.PL
new file mode 100644
index 0000000..82c310e
--- /dev/null
+++ b/www/p5-HTTP-Proxy/files/5.005-Makefile.PL
@@ -0,0 +1,24 @@
+--- Makefile.PL~ Tue Mar 23 17:31:09 2004
++++ Makefile.PL Tue Mar 23 17:31:28 2004
+@@ -1,5 +1,21 @@
+ use ExtUtils::MakeMaker;
+
++if ($] < 5.006) {
++ for my $f (<lib/HTTP/Proxy/*/*.pm>) {
++ open F,$f;
++ my @f = <F>;
++ close F;
++ for (@f) {
++ if (/^use base qw\( (.*) \);/o) {
++ $_ = "use $1;\nuse vars '\@ISA';\n\@ISA = qw( $1 );\n";
++ }
++ }
++ open F, ">$f";
++ print F @f;
++ close F;
++ }
++}
++
+ WriteMakefile(
+ NAME => 'HTTP::Proxy',
+ VERSION_FROM => 'lib/HTTP/Proxy.pm',
diff --git a/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy.pm b/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy.pm
new file mode 100644
index 0000000..7c41192
--- /dev/null
+++ b/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy.pm
@@ -0,0 +1,11 @@
+--- lib/HTTP/Proxy.pm~ Wed Mar 3 01:15:02 2004
++++ lib/HTTP/Proxy.pm Tue Mar 23 17:54:31 2004
+@@ -760,7 +760,7 @@
+ # proxy the data
+ $self->log( CONNECT, "($$) CONNECT:",
+ "$read bytes received from $from" );
+- $peer->syswrite($data);
++ $peer->syswrite($data, length($data));
+ }
+ }
+ $self->log( CONNECT, "($$) CONNECT:", "End of CONNECT proxyfication");
diff --git a/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy::BodyFilter::htmltext.pm b/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy::BodyFilter::htmltext.pm
new file mode 100644
index 0000000..46080aa
--- /dev/null
+++ b/www/p5-HTTP-Proxy/files/5.005-lib::HTTP::Proxy::BodyFilter::htmltext.pm
@@ -0,0 +1,11 @@
+--- lib/HTTP/Proxy/BodyFilter/htmltext.pm~ Tue Mar 23 17:51:08 2004
++++ lib/HTTP/Proxy/BodyFilter/htmltext.pm Tue Mar 23 17:53:30 2004
+@@ -66,7 +66,7 @@
+ redo SCAN if $self->{js}; # ignore protected
+ {
+ local $_ = $1;
+- $self->{_filter}();
++ $self->{_filter}->();
+ substr( $$dataref, $pos, length($1), $_ );
+ pos($$dataref) = $pos + length($_);
+ }
diff --git a/www/p5-HTTP-Proxy/pkg-descr b/www/p5-HTTP-Proxy/pkg-descr
new file mode 100644
index 0000000..813f008
--- /dev/null
+++ b/www/p5-HTTP-Proxy/pkg-descr
@@ -0,0 +1,7 @@
+This module implements a HTTP proxy, using a HTTP::Daemon to accept client
+connections, and a LWP::UserAgent to ask for the requested pages.
+
+The most interesting feature of this proxy object is its hability to filter the
+HTTP requests and responses through user-defined filters.
+
+WWW: http://search.cpan.org/dist/HTTP-Proxy/
diff --git a/www/p5-HTTP-Proxy/pkg-plist b/www/p5-HTTP-Proxy/pkg-plist
new file mode 100644
index 0000000..3161dc3
--- /dev/null
+++ b/www/p5-HTTP-Proxy/pkg-plist
@@ -0,0 +1,17 @@
+%%SITE_PERL%%/HTTP/Proxy.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter/htmlparser.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter/htmltext.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter/lines.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter/simple.pm
+%%SITE_PERL%%/HTTP/Proxy/BodyFilter/tags.pm
+%%SITE_PERL%%/HTTP/Proxy/HeaderFilter.pm
+%%SITE_PERL%%/HTTP/Proxy/HeaderFilter/simple.pm
+%%SITE_PERL%%/HTTP/Proxy/HeaderFilter/standard.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTTP/Proxy/.packlist
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/HTTP/Proxy
+@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTTP 2>/dev/null || true
+@dirrm %%SITE_PERL%%/HTTP/Proxy/HeaderFilter
+@dirrm %%SITE_PERL%%/HTTP/Proxy/BodyFilter
+@dirrm %%SITE_PERL%%/HTTP/Proxy
+@unexec rmdir %D/%%SITE_PERL%%/HTTP 2>/dev/null || true
OpenPOWER on IntegriCloud