summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-11-29 09:58:56 +0000
committerAlin Năstac <mrness@gentoo.org>2009-11-29 09:58:56 +0000
commitbb712b946d8c7c8462056917406268dd55f067f6 (patch)
treebb7e63c5538d16c3c6d76c026556040d2ee1f516 /net-proxy
parentUpdate Manifest (diff)
downloadgentoo-2-bb712b946d8c7c8462056917406268dd55f067f6.tar.gz
gentoo-2-bb712b946d8c7c8462056917406268dd55f067f6.tar.bz2
gentoo-2-bb712b946d8c7c8462056917406268dd55f067f6.zip
Add http-via-header USE flag (#292715). Migrate to EAPI 2.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/tinyproxy/ChangeLog10
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-no-via.patch40
-rw-r--r--net-proxy/tinyproxy/metadata.xml1
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.6.5.ebuild52
4 files changed, 101 insertions, 2 deletions
diff --git a/net-proxy/tinyproxy/ChangeLog b/net-proxy/tinyproxy/ChangeLog
index b5aea393e9ea..aaa6ad541a7b 100644
--- a/net-proxy/tinyproxy/ChangeLog
+++ b/net-proxy/tinyproxy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-proxy/tinyproxy
-# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.12 2008/09/25 21:01:49 mrness Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.13 2009/11/29 09:58:56 mrness Exp $
+
+*tinyproxy-1.6.5 (29 Nov 2009)
+
+ 29 Nov 2009; Alin Năstac <mrness@gentoo.org> +tinyproxy-1.6.5.ebuild,
+ +files/tinyproxy-no-via.patch, metadata.xml:
+ Add http-via-header USE flag (#292715). Migrate to EAPI 2.
*tinyproxy-1.6.4 (25 Sep 2008)
diff --git a/net-proxy/tinyproxy/files/tinyproxy-no-via.patch b/net-proxy/tinyproxy/files/tinyproxy-no-via.patch
new file mode 100644
index 000000000000..575ec06765c3
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-no-via.patch
@@ -0,0 +1,40 @@
+--- src/reqs.c 2009-09-28 23:27:46.000000000 -0400
++++ ../reqs.c 2009-11-10 15:06:28.062785177 -0400
+@@ -1002,36 +1002,5 @@
+ unsigned int major, unsigned int minor)
+ {
+- ssize_t len;
+- char hostname[512];
+- char *data;
+- int ret;
+-
+- if (config.via_proxy_name) {
+- strlcpy(hostname, config.via_proxy_name, sizeof(hostname));
+- } else if (gethostname(hostname, sizeof(hostname)) < 0) {
+- strcpy(hostname, "unknown");
+- }
+-
+- /*
+- * See if there is a "Via" header. If so, again we need to do a bit
+- * of processing.
+- */
+- len = hashmap_entry_by_key(hashofheaders, "via", (void **)&data);
+- if (len > 0) {
+- ret = write_message(fd,
+- "Via: %s, %hu.%hu %s (%s/%s)\r\n",
+- data,
+- major, minor,
+- hostname, PACKAGE, VERSION);
+-
+- hashmap_remove(hashofheaders, "via");
+- } else {
+- ret = write_message(fd,
+- "Via: %hu.%hu %s (%s/%s)\r\n",
+- major, minor,
+- hostname, PACKAGE, VERSION);
+- }
+-
+- return ret;
++ return 1;
+ }
+
diff --git a/net-proxy/tinyproxy/metadata.xml b/net-proxy/tinyproxy/metadata.xml
index c71417f73d4f..2c9461c4a0be 100644
--- a/net-proxy/tinyproxy/metadata.xml
+++ b/net-proxy/tinyproxy/metadata.xml
@@ -6,5 +6,6 @@
<use>
<flag name='transparent-proxy'>Enables support for transparent
proxies</flag>
+ <flag name='http-via-header'>Add Via field to HTTP headers</flag>
</use>
</pkgmetadata>
diff --git a/net-proxy/tinyproxy/tinyproxy-1.6.5.ebuild b/net-proxy/tinyproxy/tinyproxy-1.6.5.ebuild
new file mode 100644
index 000000000000..9df2e1f15795
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.6.5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/tinyproxy-1.6.5.ebuild,v 1.1 2009/11/29 09:58:56 mrness Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="A lightweight HTTP/SSL proxy"
+HOMEPAGE="http://www.banu.com/tinyproxy/"
+SRC_URI="http://www.banu.com/pub/tinyproxy/1.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="debug socks5 +http-via-header transparent-proxy"
+
+DEPEND="socks5? ( net-proxy/dante )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ use http-via-header || epatch "${FILESDIR}"/${PN}-no-via.patch
+}
+
+src_configure() {
+ econf \
+ --enable-xtinyproxy \
+ --enable-filter \
+ --enable-upstream \
+ `use_enable transparent-proxy` \
+ `use_enable debug` \
+ `use_enable debug profiling` \
+ `use_enable socks5 socks` \
+ || die "econf failed"
+}
+
+src_install() {
+ sed -i \
+ -e 's:mkdir $(datadir)/tinyproxy:mkdir -p $(DESTDIR)$(datadir)/tinyproxy:' \
+ Makefile
+ make DESTDIR="${D}" install || die "install failed"
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ mv "${D}/usr/share/tinyproxy" "${D}/usr/share/doc/${PF}/html"
+
+ newinitd "${FILESDIR}/tinyproxy.initd" tinyproxy
+}
+
+pkg_postinst() {
+ einfo "For filtering domains and URLs, enable filter option in the configuration file"
+ einfo "and add them to the filter file (one domain or URL per line)."
+}