summaryrefslogtreecommitdiff
path: root/net-proxy
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/3proxy/3proxy-0.5.3k.ebuild55
-rw-r--r--net-proxy/3proxy/3proxy-0.7.1.2.ebuild40
-rw-r--r--net-proxy/3proxy/3proxy-0.7.1.4.ebuild40
-rw-r--r--net-proxy/3proxy/3proxy-0.8.6.ebuild40
-rw-r--r--net-proxy/3proxy/3proxy-0.8.8.ebuild41
-rw-r--r--net-proxy/3proxy/3proxy-0.8.9.ebuild39
-rw-r--r--net-proxy/3proxy/Manifest19
-rw-r--r--net-proxy/3proxy/files/3proxy-0.5.3k-gentoo.patch26
-rw-r--r--net-proxy/3proxy/files/3proxy-0.7.1.2-gentoo.patch43
-rw-r--r--net-proxy/3proxy/files/3proxy-0.8.6-gentoo.patch43
-rw-r--r--net-proxy/3proxy/files/3proxy-0.8.8-gentoo.patch43
-rw-r--r--net-proxy/3proxy/metadata.xml26
-rw-r--r--net-proxy/adzapper/Manifest6
-rw-r--r--net-proxy/adzapper/adzapper-20110915-r2.ebuild56
-rw-r--r--net-proxy/adzapper/files/20110915-flush.patch107
-rw-r--r--net-proxy/adzapper/metadata.xml9
-rw-r--r--net-proxy/bfilter/Manifest12
-rw-r--r--net-proxy/bfilter/bfilter-1.1.4-r4.ebuild84
-rw-r--r--net-proxy/bfilter/files/bfilter-1.1.4-external-boost.patch63
-rw-r--r--net-proxy/bfilter/files/bfilter-1.1.4-glib-2.32.patch39
-rw-r--r--net-proxy/bfilter/files/bfilter-1.1.4-gtkmm-X11-underlinking.patch12
-rw-r--r--net-proxy/bfilter/files/bfilter.conf4
-rw-r--r--net-proxy/bfilter/files/bfilter.init35
-rw-r--r--net-proxy/bfilter/files/forwarding-proxy.xml19
-rw-r--r--net-proxy/bfilter/files/forwarding.xml5
-rw-r--r--net-proxy/bfilter/metadata.xml21
-rw-r--r--net-proxy/c-icap-modules/Manifest5
-rw-r--r--net-proxy/c-icap-modules/c-icap-modules-0.2.4.ebuild53
-rw-r--r--net-proxy/c-icap-modules/metadata.xml9
-rw-r--r--net-proxy/c-icap/Manifest9
-rw-r--r--net-proxy/c-icap/c-icap-0.2.6.ebuild112
-rw-r--r--net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch11
-rw-r--r--net-proxy/c-icap/files/c-icap.conf11
-rw-r--r--net-proxy/c-icap/files/c-icap.init.326
-rw-r--r--net-proxy/c-icap/files/c-icap.logrotate13
-rw-r--r--net-proxy/c-icap/metadata.xml7
-rw-r--r--net-proxy/cntlm/Manifest9
-rw-r--r--net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild56
-rw-r--r--net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch195
-rw-r--r--net-proxy/cntlm/files/cntlm.confd5
-rw-r--r--net-proxy/cntlm/files/cntlm.initd21
-rw-r--r--net-proxy/cntlm/files/cntlm.service9
-rw-r--r--net-proxy/cntlm/metadata.xml12
-rw-r--r--net-proxy/dante/Manifest18
-rw-r--r--net-proxy/dante/dante-1.4.1-r1.ebuild102
-rw-r--r--net-proxy/dante/files/dante-1.3.2-sockd-init56
-rw-r--r--net-proxy/dante/files/dante-1.4.0-HAVE_SENDBUF_IOCTL.patch11
-rw-r--r--net-proxy/dante/files/dante-1.4.0-cflags.patch32
-rw-r--r--net-proxy/dante/files/dante-1.4.0-osdep-format-macro.patch15
-rw-r--r--net-proxy/dante/files/dante-1.4.0-socksify.patch27
-rw-r--r--net-proxy/dante/files/dante-1.4.1-miniupnp14.patch14
-rw-r--r--net-proxy/dante/files/dante-1.4.1-sigpwr-siginfo.patch26
-rw-r--r--net-proxy/dante/files/dante-sockd-conf13
-rw-r--r--net-proxy/dante/files/dante-sockd.service9
-rw-r--r--net-proxy/dante/files/sockd.conf243
-rw-r--r--net-proxy/dante/files/sockd.conf-with-libwrap.patch41
-rw-r--r--net-proxy/dante/files/sockd.conf-with-pam.patch12
-rw-r--r--net-proxy/dante/files/socks.conf127
-rw-r--r--net-proxy/dante/metadata.xml6
-rw-r--r--net-proxy/dnsproxy/Manifest8
-rw-r--r--net-proxy/dnsproxy/dnsproxy-1.16-r2.ebuild42
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch10
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy.confd3
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy.initd31
-rw-r--r--net-proxy/dnsproxy/metadata.xml9
-rw-r--r--net-proxy/haproxy/Manifest24
-rw-r--r--net-proxy/haproxy/files/haproxy-1.7-contrib.patch31
-rw-r--r--net-proxy/haproxy/files/haproxy.confd14
-rw-r--r--net-proxy/haproxy/files/haproxy.initd-r246
-rw-r--r--net-proxy/haproxy/files/haproxy.initd-r485
-rw-r--r--net-proxy/haproxy/files/haproxy.initd-r585
-rw-r--r--net-proxy/haproxy/haproxy-1.5.14.ebuild134
-rw-r--r--net-proxy/haproxy/haproxy-1.5.19-r1.ebuild135
-rw-r--r--net-proxy/haproxy/haproxy-1.6.11-r1.ebuild164
-rw-r--r--net-proxy/haproxy/haproxy-1.6.13-r2.ebuild158
-rw-r--r--net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild159
-rw-r--r--net-proxy/haproxy/haproxy-1.7.7.ebuild159
-rw-r--r--net-proxy/haproxy/haproxy-1.7.8.ebuild159
-rw-r--r--net-proxy/haproxy/haproxy-1.7.9.ebuild159
-rw-r--r--net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild159
-rw-r--r--net-proxy/haproxy/metadata.xml30
-rw-r--r--net-proxy/hatop/Manifest5
-rw-r--r--net-proxy/hatop/hatop-0.7.7.ebuild31
-rw-r--r--net-proxy/hatop/metadata.xml8
-rw-r--r--net-proxy/havp/Manifest8
-rw-r--r--net-proxy/havp/files/havp-0.92a-pkg-config-libclamav.patch66
-rw-r--r--net-proxy/havp/files/havp-0.92a-run.patch51
-rw-r--r--net-proxy/havp/files/havp.initd59
-rw-r--r--net-proxy/havp/havp-0.92a-r2.ebuild75
-rw-r--r--net-proxy/havp/metadata.xml7
-rw-r--r--net-proxy/http-replicator/Manifest19
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch51
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch31
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.13
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2201
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch20
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3.0.conf46
-rw-r--r--net-proxy/http-replicator/files/http-replicator-3.0.init20
-rw-r--r--net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf46
-rw-r--r--net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch101
-rw-r--r--net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init21
-rw-r--r--net-proxy/http-replicator/files/http-replicator.service11
-rw-r--r--net-proxy/http-replicator/files/http-replicator.service.conf3
-rw-r--r--net-proxy/http-replicator/http-replicator-3.0-r7.ebuild93
-rw-r--r--net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild72
-rw-r--r--net-proxy/http-replicator/metadata.xml8
-rw-r--r--net-proxy/httpush/Manifest5
-rw-r--r--net-proxy/httpush/httpush-0.9_beta11-r1.ebuild60
-rw-r--r--net-proxy/httpush/metadata.xml9
-rw-r--r--net-proxy/metadata.xml33
-rw-r--r--net-proxy/mitmproxy/Manifest10
-rw-r--r--net-proxy/mitmproxy/files/mitmproxy-0.10-jsbeautifier-imports.patch44
-rw-r--r--net-proxy/mitmproxy/metadata.xml11
-rw-r--r--net-proxy/mitmproxy/mitmproxy-0.10.1.ebuild51
-rw-r--r--net-proxy/mitmproxy/mitmproxy-0.11.1.ebuild55
-rw-r--r--net-proxy/mitmproxy/mitmproxy-0.11.3.ebuild54
-rw-r--r--net-proxy/nutcracker/Manifest15
-rw-r--r--net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch64
-rw-r--r--net-proxy/nutcracker/files/nutcracker-0.3.0-use-system-libyaml.patch57
-rw-r--r--net-proxy/nutcracker/files/nutcracker.confd9
-rw-r--r--net-proxy/nutcracker/files/nutcracker.confd.29
-rw-r--r--net-proxy/nutcracker/files/nutcracker.initd39
-rw-r--r--net-proxy/nutcracker/files/nutcracker.initd.239
-rw-r--r--net-proxy/nutcracker/metadata.xml11
-rw-r--r--net-proxy/nutcracker/nutcracker-0.2.4.ebuild43
-rw-r--r--net-proxy/nutcracker/nutcracker-0.3.0.ebuild43
-rw-r--r--net-proxy/nutcracker/nutcracker-0.4.1-r1.ebuild45
-rw-r--r--net-proxy/nylon/Manifest8
-rw-r--r--net-proxy/nylon/files/nylon-1.21-libevent.patch63
-rw-r--r--net-proxy/nylon/files/nylon.conf37
-rw-r--r--net-proxy/nylon/files/nylon.init22
-rw-r--r--net-proxy/nylon/metadata.xml7
-rw-r--r--net-proxy/nylon/nylon-1.21-r2.ebuild35
-rw-r--r--net-proxy/obfs4proxy/Manifest7
-rw-r--r--net-proxy/obfs4proxy/metadata.xml15
-rw-r--r--net-proxy/obfs4proxy/obfs4proxy-0.0.6.ebuild48
-rw-r--r--net-proxy/obfs4proxy/obfs4proxy-0.0.7.ebuild48
-rw-r--r--net-proxy/obfs4proxy/obfs4proxy-9999.ebuild48
-rw-r--r--net-proxy/pingtunnel/Manifest6
-rw-r--r--net-proxy/pingtunnel/files/pingtunnel-0.72_makefile.patch60
-rw-r--r--net-proxy/pingtunnel/metadata.xml9
-rw-r--r--net-proxy/pingtunnel/pingtunnel-0.72.ebuild37
-rw-r--r--net-proxy/piper/Manifest5
-rw-r--r--net-proxy/piper/metadata.xml7
-rw-r--r--net-proxy/piper/piper-1.14.ebuild24
-rw-r--r--net-proxy/polipo/Manifest10
-rw-r--r--net-proxy/polipo/files/config8
-rw-r--r--net-proxy/polipo/files/polipo.crond-222
-rw-r--r--net-proxy/polipo/files/polipo.initd-565
-rw-r--r--net-proxy/polipo/files/polipo_at.service11
-rw-r--r--net-proxy/polipo/metadata.xml8
-rw-r--r--net-proxy/polipo/polipo-1.1.1-r4.ebuild61
-rw-r--r--net-proxy/polipo/polipo-9999.ebuild61
-rw-r--r--net-proxy/privoxy/Manifest9
-rw-r--r--net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch114
-rw-r--r--net-proxy/privoxy/files/privoxy.initd-328
-rw-r--r--net-proxy/privoxy/files/privoxy.logrotate9
-rw-r--r--net-proxy/privoxy/files/privoxy.service10
-rw-r--r--net-proxy/privoxy/metadata.xml38
-rw-r--r--net-proxy/privoxy/privoxy-3.0.26.ebuild127
-rw-r--r--net-proxy/ratproxy/Manifest6
-rw-r--r--net-proxy/ratproxy/files/ratproxy-Makefile.patch19
-rw-r--r--net-proxy/ratproxy/metadata.xml17
-rw-r--r--net-proxy/ratproxy/ratproxy-1.58.ebuild41
-rw-r--r--net-proxy/redsocks/Manifest7
-rw-r--r--net-proxy/redsocks/files/redsocks.conf15
-rw-r--r--net-proxy/redsocks/files/redsocks.init53
-rw-r--r--net-proxy/redsocks/files/redsocks.service15
-rw-r--r--net-proxy/redsocks/metadata.xml26
-rw-r--r--net-proxy/redsocks/redsocks-0.5.ebuild48
-rw-r--r--net-proxy/redsocks/redsocks-9999.ebuild48
-rw-r--r--net-proxy/rejik/Manifest6
-rw-r--r--net-proxy/rejik/metadata.xml11
-rw-r--r--net-proxy/rejik/rejik-3.2.10.ebuild84
-rw-r--r--net-proxy/shadowsocks-libev/Manifest15
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service11
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks.initd61
-rw-r--r--net-proxy/shadowsocks-libev/files/shadowsocks.json8
-rw-r--r--net-proxy/shadowsocks-libev/metadata.xml16
-rw-r--r--net-proxy/shadowsocks-libev/shadowsocks-libev-2.5.6.ebuild76
-rw-r--r--net-proxy/shadowsocks-libev/shadowsocks-libev-2.6.2.ebuild76
-rw-r--r--net-proxy/shadowsocks-libev/shadowsocks-libev-3.0.6.ebuild74
-rw-r--r--net-proxy/squid/Manifest18
-rw-r--r--net-proxy/squid/files/squid-3.5.7-gentoo.patch100
-rw-r--r--net-proxy/squid/files/squid-cppunit-1.14.patch417
-rw-r--r--net-proxy/squid/files/squid.confd-r112
-rw-r--r--net-proxy/squid/files/squid.cron5
-rw-r--r--net-proxy/squid/files/squid.initd-r4117
-rw-r--r--net-proxy/squid/files/squid.logrotate8
-rw-r--r--net-proxy/squid/files/squid.pam7
-rw-r--r--net-proxy/squid/metadata.xml31
-rw-r--r--net-proxy/squid/squid-3.5.23.ebuild240
-rw-r--r--net-proxy/squid/squid-3.5.24.ebuild240
-rw-r--r--net-proxy/squid/squid-3.5.25.ebuild240
-rw-r--r--net-proxy/squid/squid-3.5.26.ebuild241
-rw-r--r--net-proxy/squidclamav/Manifest7
-rw-r--r--net-proxy/squidclamav/metadata.xml13
-rw-r--r--net-proxy/squidclamav/squidclamav-6.10.ebuild66
-rw-r--r--net-proxy/squidclamav/squidclamav-6.8.ebuild62
-rw-r--r--net-proxy/squidguard/Manifest10
-rw-r--r--net-proxy/squidguard/files/blockedsites1
-rw-r--r--net-proxy/squidguard/files/squidGuard.conf.blocksites13
-rw-r--r--net-proxy/squidguard/files/squidGuard.conf.minimal7
-rw-r--r--net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch50
-rw-r--r--net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch130
-rw-r--r--net-proxy/squidguard/metadata.xml8
-rw-r--r--net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild102
-rw-r--r--net-proxy/squirm/Manifest7
-rw-r--r--net-proxy/squirm/files/squirm-1.26-gcc5.patch9
-rw-r--r--net-proxy/squirm/files/squirm-1.26-gentoo.patch34
-rw-r--r--net-proxy/squirm/metadata.xml6
-rw-r--r--net-proxy/squirm/squirm-1.26-r1.ebuild37
-rw-r--r--net-proxy/sshuttle/Manifest5
-rw-r--r--net-proxy/sshuttle/metadata.xml12
-rw-r--r--net-proxy/sshuttle/sshuttle-0.78.3.ebuild42
-rw-r--r--net-proxy/tayga/Manifest5
-rw-r--r--net-proxy/tayga/metadata.xml8
-rw-r--r--net-proxy/tayga/tayga-0.9.2.ebuild29
-rw-r--r--net-proxy/tinyproxy/Manifest11
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.1-ldflags.patch11
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.1-minimal.patch10
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch183
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd40
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy.service9
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy.tmpfiles.conf1
-rw-r--r--net-proxy/tinyproxy/metadata.xml13
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild89
-rw-r--r--net-proxy/torsocks/Manifest5
-rw-r--r--net-proxy/torsocks/metadata.xml12
-rw-r--r--net-proxy/torsocks/torsocks-2.2.0.ebuild46
-rw-r--r--net-proxy/tsocks/Manifest11
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch22
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch31
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch35
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch16
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch62
-rw-r--r--net-proxy/tsocks/metadata.xml19
-rw-r--r--net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild78
-rw-r--r--net-proxy/ufdbguard/Manifest11
-rw-r--r--net-proxy/ufdbguard/files/ufdb.confd20
-rw-r--r--net-proxy/ufdbguard/files/ufdb.initd82
-rw-r--r--net-proxy/ufdbguard/files/ufdb.initd.267
-rw-r--r--net-proxy/ufdbguard/files/ufdbUpdate.cron13
-rw-r--r--net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch13
-rw-r--r--net-proxy/ufdbguard/metadata.xml22
-rw-r--r--net-proxy/ufdbguard/ufdbguard-1.32.4.ebuild126
-rw-r--r--net-proxy/wwwoffle/Manifest9
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch20
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-online.confd9
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle-online.initd29
-rw-r--r--net-proxy/wwwoffle/files/wwwoffle.initd20
-rw-r--r--net-proxy/wwwoffle/metadata.xml9
-rw-r--r--net-proxy/wwwoffle/wwwoffle-2.9i-r1.ebuild107
-rw-r--r--net-proxy/ziproxy/Manifest8
-rw-r--r--net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch46
-rw-r--r--net-proxy/ziproxy/files/ziproxy.confd18
-rw-r--r--net-proxy/ziproxy/files/ziproxy.initd-r125
-rw-r--r--net-proxy/ziproxy/metadata.xml13
-rw-r--r--net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild84
262 files changed, 11435 insertions, 0 deletions
diff --git a/net-proxy/3proxy/3proxy-0.5.3k.ebuild b/net-proxy/3proxy/3proxy-0.5.3k.ebuild
new file mode 100644
index 000000000000..52aa87fc211d
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.5.3k.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="really tiny cross-platform proxy servers set"
+HOMEPAGE="http://www.security.nnov.ru/soft/3proxy/"
+SRC_URI="http://www.security.nnov.ru/soft/3proxy/${PV}/${P}.tgz"
+
+LICENSE="3proxy"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LN="$(tc-getCC)" \
+ -f Makefile.unix \
+ || die "emake failed"
+}
+
+src_install() {
+ local x
+
+ pushd src
+ dobin 3proxy || die "dobin 3proxy failed"
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts ; do
+ newbin ${x} ${PN}-${x} || die "newbin ${x} failed"
+ [[ -f ${S}/man/${x}.8 ]] \
+ && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ popd
+
+ doman "${S}"/man/3proxy*.[38]
+
+ cd "${S}"
+ dodoc Changelog Readme Release.notes
+ dohtml -r doc/html/*
+ docinto cfg
+ dodoc cfg/*.{txt,sample}
+ docinto cfg/sql
+ dodoc cfg/sql/*.{cfg,sql}
+}
diff --git a/net-proxy/3proxy/3proxy-0.7.1.2.ebuild b/net-proxy/3proxy/3proxy-0.7.1.2.ebuild
new file mode 100644
index 000000000000..685cfce08be6
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.7.1.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+inherit eutils
+
+DESCRIPTION="A really tiny cross-platform proxy servers set"
+HOMEPAGE="http://www.3proxy.ru/"
+SRC_URI="http://3proxy.ru/${PV}/${P}.tgz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ cp Makefile.Linux Makefile || die
+ default
+}
+
+src_install() {
+ local x
+
+ cd src || die
+ dobin 3proxy
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts countersutil ; do
+ newbin ${x} ${PN}-${x}
+ [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ cd ..
+
+ doman man/3proxy*.[38]
+
+ dodoc Readme
+ docinto html
+ dodoc -r doc/html/*
+ docinto cfg
+ dodoc -r cfg/*
+}
diff --git a/net-proxy/3proxy/3proxy-0.7.1.4.ebuild b/net-proxy/3proxy/3proxy-0.7.1.4.ebuild
new file mode 100644
index 000000000000..c9dc4bc113cf
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.7.1.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+inherit eutils
+
+DESCRIPTION="A really tiny cross-platform proxy servers set"
+HOMEPAGE="http://www.3proxy.ru/"
+SRC_URI="http://3proxy.ru/${PV}/${P}.tgz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7.1.2-gentoo.patch
+ cp Makefile.Linux Makefile || die
+ default
+}
+
+src_install() {
+ local x
+
+ cd src || die
+ dobin 3proxy
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts countersutil ; do
+ newbin ${x} ${PN}-${x}
+ [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ cd ..
+
+ doman man/3proxy*.[38]
+
+ dodoc Readme
+ docinto html
+ dodoc -r doc/html/*
+ docinto cfg
+ dodoc -r cfg/*
+}
diff --git a/net-proxy/3proxy/3proxy-0.8.6.ebuild b/net-proxy/3proxy/3proxy-0.8.6.ebuild
new file mode 100644
index 000000000000..f8c913ff35b8
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.8.6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+inherit eutils
+
+DESCRIPTION="A really tiny cross-platform proxy servers set"
+HOMEPAGE="http://www.3proxy.ru/"
+SRC_URI="http://3proxy.ru/${PV}/${P}.tgz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ cp Makefile.Linux Makefile || die
+ default
+}
+
+src_install() {
+ local x
+
+ cd src || die
+ dobin 3proxy
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts icqpr smtpp; do
+ newbin ${x} ${PN}-${x}
+ [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ cd ..
+
+ doman man/3proxy*.[38]
+
+ dodoc Readme
+ docinto html
+ dodoc -r doc/html/*
+ docinto cfg
+ dodoc -r cfg/*
+}
diff --git a/net-proxy/3proxy/3proxy-0.8.8.ebuild b/net-proxy/3proxy/3proxy-0.8.8.ebuild
new file mode 100644
index 000000000000..f1f343e233af
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.8.8.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+
+DESCRIPTION="A really tiny cross-platform proxy servers set"
+HOMEPAGE="https://www.3proxy.ru/"
+SRC_URI="https://github.com/z3APA3A/3proxy/archive/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+DOCS=( README cfg )
+HTML_DOCS=( doc/html/. )
+
+src_prepare() {
+ default
+ cp Makefile.Linux Makefile || die
+}
+
+src_install() {
+ local x
+
+ pushd src >/dev/null || die
+ dobin 3proxy
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts icqpr smtpp; do
+ newbin ${x} ${PN}-${x}
+ [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ popd >/dev/null
+
+ doman man/3proxy*.[38]
+
+ einstalldocs
+}
diff --git a/net-proxy/3proxy/3proxy-0.8.9.ebuild b/net-proxy/3proxy/3proxy-0.8.9.ebuild
new file mode 100644
index 000000000000..c8979db8e54d
--- /dev/null
+++ b/net-proxy/3proxy/3proxy-0.8.9.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+
+DESCRIPTION="A really tiny cross-platform proxy servers set"
+HOMEPAGE="https://www.3proxy.ru/"
+SRC_URI="https://github.com/z3APA3A/3proxy/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ppc x86"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8.8-gentoo.patch
+)
+
+DOCS=( README cfg )
+HTML_DOCS=( doc/html/. )
+
+src_prepare() {
+ default
+ cp Makefile.Linux Makefile || die
+}
+
+src_install() {
+ local x
+
+ pushd src >/dev/null || die
+ dobin 3proxy
+ for x in proxy socks ftppr pop3p tcppm udppm mycrypt dighosts icqpr smtpp; do
+ newbin ${x} ${PN}-${x}
+ [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8
+ done
+ popd >/dev/null
+
+ doman man/3proxy*.[38]
+
+ einstalldocs
+}
diff --git a/net-proxy/3proxy/Manifest b/net-proxy/3proxy/Manifest
new file mode 100644
index 000000000000..a27e3e8078a6
--- /dev/null
+++ b/net-proxy/3proxy/Manifest
@@ -0,0 +1,19 @@
+AUX 3proxy-0.5.3k-gentoo.patch 956 SHA256 af4b7ff7dd0830b8d4aeb1ff3127621a40935a8d821da74e6e29ebae43ff8aa1 SHA512 857d72ad85d5dc5158eda402f0ad81ccd9410e1849c5c1f1a2fd86946ae65073ce5ac09f19e0d9cae940d285d161252045cb0d2b936dcb6121fae161a77df113 WHIRLPOOL 9dd0f2ddaea764193e67212ed12a7647856e02b5a1a296c624940a866b7f328fdff6faf2f132d0787b6ea5fc9300cfbadeb419dce5e550b833b6eb394c52c642
+AUX 3proxy-0.7.1.2-gentoo.patch 1536 SHA256 789e3dbe03040a1a2be700c9cfc09c7aac6a82585a296cf9674f29d9ce52db96 SHA512 e7e1f935bb241fec05705819d7f967898bcab4a670126d6ed6f5f6b96e392d11e3b6886fce7f7c81b13b0b1131c75787d9433e793b54d7c0bcc0deb92b3de469 WHIRLPOOL 9ede048cc8f95c2214a4dc0bff7bbae2b94aacb01b98406359fecf22fd954bfe3e9419d4137e8ffc817682b4231263a6790628544305859fb65e57aab9e5d264
+AUX 3proxy-0.8.6-gentoo.patch 1512 SHA256 7ec3f3f997d01a8c9efcad0a3e0ecd55b078c24a7827fc53a7e122c8a3abcf3b SHA512 6e5686af44cebe4cbb6aa45bfc5602ac40d018d98225d2788a1314d10bed861e8599e4d594ee9422835214cc2cf1994bb27fc65eb216996b254e19cca3d7b5b0 WHIRLPOOL c95fc1a7f4172596a01e34122cc48741f32bbb014e02de30dda7dddfea6562402fed936602a991779ffa43be67069e6728e2410001afe683b4dc43751f1230c7
+AUX 3proxy-0.8.8-gentoo.patch 1471 SHA256 40c053d5788bc074f63c2e40c485c3d3cbfd6b5f0543e31cd8d23af3b30cf44f SHA512 9c41df962691f8b2b832495a5e644fcbe58805839b2b40dd65564dc3eb9897de1a744677e2c4a032e39d64b34c4190893049f2ed86be8908f739f720633b2f3a WHIRLPOOL 248b79ebf7b459df6aa0a8a48f18ed6352739c706540a3855cb736421b29f9c8802187734b26fbe59a92467f129bf039530035e063aaa01393440fabc341ba85
+DIST 3proxy-0.5.3k.tgz 190797 SHA256 7bbe159a0157480c653ef3976495a9b1993435a44ea0e7c03784320e3ac28ea3 SHA512 d709d57fc7c1a31ab190dd4692a93d9a4866a0cfea4cb6d2ff8dc8f8a3ec2ff674496a4c63854580a933948a6f899db2cc21e5b82a6f854bc236e5779014ae00 WHIRLPOOL 98b7ccab3447674c82e2f8fb94f9840cc696038fb7a443d55795e9b32052c1de3e76797a444bad1daed8bee27835b930c045073b666cd7fb54bc643c5b962760
+DIST 3proxy-0.7.1.2.tgz 478532 SHA256 e1157aab3ff8215a3b1f35c61a9d6011e60ad38b52d9f74a1fc4cae14ba16a31 SHA512 c7f4e25d2630e8c6c25bbc09a5f9f201448d57a85d404cd1f6304946d9a31083845bd8d481f610fe1cd1f56be349eb774cdae135430efcfdd1952a0403d01735 WHIRLPOOL bdfd70a0054b71457f49bcc09af8f26d1cf371d10fb60adc256ad5a60f54167fc1d8e26f9355785223647392b5697adaa4ebeec26c7009a09e1f8d317cdf7089
+DIST 3proxy-0.7.1.4.tgz 478617 SHA256 905a080ea3ba45a522a2d871bfdda94168561f7dd81c01a4be3540eda8f6c98f SHA512 af361666ec6d53decee6a66f4ec5621e0bbaccfaae8f6cadd5c00c91a417916b2b1b97a660fd47566677c3343f603a45b92f085a48a26eaa429398938d29383a WHIRLPOOL 08ab0ff3a26bce973ffe0077bddc84f356c0c8f8e3a8c06faadb932b10f8c8fc7000d3aaf372bcfe6a2ffcfa4516b23dc3f10bc5509afd404af466d0f765f1d5
+DIST 3proxy-0.8.6.tgz 508359 SHA256 7819237ce043465d887cb0b25d8594de932ed9a694a32a4e46b895ee55675fa2 SHA512 394fcf8f6d088543b2380ad6bf058d276caed29300df7de963895add788a867cab5860f6fc3f1279e10304db5b0ac147af232f9acd3986188bfa56ad2307aae4 WHIRLPOOL d1640a5d0765b3332263ed09e9349e470a5b8c5f57ba65b993cff6bb89d3818ee4da40193e7bdbcfec891810ffe05db02ae5ad25216e00613738e302c1880c88
+DIST 3proxy-0.8.8.tar.gz 497039 SHA256 a614527db4056a29672362b6491378d74dbcc21433efa293d351d225d2cccf67 SHA512 ea35ae862f006428950264a673266cff016ad35f3fcbfc842438fef8b1f484c665cfdf30ad1346527c1b18d0c552e3f806416a73f5cc1d35fc1045e322ea4e3d WHIRLPOOL 13587ae2ac034a5342852b426b270eb32005675799ae9d42951b1f0b0944259abb342e748cbbba3bcdf77d3071779d0aca836aef12caa67f670c267f59663e40
+DIST 3proxy-0.8.9.tar.gz 497006 SHA256 6c06e5ba2267bb63f6ac3f1293949ff4ff4988fad88fedd3fe93a8b1ba1ff21f SHA512 35153882fec7077b05b23f9cea91443126a8a9faf9818915612e0739196a8bd1f00e0bcefb339a86bad10bb0c1b9891bd06847934787f4758ec55e6cc2e9e815 WHIRLPOOL 251c8c7a79d20d69ae53ac1613fbacf9107c39c72b7a9b22727f12c123503d9d241b5ff6bdbfa78454aa1696e83c3020199df1acbe3afd624ff494b5ca3ddf2e
+EBUILD 3proxy-0.5.3k.ebuild 1077 SHA256 7321f64b97a88eae76fca792bfdb447aca96e25ba7551db5b2d47860d43504ba SHA512 fa39bb3d3ba77ecbfba19d91f6832a5e2ce74ef76b33c05f0cc2f95a11f96eedb2d58f598dc39d052cbb26d22edf3ebe073bb4064c34435c4547bd186c22dbab WHIRLPOOL 342aeb4d363b72e762617550a04cd580b59b1d4d01afa577d0cb2d7e2d7e632a50912279f1f710d2a412ad0a8fff4a96c711f79747b4c620ab599632486e3994
+EBUILD 3proxy-0.7.1.2.ebuild 801 SHA256 63073a9ff7db16b4bf3a850c44100051a84302faa65e04a0e874613e094d5014 SHA512 9d7c225b7f753b17aa1f71e5d2b63b22bc0bea6d9c1d87b338c9f0e009b14f26ff7af4d93a006107bc292e8a4ed968b0e04e951cd734f2e3f5dcfec9ad8ffdce WHIRLPOOL 874210aea1e718d06ff02e20960857d6901cd7911f49ba2639592ffa6c59b1e5a4803ab3adf716f28e83a1e21703727f2b5d5cb66a0b6a9322f6bde63e168c7b
+EBUILD 3proxy-0.7.1.4.ebuild 810 SHA256 46d39dec7e908e02497cbf8ff23809b5e3c3893dca9557c7a6fbad9fc01d31fa SHA512 b650a9ff640e18c9cf5fd5508639b1d5c5c76b196101d9d9b4873bca1446faa56e0e049e98913229f0a3ca5c3fd1e558e9c6d7b0ad1185cbe4c081667fea2da1 WHIRLPOOL 0347c5a10b24bfd9f297517c67e18f1f736ae1a4eb72ba12a8d93b812f035a0376ac0c94639a7f117ec2640362cd13178f49227118c2f9b82650fa6498371ca7
+EBUILD 3proxy-0.8.6.ebuild 799 SHA256 f94f41da15aff7a4d764c3f5f55fffa12306eff234f4abc0f3c47df3161e9fff SHA512 b2e8ecaae5745a3b44ac262cdac96584de5946234cfebc301ed55423e43caad6883463eda34224f798358f03f9e6f22fef5bdeb421fdad4f4aaf0eac4fc052f1 WHIRLPOOL 1bdab204cc036fcf397daa920f3540e128df1a01cd3d7c20b5feb0b5177692220a6e81258d5d3e10a6b332a0a4caa3b682c44be6eeffccd6a8d1fb19a205f6e0
+EBUILD 3proxy-0.8.8.ebuild 824 SHA256 454ad08b80014b0e5ca582f0817841778ac496247fbc282bfd1f947855d4dc98 SHA512 e862d3efd0774054d2f0e6ba23c7494761591664df59cd27eda1492799b776e08076d62aa3a4fa47d50847fa63621ccc5e614ee6d993f4bf5c65692aef1c0211 WHIRLPOOL aa13501f00325b9ed2e6457765e7e8b5e8e2151f6369ed56abdc27230b595bda14a18d9e9038d9904a25d8132e949c6b1caf4555906297cf704338f7f977d837
+EBUILD 3proxy-0.8.9.ebuild 829 SHA256 cb60cd8a99d87ba293b3e0fa32bd9ab2b383b1c5537debe5c7e2d72d042d2235 SHA512 cddcc60addcf96dac36d13e97104b532acf5e0b856869283cea711e2cfbd337292372d041810a8f676477d7c0aca17da85ffa431ded7c8438c9549d1172cbb8a WHIRLPOOL fa386349df4a58a888c247b17a100dc558b5ae92512855dd5360ade81ba249935857b3f9b8c5d810a2a87eda1c316b5b74c4fb7853b2852ed8aa8012d87b0824
+MISC ChangeLog 4559 SHA256 85675d8f97105f30bd3f735ffc171102a6bf1a449f1e26367750a5ad115a6691 SHA512 d895df361ea78165ee338207fe2e1f8bb97310167df9c012e8b2221fa2a286f9219af7d3880a252912790c0152d232c2f120e5b139041efc8c70b41177ffcaca WHIRLPOOL a0376b218b402996abd763be0d796a2147ee42fd4df338ac5cf7cb11d355bd3dd508fffd3ecee102d9599a62401e5abfe38e7eefb2cdb594df33a9e4b6608adb
+MISC ChangeLog-2015 4815 SHA256 0ca6fc5064ce0818190f95c0387985024918d42c790cd496c2d9d7c085014e2e SHA512 ecb871916618986c1a49204d19263c597dd2484f6bdeddd978dae7547bc1e116f9790836c9a657577ad0873b314d3d259c0ed43bdfcd5b6e57f48f262c9fdcbc WHIRLPOOL 577c3b9a8ae58655f3a7cb154a12d27787f8ae63a24637b61c668c819d3c3cdbf937b5e59a60b72b8c2b59effb535b2be09ccb45ed55031a9da17148479fb3d7
+MISC metadata.xml 1102 SHA256 283643d0f2f6a62971041041365e2d791185c1c19284a85abd5df41247e9753e SHA512 f9c7b4b3b9f045b76049a75f2e65f70a316a3ad08f44a39d1c7ea23e5b23bc92232eae7487b4bf7534bb2fbd2655a9debf35ac3ba8ee4de6583d49f61bfc6076 WHIRLPOOL 9595b9cd2f0c6c2e917dffb82e075a4c9e7c42582718a351fe8604f2f5d65927cbb0753287c3805302faaf0197989d6d13930fd55bd01dbf638112cf020bf31e
diff --git a/net-proxy/3proxy/files/3proxy-0.5.3k-gentoo.patch b/net-proxy/3proxy/files/3proxy-0.5.3k-gentoo.patch
new file mode 100644
index 000000000000..a88a28780432
--- /dev/null
+++ b/net-proxy/3proxy/files/3proxy-0.5.3k-gentoo.patch
@@ -0,0 +1,26 @@
+--- Makefile.unix.orig 2005-04-30 18:29:00.000000000 +0000
++++ Makefile.unix 2008-10-12 17:18:21.000000000 +0000
+@@ -9,10 +9,10 @@
+ CC = gcc
+
+ # you may need -L/usr/pkg/lib for older NetBSD versions
+-CFLAGS = -Wall -g -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
++CFLAGS += -Wall -g -c -pthread -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
+ COUT = -o
+ LN = gcc
+-LDFLAGS = -Wall -O2 -pthread
++LDFLAGS += -Wall -pthread
+ # -lpthreads may be reuqired on some platforms instead of -pthreads
+ LIBS =
+ LNOUT = -o
+--- src/stringtable.c.orig 2008-01-09 21:14:46.000000000 +0000
++++ src/stringtable.c 2008-10-12 17:19:19.000000000 +0000
+@@ -23,7 +23,7 @@
+ /* 19 */ NULL,
+ #ifndef TPROXY_CONF
+ #ifndef _WIN32
+-/* 20 */ (unsigned char *)"/usr/local/etc/3proxy.cfg",
++/* 20 */ (unsigned char *)"/etc/3proxy.cfg",
+ #else
+ /* 20 */ (unsigned char *)"3proxy.cfg",
+ #endif
diff --git a/net-proxy/3proxy/files/3proxy-0.7.1.2-gentoo.patch b/net-proxy/3proxy/files/3proxy-0.7.1.2-gentoo.patch
new file mode 100644
index 000000000000..715992bdc9d8
--- /dev/null
+++ b/net-proxy/3proxy/files/3proxy-0.7.1.2-gentoo.patch
@@ -0,0 +1,43 @@
+--- Makefile.Linux.orig 2015-04-18 01:55:14.195955388 +0300
++++ Makefile.Linux 2015-04-21 02:30:16.835282128 +0300
+@@ -11,11 +11,11 @@
+ BUILDDIR =
+ CC = gcc
+
+-CFLAGS = -Wall -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
++CFLAGS += -Wall -g -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
+ COUT = -o
+ LN = gcc
+ DCFLAGS = -fpic
+-LDFLAGS = -Wall -O2 -pthread
++LDFLAGS += -Wall -pthread
+ DLFLAGS = -shared
+ DLSUFFICS = .ld.so
+ # -lpthreads may be reuqired on some platforms instead of -pthreads
+@@ -38,12 +38,12 @@
+ include Makefile.inc
+
+ allplugins:
+- @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
++ @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; $(MAKE) ; cd ../.. ; done
+
+ DESTDIR =
+-prefix = /usr/local
++prefix =
+ exec_prefix = $(prefix)
+-man_prefix = $(prefix)/share
++man_prefix = $(prefix)/usr/share
+
+ INSTALL = /usr/bin/install
+ INSTALL_BIN = $(INSTALL) -m 755
+--- src/stringtable.c.orig 2015-04-21 02:23:10.895258697 +0300
++++ src/stringtable.c 2015-04-21 02:23:31.141926478 +0300
+@@ -38,7 +38,7 @@
+ /* 24 */ NULL,
+ #ifndef TPROXY_CONF
+ #ifndef _WIN32
+-/* 25 */ (unsigned char *)"/usr/local/etc/3proxy/3proxy.cfg",
++/* 25 */ (unsigned char *)"/etc/3proxy/3proxy.cfg",
+ #else
+ /* 25 */ (unsigned char *)"3proxy.cfg",
+ #endif
diff --git a/net-proxy/3proxy/files/3proxy-0.8.6-gentoo.patch b/net-proxy/3proxy/files/3proxy-0.8.6-gentoo.patch
new file mode 100644
index 000000000000..d12c9b2b5d65
--- /dev/null
+++ b/net-proxy/3proxy/files/3proxy-0.8.6-gentoo.patch
@@ -0,0 +1,43 @@
+--- Makefile.Linux.orig 2016-03-23 07:25:19.209178284 +0200
++++ Makefile.Linux 2016-03-23 07:27:06.704181518 +0200
+@@ -10,11 +10,11 @@
+ BUILDDIR =
+ CC = gcc
+
+-CFLAGS = -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
++CFLAGS += -g -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
+ COUT = -o
+ LN = gcc
+ DCFLAGS = -fpic
+-LDFLAGS = -O2 -pthread
++LDFLAGS += -pthread
+ DLFLAGS = -shared
+ DLSUFFICS = .ld.so
+ # -lpthreads may be reuqired on some platforms instead of -pthreads
+@@ -39,12 +39,12 @@
+ include Makefile.inc
+
+ allplugins:
+- @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
++ @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; $(MAKE) ; cd ../.. ; done
+
+ DESTDIR =
+-prefix = /usr/local
++prefix =
+ exec_prefix = $(prefix)
+-man_prefix = $(prefix)/share
++man_prefix = $(prefix)/usr/share
+
+ INSTALL = /usr/bin/install
+ INSTALL_BIN = $(INSTALL) -m 755
+--- src/stringtable.c.orig 2016-03-23 07:27:41.216182556 +0200
++++ src/stringtable.c 2016-03-23 07:27:55.280182979 +0200
+@@ -38,7 +38,7 @@
+ /* 24 */ NULL,
+ #ifndef TPROXY_CONF
+ #ifndef _WIN32
+-/* 25 */ (unsigned char *)"/usr/local/etc/3proxy/3proxy.cfg",
++/* 25 */ (unsigned char *)"/etc/3proxy/3proxy.cfg",
+ #else
+ /* 25 */ (unsigned char *)"3proxy.cfg",
+ #endif
diff --git a/net-proxy/3proxy/files/3proxy-0.8.8-gentoo.patch b/net-proxy/3proxy/files/3proxy-0.8.8-gentoo.patch
new file mode 100644
index 000000000000..1f8d478cd086
--- /dev/null
+++ b/net-proxy/3proxy/files/3proxy-0.8.8-gentoo.patch
@@ -0,0 +1,43 @@
+--- a/Makefile.Linux 2016-12-16 20:24:53.809856430 +0200
++++ b/Makefile.Linux 2016-12-16 20:26:24.912859170 +0200
+@@ -10,11 +10,11 @@
+ BUILDDIR =
+ CC = gcc
+
+-CFLAGS = -g -O2 -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
++CFLAGS += -c -pthread -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL
+ COUT = -o
+ LN = gcc
+ DCFLAGS = -fpic
+-LDFLAGS = -O2 -pthread
++LDFLAGS += -pthread
+ DLFLAGS = -shared
+ DLSUFFICS = .ld.so
+ # -lpthreads may be reuqired on some platforms instead of -pthreads
+@@ -39,12 +39,12 @@
+ include Makefile.inc
+
+ allplugins:
+- @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
++ @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; $(MAKE) ; cd ../.. ; done
+
+ DESTDIR =
+-prefix = /usr/local
++prefix =
+ exec_prefix = $(prefix)
+-man_prefix = $(prefix)/share
++man_prefix = $(prefix)/usr/share
+
+ INSTALL = /usr/bin/install
+ INSTALL_BIN = $(INSTALL) -m 755
+--- a/src/stringtable.c 2016-12-16 20:24:53.811856430 +0200
++++ b/src/stringtable.c 2016-12-16 20:26:48.288859873 +0200
+@@ -38,7 +38,7 @@
+ /* 24 */ NULL,
+ #ifndef TPROXY_CONF
+ #ifndef _WIN32
+-/* 25 */ (unsigned char *)"/usr/local/etc/3proxy/3proxy.cfg",
++/* 25 */ (unsigned char *)"/etc/3proxy/3proxy.cfg",
+ #else
+ /* 25 */ (unsigned char *)"3proxy.cfg",
+ #endif
diff --git a/net-proxy/3proxy/metadata.xml b/net-proxy/3proxy/metadata.xml
new file mode 100644
index 000000000000..f9ccb9ec7eab
--- /dev/null
+++ b/net-proxy/3proxy/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>powerman-asdf@yandex.ru</email>
+ <name>Alex Efros</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ 3Proxy is really tiny cross-platform proxy servers set. It includes
+ HTTP proxy with HTTPS and FTP support, SOCKSv4/SOCKSv4.5/SOCKSv5 proxy,
+ POP3 proxy, FTP proxy, TCP and UDP portmappers. You can use every proxy
+ as a standalone program (socks, proxy, tcppm, udppm, pop3p) or use
+ combined program (3proxy). Combined proxy additionally supports
+ features like access control, bandwidth limiting, limiting
+ daily/weekly/monthly traffic amount, proxy chaining, log rotation,
+ sylog and ODBC logging, etc. It's created to be small, simple (I'd
+ like to say secure - but it's just a beta) and yet functional.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">z3APA3A/3proxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/adzapper/Manifest b/net-proxy/adzapper/Manifest
new file mode 100644
index 000000000000..f5c653c9a744
--- /dev/null
+++ b/net-proxy/adzapper/Manifest
@@ -0,0 +1,6 @@
+AUX 20110915-flush.patch 2376 SHA256 9bd832c9da00b69c674d73cadc519c5edcc028cd17e4395a8eb7a60f86eb16a3 SHA512 a15464953d0e589b4e679116a734e9d590990ce619858b8b8d9faac18a991c13b650c3f1edc732dbc4e8c2d38e82f67700471421b3a7250fdec4e6461f58d2ca WHIRLPOOL 5db51812a46d792b6e11cdf7c08b71e4f3ba42f41b80a5f8acc96bee88bdfcd7c41c3b77db38c26989accc18021f9bc4805f4bf3f617a918a30d0c29c438eadb
+DIST adzap-20110915.tar.gz 128132 SHA256 30a66419b4e77631d303ca5ba76ad3a64fabbed1cdab01bee02f0d790431ce7a SHA512 8b3566fc708b3db3b8eaa0306f90c75a82ac001cfdc3bc925fc649481420532ddc017f1b5139fce36733d3a38b2a7a31b39872b522ba4f49c098177496d64416 WHIRLPOOL 02d4360bec08fffcf3e0719d0fdd76c6cd02c52094193ed31e5d98c25a34da2e732fd87c7c0811beaad25979074b831210454370cabbdbdb7c5868fb41966d9e
+EBUILD adzapper-20110915-r2.ebuild 1449 SHA256 4aec506678ce34caef7744ba893d3ab41c199fde560e2342d1c06242c7156f16 SHA512 0cde509cdb38ff9619acd4339cebec506a73ac3fbf2ed57c0cc2307bf4d946e7055f89a0c7ad00bef3fd63fd3e0e55e70f8a402278a5f5c730803a3215051f88 WHIRLPOOL 1cd32a8874f79a027d1a701441bb47a909a14165ba5447b68cf321a3f6597bc78970a1b671e17d33e379cce9b7cf904d44872402d28a25a9925303698d20f636
+MISC ChangeLog 3113 SHA256 c15ddd0b89362161a23020884e279dc685a5ffd310fd5f3b3c6874d01f20a78c SHA512 56adabb0d3fa85d918da0d7b2ba174fb954c6f71060f4026d94069be6513a45be5c6da3038b5e48baa71f7bd7e180624de3343250733e712145b193bf1bc7f1c WHIRLPOOL 69b315262b07a2bfc96bf76570af478c6c60d454304e3f1034ed3a8980d1935080f71279ff7b044b2a069d9785f366ef27276e83279f10c5acee4d07c6f948e1
+MISC ChangeLog-2015 12127 SHA256 83ee1cd8cf9521273321291aea6156ab9fce84036fc5c78068ec46fd40411478 SHA512 6753b80d66d6a2c2a2bc1cb33ebf73bf22e6e31a3e424917e0c722104f797c45672e18680098812b5ef25f81f1e87a0a0a5aa84b000cc3b767ac9b6314b6808d WHIRLPOOL db93c578b468a01f8f4bb7a34d595fae61edafa181f7acd5bdaa8b59b149c514e90410df9063c5c9565b696ab803f1dad9470c9324286dd157d53cd11192725e
+MISC metadata.xml 363 SHA256 c33e4ee99d446395878336a2dc5229ddecb23dceb4635eb3f2f57b8ec8abaa7a SHA512 3d6c6318383863347bd23341e82d5b149a40b660870726bc1abdeb10214178d81d750b30c28c12907062a6f934d58cb036452b1bcaecd2f8f777e9a5b99e9c99 WHIRLPOOL 8c666fabb6f0455c78bb4b078fa90bbe55a4686657a9c1596ddb14ce945ac515d1d986b3059d3bdd2706b541d7492403329e9bba0b627f87461ea9311266366c
diff --git a/net-proxy/adzapper/adzapper-20110915-r2.ebuild b/net-proxy/adzapper/adzapper-20110915-r2.ebuild
new file mode 100644
index 000000000000..60b6800c1ef1
--- /dev/null
+++ b/net-proxy/adzapper/adzapper-20110915-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P=${P/zapper/zap}
+
+inherit eutils
+
+DESCRIPTION="Redirector for squid to intercept advertising, page counters and web bugs"
+HOMEPAGE="http://adzapper.sourceforge.net/"
+SRC_URI="http://adzapper.sourceforge.net/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+
+S="${WORKDIR}"/${P/per/}
+
+src_prepare() {
+ epatch "${FILESDIR}"/20110915-flush.patch
+ # update the zapper path in various scripts
+ local SCRPATH="/etc/adzapper/squid_redirect"
+ sed -i \
+ -e "s|^zapper=.*|zapper=${SCRPATH}|" \
+ -e "s|^ZAPPER=.*|ZAPPER=\"${SCRPATH}\"|" \
+ -e "s|^pidfile=.*|pidfile=/var/run/squid.pid|" \
+ -e "s|^PIDFILE=.*|PIDFILE=\"/var/run/squid.pid\"|" \
+ -e "s|^RESTARTCMD=.*|RESTARTCMD=\"/etc/init.d/squid restart\"|" \
+ scripts/wrapzap scripts/update-zapper* \
+ || die "sed updating failed."
+}
+
+src_install() {
+ exeinto /etc/adzapper
+ doexe \
+ scripts/wrapzap \
+ scripts/zapchain \
+ adblock-plus/adblockplus2adzapper.py
+ newexe scripts/squid_redirect-nodata squid_redirect
+
+ insinto /etc/adzapper
+ doins scripts/update-zapper*
+
+ insinto /var/www/localhost/htdocs/zap
+ doins zaps/*
+}
+
+pkg_postinst() {
+ einfo "To enable adzapper, add the following lines to /etc/squid/squid.conf:"
+ einfo " url_rewrite_program /etc/adzapper/wrapzap"
+ einfo " url_rewrite_children 10"
+}
diff --git a/net-proxy/adzapper/files/20110915-flush.patch b/net-proxy/adzapper/files/20110915-flush.patch
new file mode 100644
index 000000000000..3fb4ce913db0
--- /dev/null
+++ b/net-proxy/adzapper/files/20110915-flush.patch
@@ -0,0 +1,107 @@
+--- a/scripts/squid_redirect-nodata
++++ b/scripts/squid_redirect-nodata
+@@ -31,7 +31,7 @@
+
+ use POSIX ":sys_wait_h";
+ use Socket;
+-require 'flush.pl';
++use IO::Handle;
+
+ $::IOSIZE=1024;
+
+@@ -232,7 +232,7 @@
+ {
+ if (defined $::LogFile)
+ { print LOGFILE $_;
+- flush(LOGFILE);
++ LOGFILE->flush();;
+ }
+ chomp;
+
+@@ -259,7 +259,7 @@
+ }
+ }
+
+- flush(STDOUT);
++ STDOUT->flush();
+ }
+
+ exit 0;
+@@ -789,14 +789,16 @@
+ }
+
+ # dispatch request and headers
+- printflush(GCHILD_WRITE,"$method $uri $v1 $v2\n")
++ print GCHILD_WRITE "$method $uri $v1 $v2\n"
+ || die "tell grandchild the request: $!";
++ GCHILD_WRITE->flush();
+
+ print PROXY "$method $uri HTTP/$v1.$v2\r\n";
+ for my $H (@hdrs)
+ { print PROXY $H->[0], ":", $H->[1], "\r\n";
+ }
+- printflush(PROXY,"\r\n");
++ print PROXY "\r\n";
++ PROXY->flush();
+ ##warn "[$$]: sent rq to proxy\n";
+
+ proxy_copybody(CONN,PROXY,$method,$persist,\@hdrs)
+@@ -965,8 +967,9 @@
+ }
+
+ warn "[$child:$$]: pass response to parent\n";
+- printflush(TOCHILD,($persist ? PERSIST : CLOSE)." $code $info")
++ print TOCHILD ($persist ? PERSIST : CLOSE)." $code $info"
+ || die "[$child:$$]: print(TOCHILD) fails: $!";
++ TOCHILD->flush();
+ warn "[$child:$$]: told parent, passing response to client\n";
+
+ # copy to child
+@@ -974,7 +977,8 @@
+ for my $H (@hdrs)
+ { print CONN $H->[0], ":", $H->[1], "\r\n";
+ }
+- printflush(CONN,"\r\n");
++ print CONN "\r\n";
++ CONN->flush();
+
+ # see RFC2616 section 10
+ if (
+@@ -1050,11 +1054,13 @@
+ )
+ {
+ ##warn "[$$]: read ".length($_)." bytes of request body\n";
+- if (! printflush($to,$_))
+- { warn "$::cmd: [$$]: printflush($to,..): $!";
++ $to->autoflush(1);
++ if (! print $to $_)
++ { warn "$::cmd: [$$]: print $to ..): $!";
+ $ok=0;
+ last COPY;
+ }
++ $to->autoflush(0);
+ $cl-=length if defined $cl;
+ }
+ warn "[$$]: finished unchunked body, ok=$ok";
+@@ -1083,10 +1089,10 @@
+ { print $to $_;
+ $chunksize-=length;
+ }
+- flush($to);
++ $to->flush();
+ }
+
+- flush($to);
++ $to->flush();
+
+ # pass trailer headers
+ while (defined($_=<$from>) && !/^\r?\n/)
+@@ -1096,7 +1102,7 @@
+ { ##warn "[$$]: final trailer: $_";
+ print $to $_;
+ }
+- flush($to);
++ $to->flush();
+
+ return (1,"");
+ }
diff --git a/net-proxy/adzapper/metadata.xml b/net-proxy/adzapper/metadata.xml
new file mode 100644
index 000000000000..ce554bb8d936
--- /dev/null
+++ b/net-proxy/adzapper/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>Redirector for squid that intercepts advertising, page counters and some web bugs</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">adzapper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/bfilter/Manifest b/net-proxy/bfilter/Manifest
new file mode 100644
index 000000000000..27af158f2523
--- /dev/null
+++ b/net-proxy/bfilter/Manifest
@@ -0,0 +1,12 @@
+AUX bfilter-1.1.4-external-boost.patch 2435 SHA256 0e82a8afe9b15eab6010ed65e442d7e0f949d0e50d29eb60760ebbd41ac8332c SHA512 38f98caa936e56a5380c8ff3db0e3d37b6f0b76ed9d5691983cd189830af0d52897ea76a51080830b9a5c5d073c40136f8b5f47a39b4edc9b614bc5754b08f23 WHIRLPOOL 9e44dcc520f3d60f3aa207f0c9bab9c51fda23c153db5067f5f5fdddc2fa802254fbe04ec821af2796b4c81c305c5e5a3ed9bfa4e1fd5508fc7add783e123671
+AUX bfilter-1.1.4-glib-2.32.patch 1084 SHA256 231dda9fd40017ce913bd047cb9fa8d5cc2d43f2790f92780b8dc23268cc9875 SHA512 e8508c9196024c2dc20042c6f88dadf4ed27a5c384e99237d241644266749625fbec3be00b63a332818db915d3d254ffc16dad2de4887df9cabbd66525a2d68a WHIRLPOOL 80222f4d8b4e05f801858b5b32c169ad52fe9d3bb3fd6de657c6015267bc483b5e2d1f0b0c7a3d935a99fbc75ffd84b3ea4907b432ca17f12c946fed818ea7dc
+AUX bfilter-1.1.4-gtkmm-X11-underlinking.patch 505 SHA256 0929db0fa6f5ab1c64fd040e3081b6beeabae65ed4e9212cdb72ab9c7955c723 SHA512 214545b96c00b80861d6bd2513dd914d577344f90dfda0b9d562036f3e2871971121e1fe0f0d17b9fca2c5c9e60d75e169d9e10073412fe450dbc21405682baa WHIRLPOOL eee5c30e9f7f40b793c301e17614b364c51c89aa7c0ba642f528d2fd4ba495cfb0c02e5f556f7476e0f9041e1287d90ac92265381dbbda65583046c7b4e5447c
+AUX bfilter.conf 156 SHA256 feb103fc8138122d6cb70d0fc267fb5783740cf5a35edb194717b6d4ac2e400c SHA512 24d7f49f95832dae0ae326722f7a36403945db192b2d251fb0e8a5358805e31614eac87466b97f50b3d3a73ea49bf7c3ff3386c945af713e38631fc17993c5ee WHIRLPOOL aab8a94cba6c71c76705abfc2965dc6da8388326f1962cca7295160e61e2a45c2b6c864cbf9f15cd07b5e4a32ea7b372e0abfd7bf1c9d15c6fc378bb5105d177
+AUX bfilter.init 824 SHA256 6091ea945580c7c45b475fcbef8fb5fce2f35d3570e4f3e6d84edf4c82422639 SHA512 42b8137e6c4e7f0ee1d39d35bef2487b14cd0e78c78b3be8a6b49800f81335d1493c3008f2a57a54bbb0ab980d1c848cb5d3eb9418d2d9054c54385a81c56c17 WHIRLPOOL 400fae643817e8a71afb909220316346a4de9fe595cf9429959d37e552f55fe287278b35c835dcef57a2361ff4d5055690fb160931bfe96488bbffff5f652717
+AUX forwarding-proxy.xml 581 SHA256 70c5654c7e56cc1468abf3ae92b063be7b151580f1e10804c9f3a5722055b4a3 SHA512 885d866b681410a6fa4fe3c84692ba33d8b50ee0297ada52ed77e9fdd4b37c43bfd190f0a4dd87268ad3fb58a5d1cb92cebb88230ef6409a52a6a7ccf45192d0 WHIRLPOOL 72efdd346828a2c6f2d3942f51aa40d1fc1e477083a3c3f8f0601f1f253dd49c471a864fb8ed557f6eb04d73204de3ee76c022702d1c866a5b53d657120b489b
+AUX forwarding.xml 127 SHA256 672b2cd2ae5aa10d7f295adbe8c0d0ab9b4366eabf9f47dbd829a708ac95d76d SHA512 cfa63bdc083fa2edbd238be5e8da30066be38b4cc56153b929e5145b12a5ea6c43f639df545815addcc89945d9fedb0cb38b5aa386e9f03ab3ec3a917a184c4d WHIRLPOOL c25f860da04c3ed4685e063e3fb255b03c68803469e9b01273aac0894c7d4bb741a68e44da656152d1bc8598db7d8022ec5e9783f3625cea5fc08b89c7f5acd8
+DIST bfilter-1.1.4.tar.gz 3055651 SHA256 04fda3f2d0c19199cb47c3e0743ba1160f4dee10099ab63f5b174fdd81b49b6a SHA512 d501e09e449a29f175ec5484ba5aa77ce6bd1a51cb146222fca3af4215c162aff885565086cb64be9dc7cdac63611be1a0970b3d2d81e3f2038009ea3f527e5e WHIRLPOOL 0c5dc79b25c88e51d3327a346074f064a685b051f28e640a8a2fe64fd849831df22182045c866da3c0f59575d1ccb273247d4379e0eb7b1206e6ce9ae436353f
+EBUILD bfilter-1.1.4-r4.ebuild 1892 SHA256 f942d2113434b090f76f04b2aa173075c35ab3bf6fbc85b3476930e85d1177fd SHA512 87fb37fa8f3ffc220c969a4b1881e70fe11e48cdfeedd8d16ff77d4c03447fafb083c4d2e0b611027ae62c6ec05021fa57cd204b9170b9e34ce672359c4db469 WHIRLPOOL eef07f9f5622c32904a9ff249757ed2ea236cd7d0bb52730bcbdf3a5d372b4cb446eae2d8eda9685aad83319b3cce14c718fb1351d3f94d14f2e75c2ab4ce96b
+MISC ChangeLog 4748 SHA256 cff3c06b6a6de152bc965f0b7ab01a8cab36fb455dbbfe5e0fb0de893d7b3288 SHA512 2fa42d17ad8ec0432f9dd86728051cff063125795118f4e05b30268411dd79e74b566ef07a07c33be7e52891adbc4aadec8f86a49a0a4fc3331d5fe13a88492d WHIRLPOOL 89034ef0784f35ff6526a479ed960e0b06170edcb944c68170362a0b5d855c1f2428d9aea8e366da75a42180585bbee3766658388a9188e214c7cb3f1202d88f
+MISC ChangeLog-2015 5936 SHA256 c9fa417b679006a404d895876326094077b264e840f132a04e54a9975d86443b SHA512 e46bac4a6f28f51bed1a348cfdbd9babc546e511791dde158ad99d695376edde6e149a33781f038430d1a9cefbdcb100f9f275f01de362ce7ef342ccc84e1570 WHIRLPOOL 213bf0c5b80232aacb61a2fa70faf1150a83319841a6c83d4a5606460593188c7250e7281ddf93192e16da3a7cf4fa7d606b61fd0d81ac0dffa681a58b6928bf
+MISC metadata.xml 1254 SHA256 88af45db36ac933ef60826c689796407bd203f28be7547201883e5221fbfe5eb SHA512 c61355f73764cf9055cff0e7e96c329a07769582987a7e42ef95917d4c517e5d93194db4971eb13d5f5fb580533873fadbd11c43821be908b9bd96142f52bb5f WHIRLPOOL 26dd32ae7f99894cbce85e4a78b52c3cec0c15d9cd974f925555aaebc7050626ab7bc8ce666ac8660bbf69295fbfb85737787cf8cf0d2fcfc313544f4f235982
diff --git a/net-proxy/bfilter/bfilter-1.1.4-r4.ebuild b/net-proxy/bfilter/bfilter-1.1.4-r4.ebuild
new file mode 100644
index 000000000000..1d85ad3d580e
--- /dev/null
+++ b/net-proxy/bfilter/bfilter-1.1.4-r4.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic user
+
+DESCRIPTION="Ad-filtering web proxy featuring an effective heuristic ad-detection algorithm"
+HOMEPAGE="http://bfilter.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bfilter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="X debug"
+
+RDEPEND="sys-libs/zlib
+ dev-libs/ace:=
+ dev-libs/libsigc++:2
+ X? ( dev-cpp/gtkmm:2.4 x11-libs/libX11 )
+ dev-libs/boost:="
+
+DEPEND="${RDEPEND}
+ dev-util/scons
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-glib-2.32.patch"
+ "${FILESDIR}/${P}-external-boost.patch"
+ "${FILESDIR}/${P}-gtkmm-X11-underlinking.patch"
+)
+
+RESTRICT="test" # boost's test API has changed
+
+src_prepare() {
+ default
+
+ # Some includes are missing and this breaks updates of ACE
+ sed -i \
+ -e "/#include <ace\/Synch.h>/a#include <ace\/Condition_T.h>\n#include <ace\/Guard_T.cpp>" \
+ libjs/nspr_impl/private.h \
+ main/*.h \
+ main/cache/*.h || die
+
+ mv configure.{in,ac} || die
+ rm -r boost || die
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ # Required to prevent narrowing conversion in lexcode.cpp, #572072
+ append-cxxflags -funsigned-char
+ econf \
+ $(use_enable debug) \
+ $(use_with X gui) \
+ --without-builtin-boost
+}
+
+src_install() {
+ default
+
+ insinto /etc/bfilter
+ doins "${FILESDIR}/forwarding.xml"
+
+ dodoc "${FILESDIR}/forwarding-proxy.xml"
+ dodoc -r doc/*
+
+ newinitd "${FILESDIR}/bfilter.init" bfilter
+ newconfd "${FILESDIR}/bfilter.conf" bfilter
+}
+
+pkg_preinst() {
+ enewgroup bfilter
+ enewuser bfilter -1 -1 -1 bfilter
+}
+
+pkg_postinst() {
+ elog "The documentation is available at"
+ elog " http://bfilter.sourceforge.net/documentation.php"
+ elog "For forwarding bfilter service traffic through a proxy,"
+ elog "see forwarding-proxy.xml example installed in the doc directory."
+}
diff --git a/net-proxy/bfilter/files/bfilter-1.1.4-external-boost.patch b/net-proxy/bfilter/files/bfilter-1.1.4-external-boost.patch
new file mode 100644
index 000000000000..6f185ca9f41b
--- /dev/null
+++ b/net-proxy/bfilter/files/bfilter-1.1.4-external-boost.patch
@@ -0,0 +1,63 @@
+diff -Nru bfilter-1.1.4.orig/configure.in bfilter-1.1.4/configure.in
+--- bfilter-1.1.4.orig/configure.in 2007-11-11 23:14:49.000000000 +0100
++++ bfilter-1.1.4/configure.in 2009-10-18 18:26:32.000000000 +0200
+@@ -260,11 +260,6 @@
+ Makefile
+ binreloc/Makefile
+ foundation/Makefile
+-boost/Makefile
+-boost/libs/Makefile
+-boost/libs/regex/Makefile
+-boost/libs/program_options/Makefile
+-boost/libs/test/Makefile
+ reactor/Makefile
+ mkskel/Makefile
+ lexgen/Makefile
+diff -Nru bfilter-1.1.4.orig/main/daemon/Makefile.am bfilter-1.1.4/main/daemon/Makefile.am
+--- bfilter-1.1.4.orig/main/daemon/Makefile.am 2007-01-19 20:21:02.000000000 +0100
++++ bfilter-1.1.4/main/daemon/Makefile.am 2009-10-18 18:25:52.000000000 +0200
+@@ -6,7 +6,7 @@
+ $(top_builddir)/boost/libs/program_options/libprogram_options.la
+ else
+ BOOST_CPPFLAGS =
+-BOOST_LIBS =
++BOOST_LIBS = -lboost_regex-mt -lboost_program_options-mt
+ endif
+
+ AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \
+diff -Nru bfilter-1.1.4.orig/main/gui/gtk/Makefile.am bfilter-1.1.4/main/gui/gtk/Makefile.am
+--- bfilter-1.1.4.orig/main/gui/gtk/Makefile.am 2008-06-02 17:25:27.000000000 +0200
++++ bfilter-1.1.4/main/gui/gtk/Makefile.am 2009-10-18 18:25:52.000000000 +0200
+@@ -50,7 +50,7 @@
+ BOOST_LIBS = $(top_builddir)/boost/libs/regex/libregex.la
+ else
+ BOOST_CPPFLAGS =
+-BOOST_LIBS =
++BOOST_LIBS = -lboost_regex-mt
+ endif
+
+ if WITH_GUI
+diff -Nru bfilter-1.1.4.orig/Makefile.am bfilter-1.1.4/Makefile.am
+--- bfilter-1.1.4.orig/Makefile.am 2007-11-11 23:16:04.000000000 +0100
++++ bfilter-1.1.4/Makefile.am 2009-10-18 18:26:46.000000000 +0200
+@@ -1,7 +1,7 @@
+ EXTRA_DIST = doc cmake bootstrap m4 VERSION CMakeLists.txt types.h pstdint.h \
+ config.h.cm bfilter.desktop bfilter.png Doxyfile
+ DISTCLEANFILES = itypes.h
+-SUBDIRS = binreloc foundation boost reactor mkskel lexgen libjs main conf \
++SUBDIRS = binreloc foundation reactor mkskel lexgen libjs main conf \
+ packaging tests
+
+ dist_man_MANS = bfilter.8
+diff -Nru bfilter-1.1.4.orig/tests/Makefile.am bfilter-1.1.4/tests/Makefile.am
+--- bfilter-1.1.4.orig/tests/Makefile.am 2007-05-07 16:19:40.000000000 +0200
++++ bfilter-1.1.4/tests/Makefile.am 2009-10-18 18:25:52.000000000 +0200
+@@ -6,7 +6,7 @@
+ $(top_builddir)/boost/libs/regex/libregex.la
+ else
+ BOOST_CPPFLAGS =
+-BOOST_LIBS =
++BOOST_LIBS = -lboost_regex-mt -lboost_unit_test_framework-mt
+ endif
+
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
diff --git a/net-proxy/bfilter/files/bfilter-1.1.4-glib-2.32.patch b/net-proxy/bfilter/files/bfilter-1.1.4-glib-2.32.patch
new file mode 100644
index 000000000000..7b4068b758e3
--- /dev/null
+++ b/net-proxy/bfilter/files/bfilter-1.1.4-glib-2.32.patch
@@ -0,0 +1,39 @@
+Index: bfilter-1.1.4/main/gui/gtk/CompiledImage.h
+===================================================================
+--- bfilter-1.1.4.orig/main/gui/gtk/CompiledImage.h
++++ bfilter-1.1.4/main/gui/gtk/CompiledImage.h
+@@ -24,7 +24,7 @@
+ #include <config.h>
+ #endif
+
+-#include <glib/gtypes.h>
++#include <glib.h>
+ #include <glibmm/refptr.h>
+ #include <gdkmm/pixbuf.h>
+ #include <stddef.h>
+Index: bfilter-1.1.4/main/gui/gtk/TrayMenu.h
+===================================================================
+--- bfilter-1.1.4.orig/main/gui/gtk/TrayMenu.h
++++ bfilter-1.1.4/main/gui/gtk/TrayMenu.h
+@@ -25,7 +25,7 @@
+ #endif
+
+ #include "NonCopyable.h"
+-#include <glib/gtypes.h>
++#include <glib.h>
+ #include <memory>
+
+ namespace GtkGUI
+Index: bfilter-1.1.4/main/gui/gtk/img2src.sh
+===================================================================
+--- bfilter-1.1.4.orig/main/gui/gtk/img2src.sh
++++ bfilter-1.1.4/main/gui/gtk/img2src.sh
+@@ -4,7 +4,7 @@ cat <<END
+ /* This file was generated by img2src.sh */
+
+ #include "CompiledImage.h"
+-#include <glib/gtypes.h>
++#include <glib.h>
+
+ END
+
diff --git a/net-proxy/bfilter/files/bfilter-1.1.4-gtkmm-X11-underlinking.patch b/net-proxy/bfilter/files/bfilter-1.1.4-gtkmm-X11-underlinking.patch
new file mode 100644
index 000000000000..2a474e5d3867
--- /dev/null
+++ b/net-proxy/bfilter/files/bfilter-1.1.4-gtkmm-X11-underlinking.patch
@@ -0,0 +1,12 @@
+diff -Naur -u a/configure.in b/configure.in
+--- a/configure.in 2013-11-30 17:03:04.733971428 +0100
++++ b/configure.in 2013-11-30 17:03:21.231971410 +0100
+@@ -205,7 +205,7 @@
+ [ with_gui="no" ])
+ AM_CONDITIONAL(WITH_GUI, [test "$with_gui" = "yes"])
+ if test "$with_gui" = "yes"; then
+- PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4)
++ PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4 x11)
+ dnl PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.0)
+ dnl GTKMM_LIBS="$GTKMM_LIBS $GTHREAD_LIBS"
+ AC_SUBST(GTKMM_CFLAGS)
diff --git a/net-proxy/bfilter/files/bfilter.conf b/net-proxy/bfilter/files/bfilter.conf
new file mode 100644
index 000000000000..3c533b418eae
--- /dev/null
+++ b/net-proxy/bfilter/files/bfilter.conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/bfilter
+
+# See the bfilter(8) man page for possible options to put here.
+BFILTER_OPTS="-u bfilter -g bfilter -r /etc/bfilter"
diff --git a/net-proxy/bfilter/files/bfilter.init b/net-proxy/bfilter/files/bfilter.init
new file mode 100644
index 000000000000..cd0156a9126b
--- /dev/null
+++ b/net-proxy/bfilter/files/bfilter.init
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkresolvconf() {
+ #make /etc/bfilter/etc/resolv.conf if chroot is set
+ if [ "${BFILTER_OPTS#* -r *}" != "${BFILTER_OPTS}" ] ; then
+ local CHROOTDIR="${BFILTER_OPTS#* -r }"
+ CHROOTDIR="${CHROOTDIR%% *}"
+ mkdir -p "${CHROOTDIR}/etc" || return 1
+ if ! cmp -s /etc/resolv.conf "${CHROOTDIR}/etc/resolv.conf" ; then
+ cp -p /etc/resolv.conf "${CHROOTDIR}/etc/resolv.conf" || return 1
+ fi
+ fi
+
+ return 0
+}
+
+start() {
+ checkresolvconf || return 1
+
+ ebegin "Starting bfilter"
+ start-stop-daemon --start --quiet --exec /usr/bin/bfilter -- ${BFILTER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bfilter"
+ start-stop-daemon --stop --quiet --exec /usr/bin/bfilter
+ eend $?
+}
diff --git a/net-proxy/bfilter/files/forwarding-proxy.xml b/net-proxy/bfilter/files/forwarding-proxy.xml
new file mode 100644
index 000000000000..dafcbb1ed664
--- /dev/null
+++ b/net-proxy/bfilter/files/forwarding-proxy.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<forwarding>
+ <option name="Direct">
+ </option>
+ <option name="ISP Proxy" selected="selected">
+ <bypass>
+ <simple-hostnames/>
+ <host-mask>*.isp.com</host-mask>
+ <host-mask>192.168.*</host-mask>
+ </bypass>
+ <proxy-chain>
+ <proxy>
+ <type>socks4</type><!-- available types: http, socks4, socks4a and socks5 -->
+ <host>localhost</host>
+ <port>9050</port>
+ </proxy>
+ </proxy-chain>
+ </option>
+</forwarding>
diff --git a/net-proxy/bfilter/files/forwarding.xml b/net-proxy/bfilter/files/forwarding.xml
new file mode 100644
index 000000000000..9b62c6bfc4a9
--- /dev/null
+++ b/net-proxy/bfilter/files/forwarding.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<forwarding>
+ <option name="Direct" selected="selected">
+ </option>
+</forwarding>
diff --git a/net-proxy/bfilter/metadata.xml b/net-proxy/bfilter/metadata.xml
new file mode 100644
index 000000000000..ad49eeed7a03
--- /dev/null
+++ b/net-proxy/bfilter/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>BFilter is a filtering web proxy. It was originally intended for removing banner ads only, but at some point
+it has been extended to remove popups and webbugs. It can't be used as a general purpose filtering proxy
+because it was never intended this way.
+
+For example you can't just block an arbitrary object, you can only hint the ad detector in its decision making.
+The main advantage BFilter has over the similar tools is its heuristic ad detection algorithm. The traditional
+blocklist-based approach is also implemented, but it's mostly used for dealing with false positives. Unlike
+other tools that require constant updates of their blocklists, BFilter manages to remove over 90% of ads
+even with an empty blocklist!
+
+The javascript generated ads are not a problem for BFilter, as it has a javascript engine to combat them.
+BFilter is expected work with any browser that supports proxies (nearly any browser does), and can forward
+requests to another HTTP proxy.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bfilter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/c-icap-modules/Manifest b/net-proxy/c-icap-modules/Manifest
new file mode 100644
index 000000000000..937c92754651
--- /dev/null
+++ b/net-proxy/c-icap-modules/Manifest
@@ -0,0 +1,5 @@
+DIST c_icap_modules-0.2.4.tar.gz 373120 SHA256 63108dfbc36af9f44cfbe073b4248d368eb64c9d3612aeab0d46171be5c15713 SHA512 5752a52f58852f71c98ff60e5670468998fa481807b866b238bfc3f2465387cf4ce4b2ee1544c35021b618cda69798765479129133d9ac25d23662eac1adbc7f WHIRLPOOL 62fae3fa2b3cceffc210b86119715bbfcaa6a48e38986e7553d7442ad1c8402b8d09ab60134e57e05a9a4b7134642f826d34cd00a600eca45b53ada903caf142
+EBUILD c-icap-modules-0.2.4.ebuild 1111 SHA256 1a12b0378b6395cdd2de8e77ade35b130e5995bda380b3b098e3d4ce15e4774a SHA512 9feff59d651acc3369f2f00fb722855d55409888516afd83cd325c16f1ffd74c2c63918362abf0b785878750b89412bcbf623eae64438489f30c4ab6eae80b6b WHIRLPOOL 4b0dbe43b8691681b17a040ed49e4763da89744a6345b98855cdd29c24230077257048e1006a4604136746337ac86fbe08f11c4776646bfc9677695f7a5c1938
+MISC ChangeLog 2544 SHA256 53b5db130e9869d99d3a5b772c3a7946d6c82ec3bed94708e0afca433cd467d0 SHA512 0042e88946c91615bb54e78480aca9d0c3daa499f76b0fbec1ff459ed1dae04df0a5c504ac831c2ea22a93b0068ed1c7dfbcfef55ab74028c7a8c0cbc1952934 WHIRLPOOL 21a3513ea2db9cbd7f4a0c960399146368e25df02b3e1eb46fa128af9f58e3ff7c0cf1cb25ff8246986bad8b00c99e423a415a7a09b9aa44024a2b02f4e8924a
+MISC ChangeLog-2015 681 SHA256 700678286dac1e66b746c93a19c7a8323216abc81cc5536c1c0c567bcc60ee06 SHA512 d8b46c116e5789bfe99cc744be6401b32f83efd7da0f6c431a6009756bad6ef31d593388492c56b8cbd71c6c9578a20c5ea98f7fa5d96c65fcdf4db31d7ecc83 WHIRLPOOL 95f1883278a454474918f08c9b73396731497e8c6104873c82aefabbe40ec0af18e61a1c7c43d97db972b8704e7b53268c171a14b639f1a4086ff7a79dcdc386
+MISC metadata.xml 333 SHA256 232df570a101994ca96e952c4e714cad83e4e6affd5265b369f0aedd42bbae7e SHA512 6c99f30ce4ee6a472051f70f318e4a6745cac7d7b0f9a2f97f490e4ece6c8e91ba971c543fd717f6d8c5a8040cd17709d8a882ece8ce7718444afb72ae1672f5 WHIRLPOOL fcb57b1eae02a73f0dcd7e34f5a156ffe7857d1af4b73a4df407b41a923afb3aff37f9f25793fc9da39c1ae7b99d1b18a131332aba1894bca487c7c71cf6ac78
diff --git a/net-proxy/c-icap-modules/c-icap-modules-0.2.4.ebuild b/net-proxy/c-icap-modules/c-icap-modules-0.2.4.ebuild
new file mode 100644
index 000000000000..c06b817fbfcb
--- /dev/null
+++ b/net-proxy/c-icap-modules/c-icap-modules-0.2.4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib flag-o-matic
+
+MY_PN=c_icap_modules #${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="URL blocklist and virus scanner for the C-ICAP server"
+HOMEPAGE="http://c-icap.sourceforge.net/"
+SRC_URI="mirror://sourceforge/c-icap/${PN}/0.2.x/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="berkdb clamav"
+
+DEPEND="berkdb? ( sys-libs/db )
+ clamav? ( app-antivirus/clamav )
+ net-proxy/c-icap
+ sys-libs/glibc
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # some void *** pointers get casted around and can be troublesome to
+ # fix properly.
+ append-flags -fno-strict-aliasing
+
+ econf --sysconfdir=/etc/c-icap \
+ --disable-dependency-tracking \
+ --disable-maintainer-mode \
+ --disable-static \
+ $(use_with berkdb bdb) \
+ $(use_with clamav)
+}
+
+src_compile() {
+ emake LOGDIR="/var/log"
+}
+
+src_install() {
+ dodir /etc/c-icap
+
+ emake LOGDIR="/var/log" \
+ DESTDIR="${D}" install
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/net-proxy/c-icap-modules/metadata.xml b/net-proxy/c-icap-modules/metadata.xml
new file mode 100644
index 000000000000..4964bf824fc9
--- /dev/null
+++ b/net-proxy/c-icap-modules/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>URL blocklist and virus scanner for the C-ICAP server</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">c-icap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/c-icap/Manifest b/net-proxy/c-icap/Manifest
new file mode 100644
index 000000000000..88da81d9c0fb
--- /dev/null
+++ b/net-proxy/c-icap/Manifest
@@ -0,0 +1,9 @@
+AUX c-icap-0.2.6-fix-icap-parsing.patch 522 SHA256 b856b028085f937b21d2e4eeeb3f0ae05f9b2170c6adf7ce213fcaad29a36818 SHA512 9bc60cba5d5560acad1320595176f0ccd654c4f88e2507da0e80d588999309b4180bc7b86843bf63d5688bcd377432a913ea76525ac5ccdec40155e70ecec9c0 WHIRLPOOL f27315ca51d6526fdef84f03dbcbcd75266e2615ca34ab54bd2604aa0caad52626d9eb0292285c7a78182f4847c4151902666173689b2541ac6e957a273ef59d
+AUX c-icap.conf 359 SHA256 b855b93780a6885388f6bfa8d44ee4ad7f5aa75c83d43c5a54d2923848b0c1da SHA512 2ccab04f6ddb1b76b41d9b26dfdcf3e43aa4acdaeeddc215f38e0f7f8b537687733c643d5cc2b0e06b95710a3cd76c8a67e33e8c8240b375d939fea649e86ba3 WHIRLPOOL 7ae5daacae96e252628457b98dc9cf8fbeac962fd16015aeb830a4b3cdfbee83f24f46bd3cdffcff0b106d27871e44596a708ddf5c9ccdc9077344b6d2a1d6f8
+AUX c-icap.init.3 693 SHA256 eff25085309624987362c1427725db3081c2466e305a59a4f064faa49405726d SHA512 9518ebdc57e69716717160fa11d2ade4648212ac4bbc65caeec0d0c7d2427cd0a8a70e1de36b6c81113c821ed9a11808f7d81595f8c1fc185013a1cd4ac93bdb WHIRLPOOL 1d654d4b7f430811b23f399afec4d6b5dc2ced57a1da8a2d3205b9f288a018120833457ffbf4286be2d0e491a6b168ef676371fdace411050ce0116b52c65823
+AUX c-icap.logrotate 188 SHA256 a1ebd01837312c1fbb5b110486656656001c9b70ab0008f5ee73de6222005b54 SHA512 edc8dbbbaa06cf062b307e37ffee1dee9d566cc4b8a6947422125a22d956bcc639c483712ff6b6f6e9eb30852b4b0d5c293f1279463af89e8fc199828792a9e7 WHIRLPOOL f20fa59b07edd5c1b1a86d6d5e59523ba17b011d019af9b521f03f10a9f821c5d31230161abeabbd77a020ca59425e91e48588e85a469a9452ed8ff296390d3d
+DIST c_icap-0.2.6.tar.gz 581856 SHA256 e5caf8d53975fbffdd50f99ebf7bf88067c842609ab69e08b4337961ac46482a SHA512 3b1fe1f89581ec4649f74771f4a33a08637428f6cf81a9228f5d08405207c3495e6dadd590254dd6804ccbb7c34af1fc62973563c6156c4249941a599a072a40 WHIRLPOOL 8dd8a999e8863f3873629b0e0dc72e7a4109d37531bf2752d587b4c4df128dba6280b0d9226e3e4edffc615cca6cb6795cc62c9fe2b75ba7adbbcc2f108935ea
+EBUILD c-icap-0.2.6.ebuild 2854 SHA256 a7c4c12db7dd08bb053ed42818e46e5b43ef80e092f8f35f59786312b461172f SHA512 abe180bfeab2c1223dfc9fa6deb1880a0f8fbdc9064950130700a50278fa3551af4761e9d03e1e878df6bec489ed91cd628726c6dc1b76ce107dd5d60a2b1615 WHIRLPOOL 78b00e5b42236a890f8bf06fb7c4aba413343e4760a7ced7c5c060f0726bc3ed861f2c95559d0d74d53f9f1060ba53bb032bef51c29b5c5eb959bc3af6b38a84
+MISC ChangeLog 2734 SHA256 f20f3244a18aa53ac3643fb5e11caecf45c423837a395fbfba87978051bb2ba4 SHA512 ae480ccf0764d7fd781e6cba8a0328c77678b69de8f7719e45ff70755a199b5980b46f00e9c372e17bd9ed4bbb19ac5a97fe3b198f971cb94d58978396c8cc15 WHIRLPOOL 702d9853bc00069055c5dc7b65d0da704fd1ec5c0c678b5edc4dfd82f792dc357552f3f6cf1d5980cbbcfb5ba24a956753e83dbd513a7daeab712ec84f8d2896
+MISC ChangeLog-2015 5108 SHA256 a9f29413026ac8cee0c4250214171add686d292e4d3b0dbe398a5e54bd1b670c SHA512 3237f64eaa1d5c1b1e80b77968a8a1b05788eef5ba65ccc29f870ec3a742e1782d699a7ce6207d10eaba98dfbc79932fbfaf70387ed49e573f726d0bf658b517 WHIRLPOOL c55feba16e9e94a44e897f8a9052638102b489c8f056a1c4748c60588c9522af4a8c80c51dd26412e42a44e77d420d31b03883365de0e8c2d573512242fab51d
+MISC metadata.xml 219 SHA256 0a93248fcf60015edfbc867d76cb5bc6cf131ed4145d2566cd8634103513d58a SHA512 1b367aedae4a1b2484e88740adb95edb652befa869fb44b25f98a9634dc8819f461913304e74ac254cff88841b254b256d33062b65cee579f8cbf9f72526e2aa WHIRLPOOL 61d39236a2478eeadc28260d0f897173efccc2a37aeb79ad8cc87f52f028900801e066df0c92a22d315673e040b08042c2047ed88931fc4bcfa52ad03c694d11
diff --git a/net-proxy/c-icap/c-icap-0.2.6.ebuild b/net-proxy/c-icap/c-icap-0.2.6.ebuild
new file mode 100644
index 000000000000..cd9886df7296
--- /dev/null
+++ b/net-proxy/c-icap/c-icap-0.2.6.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib flag-o-matic
+
+MY_PN="${PN/-/_}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="C Implementation of an ICAP server"
+HOMEPAGE="http://c-icap.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="berkdb ipv6 ldap"
+
+RDEPEND="berkdb? ( sys-libs/db )
+ ldap? ( net-nds/openldap )
+ sys-libs/zlib"
+
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/c-icap-0.2.6-fix-icap-parsing.patch
+}
+
+src_configure() {
+ # some void *** pointers get casted around and can be troublesome to
+ # fix properly.
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --sysconfdir=/etc/${PN} \
+ --disable-dependency-tracking \
+ --disable-maintainer-mode \
+ --disable-static \
+ --enable-large-files \
+ $(use_enable ipv6) \
+ $(use_with berkdb bdb) \
+ $(use_with ldap)
+}
+
+src_compile() {
+ emake LOGDIR="/var/log"
+}
+
+src_install() {
+ emake \
+ LOGDIR="/var/log" \
+ DESTDIR="${D}" install
+
+ find "${D}" -name '*.la' -delete || die
+
+ # Move the daemon out of the way
+ dodir /usr/libexec
+ mv "${D}"/usr/bin/c-icap "${D}"/usr/libexec || die
+
+ # Remove the default configuration files since we have etc-update to
+ # take care of it for us.
+ rm "${D}"/etc/${PN}/c-icap.*.default || die
+
+ # Fix the configuration file; for some reason it's a bit messy
+ # around.
+ sed -i \
+ -e 's:/usr/var/:/var/:g' \
+ -e 's:/var/log/:/var/log/c-icap/:g' \
+ -e 's:/usr/etc/:/etc/c-icap/:g' \
+ -e 's:/usr/local/c-icap/etc/:/etc/c-icap/:g' \
+ -e 's:/usr/lib/:/usr/'$(get_libdir)'/:g' \
+ "${D}"/etc/${PN}/c-icap.conf \
+ || die
+
+ dodoc AUTHORS README TODO ChangeLog
+
+ newinitd "${FILESDIR}/${PN}.init.3" ${PN}
+ newconfd "${FILESDIR}/${PN}.conf" ${PN}
+ keepdir /var/log/c-icap
+
+ insopts -m0644
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ # avoid triggering portage's symlink protection; this is handled by
+ # the init script anyway.
+ rm -rf "${D}"/var/run
+}
+
+pkg_postinst() {
+ elog "To enable Squid to call the ICAP modules from a local server you should set"
+ elog "the following in your squid.conf:"
+ elog ""
+ elog " icap_enable on"
+ elog ""
+ elog " # not strictly needed, but some modules might make use of these"
+ elog " icap_send_client_ip on"
+ elog " icap_send_client_username on"
+ elog ""
+ elog " icap_service service_req reqmod_precache bypass=1 icap://localhost:1344/service"
+ elog " adaptation_access service_req allow all"
+ elog ""
+ elog " icap_service service_resp respmod_precache bypass=0 icap://localhost:1344/service"
+ elog " adaptation_access service_resp allow all"
+ elog ""
+ elog "You obviously will have to replace \"service\" with the actual ICAP service to"
+ elog "use."
+}
diff --git a/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch
new file mode 100644
index 000000000000..b0275edefee5
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch
@@ -0,0 +1,11 @@
+--- c-icap-0.2.2.orig/request.c 2013-02-03 16:37:43.000000000 +0000
++++ c-icap-02.2/request.c 2012-06-19 12:55:51.000000000 +0000
+@@ -267,7 +267,7 @@
+ req->req_server[servnamelen] = '\0';
+ if (*end == '/') { /*service */
+ start = ++end;
+- while (*end != ' ' && *end != '?')
++ while (*end && *end != ' ' && *end != '?')
+ end++;
+ len = end - start;
+ if (len > 0) {
diff --git a/net-proxy/c-icap/files/c-icap.conf b/net-proxy/c-icap/files/c-icap.conf
new file mode 100644
index 000000000000..d3f2420b2dce
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.conf
@@ -0,0 +1,11 @@
+# Use this to change the configuration file to use for c-icap.
+configfile=/etc/c-icap/c-icap.conf
+
+# Use this to set any extra option for the daemon. Do not use the -f
+# option here.
+EXTRA_OPTS=""
+
+# If you enabled LDAP support, and you'd like to access tables stored
+# in the local LDAP instance, you want to uncomment the following
+# line.
+#rc_need="slapd"
diff --git a/net-proxy/c-icap/files/c-icap.init.3 b/net-proxy/c-icap/files/c-icap.init.3
new file mode 100644
index 000000000000..c11ae50b9f79
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.init.3
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${configfile:=/etc/c-icap/c-icap.conf}
+
+get_config() {
+ local value=$(awk '$1 == "'$1'" { print $2 }' ${configfile})
+ echo ${value:-$2}
+}
+
+command="/usr/libexec/c-icap"
+command_arguments="${EXTRA_OPTS} -f ${configfile}"
+pidfile=$(get_config PidFile /var/run/c-icap/c-icap.pid)
+
+depend() {
+ need localmount
+ config ${configfile}
+ [ "$(get_config Logger file_logger)" = "sys_logger" ] && use logger
+}
+
+start_pre() {
+ local cmdsocket=$(get_config CommandsSocket /var/run/c-icap/c-icap.ctl)
+
+ checkpath -d "$(dirname "${cmdsocket}")" "$(dirname "${pidfile}")"
+}
diff --git a/net-proxy/c-icap/files/c-icap.logrotate b/net-proxy/c-icap/files/c-icap.logrotate
new file mode 100644
index 000000000000..c4c0a5d34f6e
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap.logrotate
@@ -0,0 +1,13 @@
+/var/log/c-icap/access.log {
+ missingok
+ postrotate
+ /etc/init.d/c-icap restart
+ endscript
+}
+
+/var/log/cicap-server.log {
+ missingok
+ postrotate
+ /etc/init.d/c-icap restart
+ endscript
+}
diff --git a/net-proxy/c-icap/metadata.xml b/net-proxy/c-icap/metadata.xml
new file mode 100644
index 000000000000..af696825f7a7
--- /dev/null
+++ b/net-proxy/c-icap/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="sourceforge">c-icap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/cntlm/Manifest b/net-proxy/cntlm/Manifest
new file mode 100644
index 000000000000..526b40f287c6
--- /dev/null
+++ b/net-proxy/cntlm/Manifest
@@ -0,0 +1,9 @@
+AUX cntlm-0.93_beta5-buildsystem.patch 6380 SHA256 988092a399ef78a775c2b1c02bdd49fe1efb3f1c13ba6b07b92102145051410d SHA512 fbd51773feeceb130cf1ba0345a8d169611e038a7ced8633511ac8f907c0f04b515b42b618f3058d9a0325dd6b76b08a3969f65fa8c1c67c5d886ce978ee54a3 WHIRLPOOL 5882c7f967eaab4c84252672ecd0127a55c5dd320ebfbdb9bceade11e2731686101ad1df344f3ed515853fd5cdc8bc81cb45e63365b2896b3b8e8384c84fd737
+AUX cntlm.confd 150 SHA256 5a5e6b44ea784bf667308d79f7df3b8519f7a5741a6939c810e0a5eecbbe2afe SHA512 e2ff84cbb17265e5ba1a8be9d66294dd714c9b42f9977548305447413ca3763ad18035c90c723cbdc5e3fdb5e87005f597a1a441f57c9aec2612558c7534e697 WHIRLPOOL f73ad3406c709c453d391e5126ebb427761790e07105871213e8e516d80be08c07c2f25394cb8200ea458d9bbe88e38c0d47d92583411917fb95efea5f9528b5
+AUX cntlm.initd 457 SHA256 e61cc1d4f9227bc3a84ca6f4843ccd646882826377138ef77164b6762717c72f SHA512 5297d9cb64d5b9d56e67f3e211f6778c6e38318edec09e13df0571fac10eb4aa4b48479a93495a0837936d43a58a62839d1adb9871431970917d44207446ab11 WHIRLPOOL b366cac264662bf80e0a074e554736db59f0f03b5a06ea47df8f26fa07a9b904b9cee406228b308c2bc0c5a48209d66eadbc2f972570faef2ca89eadec511b3b
+AUX cntlm.service 207 SHA256 be37630bc684b2d613aaaab183ab1aa7f615d7ff9b4eeb2c261eb53ac876de4e SHA512 5084b6e65b4b91120a8fe369f7cec1566103db04f1c25f9d13241e8051a49bc776bc68601992e02156719623f0f62e6e77f3781a40776601b19faa53e1039324 WHIRLPOOL 00dc56426ecc0254fe4828dd53f2465ac131b04d5377387ee21bbfe6441eb1ddde18653ab10c79467de1437153811e660f66765496209eb4477fbd740d49dcf0
+DIST cntlm-0.93beta5.tar.gz 718018 SHA256 97d0d7162e1c782a74958af3b7f48f61ae72b49d2f608d21155f804583a6a754 SHA512 5cb59788a0d6dc5cd787acb36dbe6de9a3909727d63327c9a12b20973619b777add9e0acbe94ed6a3cf1c189ef0e0ac6c01aa3c1c4739881bbd371b4c90744cd WHIRLPOOL e2627cf54e3e91bcc08cbaa9e6e95cb7fb8464bf48e6f924575a86237188d976d86ef9b1cb960c2cd982316dd3ebb6d1bd7129aa4191cbd605f69df09af4b715
+EBUILD cntlm-0.93_beta5-r2.ebuild 1070 SHA256 72fa950f8a4fd2925b3ca11972c5403523d3bb21712481f5d4f182cc58331dce SHA512 d16bfd29e3744962ebbb2d9f8b0e6b067cc00ba895532ae0098993df48bdc00bc82d4c9644605c3ffd0254cb01bb86db86219f12ea8b37abddc3a0a8dc9489c1 WHIRLPOOL 6fdda494752caac12ea34c80c43a31e85fd83081d80a8ed0a00190e4c5a59673f5ff722b8937016411df92c314f32a98a21f6b3a47047ab3e5c53e85d9003f26
+MISC ChangeLog 3604 SHA256 96e40d17f9e7e1954a5bafc2d552548b53af0b6cfd47dab1ad0bd22d4bd47415 SHA512 a8c39c208a525f83bbacda9bf6a599fa7dc84d2b0bc06d9607665b99e88b74c95b90033a12429ea46deb8e17c4107dfdcb47ffaa113bf4da706935f63af38177 WHIRLPOOL c7151dc7b86b245ae3bb6020b52c76e7c68b62e7a0d115c8e0a72d508631c0a3e76a8545dc2ca16d70cfafe109a55cf0a23754087df8f8e58606009a9cd66557
+MISC ChangeLog-2015 1587 SHA256 c951ea3410c1d87c54ae3b641763894a35fc6ea7d1948d8cbd8b7739c0341e17 SHA512 b0b0481b63789e436757ff8428674ae4ac65ee290ea5f7c0c107650917308b382a6b087ea6a5bedb8885babebb447cea1b21f0d185a89603a178abc370e911b1 WHIRLPOOL 734715c9369e0b4aa417469e695e08df4bc942af2c1d8b070a13edeb58cb10467246d397435050e317d3dac3bce05aae3ca7ae6f4f535aea30e20569f880a299
+MISC metadata.xml 389 SHA256 23927b5a2139fba945a1d4582e9ebeb7071000d20ea33740d442c599a27d604a SHA512 5d765000881049ae413629dfc297a72bda28e2000e3e145782aadeb2da3c8dd2ee51378f0333dc1e3a0d23012c916e1313b4aacf65998a0a17b898658b1602eb WHIRLPOOL 948c7c8ea04ccd67a5cb2272497852fc71576fe1e842e6413c9a937a4270a1ffa1aace2b5b14a69acedd32f1f97f134dd9058fbc122d4aa8dfbf5904a9be6896
diff --git a/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild b/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild
new file mode 100644
index 000000000000..2e86f2f75b59
--- /dev/null
+++ b/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd toolchain-funcs user
+
+DESCRIPTION="Cntlm is an NTLM/NTLMv2 authenticating HTTP proxy"
+HOMEPAGE="http://cntlm.sourceforge.net/"
+SRC_URI="http://ftp.awk.cz/pub/${P//_}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${P//_}"
+
+src_prepare() {
+ eapply -p0 "${FILESDIR}"/${P}-buildsystem.patch # 334647
+
+ default
+}
+
+src_configure() {
+ tc-export CC
+
+ econf
+
+ # Replace default config file path in Makefile
+ sed -i -e 's~SYSCONFDIR=/usr/local/etc~SYSCONFDIR=/etc~' \
+ "${S}"/Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ dobin cntlm
+ dodoc COPYRIGHT README VERSION doc/cntlm.conf
+ doman doc/cntlm.1
+ newinitd "${FILESDIR}"/cntlm.initd cntlm
+ newconfd "${FILESDIR}"/cntlm.confd cntlm
+ systemd_dounit "${FILESDIR}"/cntlm.service
+ insinto /etc
+ insopts -m0600
+ doins doc/cntlm.conf
+}
+
+pkg_postinst() {
+ enewgroup cntlm
+ enewuser cntlm -1 -1 -1 cntlm
+}
diff --git a/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch
new file mode 100644
index 000000000000..d553e8661484
--- /dev/null
+++ b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch
@@ -0,0 +1,195 @@
+Gentoo Bug#334647:
+Respect CC, CFLAGS, LDFLAGS (with gcc).
+Support verbose building via 'make V=1'.
+--- configure.orig 2012-10-02 14:01:48.735669564 +0200
++++ configure 2012-10-02 14:23:01.224271511 +0200
+@@ -10,7 +10,7 @@
+ # This can be disabled if neccessary.
+ #
+
+-CCS="xlc_r gcc"
++CCS=${CC-"xlc_r gcc"}
+
+ #
+ # Look for supported compilers
+@@ -31,15 +31,21 @@
+ else
+ echo "Using $CCPATH to compile Cntlm"
+ [ -h Makefile ] && rm -f Makefile 2>/dev/null
+- case "$CC" in
+- gcc)
++ if $CC -v >/dev/null 2>&1; then
+ # default Makefile is for GCC; just revert back to
+ # GCC if Makefile is linked to other compiler version
+ if [ ! -f Makefile ]; then
+ mv Makefile.gcc Makefile
+ fi
+- ;;
+- *)
++ : ${CFLAGS=-O3}
++ : ${LDFLAGS=}
++ CFLAGS="$CFLAGS -std=c99 -Wall -Wno-unused-but-set-variable -pedantic -pthread"
++ LDFLAGS="$LDFLAGS -pthread"
++ sed -e "s~^CFLAGS[ :]*=~CFLAGS=$CFLAGS ~" \
++ -e "s~^LDFLAGS[ :]*=.*~LDFLAGS=$LDFLAGS~" \
++ -e "s~^CC[ :]*=.*~CC=$CC~" \
++ -i Makefile
++ else
+ # backup default GCC Makefile and create a link to other
+ if [ -f Makefile ]; then
+ mv Makefile Makefile.gcc
+@@ -47,8 +53,7 @@
+
+ EXT=`echo "$CC" | sed 's/_.*//'`
+ ln -s Makefile.$EXT Makefile
+- ;;
+- esac
++ fi
+ fi
+
+ STAMP=configure-stamp
+@@ -62,7 +67,7 @@
+ for i in $TESTS; do
+ printf "Checking $i... "
+ printf "#define config_$i " >> $CONFIG
+- OUT=`$CC -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1`
++ OUT=`$CC $CFLAGS $LDFLAGS -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1`
+ rc=$?
+
+ if [ $rc -ne 0 ]; then # -o -n "$OUT" ]; then
+--- Makefile.orig 2012-10-02 15:31:03.986270993 +0200
++++ Makefile 2012-10-02 15:40:10.277689068 +0200
+@@ -16,14 +16,13 @@
+ CC := gcc
+ VER := $(shell cat VERSION)
+ OS := $(shell uname -s)
+-OSLDFLAGS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl")
+-LDFLAGS := -lpthread $(OSLDFLAGS)
++LIBS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl")
++LDFLAGS := -pthread
+ CYGWIN_REQS := cygwin1.dll cyggcc_s-1.dll cygstdc++-6.dll cygrunsrv.exe
+
++CFLAGS=-D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\"
+ ifeq ($(DEBUG),1)
+- CFLAGS += -g -std=c99 -Wall -pedantic -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\"
+-else
+- CFLAGS += -O3 -std=c99 -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\"
++ CFLAGS += -g -O0
+ endif
+
+ ifneq ($(findstring CYGWIN,$(OS)),)
+@@ -32,28 +31,35 @@
+ OBJS=utils.o ntlm.o xcrypt.o config.o socket.o acl.o auth.o http.o forward.o direct.o scanner.o pages.o main.o
+ endif
+
++VE_=@echo
++VE_1=@:
++VE=$(VE_$(V))
++VV_=@
++VV_1=
++VV=$(VV_$(V))
++
+ $(NAME): configure-stamp $(OBJS)
+- @echo "Linking $@"
+- @$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
++ $(VE) "Linking $@"
++ $(VV) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
+
+ main.o: main.c
+- @echo "Compiling $<"
+- @if [ -z "$(SYSCONFDIR)" ]; then \
++ $(VE) "Compiling $<"
++ $(VV) if [ -z "$(SYSCONFDIR)" ]; then \
+ $(CC) $(CFLAGS) -c main.c -o $@; \
+ else \
+ $(CC) $(CFLAGS) -DSYSCONFDIR=\"$(SYSCONFDIR)\" -c main.c -o $@; \
+ fi
+
+ %.o: %.c
+- @echo "Compiling $<"
+- @$(CC) $(CFLAGS) -c -o $@ $<
++ $(VE) "Compiling $<"
++ $(VV) $(CC) $(CFLAGS) -c -o $@ $<
+
+ configure-stamp:
+ ./configure
+
+ win/resources.o: win/resources.rc
+- @echo Adding EXE resources
+- @windres $^ -o $@
++ $(VE) Adding EXE resources
++ $(VV) windres $^ -o $@
+
+ install: $(NAME)
+ # Special handling for install(1)
+@@ -115,31 +121,31 @@
+
+ $(NAME)-$(VER)-win32.exe:
+ @echo - preparing binaries for GUI installer
+- @cp $(patsubst %, /bin/%, $(CYGWIN_REQS)) win/
++ $(VV) cp $(patsubst %, /bin/%, $(CYGWIN_REQS)) win/
+ ifeq ($(DEBUG),1)
+- @cp -p cntlm.exe win/
++ $(VV) cp -p cntlm.exe win/
+ else
+- @strip -o win/cntlm.exe cntlm.exe
++ $(VV) strip -o win/cntlm.exe cntlm.exe
+ endif
+ @echo - generating GUI installer
+- @win/Inno5/ISCC.exe /Q win/setup.iss #/Q win/setup.iss
++ $(VV) win/Inno5/ISCC.exe /Q win/setup.iss #/Q win/setup.iss
+
+ $(NAME)-$(VER)-win32.zip:
+ @echo - creating ZIP release for manual installs
+- @ln -s win $(NAME)-$(VER)
++ $(VV) ln -s win $(NAME)-$(VER)
+ zip -9 $(NAME)-$(VER)-win32.zip $(patsubst %, $(NAME)-$(VER)/%, $(CYGWIN_REQS) cntlm.ini LICENSE.txt cntlm_manual.pdf)
+- @rm -f $(NAME)-$(VER)
++ $(VV) rm -f $(NAME)-$(VER)
+
+ win/cntlm.ini: doc/cntlm.conf
+- @cat doc/cntlm.conf | unix2dos > win/cntlm.ini
++ $(VV) cat doc/cntlm.conf | unix2dos > win/cntlm.ini
+
+ win/LICENSE.txt: COPYRIGHT LICENSE
+- @cat COPYRIGHT LICENSE | unix2dos > win/LICENSE.txt
++ $(VV) cat COPYRIGHT LICENSE | unix2dos > win/LICENSE.txt
+
+ win/cntlm_manual.pdf: doc/cntlm.1
+ @echo - generating PDF manual
+- @rm -f win/cntlm_manual.pdf
+- @groff -t -e -mandoc -Tps doc/cntlm.1 | ps2pdf - win/cntlm_manual.pdf
++ $(VV) rm -f win/cntlm_manual.pdf
++ $(VV) groff -t -e -mandoc -Tps doc/cntlm.1 | ps2pdf - win/cntlm_manual.pdf
+
+ win/setup.iss: win/setup.iss.in
+ ifeq ($(findstring CYGWIN,$(OS)),)
+@@ -148,16 +154,16 @@
+ @echo
+ @exit 1
+ endif
+- @sed "s/\$$VERSION/$(VER)/g" $^ > $@
++ $(VV) sed "s/\$$VERSION/$(VER)/g" $^ > $@
+
+ uninstall:
+ rm -f $(BINDIR)/$(NAME) $(MANDIR)/man1/$(NAME).1 2>/dev/null || true
+
+ clean:
+- @rm -f config/endian config/gethostname config/strdup config/socklen_t config/*.exe
+- @rm -f *.o cntlm cntlm.exe configure-stamp build-stamp config/config.h
++ $(VV) rm -f config/endian config/gethostname config/strdup config/socklen_t config/*.exe
++ $(VV) rm -f *.o cntlm cntlm.exe configure-stamp build-stamp config/config.h
+ rm -f $(patsubst %, win/%, $(CYGWIN_REQS) cntlm.exe cntlm.ini LICENSE.txt setup.iss cntlm_manual.pdf)
+- @if [ -h Makefile ]; then rm -f Makefile; mv Makefile.gcc Makefile; fi
++ $(VV) if [ -h Makefile ]; then rm -f Makefile; mv Makefile.gcc Makefile; fi
+
+ distclean: clean
+ ifeq ($(findstring CYGWIN,$(OS)),)
+@@ -169,6 +175,6 @@
+ fakeroot rpm/rules clean; \
+ fi
+ endif
+- @rm -f *.exe *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 *.zip *.exe tags ctags pid 2>/dev/null
++ $(VV) rm -f *.exe *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 *.zip *.exe tags ctags pid 2>/dev/null
+
+ .PHONY: all install tgz tbz2 deb rpm win uninstall clean distclean
diff --git a/net-proxy/cntlm/files/cntlm.confd b/net-proxy/cntlm/files/cntlm.confd
new file mode 100644
index 000000000000..bc3dce0fb18c
--- /dev/null
+++ b/net-proxy/cntlm/files/cntlm.confd
@@ -0,0 +1,5 @@
+# cntlm init script configuration file
+
+# here you can specify additional options to cntlm
+# NOTE that using config file is recommended
+CNTLM_OPTS=""
diff --git a/net-proxy/cntlm/files/cntlm.initd b/net-proxy/cntlm/files/cntlm.initd
new file mode 100644
index 000000000000..106a4a163a6f
--- /dev/null
+++ b/net-proxy/cntlm/files/cntlm.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=${PIDFILE:-/var/run/cntlm.pid}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cntlm"
+ start-stop-daemon --start --background --make-pidfile --pidfile ${PIDFILE} --exec /usr/bin/cntlm -- -f -U cntlm ${CNTLM_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cntlm"
+ start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-proxy/cntlm/files/cntlm.service b/net-proxy/cntlm/files/cntlm.service
new file mode 100644
index 000000000000..01f2bcdfd803
--- /dev/null
+++ b/net-proxy/cntlm/files/cntlm.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/cntlm -f -U cntlm -c /etc/cntlm.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/cntlm/metadata.xml b/net-proxy/cntlm/metadata.xml
new file mode 100644
index 000000000000..86bbb0e6615e
--- /dev/null
+++ b/net-proxy/cntlm/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ NTLM authorizing proxy. Upstream seems dead, but this is still a good
+ alternative to ntlmaps.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">cntlm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/dante/Manifest b/net-proxy/dante/Manifest
new file mode 100644
index 000000000000..39f25cd7dea6
--- /dev/null
+++ b/net-proxy/dante/Manifest
@@ -0,0 +1,18 @@
+AUX dante-1.3.2-sockd-init 1639 SHA256 53e0fa62ec85eec0020c2aacd1327716f34f9e77021886ca8fd4c61e1d3ef1c0 SHA512 8ee0b47ecc6bb882fb76e6212e7fbc39394450d64a34ee6b3b965cb0197dfe88e3d37b4f0f33b005ff6a4898d7205250835dca412cc9f735f4c02b3d395df945 WHIRLPOOL 147d1902533dc7b6c48363763f1ba7c707785490ff99c39dfc937edf593da8f29dd702807bb31272df9ec0f39b6d887cd06c186b839f123944beee58cec4242a
+AUX dante-1.4.0-HAVE_SENDBUF_IOCTL.patch 360 SHA256 41cd1edfbd9ca40c62fe71b63f5365884bda37c3b80baa03a098e470084c863d SHA512 83c5778c184cb0631e9d0ba62b970deab40747c1db40b59e2e63eac7ce7de620e372e7236b435ffcfa793a401c337290afac75991f324e1572ec4871ba3b507b WHIRLPOOL e86afa3aa961c30e15e385ad4535e132e402021ce7b74ab5023e43cf4ef51d987c157ade687b35ac98cfab92fa9ae51b6641c3dbd730f2840eb0144852077b0d
+AUX dante-1.4.0-cflags.patch 1182 SHA256 cacc63d0ef7d34856f38d1cf5aae58e2c5ec5884d3bfc9798737370ea9368dcb SHA512 436508a1f440b5bc7bf9ef2a2fdb32023c4fb7066ec0f132a90fd19de1d80d44f94dca0ae49067f4c4b565eaededf99bed44b0d7807e4698a9b0264a7be47775 WHIRLPOOL 559c5275e9a5528b3300c0c797f53f93cf547b35a4ee04cbb3a70d4ecb2485979880940bef5882ff240ecb778a457ee4c211b81961a9ea23886b444f46691673
+AUX dante-1.4.0-osdep-format-macro.patch 517 SHA256 b4f2fc60661aa2bff934c2f49ec156359dbccb92a3c499c703f4c98283a95705 SHA512 db3a0670562b563aecf182e70fea4df721097aa66d32d383c3b999dd2c6c01b8294491392efbe51ad82a162e7f446f4196b33a6d92f22c942777f0d5d52bdd86 WHIRLPOOL 453c4e9727301adbce5ad07403863c33e6f87230fc2cb7875b2098284384ba82532709b1b59640425983938d3ba1751702b3c072cb31cabbe137e44a466d3838
+AUX dante-1.4.0-socksify.patch 1203 SHA256 4ee5e22067ef6b3cd5bfaf1774bb19940e1ae8dda8dc8cce198789fc871ba7ba SHA512 ba118ede7b87b8c4c0973053827515762d1bd0aff846dcb17696d930228eb6e6d2fe199f47ff739420420a6d67a72187fe9d864ac74d4653f40a658278675a5a WHIRLPOOL edaa3c7a3c0971cca033df18949568c0bb0f4a8cd37d3f9fae6f8a5f2cb99619954a8eadddc38fdc2b10ca1252547d5f423aca89c93c22826369e3da36848e44
+AUX dante-1.4.1-miniupnp14.patch 475 SHA256 6ac365d0fd968a2e4f667a522cab842e1b88981a18a835e37bdd1d07f0bbf695 SHA512 54d6e6128d925b7f7fbc3efda8f9a5fb5ef09e6eafc5dc1fd25b33e942376a3989df2c4d9b1f33d90741ac71f9986fcc956dbc81238130e2d3fd52d0366a9c91 WHIRLPOOL b643ae302b130a37ba870c6ddf2ae0b6748decdbdb48f8437b1b1690edca15afb8b0b0e40de4629d5c515448cdc6f4c3f38039a2c360bdfdccd867f96fd04380
+AUX dante-1.4.1-sigpwr-siginfo.patch 554 SHA256 27ff872b9a58d13b63198aa98c031e7aa4ad7392cc5b56212fb5e4d118daa34c SHA512 86a69630ea74ccd642f9ed9672d2f13cc0cf9c5fb1871d53227ac022043cbfc385bdfa50fc698dbf3afd73e680083a69b5b60827401bf6325b3c993a8b143d81 WHIRLPOOL 5ad24252dce2dca700da9db59e231cee1df75b1ee5898bb597452c82c3407b8a1d3f2443985b53873435c48ed9c0e02a2ccbf6c55cc4f066679d7f2d196453e3
+AUX dante-sockd-conf 350 SHA256 8eea254a0ad9202e501becf2474d54dd779bf4c21b70ded0bc9362cd68afe6c1 SHA512 c9dd0982dc6893fdb6160279531d431255bd97011b6351a09d28db6c0db15886ebb323f62afc960b621455a24940c8f4baed409b4bc3c791bd3f3fe6104b30bc WHIRLPOOL a87324fb5216c8923c88408fde16d3c78b4242a518519bde37c8246defe172a1827300522e8a438944c74d08ea22ddc16a38be0529920aa5bcea6fdeae12a5bb
+AUX dante-sockd.service 167 SHA256 81e3dd10ca13fd022905147000661598a3fd6183998a2f7068e66af3c4c7cb53 SHA512 0acc71e1ab429d38c61db45dc5eb3c9ea58d822eefc83912ae9d569486eb281184f07183a40754eaf6e4f6f67c46a3683629734d6333767623d702f98bc720de WHIRLPOOL 6b6258f43872a8344cfd4b418846092d0f63e6de9f769793f721b027fd69c7c7c84d3839d60dd9f4a67a7c6994fcb47a569fbf10189cb08f7f95715224fd57e4
+AUX sockd.conf 7031 SHA256 3ea0e08ee7e5b018d1df1b83af92fb6051fb44a486e0822e28775d104bfcfee7 SHA512 a443ea203aefd3ed51b10c7140dde2fc64dfa31c2fb08539a45353ab77daea42c63b160c276f0ef9e4c683032260f93228af64db83ade7476ff6d353b63dec19 WHIRLPOOL 130a0a017071129061d6ca6987448d51c515785f3802e18b99f7df0150e41d8e03b2f2d88dea21769d5ec0d544d9d82eaccd813c86a1360881598a453f7e6e7f
+AUX sockd.conf-with-libwrap.patch 870 SHA256 ba4bb30ad5933b890d1b09c6468708f37abf012de3f8696482d1c46c5c1f2978 SHA512 087cec0bcdfb989e6cbcb0c7006ae014b7e94fe268f68e1e6516dbb034f9e7e64523ea7edab669433eb16faeb4f6232a9794c401acd2eacce08e1b560469315f WHIRLPOOL edeb4b19ff5d39cd889777bc417b36d3d6d1ab7eaf4e926a239968253260bdb502b7f3b68354556f4ac33b37cd9e18af5dbbaf3c11cac570a7dae3f01b1f5367
+AUX sockd.conf-with-pam.patch 295 SHA256 e67499de8b976e17a9c7c0556e999e03f4bf06e8e57b78ba6dd41a128de0b719 SHA512 78728605362360650e6a20869744fc941782b75d149c0835542faaad931104cb32dda56de77a7b4f9a4fa683053139c551bcf77607a047fb1be68b6da9388630 WHIRLPOOL aa68139d3766446d43987eab1d4f2d9b22deb0e0eb3acbfcd9adb198f359b1c039eb71f07359362e9d99fe64f5194103c8fa77b603d8b7aac882926dea93d271
+AUX socks.conf 4185 SHA256 3dc8c06ca5a8309015c495ea50f62097ee6a605ac262665ffa5f19e0e8a5a9d8 SHA512 d15ea77e20ad750f10285a42c9c6305cbed48313dea205139d8cf59fda4a4640bdd5c5bd2c295b32e0015b774d463f9ad34fa5a22fb188ae921dba1a533553eb WHIRLPOOL e7c39b3f9711f2a6f32d3a7d7c44bc0105d1dc236ae2b51be7257a38dc15f211a38a44c0869fbee4c381dacf946da88909b85b91a7628aeaadab737f2169d480
+DIST dante-1.4.1.tar.gz 1284288 SHA256 b6d232bd6fefc87d14bf97e447e4fcdeef4b28b16b048d804b50b48f261c4f53 SHA512 1c8e2966ba68c8584fb99ff76ae1d9c8dfe669c7e5e61c7e6e7f87295d1280c3e7849491a6369ce27795040f951dcc11f4f2b3d7e46c54219594c89315d0487e WHIRLPOOL ab59762ac2f429cb32afd98b396e432f9c62260dd69e8f96d384491cd8620f6530537dcaaf4c39270d0d2448ef06e85cd9018dcc93bb2366e5e8d6606be57b23
+EBUILD dante-1.4.1-r1.ebuild 2711 SHA256 557388cca6bddeae049c86ca635d054751f543b20410d35a55b5638c8705479f SHA512 fb363b62d29109c375a0a9c7287a23ab7ef791582de0d10b61d46aa41cb394a68b1d5435617f9aa4ad837597e1b77f85d405f2b805a2b562fb1a24f70785e95d WHIRLPOOL f22f499385282d124a7ac9c1063b09f5c1f3aa85088945da8d078eab35eac0b2f3f64392638b7a5d35a0e470f7485f61ae8d8ea8bc5148b1b45f0296206a5c43
+MISC ChangeLog 3720 SHA256 bb93cb2fec8b7fd5954be47aaf0670b02dbdff47d3ac81bded7afe93f8f1137d SHA512 cee742e432a25dc329be009d995bf719e74c51d433c17b35892e0828f0582866714a585935622718dc228b3928a949cd5be5b06a4000b405635e699fa828d131 WHIRLPOOL 57a53019118e54f71ec8fc140f6fb98b8444c7984df706648310a2f60cec8681e3abb4d96dec0ff8d91ca5a579e77ce22183df6424ce0f97cde6c35f62b64065
+MISC ChangeLog-2015 20345 SHA256 6183c55c4c272f0c54ddd472431cc9a284d1ff9208458358fee2fc1b256e0058 SHA512 d47b36e0e68b85712aafe77ea8e85db6725238ea5c41f4e942172459fa8e6c461ad527dd0a3ec1631ff6a8d109ff18d33ef6f33e4b55fc36ac0275089b8ff167 WHIRLPOOL 0af338728c8b50c1b874f7ba7ab4974483fb3291100b0fe64d9a863b0add4237735587a562a5f324e93868fbeacb9b3ae8c22eca4b5e8b5e7d86d2ffbdaacd1d
+MISC metadata.xml 296 SHA256 e35ccee1819ae9b8d6b97ba99f2e556c72f2ff44861dbe6349feb3de301dae72 SHA512 af311f739f67a9e4d7386aa2ba575f2d0ba5e6d1cd9710dc107876c6876a05ce301568da03c4287e2557665d1ca5cba174ca31b41c6788b1f1300c2fed9005ab WHIRLPOOL ea484488db3fd5738901342406deace73db6ee8b9267480a190c3e35937620c0771226b0ef9b94277d94a770d8d92125b0c883c13c3fa37416a784bfeaaf0a6e
diff --git a/net-proxy/dante/dante-1.4.1-r1.ebuild b/net-proxy/dante/dante-1.4.1-r1.ebuild
new file mode 100644
index 000000000000..1bc434301f67
--- /dev/null
+++ b/net-proxy/dante/dante-1.4.1-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools ltprune systemd user
+
+DESCRIPTION="A free socks4,5 and msproxy implementation"
+HOMEPAGE="https://www.inet.no/dante/"
+SRC_URI="https://www.inet.no/dante/files/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug kerberos pam selinux static-libs tcpd upnp"
+
+CDEPEND="
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )
+ tcpd? ( sys-apps/tcp-wrappers )
+ upnp? ( net-libs/miniupnpc:= )
+ userland_GNU? ( virtual/shadow )
+"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-dante )
+"
+
+DOCS="BUGS CREDITS NEWS README SUPPORT doc/README* doc/*.txt doc/SOCKS4.protocol"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0-socksify.patch
+ "${FILESDIR}"/${PN}-1.4.0-osdep-format-macro.patch
+ "${FILESDIR}"/${PN}-1.4.0-cflags.patch
+ "${FILESDIR}"/${PN}-1.4.0-HAVE_SENDBUF_IOCTL.patch
+ "${FILESDIR}"/${PN}-1.4.1-sigpwr-siginfo.patch #517528
+ "${FILESDIR}"/${PN}-1.4.1-miniupnp14.patch #564680
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:/etc/socks\.conf:"${EPREFIX}"/etc/socks/socks.conf:' \
+ -e 's:/etc/sockd\.conf:"${EPREFIX}"/etc/socks/sockd.conf:' \
+ doc/{socksify.1,socks.conf.5,sockd.conf.5,sockd.8} \
+ || die
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # hardcoded the libc name otherwise the scan on a amd64 multilib system
+ # ends up finding /usr/lib32/libc.so.5. That cascades and causes the
+ # preload/libdsocks to not be built.
+ econf \
+ --with-socks-conf="${EPREFIX}"/etc/socks/socks.conf \
+ --with-sockd-conf="${EPREFIX}"/etc/socks/sockd.conf \
+ --enable-preload \
+ --enable-clientdl \
+ --enable-serverdl \
+ --enable-drt-fallback \
+ --with-libc=libc.so.6 \
+ $(use_enable debug) \
+ $(use_with kerberos gssapi) \
+ $(use_with pam) \
+ $(use_with upnp) \
+ $(use_enable static-libs static) \
+ $(use_with tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ # default configuration files
+ insinto /etc/socks
+ doins "${FILESDIR}"/sock?.conf
+ pushd "${ED}"/etc/socks > /dev/null
+ use pam && eapply -p0 "${FILESDIR}"/sockd.conf-with-pam.patch
+ use tcpd && eapply -p0 "${FILESDIR}"/sockd.conf-with-libwrap.patch
+ popd > /dev/null
+
+ # init script
+ newinitd "${FILESDIR}"/${PN}-1.3.2-sockd-init dante-sockd
+ newconfd "${FILESDIR}"/dante-sockd-conf dante-sockd
+
+ systemd_dounit "${FILESDIR}"/dante-sockd.service
+
+ # example configuration files
+ docinto examples
+ dodoc example/*.conf
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ enewuser sockd -1 -1 /etc/socks daemon
+}
diff --git a/net-proxy/dante/files/dante-1.3.2-sockd-init b/net-proxy/dante/files/dante-1.3.2-sockd-init
new file mode 100644
index 000000000000..5d1f66727da3
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.3.2-sockd-init
@@ -0,0 +1,56 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SOCKD_OPT=""
+[ "${SOCKD_FORKDEPTH:-1}" -gt 1 ] && SOCKD_OPT="${SOCKD_OPT} -N ${SOCKD_FORKDEPTH}"
+[ "${SOCKD_DEBUG:-0}" -eq 1 ] && SOCKD_OPT="${SOCKD_OPT} -d"
+[ "${SOCKD_DISABLE_KEEPALIVE:-0}" -eq 1 ] && SOCKD_OPT="${SOCKD_OPT} -n"
+PIDFILE=/var/run/sockd.pid
+SOCKDIR=/var/lock/dante-sockd/
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ # first check that it exists
+ if [ ! -f /etc/socks/sockd.conf ] ; then
+ eerror "You need to setup /etc/socks/sockd.conf first"
+ eerror "Examples are in /usr/share/doc/dante[version]/example"
+ eerror "for more info, see: man sockd.conf"
+ return 1
+ fi
+
+ /usr/sbin/sockd -V >/tmp/dante-sockd.checkconf 2>&1
+ if [ $? -ne 0 ]; then
+ cat /tmp/dante-sockd.checkconf
+ eerror "Something is wrong with your configuration file"
+ eerror "for more info, see: man sockd.conf"
+ return 1
+ fi
+ rm /tmp/dante-sockd.checkconf
+
+ DAEMON_UID=`sed -e '/^[ \t]*user[.]notprivileged[ \t]*:/{s/.*:[ \t]*//;q};d' /etc/socks/sockd.conf`
+ if [ -n "$DAEMON_UID" ]; then
+ [ ! -d $SOCKDIR ] && mkdir $SOCKDIR && chown $DAEMON_UID $SOCKDIR
+ [ ! -f $SOCKDIR/.keep ] && touch $SOCKDIR/.keep
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting dante sockd"
+ start-stop-daemon --start --quiet \
+ --background --pidfile $PIDFILE --make-pidfile --env TMPDIR=$SOCKDIR \
+ --exec /usr/sbin/sockd -- ${SOCKD_OPT} >/dev/null 2>&1
+ eend $? "Failed to start sockd"
+}
+
+stop() {
+ ebegin "Stopping dante sockd"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $? "Failed to stop sockd"
+}
diff --git a/net-proxy/dante/files/dante-1.4.0-HAVE_SENDBUF_IOCTL.patch b/net-proxy/dante/files/dante-1.4.0-HAVE_SENDBUF_IOCTL.patch
new file mode 100644
index 000000000000..d8e2c220ce92
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.0-HAVE_SENDBUF_IOCTL.patch
@@ -0,0 +1,11 @@
+--- a/libscompat.m4
++++ b/libscompat.m4
+@@ -373,7 +373,7 @@
+
+ return 0;
+ }], [AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_SENDBUF_IOCTL, TIOCOUTQ, [send buffer data])
++ AC_DEFINE(HAVE_SENDBUF_IOCTL, 1, [send buffer data])
+ AC_DEFINE(SENDBUF_IOCTLVAL, TIOCOUTQ, [send buffer ioctl])],
+ [AC_MSG_RESULT(no)])],
+ [dnl assume no when cross-compiling
diff --git a/net-proxy/dante/files/dante-1.4.0-cflags.patch b/net-proxy/dante/files/dante-1.4.0-cflags.patch
new file mode 100644
index 000000000000..eccb64a5d7d8
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.0-cflags.patch
@@ -0,0 +1,32 @@
+The upstream code tries to remove -g from CFLAGS, but the logic also matches
+the -g in the middle of flags, like:
+-frecord-gcc-switches => -frecordcc-switches
+-ggdb3 => ggdb3
+Both of which cause GCC to fail horribly!
+
+Fix the grep & sed to only match standalone instances.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar dante-1.4.0.orig/compiler.m4 dante-1.4.0/compiler.m4
+--- dante-1.4.0.orig/compiler.m4 2013-10-24 13:20:23.000000000 -0700
++++ dante-1.4.0/compiler.m4 2014-01-05 15:18:03.544336373 -0800
+@@ -375,14 +375,14 @@
+ gcc)
+ if test x"$aixldbug" != x; then
+ #disable debug info
+- if echo $CFLAGS | grep -- "-g" >/dev/null; then
+- CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'`"
++ if echo $CFLAGS | grep -w -- "-g" >/dev/null; then
++ CFLAGS="`echo $CFLAGS | sed -e 's/\<-g\>//g'`"
+ fi
+ CFLAGS="$CFLAGS${CFLAGS:+ }-g0"
+ else
+ #use -ggdb also when not debugging
+- if echo $CFLAGS | grep -- "-g" >/dev/null; then
+- CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'`"
++ if echo $CFLAGS | grep -w -- "-g" >/dev/null; then
++ CFLAGS="`echo $CFLAGS | sed -e 's/\<-g\>//g'`"
+ fi
+ CFLAGS="$CFLAGS${CFLAGS:+ }-ggdb"
+ fi
diff --git a/net-proxy/dante/files/dante-1.4.0-osdep-format-macro.patch b/net-proxy/dante/files/dante-1.4.0-osdep-format-macro.patch
new file mode 100644
index 000000000000..02a0d916e563
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.0-osdep-format-macro.patch
@@ -0,0 +1,15 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' dante-1.4.0.orig/include/osdep.h dante-1.4.0/include/osdep.h
+--- dante-1.4.0.orig/include/osdep.h 2013-10-27 08:24:41.000000000 -0700
++++ dante-1.4.0/include/osdep.h 2014-01-05 15:06:45.346071952 -0800
+@@ -254,9 +254,9 @@
+ #endif /* HAVE_DECL_NONNULL */
+
+ #if HAVE_DECL_FORMAT
+-#define FORMAT(x, y, z) format(x, y, z)
++#define FORMAT(...) format(__VA_ARGS__)
+ #else
+-#define FORMAT(x, y, z)
++#define FORMAT(...)
+ #endif /* HAVE_DECL_FORMAT */
+
+ #if HAVE_DECL_BOUNDED
diff --git a/net-proxy/dante/files/dante-1.4.0-socksify.patch b/net-proxy/dante/files/dante-1.4.0-socksify.patch
new file mode 100644
index 000000000000..2063327b42c5
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.0-socksify.patch
@@ -0,0 +1,27 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' dante-1.4.0.orig/bin/socksify.in dante-1.4.0/bin/socksify.in
+--- dante-1.4.0.orig/bin/socksify.in 2013-10-27 08:24:41.000000000 -0700
++++ dante-1.4.0/bin/socksify.in 2014-01-05 15:04:32.495670262 -0800
+@@ -53,7 +53,7 @@
+ exit 1
+ fi
+
+-SOCKSIFY_PRELOAD_LIBS="@SOCKSIFY_PRELOAD_LIBS@"
++#SOCKSIFY_PRELOAD_LIBS="@SOCKSIFY_PRELOAD_LIBS@"
+ SOCKS_LIBDIR="${SOCKS_LIBDIR:-@LIBRARY_PREFIX@}"
+
+ #platform that requires full path to libdsocks?
+@@ -82,8 +82,12 @@
+ @PRELOAD_VARIABLE@="${LIBRARY}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${SOCKSIFY_PRELOAD_LIBS}${PRELOAD_POSTFIX:+${PRELOAD_SEPERATOR}}${PRELOAD_POSTFIX}"
+ export @PRELOAD_VARIABLE@
+
+-LD_LIBRARY_PATH="${SOCKS_LIBDIR}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
+-export LD_LIBRARY_PATH
++# There is no reason to set LD_LIBRARY_PATH, at least on Linux, where
++# LD_PRELOAD can contain a full path to the library. Setting the
++# following breaks socksify on Linux/Alpha at least with
++# binutils-2.14.90.0.7-r3 (08 Dec 2003 agriffis)
++#LD_LIBRARY_PATH="${SOCKS_LIBDIR}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
++#export LD_LIBRARY_PATH
+
+ #SunOS 64-bit library path
+ if test x"@ISA64DIR@" != x; then
diff --git a/net-proxy/dante/files/dante-1.4.1-miniupnp14.patch b/net-proxy/dante/files/dante-1.4.1-miniupnp14.patch
new file mode 100644
index 000000000000..1e952ad18b7d
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.1-miniupnp14.patch
@@ -0,0 +1,14 @@
+Index: dante-1.4.1/lib/upnp.c
+===================================================================
+--- dante-1.4.1.orig/lib/upnp.c
++++ dante-1.4.1/lib/upnp.c
+@@ -156,6 +156,9 @@ socks_initupnp(gw, emsg, emsglen)
+ 0
+ #if HAVE_LIBMINIUPNP17
+ ,0,
++#if MINIUPNPC_API_VERSION >= 14 /* adds ttl */
++ 2,
++#endif
+ &rc
+ #endif /* HAVE_LIBMINIUPNP17 */
+ );
diff --git a/net-proxy/dante/files/dante-1.4.1-sigpwr-siginfo.patch b/net-proxy/dante/files/dante-1.4.1-sigpwr-siginfo.patch
new file mode 100644
index 000000000000..86d54d6a37cb
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.1-sigpwr-siginfo.patch
@@ -0,0 +1,26 @@
+Description: Make sure SIGPWR is not the same as SIGINFO
+ Avoid a duplicate case value in a switch statement on e.g. Alpha.
+Forwarded: not-yet
+Author: Peter Pentchev <roam@ringlet.net>
+Last-Update: 2016-04-11
+
+--- a/lib/tostring.c
++++ b/lib/tostring.c
+@@ -1551,7 +1551,17 @@
+ return "SIGPROF";
+ #endif /* SIGPROF */
+
++#undef NEED_SIGPWR
++
+ #ifdef SIGPWR
++#ifndef SIGINFO
++#define NEED_SIGPWR
++#elif SIGINFO != SIGPWR
++#define NEED_SIGPWR
++#endif
++#endif
++
++#ifdef NEED_SIGPWR
+ case SIGPWR:
+ return "SIGPWR";
+ #endif /* SIGPWR */
diff --git a/net-proxy/dante/files/dante-sockd-conf b/net-proxy/dante/files/dante-sockd-conf
new file mode 100644
index 000000000000..e817a07a289c
--- /dev/null
+++ b/net-proxy/dante/files/dante-sockd-conf
@@ -0,0 +1,13 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Number of processes to fork off
+# 1 is plenty for most users
+# increment SLOWLY for bigger demand
+SOCKD_FORKDEPTH=1
+
+# set this to 1 to enable debug
+SOCKD_DEBUG=0
+
+# disable TCP keepalive for better resource usage
+SOCKD_DISABLE_KEEPALIVE=1
diff --git a/net-proxy/dante/files/dante-sockd.service b/net-proxy/dante/files/dante-sockd.service
new file mode 100644
index 000000000000..647a2dcc8cd8
--- /dev/null
+++ b/net-proxy/dante/files/dante-sockd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=SOCKS v4 and v5 compatible proxy server and client
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/sockd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/dante/files/sockd.conf b/net-proxy/dante/files/sockd.conf
new file mode 100644
index 000000000000..70b18747ba34
--- /dev/null
+++ b/net-proxy/dante/files/sockd.conf
@@ -0,0 +1,243 @@
+# The configfile is divided into two parts; first serversettings,
+# then the rules.
+#
+# The recommended order is:
+# Serversettings:
+# logoutput
+# internal
+# external
+# method
+# clientmethod
+# users
+# compatibility
+# extension
+# connecttimeout
+# iotimeout
+# srchost
+#
+# Rules:
+# client block/pass
+# from to
+# log
+#
+# block/pass
+# from to
+# method
+# command
+# log
+# protocol
+# proxyprotocol
+
+# the server will log both via syslog, to stdout and to /var/log/lotsoflogs
+#logoutput: syslog stdout /var/log/lotsoflogs
+logoutput: syslog
+
+# The server will bind to the address 10.1.1.1, port 1080 and will only
+# accept connections going to that address.
+#internal: 10.1.1.1 port = 1080
+# Alternatively, the interface name can be used instead of the address.
+#internal: eth0 port = 1080
+
+# all outgoing connections from the server will use the IP address
+# 195.168.1.1
+#external: 192.168.1.1
+
+# list over acceptable methods, order of preference.
+# A method not set here will never be selected.
+#
+# If the method field is not set in a rule, the global
+# method is filled in for that rule.
+#
+
+# methods for socks-rules.
+#method: username none #rfc931
+
+# methods for client-rules.
+#clientmethod: none
+
+#or if you want to allow rfc931 (ident) too
+#method: username rfc931 none
+
+#
+# An important section, pay attention.
+#
+
+# when doing something that can require privilege,
+# it will use the userid "sockd".
+user.privileged: sockd
+
+# when running as usual,
+# it will use the unprivileged userid of "sockd".
+user.notprivileged: sockd
+
+#
+# some options to help clients with compatibility:
+#
+
+# when a client connection comes in the socksserver will try to use
+# the same port as the client is using, when the socksserver
+# goes out on the clients behalf (external: IP address).
+# If this option is set, Dante will try to do it for reserved ports aswell.
+# This will usually require user.privileged to be set to "root".
+#compatibility: sameport
+
+# If you are using the bind extension and have trouble running servers
+# via the server, you might try setting this. The consequences of it
+# are unknown.
+#compatibility: reuseaddr
+
+#
+# The Dante server supports some extensions to the socks protocol.
+# These require that the socks client implements the same extension and
+# can be enabled using the "extension" keyword.
+#
+# enable the bind extension.
+#extension: bind
+
+
+#
+#
+# misc options.
+#
+
+# how many seconds can pass from when a client connects til it has
+# sent us it's request? Adjust according to your network performance
+# and methods supported.
+#connecttimeout: 30 # on a lan, this should be enough if method is "none".
+
+# how many seconds can the client and it's peer idle without sending
+# any data before we dump it? Unless you disable tcp keep-alive for
+# some reason, it's probably best to set this to 0, which is
+# "forever".
+#iotimeout: 0 # or perhaps 86400, for a day.
+
+# do you want to accept connections from addresses without
+# dns info? what about addresses having a mismatch in dnsinfo?
+#srchost: nounknown nomismatch
+
+#
+# The actual rules. There are two kinds and they work at different levels.
+#
+# The rules prefixed with "client" are checked first and say who is allowed
+# and who is not allowed to speak/connect to the server. I.e the
+# ip range containing possibly valid clients.
+# It is especially important that these only use IP addresses, not hostnames,
+# for security reasons.
+#
+# The rules that do not have a "client" prefix are checked later, when the
+# client has sent its request and are used to evaluate the actual
+# request.
+#
+# The "to:" in the "client" context gives the address the connection
+# is accepted on, i.e the address the socksserver is listening on, or
+# just "0.0.0.0/0" for any address the server is listening on.
+#
+# The "to:" in the non-"client" context gives the destination of the clients
+# socksrequest.
+#
+# "from:" is the source address in both contexts.
+#
+
+
+# the "client" rules. All our clients come from the net 10.0.0.0/8.
+#
+
+# Allow our clients, also provides an example of the port range command.
+#client pass {
+# from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0
+# method: rfc931 # match all idented users that also are in passwordfile
+#}
+
+# This is identical to above, but allows clients without a rfc931 (ident)
+# too. In practise this means the socksserver will try to get a rfc931
+# reply first (the above rule), if that fails, it tries this rule.
+#client pass {
+# from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0
+#}
+
+
+# drop everyone else as soon as we can and log the connect, they are not
+# on our net and have no business connecting to us. This is the default
+# but if you give the rule yourself, you can specify details.
+#client block {
+# from: 0.0.0.0/0 to: 0.0.0.0/0
+# log: connect error
+#}
+
+
+# the rules controlling what clients are allowed what requests
+#
+
+# you probably don't want people connecting to loopback addresses,
+# who knows what could happen then.
+#block {
+# from: 0.0.0.0/0 to: 127.0.0.0/8
+# log: connect error
+#}
+
+# the people at the 172.16.0.0/12 are bad, no one should talk to them.
+# log the connect request.
+#block {
+# from: 0.0.0.0/0 to: 172.16.0.0/12
+# log: connect error
+#}
+
+# unless you need it, you could block any bind requests.
+#block {
+# from: 0.0.0.0/0 to: 0.0.0.0/0
+# command: bind
+# log: connect error
+#}
+
+# or you might want to allow it, for instance "active" ftp uses it.
+# Note that a "bindreply" command must also be allowed, it
+# should usually by from "0.0.0.0/0", i.e if a client of yours
+# has permission to bind, it will also have permission to accept
+# the reply from anywhere.
+#pass {
+# from: 10.0.0.0/8 to: 0.0.0.0/0
+# command: bind
+# log: connect error
+#}
+
+# some connections expect some sort of "reply", this might be
+# the reply to a bind request or it may be the reply to a
+# udppacket, since udp is packetbased.
+# Note that nothing is done to verify that it's a "genuine" reply,
+# that is in general not possible anyway. The below will allow
+# all "replies" in to your clients at the 10.0.0.0/8 net.
+#pass {
+# from: 0.0.0.0/0 to: 10.0.0.0/8
+# command: bindreply udpreply
+# log: connect error
+#}
+
+
+# pass any http connects to the example.com domain if they
+# authenticate with username.
+# This matches "example.com" itself and everything ending in ".example.com".
+#pass {
+# from: 10.0.0.0/8 to: .example.com port = http
+# log: connect error
+# method: username
+#}
+
+# block any other http connects to the example.com domain.
+#block {
+# from: 0.0.0.0/0 to: .example.com port = http
+# log: connect error
+#}
+
+# everyone from our internal network, 10.0.0.0/8 is allowed to use
+# tcp and udp for everything else.
+#pass {
+# from: 10.0.0.0/8 to: 0.0.0.0/0
+# protocol: tcp udp
+#}
+
+# last line, block everyone else. This is the default but if you provide
+# one yourself you can specify your own logging/actions
+#block {
+# from: 0.0.0.0/0 to: 0.0.0.0/0
+# log: connect error
+#}
diff --git a/net-proxy/dante/files/sockd.conf-with-libwrap.patch b/net-proxy/dante/files/sockd.conf-with-libwrap.patch
new file mode 100644
index 000000000000..97d2a33f71bb
--- /dev/null
+++ b/net-proxy/dante/files/sockd.conf-with-libwrap.patch
@@ -0,0 +1,41 @@
+--- sockd.conf.orig 2005-06-04 13:57:39.770322448 +0300
++++ sockd.conf 2005-06-04 13:47:47.000000000 +0300
+@@ -18,12 +18,14 @@
+ # Rules:
+ # client block/pass
+ # from to
++# libwrap
+ # log
+ #
+ # block/pass
+ # from to
+ # method
+ # command
++# libwrap
+ # log
+ # protocol
+ # proxyprotocol
+@@ -73,6 +75,10 @@
+ # it will use the unprivileged userid of "sockd".
+ user.notprivileged: sockd
+
++# when running libwrap commands,
++# it will use the userid "sockd".
++user.libwrap: sockd
++
+ #
+ # some options to help clients with compatibility:
+ #
+@@ -179,9 +185,11 @@
+ #}
+
+ # the people at the 172.16.0.0/12 are bad, no one should talk to them.
+-# log the connect request.
++# log the connect request and also provide an example on how to
++# interact with libwrap.
+ #block {
+ # from: 0.0.0.0/0 to: 172.16.0.0/12
++# libwrap: spawn finger @%a
+ # log: connect error
+ #}
+
diff --git a/net-proxy/dante/files/sockd.conf-with-pam.patch b/net-proxy/dante/files/sockd.conf-with-pam.patch
new file mode 100644
index 000000000000..d6735a1cf30e
--- /dev/null
+++ b/net-proxy/dante/files/sockd.conf-with-pam.patch
@@ -0,0 +1,12 @@
+--- sockd.conf.orig 2005-06-04 14:01:40.492727080 +0300
++++ sockd.conf 2005-06-04 13:57:39.770322448 +0300
+@@ -58,6 +58,9 @@
+ #or if you want to allow rfc931 (ident) too
+ #method: username rfc931 none
+
++#or for PAM authentification
++#method: pam
++
+ #
+ # An important section, pay attention.
+ #
diff --git a/net-proxy/dante/files/socks.conf b/net-proxy/dante/files/socks.conf
new file mode 100644
index 000000000000..4a7d1520a7b5
--- /dev/null
+++ b/net-proxy/dante/files/socks.conf
@@ -0,0 +1,127 @@
+# The configfile is divided into two parts; first misc. settings,
+# then the routes. Objects in '[]' are optional.
+#
+#
+# recommended order is:
+# [debug]
+# [logoutput]
+# [resolveprotocol]
+#
+# routes:
+# from to via
+# [command]
+# [extension]
+# [protocol]
+# [proxyprotocol]
+
+
+#debug: 1 # uncomment to enable debugging
+
+#logoutput: stdout # users usually don't want to be bothered with that.
+
+# What protocol should be used for resolving hostnames? It's important
+# to set this right.
+#resolveprotocol: udp # default
+#resolveprotocol: tcp # set this if your socksserver only supports socksv4.
+#resolveprotocol: fake # set this if your clients can't access nameserver,
+ # neither directly nor proxied.
+
+
+
+#
+# the routes
+#
+
+# specifying routes for accepting remote connections (via bind()) is
+# difficult since we can't know what the "to:" address is
+# until we actually get the connection Since we support letting
+# the client accept connections both via the proxyserver and
+# "directly" at the same time, we have two options though:
+# a) specify a route for bind (only) first going via the proxyserver.
+# This will also handle "direct" connections.
+# b) specify a route for bind (only) first going "direct".
+# This means clients will only be able to accept "direct"
+# connections.
+
+# we want to accept remote connections via the proxyserver.
+#route {
+# from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080
+# command: bind
+#}
+
+# we do not want to accept remote connections via the proxyserver.
+#route {
+# from: 0.0.0.0/0 to: 0.0.0.0/0 via: direct
+# command: bind
+#}
+
+
+# if you don't route all local connections via direct, you should
+# at least route nameserver connections via direct connections if you
+# can. That can make for much better performance, depending on
+# your setup. Make sure the nameserver line is the first.
+#
+# Assuming your nameserver runs on address 10.1.1.1, you can do it like this:
+#route {
+# from: 0.0.0.0/0 to: 10.1.1.1/32 port = domain via: direct
+#}
+
+
+# have a route making all connections to loopback addresses be direct.
+#route {
+# from: 0.0.0.0/0 to: 127.0.0.0/8 via: direct
+# command: connect udpassociate # everything but bind, bind confuses us.
+#}
+
+# Our net is the 10.0.0.0/8 net, let clients going to local address go
+# direct, not via server.
+#route {
+# from: 0.0.0.0/0 to: 10.0.0.0/8 via: direct
+#}
+
+# for poor souls trapped behind a msproxy server.
+#route {
+# from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1745
+# protocol: tcp # server supports tcp
+# proxyprotocol: msproxy_v2 # server runs msproxy_v2
+#}
+
+# clients going anywhere else go via server listening at
+# IP address 10.1.1.1, port 1080. Note that unless you have
+# specified a direct connection for DNS, or the socksserver is resolvable
+# without network traffic, you can't give a hostname for the socksserver,
+# you must give a IP address. (the reasons for that are logical enough,
+# you would create a loop otherwise.)
+#route {
+# from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080
+# protocol: tcp udp # server supports tcp and udp.
+# proxyprotocol: socks_v4 socks_v5 # server supports socks v4 and v5.
+# method: none #username # we are willing to authenticate via
+# # method "none", not "username".
+#}
+
+# this is identical to the above, but it matches hostnames instead.
+# This is if you have clients that are unable to resolve hostnames.
+# It can be important that hostname routes come after address routes.
+#route {
+# from: 0.0.0.0/0 to: . via: 10.1.1.1 port = 1080
+# protocol: tcp udp # server supports tcp and udp.
+# proxyprotocol: socks_v4 socks_v5 # server supports socks v4 and v5.
+# method: none #username # we are willing to authenticate via
+# # method "none", not "username".
+#}
+
+# identical to above two routes, but using a httpproxy instead.
+#
+
+#route {
+# from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 3128
+# command: connect # only thing a httproxy supports.
+# proxyprotocol: http_v1.0
+#}
+
+#route {
+# from: 0.0.0.0/0 to: . via: 10.1.1.1 port = 3128
+# command: connect # only thing a httproxy supports.
+# proxyprotocol: http_v1.0
+#}
diff --git a/net-proxy/dante/metadata.xml b/net-proxy/dante/metadata.xml
new file mode 100644
index 000000000000..47c971ca58ca
--- /dev/null
+++ b/net-proxy/dante/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person"><email>robbat2@gentoo.org</email></maintainer>
+<longdescription>A free socks4, socks5 and msproxy implementation</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/dnsproxy/Manifest b/net-proxy/dnsproxy/Manifest
new file mode 100644
index 000000000000..6e07caae5e7f
--- /dev/null
+++ b/net-proxy/dnsproxy/Manifest
@@ -0,0 +1,8 @@
+AUX dnsproxy-1.16-include.patch 265 SHA256 85e507a5c858cf037b4bc3acd2cb4c605dd08bf88db74e1427f3ed154a7501d1 SHA512 b97be76ef6d9fe4be6720bb14b3cff1fc02f5b25400629a6538fe2aee003323e0f577a80dd4750242dc008bd2e7912332c66e87bd7f653eeb2f9ecf2ddc29b25 WHIRLPOOL 6419930de581265ed76b8a3fc6e1bcfade1b94560c49fa75e7b2479634151f03c1f05daf6ced84271eb117910f6a4a33d05cb3853020c9e66656e427b15185c1
+AUX dnsproxy.confd 153 SHA256 e955c254d81323baa40f1ef844465407c1fa2d61994578edd83489c283861113 SHA512 5aa16ba6f507509bb25677c68d5cef31b88b01ca1dbf7629e7702240870795327c0c4b0bcf77e643baada42c844d1d41d95aebe8b6271ede1c5ce3fa1507a8b6 WHIRLPOOL ce56e283aace8af159fed5b3bae2d388a6343fdac4a281fa4c6581b70fd46b9e14f29119910aee6ae9ff95e0cf5951d6fe347dd67607788db56515326de43645
+AUX dnsproxy.initd 704 SHA256 da3317fa9bc0ea6bed8d2e8c5318c08ab1d9b57cfbb8e6e8d048cf1950d8b09b SHA512 d36034ff8847c508844f617678257d699f172a8d680e9ff1f9cf6843b56d2461f68387c7c3d60afb369131a073fd9f8e43c343d47819457661e549b87aa59d8a WHIRLPOOL a56d068a8cdbb95223dd54243d02128c93d3907f1393d332d4e42b2ef06b0b45b20dba13aa9131aae76ea02b9291e19636ccd6a7f47c68246c13cf282845911a
+DIST dnsproxy-1.16.tar.gz 47239 SHA256 5d9df5ce547409a0e33888853f0fbaf7c599311992191c939010d2bc57ed63de SHA512 f02498de963555556b656be432612e6d9ed72f29c838672c45ed2b4100cd6ae30b19091cbd33587259935342c86a733b820d2df54a8c3c1c699edb050b1b3d2b WHIRLPOOL cc55fd72966236be4329f6d9320b9d1da0bd630634db5d025d83134f1f4a00a6662ab0af53163b642930f539d07c9a406a85ffccbe608a8b36fa5db62649db6e
+EBUILD dnsproxy-1.16-r2.ebuild 772 SHA256 b7dbe888671e2882c244da1093ac5c9af461adf5f160f6971222893874f564a9 SHA512 b353b4bf8eaf6fb9650a9eed99ff944640e8a15087fc906cc2c15d1a2c18d2b23fad75f8b93f2fe9a5373f4e574cfac6e143efde7c9e55ac579bf7dee3707425 WHIRLPOOL d180ac72502e084f1c2dd62e8909db3211102244355f74b829fa369dea13dbcf8c6da1ab2dbfcbd9754e5026b03d2198095c97a5769ed3ef87a9b87eb3f40eb1
+MISC ChangeLog 3528 SHA256 1f0e144a918933ec4af045c95279a0b0807f87603ab8af49854eba89f4a4e126 SHA512 1b153220ab80265164109515cda9cdd542b27fa61201ca091609326b1956d78b877195c2fd2a708c0cb95e925d00f47e54747e741a4b54a1a05a8f47f0a5f412 WHIRLPOOL e9d66894cf20c4d8038115b3e108d720497926fb94f93d6708329e34d32647b8c38f7b9e7e434816df438ce753eaa716792364d5548f14383e87413b1fa7e6df
+MISC ChangeLog-2015 2199 SHA256 e5244a31a6aca96d42d78c3b89d86feafac1cdd593466118de5f80f99a94df87 SHA512 a87f28cc34af4dcb801f4b4fdbf55a948ceed2b66f26b65aa33f78055dbec6b5f8bd8b3294f4f19ac7cbb36b7de7f314ba24f0103df475baf5debee38874ded3 WHIRLPOOL 38584ec282fb6a02ce41785adc9ecdf96c74a565c239536cf8728166f9d224d155ea52320e5c9681c80e204542b580deb678a1786c9ca856d0e0b287a857d5c4
+MISC metadata.xml 468 SHA256 89a7c040045057b0a6ce61a1f1d4d6939f4975d44959808549dabc5e6cdf026b SHA512 a74c88be1f57a3a2a850554d24226fc40433184a8533ba2acb4980c2d38ec7f8f62454ae25301b9f1bfa2b011e51462e159a65996c59701ca6555204a11f3c87 WHIRLPOOL 25cfcc3042a0e4bb1fbc903fa9408e79df8d32a80f9c688cc29bf693e19efc755cd2e2fb1eb9bb8a648ebb0ace92ba749f9a5d193ace646b1951a4d6fa3fe288
diff --git a/net-proxy/dnsproxy/dnsproxy-1.16-r2.ebuild b/net-proxy/dnsproxy/dnsproxy-1.16-r2.ebuild
new file mode 100644
index 000000000000..05398e13326a
--- /dev/null
+++ b/net-proxy/dnsproxy/dnsproxy-1.16-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="The dnsproxy daemon is a proxy for DNS queries"
+HOMEPAGE="http://www.wolfermann.org/dnsproxy.html"
+SRC_URI="http://www.wolfermann.org/${P}.tar.gz"
+
+LICENSE="MIT GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/libevent"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eapply -p0 "${FILESDIR}"/${P}-include.patch
+ append-cppflags -D_GNU_SOURCE
+
+ default
+}
+
+src_compile() {
+ emake ${PN}
+}
+
+src_install() {
+ dosbin ${PN}
+ keepdir /var/empty
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ insinto /etc/${PN}
+ newins ${PN}.conf ${PN}.conf.dist
+
+ dodoc README
+ doman ${PN}.1
+}
diff --git a/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch b/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch
new file mode 100644
index 000000000000..96296f5ed2d8
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch
@@ -0,0 +1,10 @@
+--- dnsproxy.c.orig 2010-01-11 16:02:00.000000000 +0100
++++ dnsproxy.c 2010-10-27 05:07:05.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <grp.h> /* setgroups() */
+ #include <unistd.h>
+
+ #define GLOBALS 1
diff --git a/net-proxy/dnsproxy/files/dnsproxy.confd b/net-proxy/dnsproxy/files/dnsproxy.confd
new file mode 100644
index 000000000000..48f8a51e57f0
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy.confd
@@ -0,0 +1,3 @@
+# Options for dnsproxy daemon (rarely you need to change these)
+DNSPROXY_CONFFILE="/etc/dnsproxy/dnsproxy.conf"
+DNSPROXY_PIDFILE="/var/run/dnsproxy.pid"
diff --git a/net-proxy/dnsproxy/files/dnsproxy.initd b/net-proxy/dnsproxy/files/dnsproxy.initd
new file mode 100644
index 000000000000..7af2199cfab2
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e "${DNSPROXY_CONFFILE}" ] ; then
+ eerror "You need to create and select the configuration file first."
+ eerror "An example can be found in /etc/dnsproxy/dnsproxy.conf.dist"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting dnsproxy"
+ checkconfig && \
+ start-stop-daemon --start --make-pidfile \
+ --quiet -b --pidfile ${DNSPROXY_PIDFILE} \
+ --exec /usr/sbin/dnsproxy -- -c "${DNSPROXY_CONFFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnsproxy"
+ start-stop-daemon --stop --quiet \
+ --pidfile ${DNSPROXY_PIDFILE}
+ eend $?
+}
diff --git a/net-proxy/dnsproxy/metadata.xml b/net-proxy/dnsproxy/metadata.xml
new file mode 100644
index 000000000000..a737ca9d17d4
--- /dev/null
+++ b/net-proxy/dnsproxy/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>The dnsproxy daemon is a proxy for DNS queries. It forwards these queries to
+two previously configured nameservers: one for authoritative queries and another
+for recursive queries. The received answers are sent back to the client unchanged.
+No local caching is done.</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
new file mode 100644
index 000000000000..6c2eb8599d9c
--- /dev/null
+++ b/net-proxy/haproxy/Manifest
@@ -0,0 +1,24 @@
+AUX haproxy-1.7-contrib.patch 1066 SHA256 e1da3b60e465e1f0ebe3afdd302f83a03201b7ff9841c4651ff1bc96546571a7 SHA512 a26846f3d970b288e6ba8c2cc67190242b41101ebb1b3b14a8ce543109b79d30a1f3257e1b2767033b3208dd223c1597b8a21824c622f16349bc849e9034f631 WHIRLPOOL 96dbf3ff0650167bde4f3233c7793bcb94bef3e7dbf6e8b3149823eaae30a3a4953fede6d5b348d4a4f5c7f60d357c2b2b204d0a28f926badbb136577e34cc18
+AUX haproxy.confd 610 SHA256 63c8ca11842b2e7817cea256f3912e2bd6bd38b7f57e61906cfd827ee66b1b81 SHA512 80a6e109432c7e751e9e1063853f73d3269c4c3967728a90cf94230cb32308b396f9f9ad7795b74b919dae4f61e5a29a9ae7badf0908148accbe0e8ca2238913 WHIRLPOOL c569e2473b6c945abb91389d080c0cec30b66f91143e887ec63f865809865def4084e24ca104382f67b270d88865f504f257d45e63c8f5d2addf6aa7bde68588
+AUX haproxy.initd-r2 978 SHA256 25237f8046bdcf145f89114561e551f01438148b74fc1b7ef26b8c13b97483fa SHA512 039f14980fd6acba7db76abb3c0e0f341bd1a741b126aa956ef2d07670a8e8d79176e378d8c1545701ec11d9779ca0f57298052f74912c58de7801fb06810e73 WHIRLPOOL 815b1cf08742837c86a3b4c262c47b355950b7450d0908638f279abb3eb8ecfd26d914af57757fcf499ae645b7474ee076b1aa5b412049703b8d20f5bbb13d53
+AUX haproxy.initd-r4 1690 SHA256 246a7a18f26190e0c47f4419ba4812c811369afa48d36a9830242c0f7886a922 SHA512 9431dcfcecf58fb0ee8681c5a649cca725c941a51f0073e67d0bd5ad67ee3f800999f8f4ae593cae06b859e58bc76d9374478c8efd81a36ccf18f54681f89de5 WHIRLPOOL d9a6e92bec579b602fcad130bfc01aa079ae6e7432a83a7971f6d5cbbdb3d1a7379340f82bb70ac1245ee8916c7bec15e8e27d19d4810df993cac4f506e5eafe
+AUX haproxy.initd-r5 1691 SHA256 90f8135f1e158928ac73eba87f262bd95d5b11e5363ef0f3f3e9e62439a8e8e0 SHA512 9eca44db0701ebbb418fd6ba27d2e44f2ec33a20b5aeac9b86faaddf026cb5ea99ab2d6fd4bc150480e53c08c673710bfbbdafd3806c213ceb6149909aa664a4 WHIRLPOOL a0f11b2fd4da945bbd497a89c505229d39678a78f2311efb43dd3775cfda2064fa4776f156d7c1f31bb7ebb9862f80552979fdd4cffb1a4bab5a540d836fae33
+DIST haproxy-1.5.14.tar.gz 1345345 SHA256 9565dd38649064d0350a2883fa81ccfe92eb17dcda457ebdc01535e1ab0c8f99 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 WHIRLPOOL 7d2c580589b9b31e1eba169e4bf930ac42d2564e21eb1c25adbdd39b701abd221fd671ebc227167ab956a48b2c30eeb740a6394355a8fa748c408ee42fdff6fc
+DIST haproxy-1.5.19.tar.gz 1362834 SHA256 e00ae2a633da614967f2e3ebebdb817ec537cba8383b833fc8d9a506876e0d5e SHA512 3462458350d76fe5634428f7b443f21e2d8d4a171ab6254736db2d64587707d11d0df1d851d629c5a2cdfb2858e98cc9345d592859c6d6d8a352b57542dc465a WHIRLPOOL 0cb297dd48e8b9e0c2d6291aa7549c0b6b11e75c58ace3bd50205d7218cf95187129126b21cd13572e0287fc5b311c94ad2ccf664ff30d83a3bc782aea7714ff
+DIST haproxy-1.6.11.tar.gz 1574029 SHA256 62fe982edb102a9f55205792bc14b0d05745cc7993cd6bee5d73cd3c5ae16ace SHA512 73ff1c7301197b3bd75a3b1355787419676854d132ce2dcdacb2a296e297dcdfc52b0c571a4fb715e369f1126e1a58196fabb21f828c880f15904032da78e434 WHIRLPOOL 4454c51da89bb089579aefcf54093fd4c09b42918e81e41772d263ebc19f243a37b42135a02c4012705e4cc31370f377cf0b429e81707f307cffe9ed23f5183b
+DIST haproxy-1.6.13.tar.gz 1580214 SHA256 7d318583f3a1bf185e857bd40449004b29c95547c89bbb36718f284e29502a1b SHA512 ffed3b347e0cd9cefdc379c91890a3c104d6848b976a9f28984878a9c2d05ca7ddea678f7a93f75cb9d29ae2be921e5a5bd295b1a8771765b099d1c619ded7a3 WHIRLPOOL 70176ee090dacbbdc822c74bba137589f168482c560734c06b98dc23b4d957ed1e016309f11f25a0b486bc6917633455f1174dc6688d6aef53667c61b83a9ff3
+DIST haproxy-1.7.7.tar.gz 1745024 SHA256 81196ca449e4ada45fbd743fe3804bb82c25563ff9653e136872181ee5603ae2 SHA512 aa4720962e94b00c2b6090f62fb875e8977783256d877eb799b6a48c884833bac00b12d04fabd440011007e2af1914e0d67ab485026a447d8a61d58128d04a5a WHIRLPOOL d730dd21f1d8c2132297011e3dfbbbc12b6aa2cc61b67ee1cb9001b9f320e1e403ba917b81c8159fc7e2b43a0e3c95fd27172e1c86aada4963d3a4ecaebb3e2e
+DIST haproxy-1.7.8.tar.gz 1746321 SHA256 ec90153ccedd20ad4015d3eaf76b502ff1f61b431d54c22b8457b5784a9ae142 SHA512 e1d65c8a4607c01d52628f36f8c7342096267130a0f949474746f571158e4f795281f78765004c214a0527f74ce180760f9cc910d3650d30026776076d721c0c WHIRLPOOL f781963b2cf80bfb6219399120821a4dd035dd89c07dc4191d45e2a7e4eaf6e8439f4eaa3174dd7a93ceb6f156d9124806f9c6490f8715bf127f37f0b33f9e17
+DIST haproxy-1.7.9.tar.gz 1748159 SHA256 1072337e54fa188dc6e0cfe3ba4c2200b07082e321cbfe5a0882d85d54db068e SHA512 d1ed791bc9607dbeabcfc6a1853cf258e28b3a079923b63d3bf97504dd59e64a5f5f44f9da968c23c12b4279e8d45ff3bd39418942ca6f00d9d548c9a0ccfd73 WHIRLPOOL efd7671925bfd260c0fce9d611ca24f3253a5553677687e5a136f6371a85852caaa4069df9bd1ba3ebe0d86ebdeef5e3c139609fc922eb0c10467cf28570e151
+EBUILD haproxy-1.5.14.ebuild 3269 SHA256 4bd6b8936a619a0f9d16fb06dce7884806a047a2d6b33cc4977ce1cf2897ee86 SHA512 41d1cfec30d177661f4402143ccf1335f5407adeb9f1581ea866011b1ec26c99da67fb2edd33e71e96b64665fa9c62641fd4b5dc1cd1383cc49877a0ce4292b4 WHIRLPOOL 6a4f67b97dbf7dc1a6c488df1f0649ab9714b3d8386f81943d1373f1993d799b6414ff00855f99835cc1e3b04a181cf452753c5da05c7681f7848b10ab2ab4ff
+EBUILD haproxy-1.5.19-r1.ebuild 3283 SHA256 699347d5e1e42730009326e7f871e8758709a0de2decab525d775c38fa05bb5c SHA512 2c789983ee584f5b917411c55fcfbedf52b284b0b13779b9f587970ae362d63f28013bcd07c858ad9a7de81ca6258336a1875375a1ed46c2b9c2a0e021408f27 WHIRLPOOL fb7326822130aaeef9e37f9390e6166e4c7e7b4f01f49243151d3d1f47c28d82ac7c9771e5de23ab75594a34a68751284788f40d028b6700af622ed236e758b0
+EBUILD haproxy-1.6.11-r1.ebuild 4672 SHA256 bacb9fc26123bfe7d350bbae5b7ee6bcdf41f71b44542997836f85bcd05af381 SHA512 26dd867d496ecad3d860c5563633e528bf6c41ac7abe1549d090c8d664dc9575788f7ba887b94d910a8b7d20b1732c2ffc336905ab3ea4a8c877ba5872b502cb WHIRLPOOL 76174f7d757bcdc503c69a55ee22f8b25c0e4846b862a4f79f1560db33bbe6cb265ee800f52439e0c897f9525b3e7bb1a94243ee800af3fbf8ba12db34aca851
+EBUILD haproxy-1.6.13-r2.ebuild 4608 SHA256 0b17f7ef332a860444ee027655bdf0662e9770fdb90c4b1ebf1dfea9dcb01000 SHA512 3d1e9ddac3421d08ec325a762e8bbbe603242ef9c1deac0d3954a5c6178b0f6e3837533f6e4ebd3251d9329276c316c15e7239edc57c0c1607bef1865c17bb9d WHIRLPOOL 72eaddcdc60c008265aa30aa822c62d39ba37c6fce82c08e7f73d6be8ea1e2b719e71f4035637f79b6a47a204088254f61343ad84209c168e8b5602b7f47ac40
+EBUILD haproxy-1.6.9999-r1.ebuild 4632 SHA256 057b1ae544887bffabf327c0d5da3075e731918c85620074956dcf17023d0b7b SHA512 4d2dc75aed69988b14e8a34b22d67fab99fefc6a4ae3b6ca03cd33e14a82f85a82325f10bb65a2423c8d1ba70723f8345f3bc3912d865a775a07a2935d0495c3 WHIRLPOOL d5c3c9c88e5012c82ce2d47bb5a27c9738fc922c797c51fc08e7f1815cb58767d53b12a47e75e66a99e985bece90e216615d4ba5e0608ce79f9f391940962d4b
+EBUILD haproxy-1.7.7.ebuild 4632 SHA256 057b1ae544887bffabf327c0d5da3075e731918c85620074956dcf17023d0b7b SHA512 4d2dc75aed69988b14e8a34b22d67fab99fefc6a4ae3b6ca03cd33e14a82f85a82325f10bb65a2423c8d1ba70723f8345f3bc3912d865a775a07a2935d0495c3 WHIRLPOOL d5c3c9c88e5012c82ce2d47bb5a27c9738fc922c797c51fc08e7f1815cb58767d53b12a47e75e66a99e985bece90e216615d4ba5e0608ce79f9f391940962d4b
+EBUILD haproxy-1.7.8.ebuild 4632 SHA256 057b1ae544887bffabf327c0d5da3075e731918c85620074956dcf17023d0b7b SHA512 4d2dc75aed69988b14e8a34b22d67fab99fefc6a4ae3b6ca03cd33e14a82f85a82325f10bb65a2423c8d1ba70723f8345f3bc3912d865a775a07a2935d0495c3 WHIRLPOOL d5c3c9c88e5012c82ce2d47bb5a27c9738fc922c797c51fc08e7f1815cb58767d53b12a47e75e66a99e985bece90e216615d4ba5e0608ce79f9f391940962d4b
+EBUILD haproxy-1.7.9.ebuild 4632 SHA256 057b1ae544887bffabf327c0d5da3075e731918c85620074956dcf17023d0b7b SHA512 4d2dc75aed69988b14e8a34b22d67fab99fefc6a4ae3b6ca03cd33e14a82f85a82325f10bb65a2423c8d1ba70723f8345f3bc3912d865a775a07a2935d0495c3 WHIRLPOOL d5c3c9c88e5012c82ce2d47bb5a27c9738fc922c797c51fc08e7f1815cb58767d53b12a47e75e66a99e985bece90e216615d4ba5e0608ce79f9f391940962d4b
+EBUILD haproxy-1.7.9999-r1.ebuild 4632 SHA256 057b1ae544887bffabf327c0d5da3075e731918c85620074956dcf17023d0b7b SHA512 4d2dc75aed69988b14e8a34b22d67fab99fefc6a4ae3b6ca03cd33e14a82f85a82325f10bb65a2423c8d1ba70723f8345f3bc3912d865a775a07a2935d0495c3 WHIRLPOOL d5c3c9c88e5012c82ce2d47bb5a27c9738fc922c797c51fc08e7f1815cb58767d53b12a47e75e66a99e985bece90e216615d4ba5e0608ce79f9f391940962d4b
+MISC ChangeLog 9654 SHA256 70ab86b15be3b3833f3d223582f21f2e2abddaea63c5b887c50e7ce432111806 SHA512 e1f7b4c7459e0c1a39bfe99c9de092981f82a64002e4eb6fad16fb141332d6dec87a83c6721221120a76aa4b3709a245bf8a7c5be195b4faa017117d756eeb75 WHIRLPOOL 891e45c2a0e7bb87d4f3ab862856a80fa1bc04984504c8709598ee5f5c89239f29413775a792b3b6252c0160ac7f7a200f0ed3c2648883c9fc6e7bf9a661c766
+MISC ChangeLog-2015 20405 SHA256 30b754ea77c21ac83dee50de917c2ad46234a7028e009c919c5ef5a6df66bb01 SHA512 77606fd8e3c692bd55a6cb6add77cdd3a56af6037544d7821726b8c10689e20fbadd46ede33330e7a1e82267221bf278fd46fb45e60a267b98d5304c17a9ce59 WHIRLPOOL 1c8d1b3112a926a2d107a5c23df3714fc7ab1e4f69f55895c1f4f19cd45d18dbf3b7a3d4afa00dca0f6988ac17dfbd6b5574cced06b72b2da87086b85e740d98
+MISC metadata.xml 1945 SHA256 8304b377e7170832d57c57296b6faaf1568c2cf560d09ef29d90ccf1b5ef854f SHA512 f5c13a273fcbf50e5d10f67d471b6f0e6cc8f7c5e08d5ed1cb24aa3e5db2c7c6c89f0d6d24d2a9bb4aa26b79b48738af9ded91232050126be145704a0c54b73a WHIRLPOOL f2ae7f2299701e9f42c7d19975fc987f556c041d556cffe79c3250a961d043a10bcb1566f15a6275f6c5d6d63329a4713de4c7e4053f0df877500715d98064c5
diff --git a/net-proxy/haproxy/files/haproxy-1.7-contrib.patch b/net-proxy/haproxy/files/haproxy-1.7-contrib.patch
new file mode 100644
index 000000000000..9ecffe7e3c78
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy-1.7-contrib.patch
@@ -0,0 +1,31 @@
+diff -Nuar --exclude '*~' haproxy-1.7.9999.orig/contrib/tcploop/Makefile haproxy-1.7.9999/contrib/tcploop/Makefile
+--- haproxy-1.7.9999.orig/contrib/tcploop/Makefile 2016-12-04 16:08:05.497256646 -0800
++++ haproxy-1.7.9999/contrib/tcploop/Makefile 2016-12-04 16:12:20.558141392 -0800
+@@ -5,7 +5,7 @@
+ OBJS = tcploop
+
+ tcploop: tcploop.c
+- $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
++ $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ clean:
+ rm -f $(OBJS) *.[oas] *~
+diff -Nuar --exclude '*~' haproxy-1.7.9999.orig/contrib/spoa_example/Makefile haproxy-1.7.9999/contrib/spoa_example/Makefile
+--- haproxy-1.7.9999.orig/contrib/spoa_example/Makefile 2016-12-04 15:56:49.068302156 -0800
++++ haproxy-1.7.9999/contrib/spoa_example/Makefile 2016-12-04 15:58:51.360644213 -0800
+@@ -6,13 +6,13 @@
+ LD = $(CC)
+
+ CFLAGS = -g -O2 -Wall -Werror -pthread
+-LDFLAGS = -lpthread
++LIBS = -lpthread
+
+ OBJS = spoa.o
+
+
+ spoa: $(OBJS)
+- $(LD) $(LDFLAGS) -o $@ $^
++ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ install: spoa
+ install spoa $(DESTDIR)$(BINDIR)
diff --git a/net-proxy/haproxy/files/haproxy.confd b/net-proxy/haproxy/files/haproxy.confd
new file mode 100644
index 000000000000..30739eb8bf23
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.confd
@@ -0,0 +1,14 @@
+# HAProxy config file(s), space separated
+#CONFIGS="/etc/haproxy/haproxy.cfg"
+
+# Additional HAProxy command line options
+HAPROXY_OPTS=""
+
+# If you want to make use ot the new seamless reload you can just write your own
+# reload_seamless function here. It will be called by the init script.
+# For more information on how to use that feature please have a look at the
+# "seamless_reload.txt" documentation file (requires net-proxy/haproxy[examples])
+#reload_seamless() {
+# checkpath -d -m 0700 haproxy:haproxy "/run/haproxy/"
+# socat /run/haproxy/socket - <<< "show servers state" > /run/haproxy/global.state
+#}
diff --git a/net-proxy/haproxy/files/haproxy.initd-r2 b/net-proxy/haproxy/files/haproxy.initd-r2
new file mode 100644
index 000000000000..e58c7c1fbfb0
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.initd-r2
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command="/usr/bin/haproxy"
+pidfile="/run/${SVCNAME}.pid"
+
+if [ -z "${CONFFILE}" -a -d "/etc/haproxy" -a -f "/etc/haproxy/${SVCNAME}.cfg" ]; then
+ CONFFILE=/etc/haproxy/${SVCNAME}.cfg
+else
+ CONFFILE=/etc/${SVCNAME}.cfg
+fi
+
+command_args="-D -p ${pidfile} -f ${CONFFILE}"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "${CONFFILE} does not exist!"
+ return 1
+ fi
+
+ ebegin "Checking ${CONFFILE}"
+ $command -q -c -f "${CONFFILE}"
+ eend $?
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ checkconfig || { eerror "Reloading failed, please fix your ${CONFFILE} first"; return 1; }
+ $command -D -p "${pidfile}" -f "${CONFFILE}" -sf $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-proxy/haproxy/files/haproxy.initd-r4 b/net-proxy/haproxy/files/haproxy.initd-r4
new file mode 100644
index 000000000000..c37719b16752
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.initd-r4
@@ -0,0 +1,85 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command="/usr/bin/haproxy"
+
+pidfile="${HAPROXY_PIDFILE:-/run/${SVCNAME}.pid}"
+
+configs=
+
+if [ -z "${CONFIGS}" ]; then
+ if [ -f "/etc/haproxy/${SVCNAME}.cfg" ]; then
+ CONFIGS=/etc/haproxy/${SVCNAME}.cfg
+ elif [ -f "/etc/${SVCNAME}.cfg" ]; then
+ CONFIGS=/etc/${SVCNAME}.cfg # Deprecated
+ fi
+fi
+
+for conf in $CONFIGS; do
+ configs="${configs} -f ${conf}"
+done
+
+command_args="-D -p ${pidfile} ${configs} ${HAPROXY_OPTS}"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ -z "${CONFIGS}" ]; then
+ eerror "No config(s) has been specified"
+ return 1
+ fi
+
+ for conf in $CONFIGS; do
+ if [ ! -f "${conf}" ]; then
+ eerror "${conf} does not exist!"
+ return 1
+ fi
+ done
+
+ ebegin "Checking ${CONFIGS}"
+ $command -q -c $configs $HAPROXY_OPTS
+ eend $?
+}
+
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+stop() {
+ local _t _pid
+
+ _t="$(mktemp)"
+ for _pid in $(cat ${pidfile}) ; do
+ echo "${_pid}" > "${_t}"
+ pidfile="${_t}" default_stop
+ done
+ rm -f "${_t}"
+}
+
+reload() {
+ checkconfig || { eerror "Reloading failed, please fix your config(s) first"; return 1; }
+
+ if [ "$(command -v reload_seamless)" = "reload_seamless" ]; then
+ einfo "Calling user-defined reload_seamless()"
+ reload_seamless || { eerror "reload_seamless() failed!"; return 1; }
+ fi
+
+ ebegin "Reloading ${SVCNAME}"
+ $command -D -p "${pidfile}" $configs $HAPROXY_OPTS -sf $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-proxy/haproxy/files/haproxy.initd-r5 b/net-proxy/haproxy/files/haproxy.initd-r5
new file mode 100644
index 000000000000..0f2435f74339
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.initd-r5
@@ -0,0 +1,85 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command="/usr/sbin/haproxy"
+
+pidfile="${HAPROXY_PIDFILE:-/run/${SVCNAME}.pid}"
+
+configs=
+
+if [ -z "${CONFIGS}" ]; then
+ if [ -f "/etc/haproxy/${SVCNAME}.cfg" ]; then
+ CONFIGS=/etc/haproxy/${SVCNAME}.cfg
+ elif [ -f "/etc/${SVCNAME}.cfg" ]; then
+ CONFIGS=/etc/${SVCNAME}.cfg # Deprecated
+ fi
+fi
+
+for conf in $CONFIGS; do
+ configs="${configs} -f ${conf}"
+done
+
+command_args="-D -p ${pidfile} ${configs} ${HAPROXY_OPTS}"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ -z "${CONFIGS}" ]; then
+ eerror "No config(s) has been specified"
+ return 1
+ fi
+
+ for conf in $CONFIGS; do
+ if [ ! -f "${conf}" ]; then
+ eerror "${conf} does not exist!"
+ return 1
+ fi
+ done
+
+ ebegin "Checking ${CONFIGS}"
+ $command -q -c $configs $HAPROXY_OPTS
+ eend $?
+}
+
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+stop() {
+ local _t _pid
+
+ _t="$(mktemp)"
+ for _pid in $(cat ${pidfile}) ; do
+ echo "${_pid}" > "${_t}"
+ pidfile="${_t}" default_stop
+ done
+ rm -f "${_t}"
+}
+
+reload() {
+ checkconfig || { eerror "Reloading failed, please fix your config(s) first"; return 1; }
+
+ if [ "$(command -v reload_seamless)" = "reload_seamless" ]; then
+ einfo "Calling user-defined reload_seamless()"
+ reload_seamless || { eerror "reload_seamless() failed!"; return 1; }
+ fi
+
+ ebegin "Reloading ${SVCNAME}"
+ $command -D -p "${pidfile}" $configs $HAPROXY_OPTS -sf $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-proxy/haproxy/haproxy-1.5.14.ebuild b/net-proxy/haproxy/haproxy-1.5.14.ebuild
new file mode 100644
index 000000000000..6a343de9ba80
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.5.14.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic systemd
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="+crypt examples +pcre pcre-jit ssl tools vim-syntax +zlib"
+
+DEPEND="pcre? ( dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? ( dev-libs/openssl:0[zlib?] )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_prepare() {
+ sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
+ > contrib/systemd/haproxy.service || die
+
+ sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
+}
+
+src_compile() {
+ local args="TARGET=linux2628 USE_GETADDRINFO=1"
+
+ if use pcre ; then
+ args="${args} USE_PCRE=1"
+ if use pcre-jit; then
+ args="${args} USE_PCRE_JIT=1"
+ else
+ args="${args} USE_PCRE_JIT="
+ fi
+ else
+ args="${args} USE_PCRE= USE_PCRE_JIT="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
+# fi
+
+ if use crypt ; then
+ args="${args} USE_LIBCRYPT=1"
+ else
+ args="${args} USE_LIBCRYPT="
+ fi
+
+ if use ssl ; then
+ args="${args} USE_OPENSSL=1"
+ else
+ args="${args} USE_OPENSSL="
+ fi
+
+ if use zlib ; then
+ args="${args} USE_ZLIB=1"
+ else
+ args="${args} USE_ZLIB="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ done
+ fi
+}
+
+src_install() {
+ dobin haproxy
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
+
+ # Don't install useless files
+# rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ dobin haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ dobin contrib/${contrib}/${contrib}
+ done
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${ROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.5.19-r1.ebuild b/net-proxy/haproxy/haproxy-1.5.19-r1.ebuild
new file mode 100644
index 000000000000..2b0bc8af0a4b
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.5.19-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic systemd
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="+crypt examples libressl +pcre pcre-jit ssl tools vim-syntax +zlib"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_compile() {
+ local args="TARGET=linux2628 USE_GETADDRINFO=1"
+
+ if use pcre ; then
+ args="${args} USE_PCRE=1"
+ if use pcre-jit; then
+ args="${args} USE_PCRE_JIT=1"
+ else
+ args="${args} USE_PCRE_JIT="
+ fi
+ else
+ args="${args} USE_PCRE= USE_PCRE_JIT="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
+# fi
+
+ if use crypt ; then
+ args="${args} USE_LIBCRYPT=1"
+ else
+ args="${args} USE_LIBCRYPT="
+ fi
+
+ if use ssl ; then
+ args="${args} USE_OPENSSL=1"
+ else
+ args="${args} USE_OPENSSL="
+ fi
+
+ if use zlib ; then
+ args="${args} USE_ZLIB=1"
+ else
+ args="${args} USE_ZLIB="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newinitd "${FILESDIR}/haproxy.initd-r5" haproxy
+
+ # Don't install useless files
+# rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ dobin contrib/${contrib}/${contrib}
+ done
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${ROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.6.11-r1.ebuild b/net-proxy/haproxy/haproxy-1.6.11-r1.ebuild
new file mode 100644
index 000000000000..06254314e424
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.6.11-r1.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="amd64 arm ppc x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
+ > contrib/systemd/haproxy.service || die
+
+ sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dobin haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN
+
+ doman doc/haproxy.1
+
+ dobin haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.6.13-r2.ebuild b/net-proxy/haproxy/haproxy-1.6.13-r2.ebuild
new file mode 100644
index 000000000000..5d3f45d2f516
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.6.13-r2.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild b/net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild
new file mode 100644
index 000000000000..43c58bdf5bc1
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.7.7.ebuild b/net-proxy/haproxy/haproxy-1.7.7.ebuild
new file mode 100644
index 000000000000..43c58bdf5bc1
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.7.7.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.7.8.ebuild b/net-proxy/haproxy/haproxy-1.7.8.ebuild
new file mode 100644
index 000000000000..43c58bdf5bc1
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.7.8.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.7.9.ebuild b/net-proxy/haproxy/haproxy-1.7.9.ebuild
new file mode 100644
index 000000000000..43c58bdf5bc1
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.7.9.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild b/net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild
new file mode 100644
index 000000000000..43c58bdf5bc1
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86"
+else
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
+ EGIT_BRANCH=master
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
+REQUIRED_USE="pcre-jit? ( pcre )
+ device-atlas? ( pcre )
+ ?? ( slz zlib )"
+
+DEPEND="
+ pcre? (
+ dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[zlib?] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ slz? ( dev-libs/libslz:= )
+ zlib? ( sys-libs/zlib )
+ lua? ( dev-lang/lua:5.3 )
+ device-atlas? ( dev-libs/device-atlas-api-c )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
+CONTRIBS=( halog iprange )
+# ip6range is present in 1.6, but broken.
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
+
+haproxy_use() {
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
+
+ usex "${1}" "USE_${2}=1" "USE_${2}="
+}
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+
+ if use net_ns; then
+ CONFIG_CHECK="~NET_NS"
+ linux-info_pkg_setup
+ fi
+}
+
+src_compile() {
+ local -a args=(
+ TARGET=linux2628
+ USE_GETADDRINFO=1
+ USE_TFO=1
+ )
+
+ args+=( $(haproxy_use crypt LIBCRYPT) )
+ args+=( $(haproxy_use net_ns NS) )
+ args+=( $(haproxy_use pcre PCRE) )
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) )
+ args+=( $(haproxy_use ssl OPENSSL) )
+ args+=( $(haproxy_use slz SLZ) )
+ args+=( $(haproxy_use zlib ZLIB) )
+ args+=( $(haproxy_use lua LUA) )
+ args+=( $(haproxy_use 51degrees 51DEGREES) )
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) )
+ args+=( $(haproxy_use wurfl WURFL) )
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ emake -C contrib/systemd SBINDIR=/usr/sbin
+
+ if use tools ; then
+ for contrib in ${CONTRIBS[@]} ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
+ done
+ fi
+}
+
+src_install() {
+ dosbin haproxy
+ dosym /usr/sbin/haproxy /usr/bin/haproxy
+
+ newconfd "${FILESDIR}/${PN}.confd" $PN
+ newinitd "${FILESDIR}/${PN}.initd-r5" $PN
+
+ doman doc/haproxy.1
+
+ dosbin haproxy-systemd-wrapper
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ einstalldocs
+
+ # The errorfiles are used by upstream defaults.
+ insinto /etc/haproxy/errors/
+ doins examples/errorfiles/*
+
+ if use doc; then
+ dodoc ROADMAP doc/*.txt
+ #if use lua; then
+ # TODO: doc/lua-api/
+ #fi
+ fi
+
+ if use tools ; then
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ dodoc examples/seamless_reload.txt
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
+ ewarn "Make use of them with the \"user\" and \"group\" directives."
+
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
+ einfo "Please consult the installed documentation for learning the configuration file's syntax."
+ einfo "The documentation and sample configuration files are installed here:"
+ einfo " ${EROOT}usr/share/doc/${PF}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/metadata.xml b/net-proxy/haproxy/metadata.xml
new file mode 100644
index 000000000000..ddb31ac2bb8b
--- /dev/null
+++ b/net-proxy/haproxy/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <longdescription>
+HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless, while still offering the possibility not to expose fragile web servers to the Net.
+
+It can:
+ - route HTTP requests depending on statically assigned cookies
+ - spread the load among several servers while assuring server persistence through the use of HTTP cookies
+ - switch to backup servers in the event a main one fails
+ - accept connections to special ports dedicated to service monitoring
+ - stop accepting connections without breaking existing ones
+ - add/modify/delete HTTP headers both ways
+ - block requests matching a particular pattern
+Its event-driven architecture allows it to easily handle thousands of simultaneous connections on hundreds of instances without risking the system's stability.
+ </longdescription>
+ <use>
+ <flag name="net_ns">Enable network namespace support (CONFIG_NET_NS)</flag>
+ <flag name="pcre-jit">Use JIT support for PCRE</flag>
+ <flag name="slz">Use <pkg>dev-libs/libslz</pkg> compression library</flag>
+ <flag name="tools">Install additional tools (halog, iprange)</flag>
+ <flag name="device-atlas">Use <pkg>dev-libs/device-atlas-api-c</pkg> library</flag>
+ <flag name="51degrees">Device Detection using 51 Degrees</flag>
+ <flag name="wurfl">Device Detection using WURFL</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-proxy/hatop/Manifest b/net-proxy/hatop/Manifest
new file mode 100644
index 000000000000..83f1d2738e0e
--- /dev/null
+++ b/net-proxy/hatop/Manifest
@@ -0,0 +1,5 @@
+DIST hatop-0.7.7.tar.gz 134143 SHA256 0b9fc1b84ce4e469a069e3a3c7c1b5eea10e6bb24bc66bd32af453acd54636ab SHA512 879de0e13af1d1c4e86be034066fb4bbc5c1700a30abebbfb1e1d524fb50cec0fa90fe160a7b7d00bf6aedd49ab7bb8fa1447f751fae95200e850ff506feb074 WHIRLPOOL cd19b4c80a4de8466ca05d182e76208782863084737b77ce90435c1a70d548a813694050fa2879bbad66013cff13218abf2a788ff3a8ad96bfda6dec22535b72
+EBUILD hatop-0.7.7.ebuild 655 SHA256 9e44c11fa69b295d3f8f4504bea43d44ee7fe1d4197904a4d7af0bb7757ba7ee SHA512 fb7fadaab0c86d6612f380df9388abb3da18392767d860de5b38b938c2a581d72302b88580d0de611df05ca709a874316b45918aeaf931bad80de773bbc38ab0 WHIRLPOOL 7db5ebd5aff41198889c56aae9bb4c3ed65bde1dc347f06b26ca6eefc8f704e3033377453226ba38b038b8aee7b339729851285d1b82625e71547a3ba7f1f8a8
+MISC ChangeLog 2495 SHA256 a5fe64f480656d8055bafc005c638ae97e6cf569950167073a889945f687849e SHA512 fae08f77f354efe08dcadcc26dd6fcb34459f819e5bf9404eeb94e5d1a4dde90fb054367a91a90c80447ba5b763d24631b3ee9e17f98aabb0600d4a0f5c8524d WHIRLPOOL 1bbd87e69a3cc6636eb9722a5e3d94cb93bb3c949c409711f1846d587a7084b9a247222b399b94d18d5530ad149a765c2ab2f2c3f155b5202d5cb48b3805b1e0
+MISC ChangeLog-2015 474 SHA256 c6ecc1fae5641e8345024de29c24d5a0ac4fea8f356bcb207a52f321b84b3ac7 SHA512 d3894d904f49960e9680b120688ecad9148b5c9db8f115a363aba321768bde7a2de8a073b547a02594a3270035f5c5411ffcf48ab3ee95e772a4e45fa1c24112 WHIRLPOOL a9d73f6cee972d24fc98a2dee692640a0df035ed62b0aebe46e8ad9093663c5cf90aa22ffd0dd55c8c8bd429983cbfe79c80a30f5b1415f6476ed1ceaf33dead
+MISC metadata.xml 249 SHA256 15c3b8c41a629764f3ac3005ca017fa7df49f48f540211a22549d7d2900ef03b SHA512 1723b9b2663814b898832e18aea1a02520775e545e256fb70a8829e2b0515e59b5abab985c995b9ae2f509d95ea4601ac0085ab0d1653cdda0ebe90f775f6e5b WHIRLPOOL 4fd539d6cb011d39a83d0c854c61363f15b2ae0fee1e9036056f384222307fc5910ab87429ace43bbe330b6a5156dbd41c32f80776ea56f3b35892a7ed84107d
diff --git a/net-proxy/hatop/hatop-0.7.7.ebuild b/net-proxy/hatop/hatop-0.7.7.ebuild
new file mode 100644
index 000000000000..f1114a42e99f
--- /dev/null
+++ b/net-proxy/hatop/hatop-0.7.7.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ncurses"
+
+inherit python-r1
+
+DESCRIPTION="Ncurses client and real-time monitoring and displaying of HAProxy status"
+HOMEPAGE="http://feurix.org/projects/hatop/"
+SRC_URI="https://hatop.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ net-proxy/haproxy"
+
+src_install() {
+ python_foreach_impl python_doscript bin/hatop
+
+ doman man/hatop.1
+
+ dodoc CHANGES KEYBINDS README
+}
diff --git a/net-proxy/hatop/metadata.xml b/net-proxy/hatop/metadata.xml
new file mode 100644
index 000000000000..5840601f180f
--- /dev/null
+++ b/net-proxy/hatop/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-proxy/havp/Manifest b/net-proxy/havp/Manifest
new file mode 100644
index 000000000000..e0379d9ee3f9
--- /dev/null
+++ b/net-proxy/havp/Manifest
@@ -0,0 +1,8 @@
+AUX havp-0.92a-pkg-config-libclamav.patch 1479 SHA256 2ce8013f62ee0c86724f5c6d72466dd7ba1ef17a1cd177c529cdb7a3266a37ee SHA512 b8466fb18e81a09da0a77a676526e13a65c55abe3aca465ebd058fb1ccbb94398e1b9d146b4c9049424e44ade073ea2b5af29234ccd15a153fe5cf3445aa14d4 WHIRLPOOL 143437ace33b0452126885d7b01fda451a7cdd185db6ce58ff4fe11b99a44789b9bddb7ff65c150924fa733bc76140e9c3364236005462c5e43bb36699e3ea26
+AUX havp-0.92a-run.patch 1084 SHA256 b5cfb56dd3324b5a931cb22b9b108c3b094120c7ebecd801fd16a0e0bf6ed490 SHA512 e8e213b635984ef67a81917fc33eb086d31400b009e657da0dc96bc4fc46659dd41ede9a4a809d7221a949564e38fbb613e649b45fb9555bc4989548eac993e6 WHIRLPOOL a1d6bcca6562f71fc4518fabf115accf37645f8450f66455dbaf4edd5abe885c88f009dfaef5bbaeb93f51ce2591b9afe8de6aeb04d5ef740a7c5764283b89ff
+AUX havp.initd 1523 SHA256 a4cc32c4813abd49a42a9a69f7de71b29637c21a479a809587f43d19a29d5305 SHA512 ada07f2c6037b101b4b9563b2b9056447520f5b30c59e0606e7f1641f5da097a8619672ff021faa6627d224d89a3242dd8130f22d56d835be913dbcb11f355d7 WHIRLPOOL a61a66c0ca9a61d00140a4723f11549a4607e882ec3d545688342609eb649607960228f1f391944a92ab232ee8a069e7b0c9827317b9e500fad408a1b5a68bf1
+DIST havp-0.92a.tar.gz 121987 SHA256 0dec86390b5738184aa7155af0c66dd00a97476fcd7377bcec8f1f0bf50f0e9a SHA512 3eb742519795a7d10520bdc1c78af0d3bf580a56e14f90bff9f519607a4e82cbf704372bd6da2fc05fcd436d580f4c226874d8df7770d22e2160b5d01afb9c62 WHIRLPOOL 9459d3bab10ed5a6b9053b72795f1e3729765665804fd01f5bae64170510a4427212357ff987cfbb4e93c9770702bb23d18d37dbfdfbc37958f16ff6890178f2
+EBUILD havp-0.92a-r2.ebuild 1817 SHA256 67d12a21ce5f04bd1c557ea369679ef939d0c1d2b550fe730c16cdec4d40ec70 SHA512 1294724855be37556111e8a1f1c5fc8143262f5e6c78014a4a538209008e49efbe01e22d4c972b37881ec6cc726b31b26bce7f93db832dd8b6e27b379cae7e2c WHIRLPOOL 45ebf8e6511d3a6effd12d8a9e320e1a181aeccd4e08f1a28855939f9cd2102191cda2d08ed3f07fb5c23d49a6813589074f93f33daea35a22b026a017cb4fd8
+MISC ChangeLog 3658 SHA256 20c958c7c7a325a89e63c2026f5f70f81db933413d42d6ea8f08e18323335013 SHA512 c905896e114959e50f8b9197286e44249ad1f9bffdb1255f96f41e1636f19a0fdb6140923107b7b7a2138c03178282e554f15e8aba89fbc19c88f4eb9963e6b4 WHIRLPOOL 52a0df57c79bfb757619aeb162c3aad02e7a53761c86e0dfa80fd07ec5338ec58d4334c67a12145d34aef55047d1e85413f422a1a273252b51c73ade65f181bd
+MISC ChangeLog-2015 7059 SHA256 b945e1eff59fce77f2ca459ded7f489f675c1231b3c3402b7ddab5cfe2a62e0c SHA512 dddf199c00ed4ebbbe12835d01113f8a3f19039e7409e6c318ec2ada50a89a661735f95e0e4df153c8ff9fa636d35465a739f2fda142d67ca4f0d8e2458b3ab1 WHIRLPOOL c1053fe81156fd0b0adfde253acac332731c46fff655465a6e3ba8bdb62d3dadbf3b9f6dfaed3be82a8647ba458b21b0f6e3e636a922f3b67b0a3844fa1900e7
+MISC metadata.xml 305 SHA256 cb324da2a04cac3bdbcd9846069f3ef4b2685b9339db4624fa47a4a463485e96 SHA512 9d35bba251c660db53dbb238edff0ac868f79d8101a3b2ea9e950593f5587f417d657c02c51afcb425195df40577403a4f1fac80ef474043e4dc21add9fd1c1e WHIRLPOOL e7fac86c8ad9448724681a3413eed89dccdd26550f33f7ea39403d10f6f519f0f8fcf218e3f862bb9b863e773fdbea5c9db7d4fcb22cedde192cdd29344d6d4f
diff --git a/net-proxy/havp/files/havp-0.92a-pkg-config-libclamav.patch b/net-proxy/havp/files/havp-0.92a-pkg-config-libclamav.patch
new file mode 100644
index 000000000000..ea761f7e3476
--- /dev/null
+++ b/net-proxy/havp/files/havp-0.92a-pkg-config-libclamav.patch
@@ -0,0 +1,66 @@
+--- a/configure.in
++++ b/configure.in
+@@ -5,6 +5,7 @@
+ unset CDPATH
+
+ AC_PROG_CXX
++PKG_PROG_PKG_CONFIG
+
+ AC_PREFIX_DEFAULT(/usr/local)
+
+@@ -83,48 +84,15 @@
+ AC_DEFINE(SSLTUNNEL)
+ fi
+
+-AC_MSG_CHECKING(for ClamAV scanner library)
+-
+ if test "$enable_clamav" = "yes"
+ then
+- clamprefix="`clamav-config --prefix 2>/dev/null`"
+- clamversion="`clamav-config --version 2>/dev/null`"
+-
+- if test "x$clamprefix" = "x"
+- then
+- AC_MSG_RESULT([clamav-config not found])
+-
+- echo ""
+- echo " Error finding ClamAV installation!"
+- echo " Add ClamAV binaries path to PATH and run configure again."
+- echo ""
+- echo " To disable ClamAV library support, use --disable-clamav."
+- echo ""
+-
+- exit 1
+- fi
+-
+- for cl in `clamav-config --cflags 2>/dev/null`; do
+- if test "x`echo $cl | perl -ne 'print if (/^-I/)' 2>/dev/null`" != "x"
+- then
+- CFLAGS="$CFLAGS $cl"
+- fi
+- done
+-
+- for cl in `clamav-config --libs 2>/dev/null`; do
+- if test "x`echo $cl | perl -ne 'print if (/(^-L|thread|c_r)/)' 2>/dev/null`" != "x"
+- then
+- LDFLAGS="$LDFLAGS $cl"
+- fi
+- done
+- LDFLAGS="$LDFLAGS -lclamav"
+-
+- SCANNEROBJECTS="clamlibscanner.o"
+- AC_DEFINE(USECLAMLIB)
+-
+- AC_MSG_RESULT([found $clamversion in $clamprefix])
+-else
+- AC_MSG_RESULT([disabled :-(])
++ PKG_CHECK_MODULES(clamav, libclamav,
++ [CFLAGS="$clamav_CFLAGS $CFLAGS"
++ LDFLAGS="$clamav_LIBS $LDFLAGS"
++
++ SCANNEROBJECTS="clamlibscanner.o"
++ AC_DEFINE(USECLAMLIB)
++ ])
+ fi
+
+ AC_MSG_CHECKING(for Trend Micro scanner)
diff --git a/net-proxy/havp/files/havp-0.92a-run.patch b/net-proxy/havp/files/havp-0.92a-run.patch
new file mode 100644
index 000000000000..d13761bee86d
--- /dev/null
+++ b/net-proxy/havp/files/havp-0.92a-run.patch
@@ -0,0 +1,51 @@
+--- a/etc/havp/havp.config.in
++++ b/etc/havp/havp.config.in
+@@ -39,7 +39,7 @@
+ # /etc/init.d/havp script requires this to work.
+ #
+ # Default:
+-# PIDFILE @localstatedir@/run/havp/havp.pid
++# PIDFILE /run/havp/havp.pid
+
+ #
+ # For performance reasons several instances of HAVP have to run.
+@@ -539,7 +539,7 @@
+ # Path to aveserver socket
+ #
+ # Default:
+-# AVESOCKET /var/run/aveserver
++# AVESOCKET /run/aveserver
+
+
+ #####
+@@ -551,7 +551,7 @@
+ # Path to sophie socket
+ #
+ # Default:
+-# SOPHIESOCKET /var/run/sophie
++# SOPHIESOCKET /run/sophie
+
+
+ #####
+@@ -600,7 +600,7 @@
+ # Path to avastd socket
+ #
+ # Default:
+-# AVASTSOCKET /var/run/avast4/local.sock
++# AVASTSOCKET /run/avast4/local.sock
+
+ # ..OR if you use avastd TCP socket, uncomment to enable use
+ #
+@@ -619,10 +619,10 @@
+
+ # Path to arcavird socket
+ #
+-# For version 2008, default socket is /var/run/arcad.ctl
++# For version 2008, default socket is /run/arcad.ctl
+ #
+ # Default:
+-# ARCAVIRSOCKET /var/run/arcavird.socket
++# ARCAVIRSOCKET /run/arcavird.socket
+
+ # Used Arcavir version
+ # 2007 = Version 2007 and earlier
diff --git a/net-proxy/havp/files/havp.initd b/net-proxy/havp/files/havp.initd
new file mode 100644
index 000000000000..1c42fca33a50
--- /dev/null
+++ b/net-proxy/havp/files/havp.initd
@@ -0,0 +1,59 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use clamd \
+ squid apache2 bfilter mman junkbuster oops polipo privoxy tinyproxy wwwoffled
+ #havp could be used in conjuction with any parent proxies enumerated above
+}
+
+get_havp_opt() {
+ eval HAVP_$1=`awk '/^[ \t]*'$1'[ \t]+/ { print $2; }' < /etc/havp/havp.config`
+}
+
+checkconfig() {
+ if [ ! -f /etc/havp/havp.config ] ; then
+ eerror "No /etc/havp/havp.config file exists!"
+ return 1
+ fi
+
+ local HAVP_USER
+ get_havp_opt USER
+ if [ -n "${HAVP_USER}" ] && ! getent passwd ${HAVP_USER} > /dev/null ; then
+ eerror "${HAVP_USER} user is missing!"
+ return 1
+ fi
+ local HAVP_GROUP
+ get_havp_opt GROUP
+ if [ -n "${HAVP_GROUP}" ] && ! getent group ${HAVP_GROUP} > /dev/null ; then
+ eerror "${HAVP_GROUP} group is missing!"
+ return 1
+ fi
+}
+
+
+start() {
+ checkconfig || return 1
+
+ checkpath --directory \
+ --owner "${HAVP_USER:-havp}:${HAVP_GROUP:-havp}" --mode 0755 /run/havp
+ checkpath --directory \
+ --owner "${HAVP_USER:-havp}:${HAVP_GROUP:-havp}" --mode 0700 /var/log/havp
+ checkpath --directory \
+ --owner "${HAVP_USER:-havp}:${HAVP_GROUP:-havp}" --mode 0750 /var/tmp/havp
+
+ ebegin "Starting HTTP AntiVirus Proxy"
+ start-stop-daemon --start --exec /usr/sbin/havp > /dev/null
+ eend $?
+}
+
+stop() {
+ local HAVP_PIDFILE
+ get_havp_opt PIDFILE
+
+ ebegin "Stopping HTTP AntiVirus Proxy"
+ start-stop-daemon --stop --pidfile=${HAVD_PIDFILE:-/var/run/havp/havp.pid}
+ eend $?
+}
diff --git a/net-proxy/havp/havp-0.92a-r2.ebuild b/net-proxy/havp/havp-0.92a-r2.ebuild
new file mode 100644
index 000000000000..973a5a81aee3
--- /dev/null
+++ b/net-proxy/havp/havp-0.92a-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs user
+
+DESCRIPTION="HTTP AntiVirus Proxy"
+HOMEPAGE="http://www.server-side.de/"
+SRC_URI="http://www.server-side.de/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="clamav ssl"
+
+DEPEND="clamav? ( >=app-antivirus/clamav-0.98.5 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /etc/${PN} ${PN}
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.92a-run.patch \
+ "${FILESDIR}"/${P}-pkg-config-libclamav.patch
+
+ sed -i configure.in -e '/^CFLAGS=/d' || die
+ mv configure.{in,ac} || die
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+ export CFLAGS="${CXXFLAGS}"
+ econf \
+ $(use_enable clamav) \
+ $(use_enable ssl ssl-tunnel) \
+ --localstatedir=/var
+}
+
+src_install() {
+ dosbin ${PN}/${PN}
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+ insinto /etc
+ rm -r etc/${PN}/${PN}.config.in
+ doins -r etc/${PN}
+
+ dodoc ChangeLog
+}
+
+pkg_postinst() {
+ ewarn "/var/tmp/${PN} must be on a filesystem with mandatory locks!"
+ ewarn "You should add \"mand\" to the mount options on the relevant line in /etc/fstab."
+
+ if use ssl; then
+ echo
+ ewarn "Note: ssl USE flag only enable SSL pass-through, which means that"
+ ewarn " HTTPS pages will not be scanned for viruses!"
+ ewarn " It is impossible to decrypt data sent through SSL connections without knowing"
+ ewarn " the private key of the used certificate."
+ fi
+
+ if use clamav; then
+ echo
+ ewarn "If you plan to use clamav daemon, you should make sure clamav user can read"
+ ewarn "/var/tmp/${PN} content. This can be accomplished by enabling AllowSupplementaryGroups"
+ ewarn "in /etc/clamd.conf and adding clamav user to the ${PN} group."
+ fi
+}
diff --git a/net-proxy/havp/metadata.xml b/net-proxy/havp/metadata.xml
new file mode 100644
index 000000000000..e7c14ea86ed6
--- /dev/null
+++ b/net-proxy/havp/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus
+filter. It does not cache or filter content.</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest
new file mode 100644
index 000000000000..07a92b4610be
--- /dev/null
+++ b/net-proxy/http-replicator/Manifest
@@ -0,0 +1,19 @@
+AUX http-replicator-3-missing-directory.patch 1776 SHA256 dcdc81cb7d74c5c3c7a7c0e2f3b82d9bd1fd38898c24b8f4a4e2928b1b65cf43 SHA512 8c4d9f563bb73ee2b237fadc7c062c8cfbc1510c9f7fc597974fbc727f61fffc9b3d79285904fcac755dc12c7603d7d4efd1d25978df6ddfc797b44c6c17570b WHIRLPOOL 5d4fe55d3a7d0e866717e8c73173a0f1865aa0316577cda97026c7b3459ca7d733bca10dff9a644f603fa030a8012ba74e8d15f1f280c04ae1c18d54fc0dda95
+AUX http-replicator-3-unique-cache-name.patch 1195 SHA256 645dd17eb3b912fc25cf0e35bc3ef8210e867141097d758a0b781b701ffdfa26 SHA512 c1fd6d4c5e7dee1e58b6289dee5b7aa97c577ccf0099b02dc99b6a80a64b25f5e2f5321563fac9fa86beeb51b77edce321b9997144a0bf23104560577b857291 WHIRLPOOL 8693410836440daf98342ded73b304a01c42ca230b5b494b67639c0e334b5ea0c2dc91301cedf683ab55b5eeb470922222ad61b23e5d007561241c37f7cd38f7
+AUX http-replicator-3.0-callrepcacheman-0.1 86 SHA256 9f7cff787b49eb8cb6ca4581c77167b305a766785a0897ee663ca94cf3aa97fd SHA512 144490fd854e22fce95e6a6891a3e65e8af001b5e421bec39b20ee4cf39709424a922f7852bf48ecf43b5b9755213e7149a2a3784bbc3a3e5542072d8d3bda3d WHIRLPOOL e458e78e85add1410ebb17900cadebff03fc5f641f628d070920bd4ecb6e361ec73964ea47ad71bbe017a2a4cea0324b63ec25f54d360250fab01b9b8c44f99c
+AUX http-replicator-3.0-repcacheman-0.44-r2 5337 SHA256 173c59c14f3a7c3a143e33b98a408e46f27cbc361ccd9f28bd47187b7ff55a04 SHA512 c917d47327a55699deb346e53aef1ba9a5eda81f6947ac4efe8422422a2cba668a3ed12c0f89bf840e4ad94dd6272b3d6eb705d1e78e58ddef90b21307ff8d15 WHIRLPOOL 940771cb19da1bf7fb6c1e6e175a338a0454d939407e89c14be1e8b72550582cf4e55fcf2b7787bf8e4ebac38f1665d7ae209e8270946f25df6c66d69bb35a16
+AUX http-replicator-3.0-sighup.patch 993 SHA256 eccf5e7b0e77906624a83214c5e652bc8cce463ddf7365ab9b13302dfb2ff352 SHA512 25da23acd8c235f2b0dbe2f424a92a161d3f4e96e5bea67973004c7bb0642640b73d528b1675174a611bef35f34cc18de08d78c3464cb6080f4f44f833173aee WHIRLPOOL 38156ba01bace9dc0279e3888c917b474b59132e1c0525ed6be7eae68baeca3c558ff861265de1899fc65718e0628697a2718560ea076580ad5c229dcd6ee11f
+AUX http-replicator-3.0.conf 1704 SHA256 8b6acbf87ffbda0cdb51167ab2bd6a665374c553fe52fe2717d8be03e0e7cb65 SHA512 c56031c303f79a44a006781b3796abaae24f1b8ea368eb0436a7ada8defe0f92382649098aef7c41372bfbf1889a17468af201669756912e0c55985c5981fb4c WHIRLPOOL fda8e01350b9849e37a11a9fc973750682d194aa267fb7e7ea2fb28c9533643f4d2c57f15560e03f4a2698b7d2db7edaf1d99dd66bb38ce2494c3b32c26729a5
+AUX http-replicator-3.0.init 620 SHA256 d6c3c661cb60c85f3b3867da1b35173f5de18e1c3595a995ce04e8fe8b91784a SHA512 e69143963155cdc03874b51dc0eef8a46bee3d7828bf20bdb50b4ea9ea6bb2e4fd705e1d9ee4864e53488e4035aa91ebd47f02a597bfa1ee6d5b7121ac5fd68d WHIRLPOOL 4b986f373dbd24d4d14d6f5803178e6fc5d3eba4bf9681a9919b811b6396f8524f302074f49f5291b49160985769dfee6c873468801cfeff6b54e0af3f641db9
+AUX http-replicator-4.0_alpha2-r2.conf 1440 SHA256 ebe9c43263d805265759768b8aab6272c31be1756367115bccfc2760be15f165 SHA512 e6237c8b7eeb319615d45abdef4feaca6bbeb741bc75e80173e42328e4eb5f4192edfbf42c7e6e307c14d258e7ec67a0ae6451ff7daef631b2d1e39fe17a48fb WHIRLPOOL 82180cfecab96751a27b3166e58a858fb5fd49fa72e73de23709665504a99de9151c2d8a6cdf437270b49ea7e32499881b909aa901e8b09ba302c555ef1c121f
+AUX http-replicator-4.0_alpha2-r3-pid.patch 2681 SHA256 e2119798eda31b010067adfccd7aab5c415785b8b2ec79f28e5ca43d204a7ce6 SHA512 9ceb6ede3ec31fd7f702ac77a51897301fd7b16baee869a82180f388949ff7388f0917d667786b45643603c0e9d655cd8686948d5e34896c1fe5932fd76e42b5 WHIRLPOOL f0b7a0918190de2ced9e2d0880a837d696a44e79825175db13aef5b74dc5e9e26595e2de201797bf3d99c33645ff0a3012e6c3c13f28fa632589fbc66b973139
+AUX http-replicator-4.0_alpha2-r3.init 644 SHA256 4228da9fb0c607595f8d9d2270e3263ebf1c6736bcd2e267b6c5221157761603 SHA512 b1a8bd956d35cc536b835aac6cb82202f0b6b775d7eae81ac30f501d1c72877d093711e0f00a28eb7645a383e211d3196379b37da1e0421773c1b91ed6d3837b WHIRLPOOL a87735fc635e1764b1249852b5edaf9b65dafae615883ac7a407528978e287c94bef1fc1cce68592d524c66347b40b95a26bee67ae055b75b2fb1d1b7be5de4f
+AUX http-replicator.service 258 SHA256 15727e6d3de285a5b02e508cc7cfe9295c9cb0830f7ecd2dd33b594050e17b7c SHA512 0da767205c21c226563eb2210a12d92d7933431245fad9bf8766eda59b1f4a16905cadcfb796b3aef86978eb06b153eb976b12f4f7e19d468654c1722e266352 WHIRLPOOL 63184f4fd4f80ceb281524f19219543c2f26458f0e68845dcce6124cdabf344d5689b068d4ca7f8d2bcc363967d0e5c46838cc8ae8d54aa1a76666d32a95bfcd
+AUX http-replicator.service.conf 164 SHA256 a551cec799cb26f1ab3162feb3b09ea755390e8c80809981c0ff951bfd802e60 SHA512 0a1854ddb9f5b8631bdf6a837f1c91b895652803b3e1b6b98fba8f67dba0488a61f8864ddd4128d8072353a38349d9848e91a5109b317c37e1ca2598d0ac2333 WHIRLPOOL 04a2fd478bebb9dbec03b633e9812eadd945a05f65198e66a38cf6f686e0bb02d875a369bf29926c038448c784bac8c72c14467ac3a38c627ba066ab823df4e3
+DIST http-replicator_3.0.tar.gz 39291 SHA256 cd5b2c8b4b6da4fd5a9313cd5e7d4179805002f2de5fd25a42301df4f5bd161e SHA512 d98a608c38201db6f2d8ba809a4777ab5588f5ed395882bdf542c2788df1770c61a2de160604c09297d847f2c73463ba0530d7f2c2e482467f8e8f35be068d57 WHIRLPOOL 965524243895a6a00df3b4be3bae391bc532f3ccef87383a487c87efbcd858aa1a2d15598be752b7640e57aef47ab7cbaad8430033925935f16a527aa50db36a
+DIST http-replicator_4.0alpha2.tgz 27575 SHA256 43f466b691244104caba96fd16df75978731ea248ad1681beaf88342a708875a SHA512 437e0cc881af0cb8f84bfd1366bb6edeee4f76112c4b2ac2af4bcb8809462852b96e9c99e04c8f370492c9e1eb33ddc68a85c4f09b073694242cd6c05b4d3a6c WHIRLPOOL 599d2ee6bab4ffb4792913763b303da3a473dee2aa15510ceee32d042e54abdb49a902eee3346c4c735c97169e11fcd2340e7c741e160500c4a6bbd064a57561
+EBUILD http-replicator-3.0-r7.ebuild 3443 SHA256 7f977fa17ebfb957ed67d2b91daa8c94562e3d54286668226e0f8776b05a321d SHA512 f2fca6973f801d66755cc5f79d19e44cab08d70211739d5cf0e8f4d25c66893afe79ca9126a8091477dbca75cfa797b334b6e11d236396c4505060ddbcf8a538 WHIRLPOOL 5a31f078a36abc6fd24465e5f05c060afdea97380121bb4a17440725740af6c29fbd14182ed2f46d6e39ed0c17d560c252efafffad21c5e580645987593e6ab4
+EBUILD http-replicator-4.0_alpha2-r5.ebuild 1992 SHA256 a464ec1298f210d683dc714c89865b753dd6041d14f912c8f06b2cf8012b3bac SHA512 2ced4476b701ddb536ec732f7623d22bd921510828706f25872411e26371ed9382836b24e49664bfff95725d9419228c25cccd28149dfcccb4c216db0d45faa5 WHIRLPOOL 44154225c5e7f7aec4108b16f4e471f7938dc829afe43b84fae567bfedf94b85966149869d55348e857976c41a639b64a7a4134086e9429594d49b7f8d4c65f0
+MISC ChangeLog 6335 SHA256 6c18e4342546eca9b89fa3d9e72a0824b5ec063822d5e6cb473fa0170285eec2 SHA512 f13422cb14471353b0f7343652bf8aba0a73fc1e24e40ba654d9773ec0af00f717dc56274204ed9d77afb7c2f5a4ddc3315b84949de8a43197aff6ff53b9f730 WHIRLPOOL 8ae1c8f72ad74c8b8f76293ed946746eb70470664d919da301e24c266d6adfe3b6cdc067158fac74fa711a7fe218a34479b6290f0a3d8a47c09451cb953acf54
+MISC ChangeLog-2015 8960 SHA256 41cc5036eaad8ca6dfaee2ca33d2f29b43a601e7bcda806abca3e9f5b9daa78c SHA512 873a92329da5dd7323f7ab3cf2bc99624b204b99c6e78dff782d085d46e54bab16ef774d3a5d6176f1145a89d8bec251138e1751b817b69ca691800fefcca323 WHIRLPOOL c3e087bc31fffafcd3fd70f2278f07eea5eb4e7e9c65dc4526b0f3b30b54cbe852632864da4f7f0205cef68ec6e947e8277971c47f270134d4abe805b9aa1acc
+MISC metadata.xml 252 SHA256 af2fcb49553ecf1eb6475b09a5f4c4739d6a2a8f80225e8e0569406ae8bd8db9 SHA512 ffd7c4cd77545f753618c9e9cfeba05b557044879ce332c01deaad820e184329cf383c8488ba777e9653029d3f75e5c99936ca225ebc4a5fb9b4d4e257ba8e7d WHIRLPOOL de2d8abdfe58955e89f9824fadbe89751ec5c6ba4fd2796054f3746904fb565369e9f1e5deb0228f0c0ea816848367ba54f7a7d4e552253fbc3267729b76e0a3
diff --git a/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch b/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch
new file mode 100644
index 000000000000..37c2ce2361f3
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch
@@ -0,0 +1,51 @@
+Author: Matthew Ogilvie
+Date: Sat Jan 17 09:24:34 2015 -0700
+
+ add some suggestions to the missing-directory error message
+
+ Also wait until directory confirmed before forking.
+
+ See gentoo bug 502574 and bug 442874
+
+diff --git a/http-replicator b/http-replicator
+index bbc163c..81e254d 100755
+--- a/http-replicator
++++ b/http-replicator
+@@ -636,13 +636,6 @@ def main ():
+ parser.error('user %r does not exist' % options.user)
+ except OSError:
+ parser.error('no permission for changing to user %r' % options.user)
+- pid = os.fork() # fork process
+- if pid: # parent process
+- pidfile.write(str(pid)) # store child's pid
+- pidfile.close()
+- return
+- else:
+- signal.signal(signal.SIGHUP, signal.SIG_IGN)
+ else:
+ handler = logging.StreamHandler(sys.stdout) # log to stdout
+ handler.setFormatter(logging.Formatter('%(levelname)s: %(name)s %(message)s'))
+@@ -651,10 +644,22 @@ def main ():
+ try:
+ os.chdir(options.dir) # change to cache directory
+ except OSError:
+- parser.error('invalid directory %r' % options.dir)
++ parser.error('invalid directory %r\n' \
++ 'Try running repcacheman, and/or see\n' \
++ 'http://forums.gentoo.org/viewtopic-t-173226.html' \
++ % options.dir)
+ if not os.access(os.curdir, os.R_OK | os.W_OK): # check permissions for cache directory
+ parser.error('no read/write permission for directory %r' % options.dir)
+
++ if options.daemon:
++ pid = os.fork() # fork process
++ if pid: # parent process
++ pidfile.write(str(pid)) # store child's pid
++ pidfile.close()
++ return
++ else:
++ signal.signal(signal.SIGHUP, signal.SIG_IGN)
++
+ sys.stdout = sys.stderr = open('/dev/null', 'w') # redirect all output to bit bucket
+ logging.root.name = 'HttpReplicator'
+ try:
diff --git a/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch b/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch
new file mode 100644
index 000000000000..3ad0529ed16a
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch
@@ -0,0 +1,31 @@
+Author: Matthew Ogilvie
+Date: Sun Dec 28 20:14:15 2014 -0700
+
+ honor x-unique-cache-name header in flat mode, if present
+
+ This allows things like different versions of the adobe-flash
+ downloader that are given different names in a flat download
+ directory (like in gentoo) to work in an http-replicator cache
+ as well. As long as the fetcher passes the custom name through
+ the experimental header...
+
+ See gentoo bug # 442874
+
+diff --git a/http-replicator b/http-replicator
+index 19ae427..befe9f2 100755
+--- a/http-replicator
++++ b/http-replicator
+@@ -311,7 +311,12 @@ class HttpClient (Http):
+ self.log.info('requested range: bytes %s to %s' % self.range) # log request
+
+ head = ''
+- for tail in self.path.split('/'): # iterate over items in path
++ adjUrlPath = self.path
++ if not self.direct and self.flat:
++ uniqueCacheName = body.get('x-unique-cache-name')
++ if uniqueCacheName:
++ adjUrlPath = uniqueCacheName
++ for tail in adjUrlPath.split('/'): # iterate over items in path
+ head = os.path.join(head, tail) # build target path
+ if head in self.alias: # path up till now hos an alias
+ head = self.alias[head] # replace by alias
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1 b/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1
new file mode 100644
index 000000000000..14cd0a70a53b
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1
@@ -0,0 +1,3 @@
+#! /bin/bash
+source /etc/conf.d/http-replicator
+/usr/bin/repcacheman.py $GENERAL_OPTS
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2 b/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2
new file mode 100644
index 000000000000..35d0a9e39fa2
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2
@@ -0,0 +1,201 @@
+#! /usr/bin/python
+#
+# repcacheman ver 0.44
+#
+# Cache Manager for Http-Replicator
+# deletes duplicate files in PORTDIR.
+# imports authenticated (checksum + listed in portage)
+# files from PORTDIR to replicator's cache directory.
+#
+# Uses portage to perform checksum and database functions.
+# All else, Copyright(C)2004-2007 Tom Poplawski (poplawtm@earthlink.net)
+# Distributed under the terms of the GNU General Public License v2
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+import portage.manifest
+import portage.checksum
+import portage.exception
+import portage
+import string
+import os
+import pwd,sys,optparse
+
+if os.getuid():
+ print"Must be root"
+ sys.exit(1)
+
+# Parse Options
+
+parser = optparse.OptionParser()
+parser.add_option('-d', '--dir', type='string', default="/var/cache/http-replicator", help='http-replicators cache DIR')
+parser.add_option('-u','--user', type='string', default="portage", help='http-replicator USER')
+options, args = parser.parse_args() # parse command line
+
+if options.user:
+ try:
+ uid=pwd.getpwnam(options.user)[2]
+ gid=pwd.getpwnam(options.user)[3]
+ except:
+ print "User \'" + options.user + "\' Doesn't exist on system - edit config or add user to system."
+ sys.exit(1)
+else:
+ print "Error\n\tunable to get USER from /etc/http-replicator.conf"
+ sys.exit(1)
+
+# dir is replicator's cache directory
+dir=options.dir+"/"
+
+if os.path.isdir(dir) :
+ newdir=0
+else :
+ print"\n\nBegin Http-Replicator Setup...."
+ try:
+ os.makedirs(dir)
+ print "\tcreated " + dir
+ newdir=1
+ except:
+ print "\tcreate " + dir + " failed"
+ print '\terror:', sys.exc_info()[1]
+ sys.exit(1)
+ try:
+ os.chown(dir,uid,gid)
+ print "\tchanged owner of " + dir + " to " + options.user
+ except:
+ print "\tchange owner " + dir + " to " + options.user + " failed:"
+ print '\terror:', sys.exc_info()[1]
+
+print "\n\nReplicator's cache directory: " + dir
+
+# Import Portage settings
+
+distdir=portage.settings["DISTDIR"]+"/"
+if distdir:
+ print "Portage's DISTDIR: " + distdir
+else:
+ print"Unable to get Portage's DISTDIR"
+ sys.exit(1)
+
+# Start Work
+
+print "\nComparing directories...."
+
+# Create filecmp object
+import filecmp
+dc=filecmp.dircmp (distdir,dir,['cvs-src','git-src','hg-src','egit-src','.locks'])
+print "Done!"
+
+dupes=dc.common
+deleted=0
+
+if dupes:
+ print "\nDeleting duplicate file(s) in " + distdir
+
+ for s in dupes:
+ print s
+ try:
+ os.remove(distdir + s )
+ deleted +=1
+ except:
+ print "\tdelete " + distdir + s + " failed:"
+ print '\terror:', sys.exc_info()[1]
+
+ print "Done!"
+
+
+newfiles=dc.left_only
+nf=len(dc.left_only)
+
+if nf:
+ print "\nNew files in DISTDIR:"
+ for s in newfiles:
+ print s
+ print"\nChecking authenticity and integrity of new files..."
+ added=0
+ errors=0
+ badsum=0
+
+# search all packages
+
+ for mycp in portage.db["/"]["porttree"].dbapi.cp_all():
+ manifest = portage.manifest.Manifest("/usr/portage/" + mycp , distdir)
+ if manifest == None:
+ portage.writemsg("Missing manifest: %s\n" % mycpv)
+
+ remove=[]
+ for file in newfiles:
+ if manifest.hasFile("DIST",file):
+ try:
+ myok, myreason = manifest.checkFileHashes("DIST",file)
+
+ try:
+ os.rename(distdir+file,dir+file)
+ added += 1
+ except:
+ try:
+ import shutil
+ shutil.copyfile(distdir+file,dir+file)
+ added += 1
+ os.remove(distdir+file)
+ except:
+ print "\tmove/copy " + file + " failed:"
+ print '\terror:', sys.exc_info()[1]
+ errors+=1
+
+ try:
+ os.chown(dir+file,uid,gid)
+ except:
+ print "\tchown " + file + " failed:"
+ print '\terror:', sys.exc_info()[1]
+ errors +=1
+
+ remove.append( file )
+
+ except portage.exception.DigestException, e:
+ print("\n!!! Digest verification failed:")
+ print("!!! %s" % e.value[0])
+ print("!!! Reason: %s" % e.value[1])
+ print("!!! Got: %s" % e.value[2])
+ print("!!! Expected: %s" % e.value[3])
+ badsum+=1
+ if remove:
+ for rf in remove:
+ newfiles.remove ( rf )
+
+
+print "\nSUMMARY:"
+print "Found " + str(len(dupes)) + " duplicate file(s)"
+if deleted:
+ print "\tDeleted " + str(deleted) + " dupe(s)"
+
+if nf:
+ print "Found " + str(nf) + " new file(s)"
+ print "\tAdded " + str(added) + " of those file(s) to the cache"
+
+ print "Rejected " +str(len(newfiles)) + " File(s) - ",
+ print str(badsum) + " failed checksum(s)"
+ for s in newfiles:
+ print "\t%s" %s
+ if errors:
+ print "Encountered " +str(errors) + " errors"
+# if badsum:
+# print str(badsum) + " partial/corrupted file(s)"
+
+if newdir:
+ print"\n\nexecute:\n/etc/init.d/http-replicator start"
+ print"to run http-replicator.\n\nexecute:\nrc-update add http-replicator default"
+ print"to make http-replicator start at boot"
+ print"\n\nexecute:\n/usr/bin/repcacheman\nafter emerge's on the server to delete"
+ print"dup files and add new files to the cache"
+
+print "\n\nHTTP-Replicator requires you delete any partial downloads in " + distdir
+print "run rm -f " + distdir +'*'
+
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch b/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch
new file mode 100644
index 000000000000..969bbc91f9da
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch
@@ -0,0 +1,20 @@
+--- a/http-replicator 2007-07-09 20:09:44.000000000 +0200
++++ b/http-replicator 2007-07-09 20:11:48.433913445 +0200
+@@ -5,7 +5,7 @@
+ # Because of this the server runs as a single process, multiplexing I/O with its various client and server connections within a single process/thread.
+ # According to the readme <http://www.nightmare.com/medusa/README.html> this means it is capable of smoother and higher performance than most other servers, while placing a dramatically reduced load on the server machine.
+
+-import asyncore, socket, os, time, calendar, sys, re, optparse, logging
++import asyncore, socket, os, time, calendar, sys, re, optparse, logging, signal
+
+ # LISTENER
+ #
+@@ -636,6 +636,8 @@
+ pidfile.write(str(pid)) # store child's pid
+ pidfile.close()
+ return
++ else:
++ signal.signal(signal.SIGHUP, signal.SIG_IGN)
+ else:
+ handler = logging.StreamHandler(sys.stdout) # log to stdout
+ handler.setFormatter(logging.Formatter('%(levelname)s: %(name)s %(message)s'))
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.conf b/net-proxy/http-replicator/files/http-replicator-3.0.conf
new file mode 100644
index 000000000000..35671fd262c0
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0.conf
@@ -0,0 +1,46 @@
+## Config file for http-replicator
+## sourced by init scripts automatically
+## GENERAL_OPTS used by repcacheman
+## DAEMON_OPTS used by http-replicator
+
+
+## Set the cache dir
+GENERAL_OPTS="--dir /var/cache/http-replicator"
+
+## Change UID/GID to user after opening the log and pid file.
+## 'user' must have read/write access to cache dir:
+GENERAL_OPTS="$GENERAL_OPTS --user portage"
+
+## Don't change or comment this out:
+DAEMON_OPTS="$GENERAL_OPTS"
+
+## Do you need a proxy to reach the internet?
+## This will forward requests to an external proxy server:
+## Use one of the following, not both:
+#DAEMON_OPTS="$DAEMON_OPTS --external somehost:1234"
+#DAEMON_OPTS="$DAEMON_OPTS --external username:password@host:port"
+
+## Local dir to serve clients. Great for serving binary packages
+## See PKDIR and PORTAGE_BINHOST settings in 'man make.conf'
+## --alias /path/to/serve:location will make /path/to/serve
+## browsable at http://http-replicator.com:port/location
+DAEMON_OPTS="$DAEMON_OPTS --alias /usr/portage/packages:packages"
+
+## Dir to hold the log file:
+DAEMON_OPTS="$DAEMON_OPTS --log /var/log/http-replicator.log"
+
+## Make the log messages less and less verbose.
+## Up to four times to make it extremely quiet.
+#DAEMON_OPTS="$DAEMON_OPTS --quiet"
+#DAEMON_OPTS="$DAEMON_OPTS --quiet"
+
+## Make the log messages extra verbose for debugging.
+#DAEMON_OPTS="$DAEMON_OPTS --debug"
+
+## The ip addresses from which access is allowed. Can be used as many times
+## as necessary. Access from localhost is allowed by default.
+DAEMON_OPTS="$DAEMON_OPTS --ip 192.168.*.*"
+DAEMON_OPTS="$DAEMON_OPTS --ip 10.*.*.*"
+
+## The proxy port on which the server listens for http requests:
+DAEMON_OPTS="$DAEMON_OPTS --port 8080"
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.init b/net-proxy/http-replicator/files/http-replicator-3.0.init
new file mode 100644
index 000000000000..7fc3d5e108da
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0.init
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Http-Replicator"
+ start-stop-daemon --start --pidfile /var/run/http-replicator.pid --name http-replicator \
+ --exec /usr/bin/http-replicator -- -s -f --pid /var/run/http-replicator.pid --daemon $DAEMON_OPTS
+ eend $? "Failed to start Http-Replicator"
+}
+
+stop() {
+ ebegin "Stopping Http-Replicator"
+ start-stop-daemon --stop --pidfile /var/run/http-replicator.pid --name http-replicator --signal 2
+ eend $? "Failed to stop Http-Replicator"
+}
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf
new file mode 100644
index 000000000000..cea7c9632a34
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf
@@ -0,0 +1,46 @@
+## Configuration file for HTTP Replicator automatically sourced by init script.
+
+#################
+## REPCACHEMAN ##
+#################
+
+## Set the cache dir.
+GENERAL_OPTS="--dir /var/cache/http-replicator/"
+
+## Change UID/GID to user after opening the log and pid file.
+## 'user' must have read/write access to cache dir.
+GENERAL_OPTS="$GENERAL_OPTS --user portage"
+
+#####################
+## HTTP-REPLICATOR ##
+#####################
+
+## Specify which file to log too, use /dev/null to disable.
+LOG_FILE="/var/log/http-replicator.log"
+
+# Set cache root directory.
+DAEMON_OPTS="--root /var/cache/http-replicator/"
+
+## Try IPv6 addresses if available.
+# DAEMON_OPTS="$DAEMON_OPTS --ipv6"
+
+## The proxy port on which the server listens for http requests, default 8080.
+# DAEMON_OPTS="$DAEMON_OPTS --port 8080"
+
+## Break connection after so many seconds of inactivity, default 15.
+# DAEMON_OPTS="$DAEMON_OPTS --timeout 15"
+
+## Limit download rate at a fixed K/s.
+# DAEMON_OPTS="$DAEMON_OPTS --limit RATE"
+
+## Do you need the proxy to work offline, never connecting to a server?
+# DAEMON_OPTS="$DAEMON_OPTS --offline"
+
+## Show http headers and other info in log messages.
+# DAEMON_OPTS="$DAEMON_OPTS --verbose"
+
+## Switch from gather to debug output module.
+# DAEMON_OPTS="$DAEMON_OPTS --debug"
+
+## More options (eg --flat and --static) are listed in `http-replicator --help`,
+## the --daemon parameter is automatically passed by the init script. \ No newline at end of file
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch
new file mode 100644
index 000000000000..a1cf5eddbfcb
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch
@@ -0,0 +1,101 @@
+Bring back the --pid functionality of 3.x, needed for our init script.
+
+Patch contributed by Nikita Kozlov (klnikita / klnikita_ on IRC).
+
+Slight adjustments made to use --pid instead of --pidfile and reordered --help.
+
+URL: https://dpaste.org/Menvq/
+BUG: https://bugs.gentoo.org/show_bug.cgi?id=472422
+
+--- a/fiber.py
++++ b/fiber.py
+@@ -136,11 +136,13 @@
+ self.__stdout.flush()
+ self.__newline = string.endswith( '\n' )
+
+
+-def fork( output ):
++def fork( output, pidfile ):
+
+ try:
++ if pidfile:
++ pidout = open(pidfile, 'w') # open pid file for writing
+ log = open( output, 'w' )
+ nul = open( '/dev/null', 'r' )
+ pid = os.fork()
+ except IOError, e:
+@@ -166,17 +168,20 @@
+ print 'error:', e
+ sys.exit( 1 )
+
+ if pid:
++ if pidfile:
++ pidout.write(str(pid))
++ pidout.close()
+ print pid
+ sys.exit( 0 )
+
+ os.dup2( log.fileno(), sys.stdout.fileno() )
+ os.dup2( log.fileno(), sys.stderr.fileno() )
+ os.dup2( nul.fileno(), sys.stdin.fileno() )
+
+
+-def spawn( generator, port, debug, log ):
++def spawn( generator, port, debug, log, pidfile ):
+
+ try:
+ listener = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
+ listener.setblocking( 0 )
+@@ -187,9 +192,9 @@
+ print 'error: failed to create socket:', e
+ sys.exit( 1 )
+
+ if log:
+- fork( log )
++ fork( log, pidfile )
+
+ if debug:
+ myFiber = DebugFiber
+ else:
+--- a/http-replicator
++++ b/http-replicator
+@@ -59,5 +59,5 @@
+
+ print 'Transaction successfully completed'
+
+
+-fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG )
++fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG, Params.PIDFILE )
+--- a/Params.py
++++ b/Params.py
+@@ -6,8 +6,9 @@
+ PORT = 8080
+ ROOT = os.getcwd() + os.sep
+ VERBOSE = 0
+ TIMEOUT = 15
++PIDFILE = False
+ FAMILY = socket.AF_INET
+ FLAT = False
+ STATIC = False
+ ONLINE = True
+@@ -21,8 +22,9 @@
+
+ options:
++ --pid FILE write process ID to FILE
+ -h --help show this help message and exit
+ -p --port PORT listen on this port for incoming connections, default %(PORT)i
+ -r --root DIR set cache root directory, default current: %(ROOT)s
+ -v --verbose show http headers and other info
+ -t --timeout SEC break connection after so many seconds of inactivity, default %(TIMEOUT)i
+ -6 --ipv6 try ipv6 addresses if available
+@@ -74,8 +76,10 @@
+ except:
+ sys.exit( 'Error: %s requires a numerical argument' % _arg )
+ elif _arg == '--daemon':
+ LOG = _args.next()
++ elif _arg == '--pid':
++ PIDFILE = _args.next()
+ elif _arg == '--debug':
+ DEBUG = True
+ else:
+ sys.exit( 'Error: invalid option %r' % _arg ) \ No newline at end of file
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init
new file mode 100644
index 000000000000..3dc4297855c2
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting HTTP Replicator"
+ start-stop-daemon --start --pidfile /var/run/http-replicator.pid \
+ --name http-replicator --exec /usr/bin/http-replicator -- --static \
+ --flat --daemon $LOG_FILE $DAEMON_OPTS --pid /var/run/http-replicator.pid
+ eend $? "Failed to start HTTP Replicator"
+}
+
+stop() {
+ ebegin "Stopping HTTP Replicator"
+ start-stop-daemon --stop --pidfile /var/run/http-replicator.pid --name http-replicator --signal 2
+ eend $? "Failed to stop HTTP Replicator"
+}
diff --git a/net-proxy/http-replicator/files/http-replicator.service b/net-proxy/http-replicator/files/http-replicator.service
new file mode 100644
index 000000000000..6a2a7e5f5dff
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=http-replicator daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/http-replicator -s -f \
+ --dir /var/cache/http-replicator --user portage --log /var/log/http-replicator.log \
+ $DAEMON_OPTS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/http-replicator/files/http-replicator.service.conf b/net-proxy/http-replicator/files/http-replicator.service.conf
new file mode 100644
index 000000000000..da7445d080c4
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator.service.conf
@@ -0,0 +1,3 @@
+# Set various parameters for http-replicator
+[Service]
+Environment="DAEMON_OPTS= --alias /usr/portage/packages:packages --ip 192.168.*.* --ip 10.*.*.* --port 8080"
diff --git a/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
new file mode 100644
index 000000000000..68405a1f8c1b
--- /dev/null
+++ b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 ) # not 2.6 bug #33907, not 3.0 bug #411083
+
+inherit eutils python-single-r1 systemd
+
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Proxy cache for Gentoo packages"
+HOMEPAGE="https://sourceforge.net/projects/http-replicator"
+SRC_URI="mirror://sourceforge/http-replicator/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ppc ~sparc x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/http-replicator-3.0-sighup.patch"
+ "${FILESDIR}/http-replicator-3-unique-cache-name.patch"
+ "${FILESDIR}/http-replicator-3-missing-directory.patch"
+)
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ # Daemon and repcacheman into /usr/bin
+ python_scriptinto /usr/bin
+ python_doscript http-replicator
+ python_newscript "${FILESDIR}/http-replicator-3.0-repcacheman-0.44-r2" repcacheman.py
+
+ exeinto /usr/bin
+ newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman
+
+ # init.d scripts
+ newinitd "${FILESDIR}/http-replicator-3.0.init" http-replicator
+ newconfd "${FILESDIR}/http-replicator-3.0.conf" http-replicator
+
+ systemd_dounit "${FILESDIR}"/http-replicator.service
+ systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
+
+ # Docs
+ dodoc README debian/changelog
+
+ # Man Page - Not Gentooified yet
+ doman http-replicator.1
+
+ insinto /etc/logrotate.d
+ newins debian/logrotate http-replicator
+}
+
+pkg_postinst() {
+ elog
+ ewarn "Before starting http-replicator, please follow the next few steps:"
+ elog "- Modify /etc/conf.d/http-replicator if required."
+ ewarn "- Run /usr/bin/repcacheman to set up the cache."
+ elog "- Add http_proxy=\"http://serveraddress:8080\" to make.conf on"
+ elog " the server as well as on the client machines."
+ elog "- Make sure FETCHCOMMAND adds the X-unique-cache-name header to"
+ elog " HTTP requests in make.conf (or maybe portage will add it to"
+ elog " the default make.globals someday). Example:"
+ elog ' FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
+ elog ' RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
+ elog "- Arrange to periodically run repcacheman on this server,"
+ elog " to clean up the local /usr/portage/distfiles directory."
+ elog "- Arrange to periodically run something like the following"
+ elog " on this server. 'eclean' is in app-portage/gentoolkit."
+ elog " ( export DISTDIR=/var/cache/http-replicator/"
+ elog " eclean -i distfiles )"
+ elog "- Even with FETCHCOMMAND fixing most cases, occasionally"
+ elog " an older invalid version of a file may end up in the cache,"
+ elog " causing checksum failures when portage tries to fetch"
+ elog " it. To recover, either use eclean (above), manually delete"
+ elog " the relevant file from the cache, or temporarily comment"
+ elog " out the http_proxy setting. Commenting only requires"
+ elog " access to client config, not server cache."
+ elog "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf starts"
+ elog " with several good http mirrors."
+ elog
+ elog "For more information please refer to the following forum thread:"
+ elog " http://forums.gentoo.org/viewtopic-t-173226.html"
+ elog
+}
diff --git a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild
new file mode 100644
index 000000000000..6810108b67b9
--- /dev/null
+++ b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 systemd
+
+MY_P="${PN}_${PV/_/}"
+
+DESCRIPTION="Proxy cache for Gentoo packages"
+HOMEPAGE="https://sourceforge.net/projects/http-replicator"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# Tests downloads files as well as breaks, should be turned into local tests.
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch
+}
+
+src_test() {
+ ./unit-test && die
+}
+
+src_install() {
+ python_foreach_impl python_doscript http-replicator
+
+ newbin "${FILESDIR}"/${PN}-3.0-callrepcacheman-0.1 repcacheman
+
+ python_foreach_impl python_domodule *.py
+
+ python_foreach_impl python_newscript "${FILESDIR}"/${PN}-3.0-repcacheman-0.44-r2 repcacheman.py
+
+ newinitd "${FILESDIR}"/${PN}-4.0_alpha2-r3.init http-replicator
+ newconfd "${FILESDIR}"/${PN}-4.0_alpha2-r2.conf http-replicator
+
+ systemd_dounit "${FILESDIR}"/http-replicator.service
+ systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
+
+ dodoc README.user README.devel RELNOTES
+}
+
+pkg_postinst() {
+ echo
+ einfo "Before starting ${PN}, please follow the next few steps:"
+ einfo
+ einfo "- Modify /etc/conf.d/${PN} if required."
+ einfo "- Run \`repcacheman\` to set up the cache."
+ einfo "- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on"
+ einfo " the server as well as on the client machines."
+ einfo "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf"
+ einfo " starts with several good HTTP mirrors."
+ einfo
+ einfo "For more information please refer to the following forum thread:"
+ einfo
+ einfo " https://forums.gentoo.org/viewtopic-t-173226.html"
+ einfo
+ einfo "Starting with 4.x releases, the conf.d parameters have changed."
+ echo
+}
diff --git a/net-proxy/http-replicator/metadata.xml b/net-proxy/http-replicator/metadata.xml
new file mode 100644
index 000000000000..2700375c94e8
--- /dev/null
+++ b/net-proxy/http-replicator/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">http-replicator</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/httpush/Manifest b/net-proxy/httpush/Manifest
new file mode 100644
index 000000000000..ce13728afeca
--- /dev/null
+++ b/net-proxy/httpush/Manifest
@@ -0,0 +1,5 @@
+DIST httpush-0.9b11.tar.gz 39342 SHA256 f6c3a3bce0957557d744c27d1bf33dca33a09dede80842ee70fdbbfc42e608a8 SHA512 28f5843de8aaab2f1b1b89afb79cc15b134184781db7926dab3096359bb03db7dc8252a4eb0e89c61412692b8d2a5d6bf683e005862bc553fec754b0d48ac372 WHIRLPOOL a6dc66211bce2a07da7af27239a37be783ba879f5d1bdb6d0bcc0984c576230c6a9136dac2aca3e2c98b58e4005ab5ea571cf9f14c612a0540f78ddd58597bdc
+EBUILD httpush-0.9_beta11-r1.ebuild 1333 SHA256 1bd99f2174dc14897845ac53ffb12b8dac57ba042db9de66498db54f8c12320c SHA512 a0bf21d42c46af758fd2b881c72b8ef4b1a43472244a96b5bbec671c7a63c07f9c02795c99914cd2e1fe11ac202d557085e08c834a10cfe34e180f0d13bb69c5 WHIRLPOOL c05ca55367de9d41ad96d9ee1cf3f518dcc7f18b894a26632d2de5be1b11d0e81f1cc99bfd74f546d0866f9b04833b555f4a039a65c0cf204f39d7d6e63884b8
+MISC ChangeLog 2539 SHA256 b6ceb15725aefc65eae7c0faf63d457d1b2331a55daf260a606c54746c9d8679 SHA512 76a67f8a650a36d053976a1cb3ba100aa34cbab182eb83f304e19bc782ded3b99495a1edfed2f762d3fcf3a081ae2d669b3eaad5e63eb882348735876f8067eb WHIRLPOOL 4f8b9368516e28d0a152ff2934fd694d0793cdb3c9118cc70c708fb031559c9dff15b4d64417d5cb2d8f0d697fab9c559dd2855ad7acb8b75e27e6590499d758
+MISC ChangeLog-2015 1205 SHA256 2f37dfc6e4b2b3a4630f57d52170ba1fe1ef7a16a22385868e456f8e9933b4f5 SHA512 96c844284a4aa46698a82e387658cf9701d94be557a192cc4494a81a4317f0cc49d224c9e5c57b988cb3922567af5651eb6883e4bdffbc40ed124f27bb951b34 WHIRLPOOL 69a9e7bbbcb2932776702da380ee33cb1240461dd89bfaf6473c415b2f3c094df708f7a6c06550c8dfde6b24f99a11a705fdaacb8395098ebafbec9cda08b9d0
+MISC metadata.xml 498 SHA256 2b0923721100b9954412cf8c28432cc95b3491069790acf1624f997e6b0a82d1 SHA512 ffd18f1f753b82aa9f51f2bdb56a190f1260fd2389f4b3f08f9182c1518341355194916e4153b7f7d6a8054f7337992da4d7cb0039a78c819b45aa58267ffd13 WHIRLPOOL a03fc65dced67b00cab502d0133c41b67348032d465fd73433980966f1c448d371106388b920f75c61c8ddbf1d4c1dc4d087ae508e648e224fd8ee7d56977757
diff --git a/net-proxy/httpush/httpush-0.9_beta11-r1.ebuild b/net-proxy/httpush/httpush-0.9_beta11-r1.ebuild
new file mode 100644
index 000000000000..6e9deaa142fb
--- /dev/null
+++ b/net-proxy/httpush/httpush-0.9_beta11-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_P="${P/_beta/b}"
+
+DESCRIPTION="Intercepting proxy, allowing user to modify HTTP requests on-the-fly"
+HOMEPAGE="http://httpush.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="xml"
+
+RDEPEND="dev-perl/URI
+ virtual/perl-MIME-Base64
+ dev-perl/libwww-perl
+ dev-perl/Net-SSLeay
+ dev-perl/Crypt-SSLeay
+ dev-perl/HTML-Parser
+ xml? ( dev-perl/XML-Twig )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! use xml ; then
+ echo
+ einfo "If you'd like to use httpush's learning mode, please CTRL-C now"
+ einfo "and enable the xml USE flag."
+ epause 3
+ echo
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i 's:^\(require httpush;\)$:push @INC, "/usr/lib/httpush";\n\1:' \
+ httpush.pl || die "sed INC failed"
+ sed -i 's:^\(.*DATADIR="\)data\(.*\)$:\1/var/lib/httpush\2:' *.pl \
+ lib/plugin/broker.pm || die "sed DATADIR= failed"
+}
+
+src_install() {
+ keepdir /var/lib/httpush
+
+ insinto /usr/lib/httpush
+ doins -r httpush.{dtd,lck,pem,pm} lib
+
+ insinto /usr/share/httpush/plugins
+ doins plugins/*
+
+ newbin httpush.pl httpush
+ newbin reindex.pl httpush-reindex
+ ewarn "reindex script has been renamed httpush-reindex"
+
+ dodoc README ChangeLog doc/*
+}
diff --git a/net-proxy/httpush/metadata.xml b/net-proxy/httpush/metadata.xml
new file mode 100644
index 000000000000..3b217639af03
--- /dev/null
+++ b/net-proxy/httpush/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>HTTPush aims at providing an easy way to audit HTTP and HTTPS application/server security. It supports on-the-fly request modification, automated decision making and vulnerability detection through the use of plugins.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">httpush</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/metadata.xml b/net-proxy/metadata.xml
new file mode 100644
index 000000000000..32488608746e
--- /dev/null
+++ b/net-proxy/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-proxy category contains network proxy software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-proxy enthält verschiedene Netzwerk-Proxies.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-proxy contiene proxies de red.
+ </longdescription>
+ <longdescription lang="ja">
+ net-proxyカテゴリーにはネットワーク・プロキシの
+ ソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-proxy categorie bevat verschillende netwerkproxy's.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-proxy chứa các phần mềm proxy mạng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-proxy contiene software proxy come squid e privoxy.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-proxy contém softwares de proxy de rede.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-proxy zawiera oprogramowanie związane z serwerami proxy.
+ </longdescription>
+</catmetadata>
+
diff --git a/net-proxy/mitmproxy/Manifest b/net-proxy/mitmproxy/Manifest
new file mode 100644
index 000000000000..82c1b442a71b
--- /dev/null
+++ b/net-proxy/mitmproxy/Manifest
@@ -0,0 +1,10 @@
+AUX mitmproxy-0.10-jsbeautifier-imports.patch 1505 SHA256 4ccee70827d21ab42796f03358a48c6aabc0198ab5a3b44dd9805a8aedf96cbb SHA512 863aa8d2ae27b866b573812421d6cd3e9cf45ae70c499005e688a17f09e5a9a65ebb36a5e05599cfe76e7d4f59361c4870dfe9dc6ad764a09847180c74a292ca WHIRLPOOL 3b1c67562cce7a8a9c5064b23219489e5961a7b905770070f91d3c70acef37a7c02a25cf93753fdbb35f011af7ba33e83f490838e967c6627f0e99aa18bed528
+DIST mitmproxy-0.10.1.tar.gz 3426109 SHA256 527cbff76e0d49d7db62561252d399e1c747730676515c4ed89250c223e2fe56 SHA512 2bef02f07942177044afa24749c4e8e2ba1aae5ee33e2cbffbecc557a09351865b70dc92b9acfd285716a82c84026a3eb93f889176fd288c1e8d67a415a5c79a WHIRLPOOL 73391bf717df855016db3158e4e38126f4b5e29a28566202843b3cf15412e9b1f281ad062d86f50965dfeab344488a11e2f8ba11a3181c1da56998a297b262d0
+DIST mitmproxy-0.11.1.tar.gz 6253324 SHA256 0d2de6210b5eee3f196943d9e6e137a27bf32bdc0213620bde54bfd5d384e53d SHA512 f265441825b22e2a7ec3c8f2f3152d123fbd6ac463fd4de0e973e24b2ab9feaf28689d3c995bb361ff06a88a6d88536b642944463573117640b1c096b79f20b1 WHIRLPOOL a32f44fa9a2392d08b9bb9c4fb701e3b6e351b4d820bb35b0fd27a8d3281e2982a2b88f1216cf8eedf3a3c0a14ad38406c9d80ee23b146706be8f98c27d197f1
+DIST mitmproxy-0.11.3.tar.gz 6172130 SHA256 e774760fc33864caa708eeaafb756e110d7adeb619f3734f2f50b2a0e4910d5c SHA512 81184b3034b78d51368b4066adcc8337fc59332c80ce085c854610f70cd96531612520c1b751135e26093265c5475c8fef5fcb0908b77b5a18a5c605c0c94934 WHIRLPOOL d0867387fe2188599d68e48a8db691b508748e9dc4704998af0bb062be3d5cd242445d220b07e8fb75cc4f26cebd87d6afffa7f5abe6f80607bae3f7ce93cb22
+EBUILD mitmproxy-0.10.1.ebuild 1389 SHA256 3fcb9ce72822702f4f53d7e9f6644aba20eabefb12e4de24ca77f07fe04b575a SHA512 3d0205bd73b8129a31dd70ccbc64f8b8b632e67f85cab0beabde3b92023b477470d641ece4b2ad527c9fbe0f7572972a8046adb551a67fbc8a6e7bc1df5766cb WHIRLPOOL f1af3351cc175018a10bbbbb705740eef579c7ac3c2a6b571d280360bee03ea6d78da760b62853b24e188fa135eb99bad18033b7f42c0489cd577be963bb1076
+EBUILD mitmproxy-0.11.1.ebuild 1516 SHA256 46326771ab0698eb056d43dfd5d96c26163e9c9ccca0081c2a76b942a0635700 SHA512 f25695010fea1bbbfe139cd3f13c8be66913941f3bde96bc67b712d5ae001582a5685dba52337b9f61a50c6d3ecd92657df349d3e1153e17ca04eb1fa56aae47 WHIRLPOOL 4376ff1657d5ce3d5a648dfe9ccce2d718207526f6838a3814905596c549dc8241e69ad4be3c36f8d042febe7274de08020261bc620eb5b952000aaa166ba230
+EBUILD mitmproxy-0.11.3.ebuild 1440 SHA256 253245bb3648bd777e26ece3919dbfae4a490f3961006eafd5337f8cc05f197d SHA512 bb035673e7ea497660486e19547fbcd060dae5a2eeb6f181b65bcaab980c8cfd37b9f217541eb0d7cf2bf2f0983f4a4b6eaa41ad17c633dbd578faccfc7656fa WHIRLPOOL 68eba7b3cc0387ba00c09e07f96cc58da341c4919fda2ec9fd62918072df386fe806689db9746325dfeeaaa92032d01647a3848719f4806347a335007b5e752a
+MISC ChangeLog 2355 SHA256 38063396c4e3ab195d414c1bd312229fcaaa45ef5c7a66055b73e0ad46c1fbda SHA512 938bb83eedf1ef56ff03e9d355e7aa758020d8b2e3a230a7866fa4ea4f8ab167e0c448b3e844205b4122c550aa32f231524d5f568d8d3acd4852684179acca18 WHIRLPOOL 2de2e5c324670ce5d1063ebbdc956698ba88c8791412d1947d6f66d9cb97bfea648a5bc10ed590f153bf3833b666fb3cdb209f825cc22ee7e09b15fb3137c923
+MISC ChangeLog-2015 2406 SHA256 60a2745988d549ffca82be835da5e6d14ebc5ce59a956aaf92c517f1a9cac70a SHA512 1da02480402e4116c2b0cab58c6fa54496795f45ceb4e26be8411b407b221da1b31ac8a910271bec4932445e6b5d7749f18f702ef63dd647f95900d60b9082b8 WHIRLPOOL ba6f1e20bb1b1cb994c2611f9e375219b7a4dbd26ce3f103107e5a1318c3196f34c5a0218474929a7bcd9bc4356d00750697d4395a0c2e98a2b4e540ccfae04a
+MISC metadata.xml 318 SHA256 9a2719d114298cf573fb6ff95a479b77f2b88027c4c8bbc545551c156172c7b2 SHA512 8f7a5435cf5b7219e6f4827289dcbfb9ff4d4e5e1f70aa9694934276e9e4aa0d84a8a052c022eaa4358528b7869504037fd371d037d4e447d0d6c6536f46815f WHIRLPOOL 392b3277fa7dfe49ae564ef0e6e916c97819cee95318105b484d6553d9193db7ffe73be3f028f1975b0d9410493ee6db7c1e8647cb38b0553129001cd7a650d5
diff --git a/net-proxy/mitmproxy/files/mitmproxy-0.10-jsbeautifier-imports.patch b/net-proxy/mitmproxy/files/mitmproxy-0.10-jsbeautifier-imports.patch
new file mode 100644
index 000000000000..bd6f65aa920e
--- /dev/null
+++ b/net-proxy/mitmproxy/files/mitmproxy-0.10-jsbeautifier-imports.patch
@@ -0,0 +1,44 @@
+--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/__init__.py
++++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/__init__.py
+@@ -246,7 +246,7 @@
+ return sweet_code
+
+ def unpack(self, source, evalcode=False):
+- import jsbeautifier.unpackers as unpackers
++ from ..jsbeautifier import unpackers
+ try:
+ return unpackers.run(source, evalcode)
+ except unpackers.UnpackingError as error:
+--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/__init__.py
++++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/__init__.py
+@@ -7,7 +7,7 @@
+
+ import pkgutil
+ import re
+-from jsbeautifier.unpackers import evalbased
++from ...jsbeautifier.unpackers import evalbased
+
+ # NOTE: AT THE MOMENT, IT IS DEACTIVATED FOR YOUR SECURITY: it runs js!
+ BLACKLIST = ['jsbeautifier.unpackers.evalbased']
+--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py
++++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py
+@@ -40,7 +40,7 @@
+ except ImportError:
+ from urllib.parse import unquote
+
+-from jsbeautifier.unpackers import UnpackingError
++from ...jsbeautifier.unpackers import UnpackingError
+
+ PRIORITY = 1
+
+--- mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/packer.py
++++ mitmproxy-0.10/libmproxy/contrib/jsbeautifier/unpackers/packer.py
+@@ -14,7 +14,7 @@
+
+ import re
+ import string
+-from jsbeautifier.unpackers import UnpackingError
++from ...jsbeautifier.unpackers import UnpackingError
+
+ PRIORITY = 1
+
diff --git a/net-proxy/mitmproxy/metadata.xml b/net-proxy/mitmproxy/metadata.xml
new file mode 100644
index 000000000000..01809bf53a6f
--- /dev/null
+++ b/net-proxy/mitmproxy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">mitmproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/mitmproxy/mitmproxy-0.10.1.ebuild b/net-proxy/mitmproxy/mitmproxy-0.10.1.ebuild
new file mode 100644
index 000000000000..4dc54075e1b4
--- /dev/null
+++ b/net-proxy/mitmproxy/mitmproxy-0.10.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 versionator
+
+DESCRIPTION="An interactive, SSL-capable, man-in-the-middle HTTP proxy"
+HOMEPAGE="http://mitmproxy.org/"
+SRC_URI="http://mitmproxy.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND=">=dev-python/pillow-2.3.0[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ >=dev-python/lxml-2.3[${PYTHON_USEDEP}]
+ =dev-python/netlib-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ >dev-python/pyasn1-0.1.2[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/urwid-1.1[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
+ =www-servers/pathod-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.10-jsbeautifier-imports.patch )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # remove unwanted bytecode files
+ rm -r libmproxy/protocol || die
+}
+
+python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGELOG CONTRIBUTORS )
+ use doc && local HTML_DOCS=( doc/. )
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/net-proxy/mitmproxy/mitmproxy-0.11.1.ebuild b/net-proxy/mitmproxy/mitmproxy-0.11.1.ebuild
new file mode 100644
index 000000000000..535d1340404d
--- /dev/null
+++ b/net-proxy/mitmproxy/mitmproxy-0.11.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 versionator
+
+DESCRIPTION="An interactive, SSL-capable, man-in-the-middle HTTP proxy"
+HOMEPAGE="http://mitmproxy.org/"
+SRC_URI="http://mitmproxy.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND=">=dev-python/pillow-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.10.1[${PYTHON_USEDEP}]
+ >=dev-python/lxml-3.3.6[${PYTHON_USEDEP}]
+ =dev-python/netlib-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ >dev-python/pyasn1-0.1.2[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0.2[${PYTHON_USEDEP}]
+ >=dev-python/urwid-1.1[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
+ =www-servers/pathod-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ )"
+
+#PATCHES=( "${FILESDIR}"/${PN}-0.10-jsbeautifier-imports.patch )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # remove bundled netlib and pathod
+ rm -r libpathod netlib || die
+
+ # remove unused dep
+ sed -i '/sortedcontainers/d' setup.py || die
+}
+
+python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGELOG CONTRIBUTORS )
+ use doc && local HTML_DOCS=( doc/. )
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/net-proxy/mitmproxy/mitmproxy-0.11.3.ebuild b/net-proxy/mitmproxy/mitmproxy-0.11.3.ebuild
new file mode 100644
index 000000000000..9020f4791c05
--- /dev/null
+++ b/net-proxy/mitmproxy/mitmproxy-0.11.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 versionator
+
+DESCRIPTION="An interactive, SSL-capable, man-in-the-middle HTTP proxy"
+HOMEPAGE="http://mitmproxy.org/"
+SRC_URI="http://mitmproxy.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND="
+ >=dev-python/pillow-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.10.1[${PYTHON_USEDEP}]
+ >=dev-python/configargparse-0.9.3[${PYTHON_USEDEP}]
+ >=dev-python/lxml-3.3.6[${PYTHON_USEDEP}]
+ =dev-python/netlib-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ >dev-python/pyasn1-0.1.2[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+ >=www-servers/tornado-4.0.2[${PYTHON_USEDEP}]
+ >=dev-python/urwid-1.1[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
+ =www-servers/pathod-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+ )"
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # don't run example scripts tests
+ rm test/test_examples.py || die
+
+}
+
+python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGELOG CONTRIBUTORS )
+ use doc && local HTML_DOCS=( doc/. )
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/net-proxy/nutcracker/Manifest b/net-proxy/nutcracker/Manifest
new file mode 100644
index 000000000000..e9ecf2a75804
--- /dev/null
+++ b/net-proxy/nutcracker/Manifest
@@ -0,0 +1,15 @@
+AUX nutcracker-0.2.4-use-system-libyaml.patch 2570 SHA256 bd04d38c12d336b952a4b33aa969d11e4b0797ee6996d45814e5d33da0bf0c65 SHA512 a529872829318788d54b876800d940fdbb2d710bd092fe4b930bce3cfaf23116579d1a6f7ead8a181113713a654b34686ec7470d8198e7263aeb85e8b0f51d1d WHIRLPOOL 8f628ad6e018aee04d29e9bd48ba04d2e69581273d172ac22b315a73639b192cf3976dee96c557cf63528f716080661b04be2e925034be9eb1614054049989ba
+AUX nutcracker-0.3.0-use-system-libyaml.patch 2183 SHA256 f0fc84b8b0417ed3c411280eff9ad7c59caff12143531b95f70744a578ee3c84 SHA512 b37037f9089f0bc3eec53916e204986674e14d806028672fa723a453e274fe64a6290c14aaaebcaabaf1237069a6563fb736af5919421573050fe1b006472937 WHIRLPOOL 10275badffcff493ff174c86c34fc92eb54b53320c9a8e0a471a1ff27d733a38ba6bb8877ab655ec5fe31d7c54762eb451e96da6f2968312e069ebfe20d620a1
+AUX nutcracker.confd 271 SHA256 757c3fc11beaa5027707369c5e773f9cbf04da9ac99063f5e13ce55a6bcfffab SHA512 491b0330fda3994bedc15a77e7b4f601a2a0c234298ff04ee088f0e4a9676864e0eb01e1532f2cb6fdf95cefe0b0b0cf39d84b0993cadff774e7721f22d8c752 WHIRLPOOL 39820003020e0eeb41967d373648be46905b9bbcda04f608c1d3a934fa4c6db25624239992847ba35ff70a839868b8916dd2272828227e946d7f69a9ff545005
+AUX nutcracker.confd.2 272 SHA256 2da64af06bc9618ed8d8dcdcc29c086317e49ae365adfce52832796a3933a8e6 SHA512 d208654b1e1fd20f456f340fabe25836c8ba948c96db8034d41710f9e0362936a24f0faec89e51c04d478c60de5255c9d238ab00d7d7b778a0619061a8cbce4c WHIRLPOOL 990d6881ba064d6871b680ac2b9651f16840fbd41900d50070ff5006100f039c11b38a063bd97c59f7dd58430292de4214e7578b17fb2e629854096956fa7d2d
+AUX nutcracker.initd 890 SHA256 3b8dfcc770be3363d99b31ea04b5db98dd3f358c11b3ca956286ddc55a3461c7 SHA512 f40d692daa3cad7d7bce85ac0ecb01ca93f28f79e74b8a5bbea38930f78b24578b47fd7c44e36217ce60fee1ac3faefd8cd6d923046b339ec00c8fcc0f05f4fb WHIRLPOOL f39227325ec88c9011d84f035d0cb9fbbbee11a60028cefaf8b18ca443b4444f8190a69bfdea67e5fde9d8dd0fa9812c87d0c2f4387d8c3e17d1e3a36851f166
+AUX nutcracker.initd.2 891 SHA256 039911f6b363610d396c7635c1de201eb0ef1cb02a1708255a1a9dadc28a147e SHA512 ab06f875dca4ae27b4536d84c9342ec362e6f45f20efd370da0cb6073b306eeb0a1166737f6bdba3e1d5fe836d6b708729b7eadbab62cf66151649d2f56414eb WHIRLPOOL 938e0fad10bb7174f81010894188bedf1037ce9c64d4c4bd4a71cbc12b9d9e4adbd0c8b482dda8f77245b94d9e986279ffa8be6035868b7741a96bb9ae1679ad
+DIST nutcracker-0.2.4.tar.gz 1723439 SHA256 132f524541c6cf4dd1d570ec5da29312ed6150e8a369df703116498b65703b4e SHA512 13d7d2a778a5d85a1d73eaa220f2e95eb7765eff0c8af390ab916f099b12d6c1a99cb61ff418b9a909ff7e2b416b271ba034eb9f50cd7df1ee53600d8b681409 WHIRLPOOL a9e09376f70ade19ef6f80f769edef26b86f3af1d529f68fd6fc42575d4521603da230ee236f8b53c275c9695602e21a586d38fc33a68960b8c11359271af902
+DIST nutcracker-0.3.0.tar.gz 1825106 SHA256 e9993d6827b2e93ee2b865e827acbf9efadbbfc81ccd9103a85948ee2580942a SHA512 81ba21c54b9a15fbb1d0a42b426643b65bcd20b7bb4b35cf3427235703a01a44188b762edff412afe20c193a4e75bf618f69d8c77bae9d66cd2c4e619416f565 WHIRLPOOL 073d411619d14ff57ef9ec72975db99791d29b4b606b6a3af99a2e64b19983a0200b797e753626e7b21aeaae02a28a02402646aeb20919d0910441e5981f8da4
+DIST nutcracker-0.4.1.tar.gz 1163442 SHA256 00c2940f91947bea9457a348316aac1aa1d4e757238aafbefc9d51057da8ede0 SHA512 581fae1d12feb983ed25b22cd6f597fd28b7070906ac29d3990669ae5c626a468914021cee152a6a2299a2838c838ad907e4c911b911ef04166ac7bbb2982da1 WHIRLPOOL 149a5873e85e9ad3e177b638cde7b1436bb7c5f46ebb9dcc806fd95c4c2d859a8016b0a6af383b9512024d3d90232aab73f606883a14c26eb929c0feeb961599
+EBUILD nutcracker-0.2.4.ebuild 901 SHA256 95f699d7dc34158598c366819a60724a48ae28270f82cda166c3b59e19288b9e SHA512 e481f1d96bab41538208c62261d9191d4f643c53c99b4ce68e16f698e1b6532324a4bc801b27bb557b7f6842fee7998c4a04b85c4a7cde89be24421099d5f096 WHIRLPOOL e07311c44ca6ac2eeeb97eb3c425eba83af555c1f2000cf57092d1084c04b170832bd594f67dbba0cb2efb56ee29b54a63f0af5528dcd02bbd8b15466d4093c6
+EBUILD nutcracker-0.3.0.ebuild 901 SHA256 6062a02524f9831c7097dcfead3cf32a8abd6cd82f3329ea74f48899b81e64c4 SHA512 12bf64d1e36468e55cef8e60578b17817a808c0fcd354393ee9bfda8f3611aa409ebf4fbdce84c42957209891c09f47405ca72ea5460bd8e769533e78834e030 WHIRLPOOL 42df5cd82910bb64e2ed65f1882e5438f8f78becd2e031d24a90a0437ca6a40da659f5ec179c3652d4e4c6bfedb5b7b25be54f121d76060d5077b7fee733efb7
+EBUILD nutcracker-0.4.1-r1.ebuild 967 SHA256 bf860e65fe161f928a9ca37399bb670a4274b90f74807a8bcb1724ec2aced205 SHA512 b0de762f155724a1f431ec0662001ec1206aa64551bcb107fc9464f6c2f49fcf1d287818be7d56587e6d73d4d39e9b52390a868e62df457e3ea7995635175267 WHIRLPOOL 77aadc281e1375e4fdcd4f5e687108db0a732e877e2690cc553239ca5738061294840689d1443184f04bd6f22a95f344c5f20b93659915a31142930cfea229ab
+MISC ChangeLog 3370 SHA256 268b3c15a267f2c5494a608e5034ea92003d603a75b61f69d316a4df8b8b11fd SHA512 7810fec397619edab1da4109f8b5bc46fafeaa5b4d87eb149fab36243cb78d52660053f4174936c23dd0c211582b043dba06edf6f1d23b41133f5e7146c2c9eb WHIRLPOOL ac8ae992b96c2a810b3a330722ce49339fae3826490fe72d678852ee22e57eb34687d6c90069ebe2804dde068bf0369bd324ebffc4c516b9dbc8b102adfde902
+MISC ChangeLog-2015 626 SHA256 2c27a3254b4265be568a3cae3904b59ea8f1ced8ce988dd366956be2f5ff811a SHA512 3f9a86e897cdb5c467bc76fbdee8d12f48eae30028657ea2a726525925cc19de96446596e5cf619d63b58eea231d30536e131965e353c51eae34b2ad7533fbc9 WHIRLPOOL a07d912b8e1ce70f09f7d6f636f8b23b39ce2ffaa289cbcc70daa98affdc6899bc50cd490827661973470a8515ca6893a86b4ad83ebb9f42cdde0d627c86e2fa
+MISC metadata.xml 335 SHA256 40d82aef239aa79ae9fcd5d1ac8902882d323d40bac7ee36e6e9ce4731bd5ef5 SHA512 5b3b0aaefb2f4e9ed98835a29767288b85ce89139209e1aeb194d22870907b4ff78d152b71482af61635e5554b5707305d19fe3ba48692de4bfb2f8623f9f754 WHIRLPOOL d2d260904719be69521645ec8900871157c76f31023d4f3c29ce8e26742ccb695d406da4e697e90a3a9fd7b5912f4d78586b0c3df154a2515650bfa06cf5d7b7
diff --git a/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch b/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch
new file mode 100644
index 000000000000..5cf7b3660bdf
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch
@@ -0,0 +1,64 @@
+diff -uNr nutcracker-0.2.4.orig/Makefile.am nutcracker-0.2.4/Makefile.am
+--- nutcracker-0.2.4.orig/Makefile.am 2013-09-11 10:11:19.869975912 -0400
++++ nutcracker-0.2.4/Makefile.am 2013-09-11 10:11:36.709975757 -0400
+@@ -2,6 +2,6 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-SUBDIRS = contrib src
++SUBDIRS = src
+
+ EXTRA_DIST = README.md NOTICE LICENSE ChangeLog conf scripts notes
+diff -uNr nutcracker-0.2.4.orig/src/Makefile.am nutcracker-0.2.4/src/Makefile.am
+--- nutcracker-0.2.4.orig/src/Makefile.am 2013-09-11 10:16:16.449973187 -0400
++++ nutcracker-0.2.4/src/Makefile.am 2013-09-11 10:16:44.019972934 -0400
+@@ -3,7 +3,6 @@
+ AM_CPPFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE
+ AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit
+ AM_CPPFLAGS += -I $(top_srcdir)/src/proto
+-AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.1.4/include
+
+ AM_CFLAGS = -Wall -Wshadow
+ AM_CFLAGS += -Wpointer-arith
+@@ -43,4 +42,3 @@
+
+ nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
+ nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
+-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a
+diff -uNr nutcracker-0.2.4.orig/configure.ac nutcracker-0.2.4/configure.ac
+--- nutcracker-0.2.4.orig/configure.ac 2013-09-11 10:23:27.879969223 -0400
++++ nutcracker-0.2.4/configure.ac 2013-09-11 10:24:28.729968664 -0400
+@@ -138,11 +138,7 @@
+ [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])])
+ AC_MSG_RESULT($disable_stats)
+
+-# Untar the yaml-0.1.4 in contrib/ before config.status is rerun
+-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.1.4.tar.gz -C contrib])
+-
+-# Call yaml-0.1.4 ./configure recursively
+-AC_CONFIG_SUBDIRS([contrib/yaml-0.1.4])
++PKG_CHECK_MODULES([YAML], [yaml-0.1 >= 0.1])
+
+ # Define Makefiles
+ AC_CONFIG_FILES([Makefile
+diff -uNr nutcracker-0.2.4.orig/src/Makefile.am nutcracker-0.2.4/src/Makefile.am
+--- nutcracker-0.2.4.orig/src/Makefile.am 2013-09-11 10:23:27.879969223 -0400
++++ nutcracker-0.2.4/src/Makefile.am 2013-09-11 10:26:16.549967674 -0400
+@@ -11,8 +11,9 @@
+ AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value
+ AM_CFLAGS += -Wconversion -Wsign-compare
+ AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations
++AM_CFLAGS += $(YAML_CFLAGS)
+
+-AM_LDFLAGS = -lm -lpthread -rdynamic
++AM_LDFLAGS = -lm -lpthread -rdynamic $(YAML_LIBS)
+
+ SUBDIRS = hashkit proto
+
+@@ -40,5 +41,5 @@
+ nc_queue.h \
+ nc.c
+
+-nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
++nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
+ nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
diff --git a/net-proxy/nutcracker/files/nutcracker-0.3.0-use-system-libyaml.patch b/net-proxy/nutcracker/files/nutcracker-0.3.0-use-system-libyaml.patch
new file mode 100644
index 000000000000..8a30fae46fc1
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker-0.3.0-use-system-libyaml.patch
@@ -0,0 +1,57 @@
+diff -uNr nutcracker-0.3.0.orig/configure.ac nutcracker-0.3.0/configure.ac
+--- nutcracker-0.3.0.orig/configure.ac 2014-03-17 17:55:54.500000001 -0400
++++ nutcracker-0.3.0/configure.ac 2014-03-17 17:58:50.290000001 -0400
+@@ -195,11 +195,8 @@
+ [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])])
+ AC_MSG_RESULT($disable_stats)
+
+-# Untar the yaml-0.1.4 in contrib/ before config.status is rerun
+-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.1.4.tar.gz -C contrib])
+-
+-# Call yaml-0.1.4 ./configure recursively
+-AC_CONFIG_SUBDIRS([contrib/yaml-0.1.4])
++# Use systems libyaml.
++PKG_CHECK_MODULES([YAML], [yaml-0.1 >= 0.1])
+
+ # Define Makefiles
+ AC_CONFIG_FILES([Makefile
+diff -uNr nutcracker-0.3.0.orig/Makefile.am nutcracker-0.3.0/Makefile.am
+--- nutcracker-0.3.0.orig/Makefile.am 2014-03-17 17:55:54.500000001 -0400
++++ nutcracker-0.3.0/Makefile.am 2014-03-17 17:56:38.920000001 -0400
+@@ -2,7 +2,7 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-SUBDIRS = contrib src
++SUBDIRS = src
+
+ dist_man_MANS = man/nutcracker.8
+
+diff -uNr nutcracker-0.3.0.orig/src/Makefile.am nutcracker-0.3.0/src/Makefile.am
+--- nutcracker-0.3.0.orig/src/Makefile.am 2014-03-17 17:55:54.500000001 -0400
++++ nutcracker-0.3.0/src/Makefile.am 2014-03-17 18:00:08.480000001 -0400
+@@ -7,7 +7,6 @@
+ AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit
+ AM_CPPFLAGS += -I $(top_srcdir)/src/proto
+ AM_CPPFLAGS += -I $(top_srcdir)/src/event
+-AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.1.4/include
+
+ AM_CFLAGS =
+ AM_CFLAGS += -Wall -Wshadow
+@@ -17,9 +16,10 @@
+ AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value
+ AM_CFLAGS += -Wconversion -Wsign-compare
+ AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations
++AM_CFLAGS += $(YAML_CFLAGS)
+
+ AM_LDFLAGS =
+-AM_LDFLAGS += -lm -lpthread -rdynamic
++AM_LDFLAGS += -lm -lpthread -rdynamic $(YAML_LIBS)
+ if OS_SOLARIS
+ AM_LDFLAGS += -lnsl -lsocket
+ endif
+@@ -52,4 +52,3 @@
+ nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
+ nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
+ nutcracker_LDADD += $(top_builddir)/src/event/libevent.a
+-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a
diff --git a/net-proxy/nutcracker/files/nutcracker.confd b/net-proxy/nutcracker/files/nutcracker.confd
new file mode 100644
index 000000000000..03393f23a64c
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#USER="nobody"
+#PIDFILE="/var/run/nutcracker.pid"
+#CONF_FILE="/etc/nutcracker/nutcracker.yaml"
+
+NUTCRACKER_BIN="/usr/bin/nutcracker"
+NUTCRACKER_OPTS="--daemonize"
diff --git a/net-proxy/nutcracker/files/nutcracker.confd.2 b/net-proxy/nutcracker/files/nutcracker.confd.2
new file mode 100644
index 000000000000..4029092e6e7e
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker.confd.2
@@ -0,0 +1,9 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#USER="nobody"
+#PIDFILE="/var/run/nutcracker.pid"
+#CONF_FILE="/etc/nutcracker/nutcracker.yaml"
+
+#NUTCRACKER_BIN="/usr/bin/nutcracker"
+NUTCRACKER_OPTS="--daemonize"
diff --git a/net-proxy/nutcracker/files/nutcracker.initd b/net-proxy/nutcracker/files/nutcracker.initd
new file mode 100644
index 000000000000..47abe8f3cd45
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker.initd
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+USER="${USER:-nobody}"
+PIDFILE="${PIDFILE:-/var/run/nutcracker.pid}"
+NUTCRACKER_BIN="${NUTCRACKER_BIN:-/usr/bin/nutcracker}"
+CONF_FILE="${CONF_FILE:-/etc/nutcracker/nutcracker.yml}"
+
+depend() {
+ need net
+}
+
+checkconf() {
+ ebegin "Testing configuration"
+ ${NUTCRACKER_BIN} --test-conf \
+ --conf-file=${CONF_FILE} \
+ >/dev/null 2>&1
+ eend $?
+}
+
+start() {
+ checkconf || exit 1
+ ebegin "Starting Nutcracker"
+ start-stop-daemon --start -u ${USER} \
+ --name ${SVCNAME} \
+ --exec ${NUTCRACKER_BIN} -- \
+ --conf-file="${CONF_FILE}" \
+ --pid-file=${PIDFILE} \
+ ${NUTCRACKER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Nutcracker"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
+
diff --git a/net-proxy/nutcracker/files/nutcracker.initd.2 b/net-proxy/nutcracker/files/nutcracker.initd.2
new file mode 100644
index 000000000000..7e96808f04bb
--- /dev/null
+++ b/net-proxy/nutcracker/files/nutcracker.initd.2
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+USER="${USER:-nobody}"
+PIDFILE="${PIDFILE:-/var/run/nutcracker.pid}"
+NUTCRACKER_BIN="${NUTCRACKER_BIN:-/usr/sbin/nutcracker}"
+CONF_FILE="${CONF_FILE:-/etc/nutcracker/nutcracker.yml}"
+
+depend() {
+ need net
+}
+
+checkconf() {
+ ebegin "Testing configuration"
+ ${NUTCRACKER_BIN} --test-conf \
+ --conf-file=${CONF_FILE} \
+ >/dev/null 2>&1
+ eend $?
+}
+
+start() {
+ checkconf || exit 1
+ ebegin "Starting Nutcracker"
+ start-stop-daemon --start -u ${USER} \
+ --name ${SVCNAME} \
+ --exec ${NUTCRACKER_BIN} -- \
+ --conf-file="${CONF_FILE}" \
+ --pid-file=${PIDFILE} \
+ ${NUTCRACKER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Nutcracker"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
+
diff --git a/net-proxy/nutcracker/metadata.xml b/net-proxy/nutcracker/metadata.xml
new file mode 100644
index 000000000000..a681c7f99620
--- /dev/null
+++ b/net-proxy/nutcracker/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">twitter/twemproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/nutcracker/nutcracker-0.2.4.ebuild b/net-proxy/nutcracker/nutcracker-0.2.4.ebuild
new file mode 100644
index 000000000000..3a41d6658396
--- /dev/null
+++ b/net-proxy/nutcracker/nutcracker-0.2.4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A fast, light-weight proxy for Memcached and Redis.
+(Twitter's Twemproxy)"
+HOMEPAGE="https://github.com/twitter/twemproxy"
+SRC_URI="https://twemproxy.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+DEPEND=">=dev-libs/libyaml-0.1.4"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Lets use system libyaml
+ epatch "${FILESDIR}/${P}-use-system-libyaml.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use debug) || die "Econf failed"
+}
+
+src_install() {
+ default_src_install
+
+ insinto /etc/nutcracker
+ newins conf/nutcracker.yml nutcracker.yml.example
+
+ newconfd "${FILESDIR}/nutcracker.confd" nutcracker
+ newinitd "${FILESDIR}/nutcracker.initd" nutcracker
+
+ if use doc; then
+ dodoc -r notes
+ fi
+}
diff --git a/net-proxy/nutcracker/nutcracker-0.3.0.ebuild b/net-proxy/nutcracker/nutcracker-0.3.0.ebuild
new file mode 100644
index 000000000000..123d9cb88672
--- /dev/null
+++ b/net-proxy/nutcracker/nutcracker-0.3.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A fast, light-weight proxy for Memcached and Redis.
+(Twitter's Twemproxy)"
+HOMEPAGE="https://github.com/twitter/twemproxy"
+SRC_URI="https://twemproxy.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+DEPEND=">=dev-libs/libyaml-0.1.4"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Lets use system libyaml
+ epatch "${FILESDIR}/${P}-use-system-libyaml.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use debug) || die "Econf failed"
+}
+
+src_install() {
+ default_src_install
+
+ insinto /etc/nutcracker
+ newins conf/nutcracker.yml nutcracker.yml.example
+
+ newconfd "${FILESDIR}/nutcracker.confd" nutcracker
+ newinitd "${FILESDIR}/nutcracker.initd" nutcracker
+
+ if use doc; then
+ dodoc -r notes
+ fi
+}
diff --git a/net-proxy/nutcracker/nutcracker-0.4.1-r1.ebuild b/net-proxy/nutcracker/nutcracker-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..2b8f82b4c02d
--- /dev/null
+++ b/net-proxy/nutcracker/nutcracker-0.4.1-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A fast, light-weight proxy for Memcached and Redis.
+(Twitter's Twemproxy)"
+HOMEPAGE="https://github.com/twitter/twemproxy"
+SRC_URI="https://github.com/twitter/twemproxy/archive/v0.4.1.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+DEPEND=">=dev-libs/libyaml-0.1.4"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/twemproxy-${PV}"
+
+src_prepare() {
+ # Lets use system libyaml
+ epatch "${FILESDIR}/${PN}-0.3.0-use-system-libyaml.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use debug) || die "Econf failed"
+}
+
+src_install() {
+ default_src_install
+
+ insinto /etc/nutcracker
+ newins conf/nutcracker.yml nutcracker.yml.example
+
+ newconfd "${FILESDIR}/nutcracker.confd.2" nutcracker
+ newinitd "${FILESDIR}/nutcracker.initd.2" nutcracker
+
+ if use doc; then
+ dodoc -r notes
+ fi
+}
diff --git a/net-proxy/nylon/Manifest b/net-proxy/nylon/Manifest
new file mode 100644
index 000000000000..cb565aac91a2
--- /dev/null
+++ b/net-proxy/nylon/Manifest
@@ -0,0 +1,8 @@
+AUX nylon-1.21-libevent.patch 1854 SHA256 ea71796bf182db5291f98d31c19b2e465584b58dbb350bf124f0e8ad907e59d3 SHA512 0a960cd2ef775b53358f9eabc39a73b43534b82ab84eb0cdc2491d69c9f1aa5a69321a84e91a9d759ab65c152b0f6e0a3e93ca4d16e25f3a637215aaccab5fb0 WHIRLPOOL ea9cdf708a8f9f78cb880ff1acfedf2003c416a8916ac1e26cf734ec5312da2c9e64dbb9b40f77d8b3f41c4efd299f6d1349fd8d6aa04d9d4ca9e92dd0134e16
+AUX nylon.conf 787 SHA256 ca2b077a749154a4c1a0301578b3f7944be7577ca2081fa610ff4b8eb0c93a38 SHA512 0f93db98c62e59c97946c70a568e83a4bd08ebed494313bc6062d44cb96298d04ee688089714458733e5fdc668910c80eec318aa765023d388046afe7039dcd8 WHIRLPOOL 32d262eae8e52d98cd7a7b47ac00008ca626c7ec989b5e38364e39551eaffac930ca8da57a5426b6194d9ffc36073b0fb7bafed802758b63a836d873f59ec1f5
+AUX nylon.init 402 SHA256 d9d8245e2f903ee880cba216704db4bf3758b39e457db7810b164e257bf0e5bf SHA512 37b7b1b974d09fc0bbe2df62d85517fd0a3ba7fc4942e7e74e6ab3eaf60a194ad8fb8ae0789e6aa32223ec4d834b4a98dd69c3473aaa9d6f0fd2ee03bb9e9ca5 WHIRLPOOL 696dd914d6dd57c015d2fb37e3521382c6ba1bb11d06155d08cb5b908104ea0ece78ce95639bf7f44257f46ca6f1e839539cbf8e8320f3521dc7c6bf64a26a1d
+DIST nylon-1.21.tar.gz 115954 SHA256 34c132b005c025c1a5079aae9210855c80f50dc51dde719298e1113ad73408a4 SHA512 7338ebf376843a49777bfc2c04dc0f9b14a25162efb008a555b6d74991bfbddbe5eb8fa6371c8c6a4dae9739f15d6d85135ba9d39472bc2646293a39777b5cfa WHIRLPOOL 50d223998e5f7992dbba17568839d1c6992dc4231d5855a904a93e0e076aea5bc0c57e550fc4f3cd3b72399da16f227342ad061f31e8e0dd626192154a5c8699
+EBUILD nylon-1.21-r2.ebuild 657 SHA256 bb32e6295143d08855199b017f0636625539c0063e4cbc4a9ab2b262d6d69912 SHA512 5aef47b5392470bfb93b859cdcadb74ac60347c45b2233355a35cfb1a70953ab6186dc78c69498fec0e74675828e58e31950e7f044cf0f39790f59ff5579c62e WHIRLPOOL 9ab78383f38a0300a24e337715a52b107080bd8732793f67d1b2e10c077bb765af4b45526013aa3f7a373db815e21005abb137ff17ab05a87a46923ec18eb4b2
+MISC ChangeLog 2992 SHA256 21f64577633f654a0e106a9e3f950b42ac58f83872aa97453043372562b25585 SHA512 af528e9cd007eb647d4f7d28b7783aca0103dee2589ac31f7aa40a3e77b3740be76e1433b13b37373d040e543e68a111d265d4e4dc8313bd4d37ad4496644dfa WHIRLPOOL dacad478a5befde87ced2e18ceb83f50fbde5d5704f1169bcdb7cf2de38bb37a4583d3fb95d8d03dc57af1a12495c762f445800ee7426cf4d4bf9f6de1db2c21
+MISC ChangeLog-2015 3519 SHA256 fb2878bff7dc6931c59d4d28276594c5dcb22d9ac8209658484004e366e53cda SHA512 9910111d40eb8df08e7f32cede62f2af06b199977b9c5902b3999930934acea3dbdbbb44529f57e59c48eb42b316330e6917c8c8a71bf71ef95c26f6d07e7302 WHIRLPOOL 76086fc169a088d45a693c7a046b538cf9d2eca431829df9c116e0a8e855eb1f8ce9d6e844476770a23654c9559466e7427d29d1c435c18f25d3c5db00ad6e87
+MISC metadata.xml 351 SHA256 a1b0d363a426ce1bbfadd5be65d860f3ef6a50f45453592c085ed6069d53604e SHA512 a0d51135d2e19f2435e49c7ed375926b19a468c03f6531552df0cd7e002893a8affb8812a43513dc747e302a0914bb23407561d4f1ce99bc14495511a282f733 WHIRLPOOL ece437b5a958b1ff98bb5cae11cfca1673cca7e17f105b4c28d156141e44334f5f3c1231df4822f62afd2c4f763b65cb1cb6cf37803ef00a8f05473ed916ef89
diff --git a/net-proxy/nylon/files/nylon-1.21-libevent.patch b/net-proxy/nylon/files/nylon-1.21-libevent.patch
new file mode 100644
index 000000000000..d7ca2a1ab0e9
--- /dev/null
+++ b/net-proxy/nylon/files/nylon-1.21-libevent.patch
@@ -0,0 +1,63 @@
+--- a/configure.in
++++ b/configure.in
+@@ -95,44 +95,10 @@
+ AC_REPLACE_FUNCS(strlcpy strlcat strsep setproctitle daemon)
+
+ dnl Checks for libevent
+-AC_MSG_CHECKING(for libevent)
+-AC_ARG_WITH(libevent,
+-[ --with-libevent=DIR use libevent in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval/include"
+- EVENTLIB="-L$withval/lib -levent"
+- elif test -f $withval/event.h -a -f $withval/libevent.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval"
+- EVENTLIB="-L$withval -levent"
+- else
+- AC_ERROR(event.h or libevent.a not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/event.h -a -f ${prefix}/lib/libevent.a;
+-then
+- EVENTINC="-I${prefix}/include"
+- EVENTLIB="-L${prefix}/lib -levent"
+- elif test -f /usr/include/event.h; then
+- EVENTLIB="-levent"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libevent not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+-AC_SUBST(EVENTINC)
+-AC_SUBST(EVENTLIB)
++PKG_CHECK_MODULES(LIBEVENT,libevent,,)
++
++AC_SUBST(LIBEVENT_CFLAGS)
++AC_SUBST(LIBEVENT_LIBS)
+
+ if test "x${sysconfdir}" = 'x${prefix}/etc'; then
+ csysconfdir="${prefix}/etc"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -5,7 +5,7 @@
+ nylon_SOURCES = nylon.c print.c cfg.c expanda.c net.c access.c atomicio.c \
+ socks4.c socks5.c mirror.c cleanup.c misc.c
+
+-AM_CFLAGS = @EVENTINC@ -Wall -g
+-LDADD = @EVENTLIB@ @LIBOBJS@
++AM_CFLAGS = @LIBEVENT_CFLAGS@
++LDADD = @LIBEVENT_LIBS@ @LIBOBJS@
+
+ EXTRA_DIST = strlcpy.c strlcat.c setproctitle.c strsep.c err.c daemon.c
diff --git a/net-proxy/nylon/files/nylon.conf b/net-proxy/nylon/files/nylon.conf
new file mode 100644
index 000000000000..80d11cc8806a
--- /dev/null
+++ b/net-proxy/nylon/files/nylon.conf
@@ -0,0 +1,37 @@
+# sample configuration
+# marius aamodt eriksen (marius@umich.edu)
+# $Id: nylon.conf,v 1.11 2002/03/27 07:39:53 beriksen Exp $
+# general settings
+[General]
+
+# number of simultaneous connections allowed
+No-Simultaneous-Conn=10
+
+# log connections and other information to syslog? 1: on, 0: off
+Log=1
+
+# be verbose on the console? 1: on, 0: off
+Verbose=0
+
+# store pid file
+#PIDfile=/var/run/nylon.pid
+
+# server settings
+[Server]
+
+# interface to listen to connections
+#Binding-Interface=fxp1
+
+# interface to bind outgoing connections to
+#Connecting-Interface=fxp0
+
+# listening port to bind to
+Port=1080
+
+# allowed is processed first, then deny
+
+# allowable connect ips/ranges
+#Allow-IP=141.0.0.0/8 127.0.0.1 10.0.0.0/24
+Allow-IP=127.0.0.1/32
+# denied connect ips/ranges
+#Deny-IP=10.0.0.0/24
diff --git a/net-proxy/nylon/files/nylon.init b/net-proxy/nylon/files/nylon.init
new file mode 100644
index 000000000000..7c58d3c9bc32
--- /dev/null
+++ b/net-proxy/nylon/files/nylon.init
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Nylon"
+ start-stop-daemon --start --quiet --pidfile /var/run/nylon.pid \
+ --startas /usr/bin/nylon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Nylon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nylon.pid
+ eend $?
+}
+
+
diff --git a/net-proxy/nylon/metadata.xml b/net-proxy/nylon/metadata.xml
new file mode 100644
index 000000000000..5a6f202af08a
--- /dev/null
+++ b/net-proxy/nylon/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>nylon is a proxy server, developed on OpenBSD. It supports SOCKS version 4 and 5,
+as well as a mirror mode so that services can be mirrored directly.</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/nylon/nylon-1.21-r2.ebuild b/net-proxy/nylon/nylon-1.21-r2.ebuild
new file mode 100644
index 000000000000..ec11be51135c
--- /dev/null
+++ b/net-proxy/nylon/nylon-1.21-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools
+
+DESCRIPTION="A lightweight SOCKS proxy server"
+HOMEPAGE="http://monkey.org/~marius/nylon/"
+SRC_URI="http://monkey.org/~marius/nylon/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/libevent-0.6"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( README THANKS )
+
+src_prepare() {
+ default
+
+ eapply "${FILESDIR}"/${P}-libevent.patch
+ eautoreconf
+}
+
+src_install() {
+ default
+ insinto /etc ; doins "${FILESDIR}/nylon.conf"
+ newinitd "${FILESDIR}/nylon.init" nylond
+}
diff --git a/net-proxy/obfs4proxy/Manifest b/net-proxy/obfs4proxy/Manifest
new file mode 100644
index 000000000000..db683f00a681
--- /dev/null
+++ b/net-proxy/obfs4proxy/Manifest
@@ -0,0 +1,7 @@
+DIST obfs4proxy-0.0.6.tar.gz 67151 SHA256 a7b0a96ca3d1ed4d149bacab39b1b57477f8a5350d91e46bca15d6237ab1c0e0 SHA512 fb1584cec5db09ffc1124497daffd1cab1f9895eb080334004356cd08ec463a65226187c8462d8fe60df30f4c8c321ae8fb38e0c7b8a64216ed9413927bcd303 WHIRLPOOL e920a5fdd8b3b726b232a5dc4c59ba4015bad14361867be15959a3c3327c5bcd560faa91326ad6dc4291f8e4256221f23ed444ed96928090e45d88bcd04d8207
+DIST obfs4proxy-0.0.7.tar.gz 67479 SHA256 8e2f0fcb93ccc788601d00e84677624f6a03b785fd2e19e41740a5d15ae3510e SHA512 57b71138a139b1821cf58c8e1965f207a6164a046bbfc8d6da828351d4f5bf4ecfb63ca5c69dba834c4e3a72362089d2a7fd296278115c0cae1c53c51d1b124d WHIRLPOOL 63fd353fc0293d8f73477b5dac1b16a63ed373e27cefd1bbf79455e6d12f20809733f84561c18f58ef2774880d3068e4cc7a88ab1aa459f295f61590b478d127
+EBUILD obfs4proxy-0.0.6.ebuild 1069 SHA256 3a8488497006cf009ef1c2be60fbcf6017857db152e8f504d863fd75aaccdfe4 SHA512 fa8d46550b22999d19bc32e1edcc5818af539524d4db196822c4f6e3f50386ee6b7769d8fe680ab3403ba46cc037ed153e63e2b559a22b5887457fb15a3e4481 WHIRLPOOL 355a7eb34dcfa0ef65808b91798a2b8d35819db1f1a3dcf8e44a4a6fc8a9a68b853944e641688bf147819ffd233f7f9c09d0a2057858704e533cba7f18d2d3a4
+EBUILD obfs4proxy-0.0.7.ebuild 1069 SHA256 3a8488497006cf009ef1c2be60fbcf6017857db152e8f504d863fd75aaccdfe4 SHA512 fa8d46550b22999d19bc32e1edcc5818af539524d4db196822c4f6e3f50386ee6b7769d8fe680ab3403ba46cc037ed153e63e2b559a22b5887457fb15a3e4481 WHIRLPOOL 355a7eb34dcfa0ef65808b91798a2b8d35819db1f1a3dcf8e44a4a6fc8a9a68b853944e641688bf147819ffd233f7f9c09d0a2057858704e533cba7f18d2d3a4
+EBUILD obfs4proxy-9999.ebuild 1059 SHA256 08a38259665346f7db6ae63c33a445b290cc3dd33c7bf5495ef49a734f939034 SHA512 684941e22024940353dc8e558556093fc6939d03b8d050a641b6f8f4126440ea9418a1487a2a9c50b01a78d1e23d63eae26eed7f8855f3f928a0c2fabf1db981 WHIRLPOOL 8dfcfb854a91bd4cb98117eb655593d2355033ba189b50c8f5c3101c3c8e7022d3c82c7ef5825cd02ea7cdf64ec91e34c4a8b94678f797ced2e9dee5a008005f
+MISC ChangeLog 2740 SHA256 b8ff0b8b61b94c8d9c34c6e863c2a8b6510b7094b04046ff681a0b0ccfcc9fe7 SHA512 b60346f3c4f2a0f5cff5711e84d55b47726c9a4ed37ef648cef260e0b366a10ceb2381a5a22f0ec04f98908f63c9d5a4a851b767fe9fd68f41ec8e2d09744a6e WHIRLPOOL b5224d79e92bc5dcf3e37687213df68390d2f3fc8ea2b0b24ec5db1d1c07f3d1c93b762800d7e061487bef9d0ef5605b6fa8c98aff053a8103882db07a008aae
+MISC metadata.xml 436 SHA256 7086e1e7dfe2e2c76aeab97fc1f5e30618ef1716addac0b604fd2b263d894db6 SHA512 0077fbce7545acc98c3964643cc51be782d7aa0fe82fc1b3b44b89a6611e9b95bd579ae143c57a5c16f58c16c406f7fcbdd79e8b4e50f433092903ba6e2d3989 WHIRLPOOL 8ed1017266f94c948c98fe7989108fe419e780b48972a8bd9171886873b6db4a395a49c78ebe23a2606c4337aa5c6a705b33aa06968de399762f3e6bf9e9173b
diff --git a/net-proxy/obfs4proxy/metadata.xml b/net-proxy/obfs4proxy/metadata.xml
new file mode 100644
index 000000000000..ad68b3f3f066
--- /dev/null
+++ b/net-proxy/obfs4proxy/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Yawning/obfs4</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/obfs4proxy/obfs4proxy-0.0.6.ebuild b/net-proxy/obfs4proxy/obfs4proxy-0.0.6.ebuild
new file mode 100644
index 000000000000..bc277f9039df
--- /dev/null
+++ b/net-proxy/obfs4proxy/obfs4proxy-0.0.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-build
+
+EGO_SRC=git.torproject.org/pluggable-transports/obfs4.git
+EGO_PN=${EGO_SRC}/...
+
+if [[ ${PV} == "9999" ]];
+then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64 ~arm ~x86"
+ EGIT_COMMIT="${P}"
+ SRC_URI="https://github.com/Yawning/obfs4/archive/${P}.tar.gz -> ${P}.tar.gz"
+ inherit golang-vcs-snapshot
+fi
+
+DESCRIPTION="An obfuscating proxy supporting Tor's pluggable transport protocol obfs4"
+HOMEPAGE="https://github.com/Yawning/obfs4"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-go/ed25519
+ dev-go/go-crypto
+ dev-go/go-net
+ dev-go/goptlib
+ dev-go/siphash"
+RDEPEND=""
+
+src_compile() {
+ golang-build_src_compile
+ local binfile=$(find "${T}" -name a.out)
+ [[ -x ${binfile} ]] || die "a.out not found"
+ cp -a ${binfile} obfs4proxy
+}
+
+src_install() {
+ default
+ dobin obfs4proxy || die "install failed"
+ cd src/${EGO_SRC}
+ doman doc/obfs4proxy.1 || die "install failed"
+ dodoc README.md ChangeLog doc/obfs4-spec.txt || die "install failed"
+}
diff --git a/net-proxy/obfs4proxy/obfs4proxy-0.0.7.ebuild b/net-proxy/obfs4proxy/obfs4proxy-0.0.7.ebuild
new file mode 100644
index 000000000000..bc277f9039df
--- /dev/null
+++ b/net-proxy/obfs4proxy/obfs4proxy-0.0.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-build
+
+EGO_SRC=git.torproject.org/pluggable-transports/obfs4.git
+EGO_PN=${EGO_SRC}/...
+
+if [[ ${PV} == "9999" ]];
+then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64 ~arm ~x86"
+ EGIT_COMMIT="${P}"
+ SRC_URI="https://github.com/Yawning/obfs4/archive/${P}.tar.gz -> ${P}.tar.gz"
+ inherit golang-vcs-snapshot
+fi
+
+DESCRIPTION="An obfuscating proxy supporting Tor's pluggable transport protocol obfs4"
+HOMEPAGE="https://github.com/Yawning/obfs4"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-go/ed25519
+ dev-go/go-crypto
+ dev-go/go-net
+ dev-go/goptlib
+ dev-go/siphash"
+RDEPEND=""
+
+src_compile() {
+ golang-build_src_compile
+ local binfile=$(find "${T}" -name a.out)
+ [[ -x ${binfile} ]] || die "a.out not found"
+ cp -a ${binfile} obfs4proxy
+}
+
+src_install() {
+ default
+ dobin obfs4proxy || die "install failed"
+ cd src/${EGO_SRC}
+ doman doc/obfs4proxy.1 || die "install failed"
+ dodoc README.md ChangeLog doc/obfs4-spec.txt || die "install failed"
+}
diff --git a/net-proxy/obfs4proxy/obfs4proxy-9999.ebuild b/net-proxy/obfs4proxy/obfs4proxy-9999.ebuild
new file mode 100644
index 000000000000..d3b71a94e5cf
--- /dev/null
+++ b/net-proxy/obfs4proxy/obfs4proxy-9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-build
+
+EGO_SRC=git.torproject.org/pluggable-transports/obfs4.git
+EGO_PN=${EGO_SRC}/...
+
+if [[ ${PV} == "9999" ]];
+then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64"
+ EGIT_COMMIT="${P}"
+ SRC_URI="https://github.com/Yawning/obfs4/archive/${P}.tar.gz -> ${P}.tar.gz"
+ inherit golang-vcs-snapshot
+fi
+
+DESCRIPTION="An obfuscating proxy supporting Tor's pluggable transport protocol obfs4"
+HOMEPAGE="https://github.com/Yawning/obfs4"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-go/ed25519
+ dev-go/go-crypto
+ dev-go/go-net
+ dev-go/goptlib
+ dev-go/siphash"
+RDEPEND=""
+
+src_compile() {
+ golang-build_src_compile
+ local binfile=$(find "${T}" -name a.out)
+ [[ -x ${binfile} ]] || die "a.out not found"
+ cp -a ${binfile} obfs4proxy
+}
+
+src_install() {
+ default
+ dobin obfs4proxy || die "install failed"
+ cd src/${EGO_SRC}
+ doman doc/obfs4proxy.1 || die "install failed"
+ dodoc README.md ChangeLog doc/obfs4-spec.txt || die "install failed"
+}
diff --git a/net-proxy/pingtunnel/Manifest b/net-proxy/pingtunnel/Manifest
new file mode 100644
index 000000000000..dcc0750c9724
--- /dev/null
+++ b/net-proxy/pingtunnel/Manifest
@@ -0,0 +1,6 @@
+AUX pingtunnel-0.72_makefile.patch 1587 SHA256 797b84b27508f5233c9781056c611d8b3834ed788c457234fa52dc24e7533388 SHA512 901258ec0f299441ab65bc38240f735fd46a5faf6c33d8011bc3dd88c40bf85ec267cdf6a7e90bdb8abc7f688fb6332d9571c4949321fa8dfa4403d175f3eb32 WHIRLPOOL 967dfa0634ab2bc4105e1fb86af5a9b987d47adb0d40f049e72ad47c718395c630c8316d09e40e4e4b8706e872932a3fbfa54a8409f819553280d9c24443b81a
+DIST PingTunnel-0.72.tar.gz 64188 SHA256 b318f7aa7d88918b6269d054a7e26f04f97d8870f47bd49a76cb2c99c73407a4 SHA512 943fc571ca95bb6af59f2a74458470865a89a502145bb1e5cf9b86159d61d897418d10d100691337f299892af7aba65964624462068a77ef1645890a4abf5d17 WHIRLPOOL a39fe5cc57d87b5977fcec53083a405c5310d74ea857af3a3837c0347d78c217a3e8fc911130a93e2ec1ab43f793104185cfeb7277caf6dc7b70b2c0209d0b74
+EBUILD pingtunnel-0.72.ebuild 694 SHA256 8ea30f03ccbc3bdadd6e08fe534ea7bbc86cf542f5f842b3f3c01ac0141038ec SHA512 648f2e55dc9191dadf6223ef145b883b1705ea0a40d5bcacbfc82eb5e281ae9f7315de160246ba105433fc84cdc8cd80eea3e3fa3dd8c14558a1f86ef9589c69 WHIRLPOOL e4f0f6a26cbcb7f81d0eba9c31b028d57736cf1b13e846d96b01d91430552b7b8f0aad1181e3ec0f18afa5bc4a33ba0ab2f8f2566878c864373e237ed7100aa8
+MISC ChangeLog 2225 SHA256 e5c8b1dedafb17dc52c00857bd437f547d67bb4a2b2c7b539935e0de69d0a654 SHA512 575409fb2a08b6e1233941335ff9e526694ad678d8b4fa1b5f274377d293a6eca15de10d04a09cc68aa7cb9bbda31790ea110d7e92e5329915fc7abc2d2f916e WHIRLPOOL ce8f6b3802f4d6ccb371762a405e40676b244cba16845fcf2e754667856f25fd3d3a214a03624532e30765562d905ebe1bb09f3881b4cd8b190d5da0ec97a7fc
+MISC ChangeLog-2015 1522 SHA256 67c784cf87644d7858ff65a0b288560db9b9fda5707a704853dbf6e2628df9fe SHA512 43d8dea81ab100798fec5646f9e4733b14cb58abcc3212ad26349a5c31cc9b70c4d517fc75807085e3d3391fa2624b1ffe920929ec3c98912f3e0444f7da0bdf WHIRLPOOL 20bb50018a91d617d98c79a18db0d36d68700d3d3112c93ea0e05374f1bc173ed5e23e18741236e40a2c074eed4f73f930e62275d346c38f609736c143c27766
+MISC metadata.xml 436 SHA256 5c46b1a986beccf7adc5c23f5c624c243c7203335dfebe9cf3525c2e2483320b SHA512 013ade7657982958b210224c87210ff270c2b045973b93482d1e3758ab2539b1c7cba9b8d4414cc0d86fa53f6edd6158cd28b5f60b2acb2c00d3fc0dea29a049 WHIRLPOOL fef2335cf0bb1f48a1510f7e7945581d2c4944973078ee37a7803631d3666541513def399f1e82340ae0e1cb4de47034cd3cf566cc797e549d5f921a578f4c94
diff --git a/net-proxy/pingtunnel/files/pingtunnel-0.72_makefile.patch b/net-proxy/pingtunnel/files/pingtunnel-0.72_makefile.patch
new file mode 100644
index 000000000000..9dce0992cbda
--- /dev/null
+++ b/net-proxy/pingtunnel/files/pingtunnel-0.72_makefile.patch
@@ -0,0 +1,60 @@
+--- Makefile
++++ Makefile
+@@ -2,11 +2,26 @@
+ # (c) 2004-2009 Daniel Stoedle, daniels@cs.uit.no
+ # ptunnel.exe target added by Mike Miller, mike@mikeage.net
+
+-CC = gcc
+-CFLAGS = -Wall -g
+-LDOPTS = -lpthread -lpcap
++# set to 1 to enable debug symbols
++DEBUG=0
++
++# set to 1 to enable selinux support
++SELINUX=0
++
++CC ?= gcc
++CFLAGS += -Wall
++LIBS += -lpthread -lpcap
+ PT_OBJS = ptunnel.o md5.o
+
++ifeq ($(DEBUG),1)
++CFLAGS += -g
++endif
++
++ifeq ($(SELINUX),1)
++CPPFLAGS += -DHAVE_SELINUX
++LIBS += -lselinux
++endif
++
+ WIN32_CC = mingw32-gcc
+ WIN32_CFLAGS = -g -Wall -DWIN32 -I"c:\Program Files\WpdPack\Include"
+ WIN32_LDOPTS = -lwpcap -lwsock32 -L"c:\Program Files\WpdPack\Lib"
+@@ -26,13 +41,13 @@
+
+
+ install: ptunnel
+- install -d $(bindir)/
+- install -d $(mandir)/
+- install ./ptunnel $(bindir)/ptunnel
+- install ./ptunnel.8 $(mandir)/ptunnel.8
++ install -d "$(DESTDIR)/$(bindir)/"
++ install -d "$(DESTDIR)/$(mandir)/"
++ install -m755 ./ptunnel "$(DESTDIR)/$(bindir)/ptunnel"
++ install -m644 ./ptunnel.8 "$(DESTDIR)/$(mandir)/ptunnel.8"
+
+ ptunnel: $(PT_OBJS)
+- $(CC) -o $@ $^ $(LDOPTS) `[ -e /usr/include/selinux/selinux.h ] && echo -lselinux`
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+ ptunnel.exe: $(WIN32_PT_OBJS)
+ $(CC) -o $@ $^ $(WIN32_LDOPTS)
+@@ -47,7 +62,7 @@
+ $(CC) $(CFLAGS) -MM *.c > $@
+
+ %.o:%.c
+- $(CC) $(CFLAGS) `[ -e /usr/include/selinux/selinux.h ] && echo -DHAVE_SELINUX` -c -o $@ $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+ %.obj:%.c
+ $(WIN32_CC) $(WIN32_CFLAGS) -c -o $@ $<
diff --git a/net-proxy/pingtunnel/metadata.xml b/net-proxy/pingtunnel/metadata.xml
new file mode 100644
index 000000000000..63278481cf70
--- /dev/null
+++ b/net-proxy/pingtunnel/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+</maintainer>
+<longdescription>Ptunnel is an application that allows you to reliably tunnel TCP connections to a remote host
+using ICMP echo request and reply packets, commonly known as ping requests and replies.</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/pingtunnel/pingtunnel-0.72.ebuild b/net-proxy/pingtunnel/pingtunnel-0.72.ebuild
new file mode 100644
index 000000000000..53bc36aeacc6
--- /dev/null
+++ b/net-proxy/pingtunnel/pingtunnel-0.72.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Tunnel TCP over ICMP"
+HOMEPAGE="http://www.cs.uit.no/~daniels/PingTunnel"
+SRC_URI="http://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
+IUSE="doc selinux"
+
+DEPEND="
+ net-libs/libpcap
+ selinux? ( sys-libs/libselinux )
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/PingTunnel
+
+src_prepare(){
+ epatch "${FILESDIR}"/${P}_makefile.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake $(usex selinux "SELINUX=1" "SELINUX=0")
+}
+
+src_install() {
+ default
+ use doc && dohtml web/*
+}
diff --git a/net-proxy/piper/Manifest b/net-proxy/piper/Manifest
new file mode 100644
index 000000000000..658163981f7a
--- /dev/null
+++ b/net-proxy/piper/Manifest
@@ -0,0 +1,5 @@
+DIST piper-1.14.tar.gz 20121 SHA256 5f644ce2d0aa36d8059ae53630d781285621fb234ed5f16e79bb1e4ccf3f7ea1 SHA512 5e436a13f93adbdbebe6df6b6113d94c4e4c2ae0b7a8ad1c526d378b9e919aedc8e005ebabe84b5682fe75e066fc786da861ec5d28572e9f235349c8b106544e WHIRLPOOL f50412b220e3b5fcfbc18f03be646b5996eff2a729b5ef4ce98bc8d16a333a52e935f38df28405c299fef1671ea8449bd895602fde8705a8ca2764879fde7363
+EBUILD piper-1.14.ebuild 503 SHA256 d0b1010b154a6e3c3de25001d6fefa7f8aed74adbc4985bd4cd1e0a4bca4484f SHA512 9f003e3da749bfcff9e1fa74e6a7b0618b60172d37625d398cb3010d54196ba87dcb750a6f93e789e18fbed865614293e5e21d4594011a40d0ac9e11dc7334a8 WHIRLPOOL 4f5f675d30c7326ec029637e5e8e3a958a6c59fcfd80a5686284193f855e9f66a5be9def231613ba809277a3ab6e52aefb43c4d51f6e85605741705e914af354
+MISC ChangeLog 2169 SHA256 bca4f901914c8fa3f18073f877356bd74b0de741a1a2bb8cb0a04e79f8e711a7 SHA512 2f242c55672731109aff200c029284f823d2c800541574dec1931e006580b4f439e9391fbf2001e221d81c5f88eb9ba04da77c6b9c9688cdcd942339aa24eac9 WHIRLPOOL 4b098752049cc71a9947f327de30718e824a2ba4c3cc4293fbd6b57b7cd1d4be4dc09b4fd0242845807b52b4eb0355521973cc6830f401b4c141583e2d39bfae
+MISC ChangeLog-2015 388 SHA256 9a1b90db5812ba9d75781b416f6bc47ab53379f6cecc74a7c895e03fbff234e1 SHA512 51b1d8ad837c2f8fed0173b9534d63dbdf939906fc4afb6a72f486b05d5f77a34e20202fe93ef1ab401e9740c4a5e9a19e0950b96f602e8260fbea5ba0c3a5d1 WHIRLPOOL 1fe42617ade91385d6c44c38725aa72ca050889262fd36f16eae321cf007648cf2ac96306227d930deac127a44f460d6da55f995dbc53069c3549bb71ef381ee
+MISC metadata.xml 216 SHA256 f7475919f28a8a93ec8bd025c8f8bbab918f66d0d1737420c876f0480308fe6a SHA512 e881b59fe49746eb25ad66c258b41aba501e4eb563129093a3898ea970a20506e7898f7c355cfcf99605234962bf2c77c1309c258b9a2b84ee4302ccb71c9dbd WHIRLPOOL 163285b60aa93e00993af659dc1e29a9eb245bd3415dd5ec75b284250596165f469028102b72fa0c344834443a44c1bbcf6272fe6a3f5211f721fc96e1c6ec16
diff --git a/net-proxy/piper/metadata.xml b/net-proxy/piper/metadata.xml
new file mode 100644
index 000000000000..79d462e85571
--- /dev/null
+++ b/net-proxy/piper/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-proxy/piper/piper-1.14.ebuild b/net-proxy/piper/piper-1.14.ebuild
new file mode 100644
index 000000000000..9d0e6cf38cea
--- /dev/null
+++ b/net-proxy/piper/piper-1.14.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Piper (a tool for manipulating SOCKS5 servers)"
+HOMEPAGE="http://www.qwirx.com/"
+SRC_URI="http://www.qwirx.com/piper/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+DEPEND=""
+#RDEPEND=""
+
+src_compile() {
+ append-flags -g -Wall
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin piper
+ dodoc README
+}
diff --git a/net-proxy/polipo/Manifest b/net-proxy/polipo/Manifest
new file mode 100644
index 000000000000..dc8c51c488f6
--- /dev/null
+++ b/net-proxy/polipo/Manifest
@@ -0,0 +1,10 @@
+AUX config 167 SHA256 3b600497508790390eb5413cc53ab04bfe8b083324472732b11847acddc91bda SHA512 a92a738016ed6da4fa47d23b2cfdb5296b0c1a818eabcf319550f62e41ba45d6a9103bd7cd956a417cab3b87d18f16227fd9fbadb95dcc267c3983c61d4bdd00 WHIRLPOOL 216fa4587def4639b05a16d7a53fc96f9ef7bd3a4defd9fd4c7e0e38dd0d7265af7563ffcf710a3bc00ffb702262921aec44a38f8cc152ebecce7a6a4fd4801d
+AUX polipo.crond-2 640 SHA256 b17f66c5f8eeb26c698f56458c607dbce8b630257c64c497aa8031d6010a68b3 SHA512 36c13e9790210c378968d9c6958be412fd2f1d2739aab560d8df4064fb92cb2b79dbfcb3e674f285b48eb42a3b2c6226862d1d0f9a6ce28e14de5797d62f1354 WHIRLPOOL 89227fd7a033236fd8255ed1161ba5279d660c2beb2887482bb7ca9844a2fa243752ba07e8491f7e3064490542909bbbc4dfcac19f369e8fb5828e495fa8e8ba
+AUX polipo.initd-5 1536 SHA256 81c0bf86e26770ae9e522fcce86ab05528d37ce8ad3ce1bcf17250bbd0285a6a SHA512 9a1da0f1a156ce58ed25b20d4e06ac11c0a3040bc032a77c688a518dcb308c6f8ffe6bdeaa608d03fd1feead89ac5f04ce98853de88d32a1af0a79005a0c26bd WHIRLPOOL a8a40cb436f71d80a87d4d87c52eabf7f85d709149d4bb88a313f9d2586de87d3ae1a03c142a7f63bce5cb0c5a837c5c7135cffcbbf9d6b39395458b861e0ff9
+AUX polipo_at.service 184 SHA256 2f193ad5a6cdedc6b53179c1bf6c170141cb850166f290212f3bf57dd6df164e SHA512 cc4d1c1b4cf8dfd835956d73292282892e64cb3f2f0e4cfb09f816912d078cee793dcb5ed09037b52accfca6239edf7411ef82d4e1bc57d4be97a5163536cb23 WHIRLPOOL 94babbdce84bdcad508531dbfac57ddb90fe823c7bde9b5444800a5d684a599acbcdf4b3d356da4f76f5ec37994175364fec44abcbfe824c984ab39b2c622a7a
+DIST polipo-1.1.1.tar.gz 182891 SHA256 a259750793ab79c491d05fcee5a917faf7d9030fb5d15e05b3704e9c9e4ee015 SHA512 7324ca96c19bf9f089146a12dba349ea8cd2669ee02d0599ed6c6116d11eb0e7cef7830d91d16921ba5cdd0ce06e6f831901832326d8118ebe0a565feeec7fb1 WHIRLPOOL 2904a68cc64500dc6207713e255e49eb6d9fb3d73c0ff80c19b71cf1ae6ceee533b625643c7a177924f4d254deae659cdc4137218ae152582da65d0b933f65e3
+EBUILD polipo-1.1.1-r4.ebuild 1646 SHA256 c5a1f7309e85e343811fc80b7438f14c0ecc8bc3c2625f3338969105cae9437b SHA512 e36c7738bac32f9982a9239f13f46170b8e8b24429c46ee41cb4268d95b7568d7335b6493959f70ffd916570460378148e5f6df65b61d07331bc2bca621f2e8f WHIRLPOOL db263347e0cee69fcbb2b56854348f91e6372de9ae155a5557d4e4705e5e925c6d5b8fd34c9579d87008375bcdd23628acb3cad75a1e0e5cc6581ca57b71d1d5
+EBUILD polipo-9999.ebuild 1648 SHA256 60e299e3c3af9b13330132fb38f6b0fe274b6f2e2de80be07383d7586184156f SHA512 a91d887ce7ce9ce0f204cb67d2ae4cdbd7921a3f86e48c171a652ab283142aafa6c67dcadab03a01991f82399cb36c858ae6d68c45e587141d81b9da41ea496f WHIRLPOOL b57389de43ca1e9a62db8074aaf06b7d45f401abec06ec875b474d9a29ef9824a638ca6fb6c26157496d300d82a0904becc5a8f7aab11be195d1ca5247c756e7
+MISC ChangeLog 3750 SHA256 242b9cf53bfd3a03777d0f06f638eaf7b880cfe941f6079a584136a74771dfbf SHA512 13ca0ea97a4f8b4414d89ebd7bc81365dc24c7296f6ca823f3377c990fd832da761c4c7d7cb6bf816958b20358f03d98c2149bc2eb81991ca075b39dc56a2440 WHIRLPOOL c7e3c54211aace2e3279e7dad7a95bf720d1b0e99ee6ab549894eef888bbee2d3f680779028c677d701b8c324ad86470acb7867b03efd3af7adc5dfcc5382acc
+MISC ChangeLog-2015 8299 SHA256 699e9330747db84488836868e58e3532f4086ea7257f7b0652a7091903b2a378 SHA512 aa2bef1b67188fb42ce2792607bbbdddefcb404f2300225fe594ac410723f999d7321bab977d1e85d2f357210f2572d7f49d3bdce8024e61279c4037df888a51 WHIRLPOOL a4f8dad130932b0bc4eb59808a18f468dab5a799a66019eadf41c6d0300c96eaa57085d048efe2b3fee573136f1f7a789b1701a982c425658090469786b958c5
+MISC metadata.xml 350 SHA256 b6b6c04d0fa2a18accb7bb9c74924ba3b25d417fe6cc7d844bc28271aad36ca6 SHA512 f1a615c85840eaaeaf3ffddc6ee4cf6e0c63b75227ffbbc6d3eb2c02809d45110610a39a4872497f31c5966a23056a6c1190d9db84c2817252df8e6f61ebe7a9 WHIRLPOOL 9f1f59b6aff7ac0261e1910f6717fed35de14c057eba5f0121acdc92f420a304f4d7d3f93a9b35a2574b6f75be20fde692a34903b5ffdff76931766a2610b694
diff --git a/net-proxy/polipo/files/config b/net-proxy/polipo/files/config
new file mode 100644
index 000000000000..4c9235582594
--- /dev/null
+++ b/net-proxy/polipo/files/config
@@ -0,0 +1,8 @@
+daemonise=false
+diskCacheRoot=/var/cache/polipo/
+proxyAddress=127.0.0.1
+proxyName=localhost
+serverSlots=4
+serverMaxSlots=8
+cacheIsShared=true
+allowedClients=127.0.0.1
diff --git a/net-proxy/polipo/files/polipo.crond-2 b/net-proxy/polipo/files/polipo.crond-2
new file mode 100644
index 000000000000..6b2d609d6d6a
--- /dev/null
+++ b/net-proxy/polipo/files/polipo.crond-2
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Loop through all init.d instances
+for f in /etc/init.d/polipo*; do
+ # only proceed if daemon is running
+ "${f}" --quiet status || continue
+
+ myname="${f#/etc/init.d/polipo}"
+ conffile="/etc/polipo/config${myname}"
+ pidfile="/var/run/polipo${myname}.pid"
+
+ # check if disk cache is enabled
+ polipo -v -c "${CONFFILE}" |
+ awk '$1 ~ /diskCacheRoot/ { if ($3 == "(none)") exit 1}' ||
+ continue
+
+ # Expire old cached objects
+ kill -USR1 $(cat "${pidfile}")
+ sleep 1
+ nice -n 15 su -s "/bin/sh" -c "polipo -c ${conffile} -x" polipo > /dev/null
+ kill -USR2 $(cat "${pidfile}")
+done
diff --git a/net-proxy/polipo/files/polipo.initd-5 b/net-proxy/polipo/files/polipo.initd-5
new file mode 100644
index 000000000000..08f3394eda68
--- /dev/null
+++ b/net-proxy/polipo/files/polipo.initd-5
@@ -0,0 +1,65 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CONFFILE="/etc/polipo/config${SVCNAME#polipo}"
+PIDFILE="/var/run/${SVCNAME}.pid"
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ { polipo -v -c "${CONFFILE}" || return 1 ; } | {
+ local retvalue=0
+ local name type value desc
+ while read name type value desc ; do
+ case ${name} in
+ configFile)
+ if [ "${value}" = "(none)" ] ; then
+ eerror "Unable to read configuration file /etc/polipo/config"
+ retvalue=1
+ fi
+ ;;
+ daemonise)
+ if [ "${value}" != "false" ] ; then
+ eerror "Configuration option not supported by this init script: ${name}=${value}"
+ retvalue=1
+ fi
+ ;;
+ pidFile)
+ if [ "${value}" != "(none)" ] ; then
+ eerror "Configuration option not supported by this init script: ${name}=${value}"
+ retvalue=1
+ fi
+ ;;
+ diskCacheRoot)
+ if [ "${value}" != "(none)" ] ; then
+ # Ensure that cache directory exists and have proper permissions
+ if ! [ -d "{value}" ]; then
+ mkdir -p -m 0750 "${value}"
+ chown polipo:polipo "${value}"
+ fi
+ fi
+ ;;
+ esac
+ done
+ return ${retvalue}
+ }
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME} HTTP proxy"
+ start-stop-daemon --start --user polipo \
+ --background --pidfile "${PIDFILE}" --make-pidfile \
+ --exec /usr/bin/polipo -- -c "${CONFFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME} HTTP proxy"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-proxy/polipo/files/polipo_at.service b/net-proxy/polipo/files/polipo_at.service
new file mode 100644
index 000000000000..5018ac6c75e0
--- /dev/null
+++ b/net-proxy/polipo/files/polipo_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Polipo Proxy Server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/polipo -c /etc/polipo/%i
+User=polipo
+PrivateDevices=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/polipo/metadata.xml b/net-proxy/polipo/metadata.xml
new file mode 100644
index 000000000000..7833140b1e69
--- /dev/null
+++ b/net-proxy/polipo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+</maintainer>
+<longdescription>A small and fast caching web proxy designed to be used by one person or a small group of people.</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/polipo/polipo-1.1.1-r4.ebuild b/net-proxy/polipo/polipo-1.1.1-r4.ebuild
new file mode 100644
index 000000000000..9af6bb0e936b
--- /dev/null
+++ b/net-proxy/polipo/polipo-1.1.1-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ _GIT=git-r3
+ EGIT_REPO_URI="https://github.com/jech/${PN}.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://www.pps.jussieu.fr/~jch/software/files/${PN}/${P}.tar.gz"
+ KEYWORDS="amd64 x86"
+fi
+
+inherit ${_GIT} toolchain-funcs user systemd
+
+DESCRIPTION="A caching web proxy"
+HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/"
+LICENSE="MIT GPL-2"
+SLOT="0"
+IUSE="systemd"
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/cache/${PN} ${PN}
+}
+
+src_compile() {
+ tc-export CC
+ emake PREFIX=/usr "CDEBUGFLAGS=${CFLAGS}" all
+}
+
+src_install() {
+ einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}"
+
+ newinitd "${FILESDIR}/${PN}.initd-5" ${PN}
+ insinto /etc/${PN} ; doins "${FILESDIR}/config"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ if ! use systemd; then
+ exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN}
+ fi
+
+ dodoc CHANGES README
+ dohtml html/*
+}
+
+pkg_postinst() {
+ elog "Do not forget to read the manual."
+ elog "Change the config file in /etc/${PN} to suit your needs."
+ elog ""
+ elog "Polipo init scripts can now be multiplexed:"
+ elog "1. create /etc/${PN}/config.foo"
+ elog "2. symlink /etc/init.d/{${PN}.foo -> ${PN}}"
+ elog " a. if you are using OpenRC, symlink /etc/init.d/{${PN}.foo -> ${PN}}"
+ elog " b. if you are using systemd, execute \"systemctl enable polipo@config.foo\""
+ elog "3. make sure all instances use unique ip:port pair and cachedir, if any"
+}
diff --git a/net-proxy/polipo/polipo-9999.ebuild b/net-proxy/polipo/polipo-9999.ebuild
new file mode 100644
index 000000000000..02fb9f59cb50
--- /dev/null
+++ b/net-proxy/polipo/polipo-9999.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ _GIT=git-r3
+ EGIT_REPO_URI="https://github.com/jech/${PN}.git"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://www.pps.jussieu.fr/~jch/software/files/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit ${_GIT} toolchain-funcs user systemd
+
+DESCRIPTION="A caching web proxy"
+HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/"
+LICENSE="MIT GPL-2"
+SLOT="0"
+IUSE="systemd"
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/cache/${PN} ${PN}
+}
+
+src_compile() {
+ tc-export CC
+ emake PREFIX=/usr "CDEBUGFLAGS=${CFLAGS}" all
+}
+
+src_install() {
+ einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}"
+
+ newinitd "${FILESDIR}/${PN}.initd-5" ${PN}
+ insinto /etc/${PN} ; doins "${FILESDIR}/config"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ if ! use systemd; then
+ exeinto /etc/cron.weekly ; newexe "${FILESDIR}/${PN}.crond-2" ${PN}
+ fi
+
+ dodoc CHANGES README
+ dohtml html/*
+}
+
+pkg_postinst() {
+ elog "Do not forget to read the manual."
+ elog "Change the config file in /etc/${PN} to suit your needs."
+ elog ""
+ elog "Polipo init scripts can now be multiplexed:"
+ elog "1. create /etc/${PN}/config.foo"
+ elog "2. symlink /etc/init.d/{${PN}.foo -> ${PN}}"
+ elog " a. if you are using OpenRC, symlink /etc/init.d/{${PN}.foo -> ${PN}}"
+ elog " b. if you are using systemd, execute \"systemctl enable polipo@config.foo\""
+ elog "3. make sure all instances use unique ip:port pair and cachedir, if any"
+}
diff --git a/net-proxy/privoxy/Manifest b/net-proxy/privoxy/Manifest
new file mode 100644
index 000000000000..1afc923fd01b
--- /dev/null
+++ b/net-proxy/privoxy/Manifest
@@ -0,0 +1,9 @@
+AUX privoxy-3.0.19-gentoo.patch 3661 SHA256 71c6e6b042a820c44e7110c8a60f7987c826900fd4b22073565977ce63d4860a SHA512 e0f916f33b8f17375b60686a0e4795883f29e46c55e273e0a69fae63d4b4e5a2585bb86b04aa288fdd75cdf51eedf7d72a9f8092e13a853e934e0029ae919a24 WHIRLPOOL 701a5c7ec31b7d2d68801005d81f01ec727712aab7d5d866427a78c940ef2d63201f6ba9e1679bf8e919653b355ea8a0577d4bce5c13b24812d43f2b09797553
+AUX privoxy.initd-3 639 SHA256 7a2e3996dd9dd02307b11ffb2dca8915490283820a6b6c124d808a38badcc505 SHA512 0bfd7ab2e42c4905f2542a4dbd93cf30d15a8808d527e6bcb6b14f75de226c94c0e0dea6ff69bbac37d3da605acfa2035e2d0e9fe0a41d7beb33cfea5ed2340b WHIRLPOOL 589aeafdee5176619163e34c4e037158636f963c596f3cbeb02285abdb9c941a41623580e0b8e994f324c710cbd4aafde762f7f6c527359697bcc3ae16c62432
+AUX privoxy.logrotate 191 SHA256 a14373c8a26aab32f6f025c11a5521d7923ce900d00b31aa61da9f3979e3bb2e SHA512 118caaeac3aba751584c5bdfc737bf5bfeddf1a62fda1f44bcd4654ae2e33183bc1ce6fc66d4a1bdd79766e42e669b1615a6d46d528a1bd49cabdf98385a3bb9 WHIRLPOOL 4f7f576eb52a02daf38ccec68c49ee5ae0d449cbefdc11ecd1a9790eeee99f800576e05467f80a915423aa077ed3769e85a7c03a92679f31d6b3fe4a3aa3a792
+AUX privoxy.service 248 SHA256 35fee00be175e22dffafcd4a61de3a117268d64d506e99b9b3518702c3a20f35 SHA512 0f3484f06521a66b984fda7238f175a135b22fa5a00dc0c8caadd380d21bfecdae7a6c8d2c0d9a4a3c2858539913722be2b7d4fddd17ea2c95f4e151c3f74ca0 WHIRLPOOL 681c7fe28220ddc4194e6e83974878530b4a3aefd3b1a2de66f9b950ea1eb36252b484077c31af9fbbe335d777898e551455ee5c57892f4e43e5966b23b2d05c
+DIST privoxy-3.0.26-stable-src.tar.gz 1741772 SHA256 57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8 SHA512 e448305287d0451c761b76b8d8974ea1ec837b621bbb498a7ff16a54cb4d8f1f734efe2eef03235c01163bb40e225785065aad6ee265a31d90970ab98af11044 WHIRLPOOL 56fc14cea34923186163a91747ba09bbe8c79464ed6668c6776d83f088f3742728ff0b0755e4ca0bfe7a8ed645627b1956876e59256cf76e25f1c13017957779
+EBUILD privoxy-3.0.26.ebuild 3478 SHA256 2c95928e749e6d78d2aa4bba1b8fe49c234127745bddbb80141585dee2545e08 SHA512 377e08a3f25664af85d8340034df3e316a897b5b01d361c1dce9a608de16fe3da7420eddfec2431da2e56f8552e147e256cf346dd8371f1030361f5a28a44e07 WHIRLPOOL cbd9516b62b969e0e7eb5fb96916f1f1e489c8a3b5ad429b3136d5e4eb0b12aa09b083c71e94aaaf4c7bd13e79eaf4e8eb7cf83ec30f55c5b38160bd33a4135d
+MISC ChangeLog 5749 SHA256 be7f6f2e1005ffce129d5805a7c8e4417a0e39b9f59d6a52f7e3e3d0fb304e15 SHA512 d4875acb5485def10f24a0d6e812da42d5d9807bea934e1e98dbb128e1d7b39c9b47857dec3eaf9a0871fdf05416b29db2a1c4146758ed03f84c1a3a2e52c44c WHIRLPOOL c27bec8e0b0a2094db1cdcf1d8f62f8698a8074e09f011a1576ffc00e8fcfd222e67307f715f58fe458e161687e44f76d988badb4f911156ad534b46571a317e
+MISC ChangeLog-2015 21107 SHA256 cd60634a324380d099f5b0f427c10037faf31f4876d51c75b6ff147411f62b24 SHA512 66d2e29ca2f9e9a80b5f56f8af4662bc318fe70de5c3e6b4202c73656be50572302b2e7d09f848a0670e30f706b01c50075a919926265797cc757a41f9355577 WHIRLPOOL 965a2c63d6f228c29985cf30c0547400fb03bebf2254438fb027bef999776520b7211b0b20b32a613709fc7b9fdd754b9a9917f101e66f3da250ef66e6b8e969
+MISC metadata.xml 2327 SHA256 b00664487f467d10e71fb1554048710dc73a6c4db881ca67122265bc11336c61 SHA512 39f6ab39db2aa725e87640c141abbba5d2d06da8681045d02aadf9afd9e7e9b1f0ae2413b1b66ab1917ed0ba7b8e62fe67d5ac57ba91fac5fd6e7459fb74f456 WHIRLPOOL 43a147eadf5792e7fb976b362f83f9b63e5ab9d3cd4284dc8821febb21f8d12afebca6d9d850336ad8eae4c1f7f7ec87e6e0b1f1a1b7c3cb73c9a992d394da4d
diff --git a/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch b/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch
new file mode 100644
index 000000000000..4571e24e1f06
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch
@@ -0,0 +1,114 @@
+--- a/GNUmakefile.in
++++ b/GNUmakefile.in
+@@ -62,8 +62,8 @@
+ MAN_DEST = $(MAN_DIR)/man1
+ MAN_PAGE = privoxy.1
+ SHARE_DEST = @datadir@
+-DOC_DEST = $(SHARE_DEST)/doc/privoxy
+-VAR_DEST = @localstatedir@
++DOC_DEST = @docdir@
++VAR_DEST = /var
+ LOGS_DEST = $(VAR_DEST)/log/privoxy
+ PIDS_DEST = $(VAR_DEST)/run
+
+@@ -852,7 +852,6 @@
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/man-page/*html $(DESTDIR)$$DOC/man-page;\
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/privoxy-index.html $(DESTDIR)$$DOC/index.html;\
+ $(INSTALL) $(INSTALL_T) AUTHORS $(DESTDIR)$$DOC;\
+- $(INSTALL) $(INSTALL_T) LICENSE $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) README $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) ChangeLog $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $(DESTDIR)$$DOC;\
+@@ -923,34 +922,8 @@
+ fi ;\
+ $(ECHO) Installing configuration files to $(DESTDIR)$(CONF_DEST);\
+ for i in $(CONFIGS); do \
+- if [ "$$i" = "default.action" ] || [ "$$i" = "default.filter" ] ; then \
+- $(RM) $(DESTDIR)$(CONF_DEST)/$$i ;\
+- $(ECHO) Installing fresh $$i;\
+ $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
+- elif [ -s "$(CONF_DEST)/$$i" ]; then \
+- $(ECHO) Installing $$i as $$i.new ;\
+- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST)/$$i.new || exit 1;\
+- NEW=1;\
+- else \
+- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
+- fi ;\
+ done ;\
+- if [ -n "$$NEW" ]; then \
+- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(CONF_DEST)/*.new || exit 1 ;\
+- $(ECHO) "Warning: Older config files are preserved. Check new versions for changes!" ;\
+- fi ;\
+- [ ! -f $(DESTDIR)$(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(DESTDIR)$(LOG_DEST) || \
+- $(ECHO) Checking logfiles in $(DESTDIR)$(LOG_DEST) ;\
+- $(TOUCH) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
+- if [ x$$USER != x ]; then \
+- $(CHOWN) $$USER $(DESTDIR)$(LOG_DEST)/logfile || \
+- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
+- fi ;\
+- if [ x$$GROUP_T != x ]; then \
+- $(CHGRP) $$GROUP_T $(DESTDIR)$(LOG_DEST)/logfile || \
+- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
+- fi ;\
+- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
+ if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
+ if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
+ $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \
+--- a/config
++++ b/config
+@@ -265,7 +265,7 @@
+ #
+ # No trailing "/", please.
+ #
+-confdir .
++confdir /etc/privoxy
+ #
+ #
+ # 2.2. templdir
+@@ -322,7 +322,7 @@
+ #
+ # No trailing "/", please.
+ #
+-logdir .
++logdir /var/log/privoxy
+ #
+ #
+ # 2.4. actionsfile
+@@ -462,7 +462,7 @@
+ # Any log files must be writable by whatever user Privoxy is
+ # being run as (on Unix, default user id is "privoxy").
+ #
+-logfile logfile
++logfile privoxy.log
+ #
+ #
+ # 2.7. trustfile
+--- a/default.action.master
++++ b/default.action.master
+@@ -566,7 +566,7 @@
+ +client-header-tagger{css-requests} \
+ +client-header-tagger{image-requests} \
+ +hide-from-header{block} \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Cautious
+
+@@ -588,7 +588,7 @@
+ +hide-from-header{block} \
+ +hide-referrer{conditional-block} \
+ +session-cookies-only \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Medium
+
+@@ -627,7 +627,7 @@
+ +hide-referrer{conditional-block} \
+ +limit-connect{,} \
+ +overwrite-last-modified{randomize} \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Advanced
+
diff --git a/net-proxy/privoxy/files/privoxy.initd-3 b/net-proxy/privoxy/files/privoxy.initd-3
new file mode 100644
index 000000000000..66159ea59838
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.initd-3
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CONFFILE=/etc/${SVCNAME}/config
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ use net
+}
+
+start() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "Configuration file ${CONFFILE} not found!"
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
+ -- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-proxy/privoxy/files/privoxy.logrotate b/net-proxy/privoxy/files/privoxy.logrotate
new file mode 100644
index 000000000000..aa7463bd572e
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.logrotate
@@ -0,0 +1,9 @@
+/var/log/privoxy/privoxy.log /var/log/privoxy/jarfile {
+ missingok
+ notifempty
+ create 0640 privoxy privoxy
+ sharedscripts
+ postrotate
+ killall -HUP privoxy 2>/dev/null || true
+ endscript
+}
diff --git a/net-proxy/privoxy/files/privoxy.service b/net-proxy/privoxy/files/privoxy.service
new file mode 100644
index 000000000000..568123924781
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Privoxy Web Proxy With Advanced Filtering Capabilities
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/privoxy --no-daemon --user privoxy.privoxy /etc/privoxy/config
+SuccessExitStatus=15
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/privoxy/metadata.xml b/net-proxy/privoxy/metadata.xml
new file mode 100644
index 000000000000..ff0981277efe
--- /dev/null
+++ b/net-proxy/privoxy/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Privoxy is a non-caching web proxy with advanced filtering
+ capabilities for enhancing privacy, modifying web page data
+ and HTTP headers, controlling access, and removing ads and
+ other obnoxious Internet junk. Privoxy has a flexible
+ configuration and can be customized to suit individual
+ needs and tastes. It has application for both stand-alone
+ systems and multi-user networks.
+ </longdescription>
+ <use>
+ <flag name="editor">Enable the web-based actions file editor</flag>
+ <flag name="client-tags">Enable support for client-specific tags</flag>
+ <flag name="compression">Allow privoxy to compress buffered content before sending to the client, if it supports it</flag>
+ <flag name="extended-host-patterns">Enable and require PCRE syntax in host patterns. You must convert action files to PCRE, see privoxy-url-pattern-translator.pl Use at your own risk!</flag>
+ <flag name="external-filters">Allow to filter content with scripts and programs. Experimental</flag>
+ <flag name="fast-redirects">Support fast redirects</flag>
+ <flag name="force">Allow single-page disable (force load)</flag>
+ <flag name="graceful-termination">Allow to shutdown Privoxy through the webinterface</flag>
+ <flag name="ie-images">Enable a quick but not always reliable auto-detect whether requests from MS Internet Explorer are for an image or not</flag>
+ <flag name="image-blocking">Allows the +handle-as-image action, to send "blocked" images instead of HTML</flag>
+ <flag name="lfs">Support large files (&gt;2GB) on 32-bit systems</flag>
+ <flag name="png-images">Use PNG format instead of GIF for built-in images</flag>
+ <flag name="stats">Keep statistics</flag>
+ <flag name="toggle">Support temporary disable toggle via web interface</flag>
+ <flag name="tools">Install log parser, regression tester and user agent generator tools</flag>
+ <flag name="whitelists">Support trust files (white lists)</flag>
+ <flag name="zlib">Use <pkg>sys-libs/zlib</pkg> to decompress data before filtering</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ijbswa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/privoxy/privoxy-3.0.26.ebuild b/net-proxy/privoxy/privoxy-3.0.26.ebuild
new file mode 100644
index 000000000000..bf831fb51512
--- /dev/null
+++ b/net-proxy/privoxy/privoxy-3.0.26.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools systemd toolchain-funcs user
+
+[ "${PV##*_}" = "beta" ] &&
+ PRIVOXY_STATUS="beta" ||
+ PRIVOXY_STATUS="stable"
+
+HOMEPAGE="http://www.privoxy.org https://sourceforge.net/projects/ijbswa/"
+DESCRIPTION="A web proxy with advanced filtering capabilities for enhancing privacy"
+SRC_URI="mirror://sourceforge/ijbswa/${P%_*}-${PRIVOXY_STATUS}-src.tar.gz"
+
+IUSE="+acl client-tags compression editor extended-host-patterns
+external-filters +fast-redirects +force graceful-termination
+ie-images +image-blocking ipv6 lfs png-images selinux +stats
++threads toggle tools whitelists +zlib"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
+LICENSE="GPL-2"
+
+DEPEND="
+ dev-libs/libpcre
+ zlib? ( sys-libs/zlib )
+"
+RDEPEND="${DEPEND}
+ extended-host-patterns? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-privoxy )
+ tools? (
+ net-misc/curl
+ dev-lang/perl
+ )
+"
+REQUIRED_USE="
+ compression? ( zlib )
+ toggle? ( editor )
+"
+
+S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.0.19-gentoo.patch )
+
+pkg_pretend() {
+ if ! use threads; then
+ ewarn
+ ewarn "Privoxy may be very slow without threads support, consider to enable them."
+ ewarn "See also http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS"
+ ewarn
+ fi
+}
+
+pkg_setup() {
+ enewgroup privoxy
+ enewuser privoxy -1 -1 /etc/privoxy privoxy
+}
+
+src_prepare() {
+ default
+ mv configure.in configure.ac || die
+ sed -i "s|/p\.p/|/config.privoxy.org/|g" tools/privoxy-regression-test.pl || die
+
+ # autoreconf needs to be called even if we don't modify any autotools source files
+ # See main makefile
+ eautoreconf
+}
+
+src_configure() {
+ # --with-debug only enables debug CFLAGS
+ # --with-docbook and --with-db2html and their deps are useless,
+ # since docs are already pregenerated in the source tarball
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --sysconfdir=/etc/privoxy \
+ --enable-dynamic-pcre \
+ --with-user=privoxy \
+ --with-group=privoxy \
+ $(use_enable acl acl-support) \
+ $(use_enable compression) \
+ $(use_enable client-tags) \
+ $(use_enable editor) \
+ $(use_enable extended-host-patterns) \
+ $(use_enable fast-redirects) \
+ $(use_enable force) \
+ $(use_enable graceful-termination) \
+ $(use_enable ie-images) \
+ $(use_enable image-blocking) \
+ $(use_enable ipv6 ipv6-support) \
+ $(use_enable kernel_FreeBSD accept-filter) \
+ $(use_enable lfs large-file-support) \
+ $(use_enable png-images no-gifs) \
+ $(use_enable stats) \
+ $(use_enable threads pthread) \
+ $(use_enable toggle) \
+ $(use_enable whitelists trust-files) \
+ $(use_enable zlib)
+}
+
+src_install () {
+ default
+
+ newinitd "${FILESDIR}/privoxy.initd-3" privoxy
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/privoxy.logrotate" privoxy
+
+ diropts -m 0750 -g privoxy -o privoxy
+ keepdir /var/log/privoxy
+
+ use extended-host-patterns && newbin tools/url-pattern-translator.pl privoxy-url-pattern-translator.pl
+ if use tools; then
+ dobin tools/{privoxy-log-parser.pl,privoxy-regression-test.pl}
+ newbin tools/uagen.pl privoxy-uagen.pl
+ fi
+}
+
+pkg_postinst() {
+ if use extended-host-patterns; then
+ ewarn
+ ewarn "You enabled extended-host-patterns, now you *must* convert all action files in"
+ ewarn "PCRE-compatible format, or privoxy will fail to start. Helper tool"
+ ewarn "privoxy-url-pattern-translator.pl is available."
+ ewarn
+ fi
+}
diff --git a/net-proxy/ratproxy/Manifest b/net-proxy/ratproxy/Manifest
new file mode 100644
index 000000000000..dcfd811b9287
--- /dev/null
+++ b/net-proxy/ratproxy/Manifest
@@ -0,0 +1,6 @@
+AUX ratproxy-Makefile.patch 678 SHA256 0ef77aa04ea37e6fda98e7c565f0dc3304caa2c87f4545573156af9e73be05d8 SHA512 7bce9854c29ec0b29f73910cadc9dfc08fa7168d104d9db626dd47988d8b46a3183c6c4ef6b8cd3cf0b56b0ab5b0706a881caebc57a17ccaadbd0f17f78f8d07 WHIRLPOOL 3d20b39c8d2ed6b2da0a7e79639406597a2930d0bc84438ec0fe28d788ca15b3719d7f14ca09a6504ddaf54b22217d48cc649adffb4c799539e14be239a4ad53
+DIST ratproxy-1.58.tar.gz 168700 SHA256 2142d5643305713d9be7fcc82a244048076190851e697b645c49b549a7ae0725 SHA512 432189c5863e0937f4dea92087847e6af1563e7a49a6b91b3f610ceb5aa1e25ac24a3bd837298abccfece7b1ad088ffe20cbfcb540dee164a4264bcb10ce89a2 WHIRLPOOL 2710a890dfef624b05a192fcd130290bb65fbbd45973d17a9df7a27c10f247b913968b593e48a305a897b5c98d7f68ed6276c02aa67c88c75b7888db5692d486
+EBUILD ratproxy-1.58.ebuild 960 SHA256 3d269602f51d19bf30a996228433ae42fdde6249e4d3ea34a5f3a1c13184256c SHA512 cebc348d0604c2ce7707fae63099348f6bf71b8eb80c5a5b625353bea3a6b900e522c310c6cdb041bce362b76e4318b60f625dca129e2bcbded00fbc0b52a964 WHIRLPOOL 661a0991c580fe2287b41326ea4800d1dc85ba3d4599dc72b532357a7ea05145ec8578694d536ac6b521d4d014dd1089c4f52541877bdac0ff3b66d6081a7430
+MISC ChangeLog 2874 SHA256 423ad36b0c82c7c1b49fe6001b51e2358eaed1a23c62432b9fb845eed86b82c4 SHA512 37386f649a2335a68cf060e3edacf20dbdfedec65a90180c8436dbe7f5678470933e2a54d0bb700c7badd80fcddb390692f00b4d1c7b7785fe203f5172437500 WHIRLPOOL 42fa4623c94f481ec1280348b691ea58ecb53fa60434af3d4e55c9d7355d4e3da18c5985d559e1ddd15328a6836ce0c69523cc97d1feddbdf63c775025c06139
+MISC ChangeLog-2015 1259 SHA256 569f8769a3972e06f76f6ea14ede484a45524e44e9cfb195521b1dae35623536 SHA512 855a9c93dca8d40c3838e64f0e2e7cb740fb3cb7486e08401c153d55188ca3a4fef00289b88a31b4f9984ba03203e2d5be17598c86bbf948f65f3255926726da WHIRLPOOL 31dffa2c677f95a8b061bcd303ff4640532c279ca5fc12160a1e68fdae31c9461b40283507d93b6c59060765e9d069d0612a26e9fbf7074ee3e99f8eb9b95cfc
+MISC metadata.xml 824 SHA256 035dd14daad9fd84d46d7d61bda9ab9c5859b24fc9559ebf5ed00335f98802ea SHA512 5abef1d46af1f5a8dde0e870b045c89650c90b6f9c4f7f03edb3c0a4c01e9f0ef61c7ec0c392258a06c324019ee52b13a6d965b80b286d4a2438ec503b91cf1b WHIRLPOOL 62b939f7f4ef37a06e3065130dbb3afc264766d0547cd6fa874d910b91198ee03a21c5d6b916812661a62cf182ad53e325564591bd5346d1517328a2f970f571
diff --git a/net-proxy/ratproxy/files/ratproxy-Makefile.patch b/net-proxy/ratproxy/files/ratproxy-Makefile.patch
new file mode 100644
index 000000000000..323b52d1ff13
--- /dev/null
+++ b/net-proxy/ratproxy/files/ratproxy-Makefile.patch
@@ -0,0 +1,19 @@
+--- Makefile.bak 2008-07-08 21:34:10.000000000 +0200
++++ Makefile 2008-07-08 21:35:34.000000000 +0200
+@@ -20,13 +20,13 @@
+ #
+
+ PROGNAME = ratproxy
+-CFLAGS = -Wall -O3 -Wno-pointer-sign -D_GNU_SOURCE
+-LDFLAGS = -lcrypto -lssl
++CFLAGS += -Wall -Wno-pointer-sign -D_GNU_SOURCE
++LIBS = -lcrypto -lssl
+
+ all: $(PROGNAME) flare-check
+
+ $(PROGNAME): $(PROGNAME).c http.c mime.c ssl.c http.h mime.h ssl.h nlist.h config.h debug.h types.h string-inl.h
+- $(CC) $(PROGNAME).c -o $(PROGNAME) $(CFLAGS) http.c mime.c ssl.c $(LDFLAGS)
++ $(CC) $(PROGNAME).c -o $(PROGNAME) $(CFLAGS) $(LDFLAGS) http.c mime.c ssl.c $(LIBS)
+
+ flare-check:
+ @flare-dist/flare 2>&1 | grep -qF Igor || ( \
diff --git a/net-proxy/ratproxy/metadata.xml b/net-proxy/ratproxy/metadata.xml
new file mode 100644
index 000000000000..333a1ada7c45
--- /dev/null
+++ b/net-proxy/ratproxy/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription lang="en">A semi-automated, largely passive web application security audit tool,
+ optimized for an accurate and sensitive detection, and automatic
+ annotation, of potential problems and security-relevant design patterns
+ based on the observation of existing, user-initiated traffic in complex
+ web 2.0 environments.
+ Detects and prioritizes broad classes of security problems, such as
+ dynamic cross-site trust model considerations, script inclusion issues,
+ content serving problems, insufficient XSRF and XSS defenses, and much
+ more.</longdescription>
+ <upstream>
+ <remote-id type="google-code">ratproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/ratproxy/ratproxy-1.58.ebuild b/net-proxy/ratproxy/ratproxy-1.58.ebuild
new file mode 100644
index 000000000000..72235cfd104c
--- /dev/null
+++ b/net-proxy/ratproxy/ratproxy-1.58.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="A semi-automated, largely passive web application security audit tool"
+HOMEPAGE="https://code.google.com/p/ratproxy/"
+SRC_URI="https://ratproxy.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i -e "s:keyfile\.pem:/usr/share/${PN}/&:" ssl.c
+ sed -r -i -e "s:(ratproxy-back\.png|messages\.list):/usr/share/${PN}/&:" ratproxy-report.sh
+ epatch "${FILESDIR}"/${PN}-Makefile.patch
+}
+
+src_compile() {
+ tc-export CC
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin ${PN}-report.sh || die "install failed"
+ dobin ${PN} || die "install failed"
+ dodoc doc/{README,TODO}
+ insinto /usr/share/${PN}
+ doins keyfile.pem ratproxy-back.png messages.list
+}
diff --git a/net-proxy/redsocks/Manifest b/net-proxy/redsocks/Manifest
new file mode 100644
index 000000000000..42f1729cfbf8
--- /dev/null
+++ b/net-proxy/redsocks/Manifest
@@ -0,0 +1,7 @@
+AUX redsocks.conf 350 SHA256 62f17cfc38d2a3c0911c144215c22404c453f89070e8b4642e9def4c57cbf660 SHA512 c6ce0622a54fafef31f40ed01b210c5ffb9af0504303fc5d2a4fb335ac3617fc7832c16b0885471e6f1eea168a0e4aa490089a00fd28e26ce0f9b59db0ac238b WHIRLPOOL bc243909011556206308454974df60e8addd09aecd6ba3aa1210813873f73d5fe92d74e18556b12937af0200268cea6017466240290c30cec4c342711696d5f8
+AUX redsocks.init 1282 SHA256 50fef7a090f626d17b5ac73ed242328a0cf589be9ebdf0d0f824f22f58374187 SHA512 81af76d7917273028cda3fa62e2c04ae27f763d93c6abac12c9b47877ae64918b4b07ed680fefb0e11ac3476c3f490f5e6d315ba8b0cf9a40b756cd32fc5234c WHIRLPOOL 6f62b5d8448ee9deef7a82abe43e7277e473532ef876dd75833ca1378c75e7105b60ede8a9bb790970fd7398586d8cff5e987157ad9ddd5d768e4adacd5f60bb
+AUX redsocks.service 411 SHA256 b63b1f94337948e787e7317730ac73bcc7bf361bc718ba3fa2eb9df29c38fe4f SHA512 f652b9866b5c438cd69151c291e8e1eb7df879db79d76df9b04f4ddf45dd62c59932dd3831fe0d4ab0e60a075e58d48bf35c267ce223c708f1e1994cdc7cf6dc WHIRLPOOL 8367f1db5a828b055c70df8ba31a8fa985fe47474fa048cc21916a30b529f8871cbc25b8851ca22961a4f35cf97d6ddade37495904eeca62bb95bb557d862d60
+DIST redsocks-0.5.tar.gz 496403 SHA256 bbeb531d7f1986d7102f1bd6733dacce41d3f3ba7d604f1aab61c63e0ba2ee62 SHA512 678faca95b3570f793754abfe752b3d3580ea125aac8615ca2a1fce92cd50e7919832afe7cf5d1cc40b700045fca08f86ea1697d062ac8e7be706d166e69ff70 WHIRLPOOL aed4e6922f556696568d299767aaa917b90007359bfa37919112cb74bb6e91bb823bba585ef9dd878fe289c401dcc5df897b303861e882e7b5d105b2515054db
+EBUILD redsocks-0.5.ebuild 1136 SHA256 48e89eacf709fad59ba7da30e764dc0495b921175b082466561a430ece565acb SHA512 05e20a667769e5e0d15b92797ea44eb3ae095eca0d565e15de02eeffb0fee98ad1ae06c944d61d8a2fd624f9ca083dd92c730231c4f25c2f49ac932857340ba0 WHIRLPOOL ae28a91ef93e6b024c087d27cb0b663e705c4fd9bad8b79f41c6582e072e5b45958029788683f9477755478f8a011029f066ad8973d597fdd1300ac59356c599
+EBUILD redsocks-9999.ebuild 1136 SHA256 48e89eacf709fad59ba7da30e764dc0495b921175b082466561a430ece565acb SHA512 05e20a667769e5e0d15b92797ea44eb3ae095eca0d565e15de02eeffb0fee98ad1ae06c944d61d8a2fd624f9ca083dd92c730231c4f25c2f49ac932857340ba0 WHIRLPOOL ae28a91ef93e6b024c087d27cb0b663e705c4fd9bad8b79f41c6582e072e5b45958029788683f9477755478f8a011029f066ad8973d597fdd1300ac59356c599
+MISC metadata.xml 1060 SHA256 08c2279d62b755ff0cc874c4bd108590c6eb386848d7966758510238a7048045 SHA512 5b48446a0edf223af4775df8ebf02b71112cbda5494853e97c0dfaa7aaeecc2529af8c340ab36507c96eaaade07e6ac73bcf51d23acc4a5ddaaf69bbe093a321 WHIRLPOOL 1c6020b55683d0e02b008ab6b86a2fa74cef3ee6aa19892b573d9e2d8bf5df952ae361f25ccd5c160c4912e8c8b461f389db1448cafec36ac967b7734f0ba195
diff --git a/net-proxy/redsocks/files/redsocks.conf b/net-proxy/redsocks/files/redsocks.conf
new file mode 100644
index 000000000000..76b2c5f893c4
--- /dev/null
+++ b/net-proxy/redsocks/files/redsocks.conf
@@ -0,0 +1,15 @@
+# Config file for /etc/init.d/redsocks
+
+# Path to the redsocks binary (needs to be absolute path).
+
+#REDSOCKS_BINARY="/usr/sbin/redsocks"
+
+# Path to the redsocks config (needs to be absolute path).
+
+#REDSOCKS_CONFIG="/etc/redsocks.conf"
+
+# Pid file to use (needs to be absolute path).
+
+#REDSOCKS_PIDFILE="/run/redsocks/redsocks.pid"
+
+rc_use="logger"
diff --git a/net-proxy/redsocks/files/redsocks.init b/net-proxy/redsocks/files/redsocks.init
new file mode 100644
index 000000000000..853d9b57a6bb
--- /dev/null
+++ b/net-proxy/redsocks/files/redsocks.init
@@ -0,0 +1,53 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${REDSOCKS_BINARY:=/usr/sbin/redsocks}
+: ${REDSOCKS_CONFIG:=/etc/redsocks.conf}
+: ${REDSOCKS_PIDFILE:=/run/redsocks/redsocks.pid}
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f "${REDSOCKS_CONFIG}" ] ; then
+ eerror "No ${REDSOCKS_CONFIG} file exists!"
+ return 1
+ fi
+
+ "${REDSOCKS_BINARY}" -t -c ${REDSOCKS_CONFIG} || return 1
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec "${REDSOCKS_BINARY}" \
+ -p "${REDSOCKS_PIDFILE}" -c ${REDSOCKS_CONFIG}
+ eend $?
+}
+
+stop() {
+ if [ "${RC_CMD}" = "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec "${REDSOCKS_BINARY}" \
+ -p "${REDSOCKS_PIDFILE}" -c "${REDSOCKS_CONFIG}"
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --exec "${REDSOCKS_BINARY}" \
+ -p "${REDSOCKS_PIDFILE}" -c "${REDSOCKS_CONFIG}"
+ eend $?
+}
diff --git a/net-proxy/redsocks/files/redsocks.service b/net-proxy/redsocks/files/redsocks.service
new file mode 100644
index 000000000000..db0e9d6093e9
--- /dev/null
+++ b/net-proxy/redsocks/files/redsocks.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Transparent redirector of any TCP connection to proxy using your firewall
+
+[Service]
+Type=forking
+PIDFile=/run/redsocks/redsocks.pid
+User=redsocks
+ExecStartPre=/usr/sbin/redsocks -t -c /etc/redsocks.conf
+ExecStart=/usr/sbin/redsocks -c /etc/redsocks.conf \
+ -p /run/redsocks/redsocks.pid
+ExecStopPost=/bin/rm /run/redsocks/redsocks.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/redsocks/metadata.xml b/net-proxy/redsocks/metadata.xml
new file mode 100644
index 000000000000..8f0d16e0c220
--- /dev/null
+++ b/net-proxy/redsocks/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mattst88@gentoo.org</email>
+ <name>Matt Turner</name>
+ </maintainer>
+ <longdescription lang="en">
+ Redirect any TCP connection to a SOCKS or HTTPS proxy server Redsocks
+ is a daemon running on the local system, that will transparently tunnel
+ any TCP connection via a remote SOCKS4, SOCKS5 or HTTP proxy server. It
+ uses the system firewall's redirection facility to intercept TCP
+ connections, thus the redirection is system-wide, with fine-grained
+ control, and does not depend on LD_PRELOAD libraries.
+
+ Redsocks supports tunneling TCP connections and UDP packets. It has
+ authentication support for both, SOCKS and HTTP proxies.
+
+ Also included is a small DNS server returning answers with the
+ "truncated" flag set for any UDP query, forcing the resolver to use
+ TCP.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">darkk/redsocks</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/redsocks/redsocks-0.5.ebuild b/net-proxy/redsocks/redsocks-0.5.ebuild
new file mode 100644
index 000000000000..07ad38abbb2a
--- /dev/null
+++ b/net-proxy/redsocks/redsocks-0.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/darkk/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI="https://github.com/darkk/${PN}.git"
+fi
+
+inherit systemd toolchain-funcs user ${GIT_ECLASS}
+
+DESCRIPTION="Transparent redirector of any TCP connection to proxy"
+HOMEPAGE="http://darkk.net.ru/redsocks/"
+LICENSE="Apache-2.0 LGPL-2.1+ ZLIB"
+SLOT="0"
+IUSE="doc"
+
+DEPEND="dev-libs/libevent:0="
+RDEPEND="${DEPEND}
+ net-firewall/iptables"
+
+[[ ${PV} != *9999 ]] && S="${WORKDIR}"/"${PN}"-release-"${PV}"
+
+pkg_setup() {
+ enewgroup redsocks
+ enewuser redsocks -1 -1 /run/redsocks redsocks
+}
+
+src_compile() {
+ CC="$(tc-getCC)" emake || die "emake failed"
+}
+
+src_install() {
+ dosbin redsocks
+ doman debian/redsocks.8
+ use doc && dodoc README doc/*
+ insinto /etc
+ newins debian/redsocks.conf redsocks.conf
+
+ newinitd "${FILESDIR}"/redsocks.init redsocks
+ newconfd "${FILESDIR}"/redsocks.conf redsocks
+
+ systemd_dounit "${FILESDIR}"/redsocks.service
+}
diff --git a/net-proxy/redsocks/redsocks-9999.ebuild b/net-proxy/redsocks/redsocks-9999.ebuild
new file mode 100644
index 000000000000..07ad38abbb2a
--- /dev/null
+++ b/net-proxy/redsocks/redsocks-9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/darkk/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI="https://github.com/darkk/${PN}.git"
+fi
+
+inherit systemd toolchain-funcs user ${GIT_ECLASS}
+
+DESCRIPTION="Transparent redirector of any TCP connection to proxy"
+HOMEPAGE="http://darkk.net.ru/redsocks/"
+LICENSE="Apache-2.0 LGPL-2.1+ ZLIB"
+SLOT="0"
+IUSE="doc"
+
+DEPEND="dev-libs/libevent:0="
+RDEPEND="${DEPEND}
+ net-firewall/iptables"
+
+[[ ${PV} != *9999 ]] && S="${WORKDIR}"/"${PN}"-release-"${PV}"
+
+pkg_setup() {
+ enewgroup redsocks
+ enewuser redsocks -1 -1 /run/redsocks redsocks
+}
+
+src_compile() {
+ CC="$(tc-getCC)" emake || die "emake failed"
+}
+
+src_install() {
+ dosbin redsocks
+ doman debian/redsocks.8
+ use doc && dodoc README doc/*
+ insinto /etc
+ newins debian/redsocks.conf redsocks.conf
+
+ newinitd "${FILESDIR}"/redsocks.init redsocks
+ newconfd "${FILESDIR}"/redsocks.conf redsocks
+
+ systemd_dounit "${FILESDIR}"/redsocks.service
+}
diff --git a/net-proxy/rejik/Manifest b/net-proxy/rejik/Manifest
new file mode 100644
index 000000000000..acd7bc203f4f
--- /dev/null
+++ b/net-proxy/rejik/Manifest
@@ -0,0 +1,6 @@
+DIST banlists-2.x.x.tgz 116100 SHA256 221a40e8db9d19477d6fdece00c9152526a0d2f0c2298504fc99b4378457b09e SHA512 068d01685e01679b2726da1cbc5f31f6aba54ab2194e8ab145bd2409e7fc71e3662445a8274b08746e5cdeadea2197f5a72a1abef98ec91267df851615b188b3 WHIRLPOOL 8bea0d00cf0eea807eb5a0ec645715832f3cc8ba42b3110d72c61c7474ea76df1c5823173bf2cbc241b86c43aa4d581cbfbed9bacbd5daac935a86fe030c89ec
+DIST redirector-3.2.10.tgz 45407 SHA256 1648af09df86dba5a73fa8d3ebaf02a62c281b847b96d5921507093056a0d05f SHA512 6e82341e402b149464b048e763cfa6f7bc514bae48514b482eded9288af9705942fbfd2e11b5701d3540489ec5ccab358848108fe15f25c5ab2915e44f3f1033 WHIRLPOOL 7b97124945d9d75077fe0047d5a89cf68da6ff9b8f38988e9984aed95927cc28893e50fb79863ec37109bdc872e6379cd1edbe408e30722351e9f24c90a06291
+EBUILD rejik-3.2.10.ebuild 2322 SHA256 d1ffd58663986353eb38e5ccb451ed7ed3041417f6e66979eaa968e85db60970 SHA512 ecbc30a7595a5c3d6ce4173a06a9f7c5828c7bfd4230877f20d31e95bffc0020364bc8cafecaae58ac791af2e21bbdeeb8b10054348b791027c7a8487eb0fff7 WHIRLPOOL 264914c47eeac61148983ac7b193c550a81447952c1753f73629c106bbfb5f0e4d859af64e1a9fce6b5945da10b41eb451078d3c9112a19b43dca23b6bbe2dae
+MISC ChangeLog 2566 SHA256 3477cb38d49b343f191f16d60871efddc443a898940bead8e5d083e4bd1b9cfb SHA512 c153e98491801face21cac9976df9a4caa7f06405c32537d0c1bcf73d92fd78a2107f5c4c8ec5856a7436fb620eae45601ef49fb82e2a9a87fea72d21389d7d3 WHIRLPOOL d2aa2e2ac26fdfbb6ee3714403900b96025cf6a14074bd6d666234a94f8061bd3a17bbd639351745de095dda9ee35a8d9971d43abe14fdbd4115490d842cb5c6
+MISC ChangeLog-2015 620 SHA256 8bc1a9a0c7b26674fde02e508a8b1ab96694832022995a73d51d9d34a6ac6e58 SHA512 79033ece4416f859c384734c86314e8f53f161e484e224f2fd38bc60ece541dab89b62bb68490ac4c162649d2d10bebbb3e8127106073e3340dbfeb968e42e45 WHIRLPOOL 4d14bbbfe8a8477f15c29c0b1d7d7a1861474741fa0550b808a063ad7bdebb06a74a9817b6359b9a6c55b45abd10a496619a9efc66acc371ed226431681b7b8b
+MISC metadata.xml 345 SHA256 d27c7f2961380fae06dae932a3022856a05409d685910effa519cf3cbe17195e SHA512 c45ec66f94f72f5a1faae645214953c4941e98e442625775fc25a2010345a31e61db086f1498344a64dd026764037a7a6d277655ab578ff32d7e9167d5eece57 WHIRLPOOL 349b68453999d73782d8de1b36a28bcba365f1b3ef59c041305f0898b00754f2b0280741e87f0aba8031c9ba76aa315d9ff01ac61e3e9b020ae7b53cfc3c1cb8
diff --git a/net-proxy/rejik/metadata.xml b/net-proxy/rejik/metadata.xml
new file mode 100644
index 000000000000..3bb23158fb52
--- /dev/null
+++ b/net-proxy/rejik/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="banlists">Install upstream provided simple banlists</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-proxy/rejik/rejik-3.2.10.ebuild b/net-proxy/rejik/rejik-3.2.10.ebuild
new file mode 100644
index 000000000000..1a14f53834da
--- /dev/null
+++ b/net-proxy/rejik/rejik-3.2.10.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A squid redirector used for blocking unwanted content"
+HOMEPAGE="http://rejik.ru/"
+SRC_URI="http://rejik.ru/download/redirector-${PV}.tgz
+ banlists? ( http://rejik.ru/download/banlists-2.x.x.tgz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="banlists"
+
+DEPEND="dev-libs/libpcre"
+RDEPEND="${DEPEND}
+ dev-perl/Text-Iconv
+ dev-perl/XML-Parser
+ net-proxy/squid"
+
+S=${WORKDIR}/redirector-${PV}
+
+src_prepare() {
+ sed -i -e "s:INSTALL_PATH=/usr/local/rejik3:INSTALL_PATH=${D}/opt/rejik:g" Makefile
+ sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" vars.h
+ sed -i -e "s:SQUID_USER=nobody:SQUID_USER=squid:g" Makefile
+ sed -i -e "s:SQUID_GROUP=nogroup:SQUID_GROUP=squid:g" Makefile
+ # Respect CFLAGS
+ sed -i -e "s:CC=gcc -Wall:CC=$(tc-getCC) $CFLAGS:" Makefile
+ # Respect LDFLAGS
+ sed -i -e "s:LIBS=-L/lib \`pcre-config --libs\`:LIBS=-L/lib \`pcre-config --libs\` $LDFLAGS:" Makefile
+ #
+ sed -i -e "s:error_log /usr/local/rejik3:error_log /var/log/rejik:g" redirector.conf.dist
+ sed -i -e "s:change_log /usr/local/rejik3:change_log /var/log/rejik:g" redirector.conf.dist
+ sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" redirector.conf.dist
+}
+
+src_install() {
+ dodir /opt/rejik
+ exeinto /opt/rejik
+ insinto /opt/rejik
+
+ doexe make-cache
+ doexe redirector
+ doins redirector.conf.dist
+
+ dodir /opt/rejik/tools
+ insinto /opt/rejik/tools
+ exeinto /opt/rejik/tools
+
+ fperms +x tools/kill-cache
+ fperms +x tools/benchmark
+
+ doexe tools/kill-cache
+ doexe tools/benchmark
+ doins tools/IN.gz
+
+ fowners -R squid:squid /opt/rejik
+ fperms 750 /opt/rejik
+
+ keepdir /var/log/rejik
+ fowners -R squid:squid /var/log/rejik
+
+ if use banlists; then
+ insinto /opt/rejik
+ doins -r "${WORKDIR}/banlists"
+ fi
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Copy /opt/rejik/redirector.conf.dist to /opt/rejik/redirector.conf and add line"
+ einfo "for squid 3.*"
+ einfo "url_rewrite_program /opt/rejik/redirector /opt/rejik/redirector.conf "
+ einfo "for squid 2.*"
+ einfo "redirect_program /opt/rejik/redirector /opt/rejik/redirector.conf"
+ einfo "to /etc/squid/squid.conf"
+ einfo ""
+ einfo "Dont forget to edit /opt/rejik/redirector.conf"
+ einfo "Be sure redirector.conf has right permissions"
+}
diff --git a/net-proxy/shadowsocks-libev/Manifest b/net-proxy/shadowsocks-libev/Manifest
new file mode 100644
index 000000000000..a8f1eb7ad789
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/Manifest
@@ -0,0 +1,15 @@
+AUX shadowsocks-libev-local_at.service 246 SHA256 62f1e4dc3cbf786adcaf688f51147e1a5ddf198c3bc46e788529f4f6ebfc7195 SHA512 77154a67f86894f0cde6bed737ecb537fc5cfb12b517ebbc4b9f1d210daf28e9f2bcb7d1795500d31c00aed5a3a16603d65d4c241d2d7d71fddde0de0dae883b WHIRLPOOL 4a1832dd68d9cb627040881fc2b725c70747685817542d3fe1152bb8c1b3c807523e73b7ec90c5ba645a3f36000ba0c0966af529c611ab260b17fd7c48ba2cef
+AUX shadowsocks-libev-redir_at.service 257 SHA256 5930c44e64b56cb930842a58a139cab6d880ad49440e565511469a3080a4cae4 SHA512 a94924c85f29ef0886f2dd72fc983974fffab7955d2a008154f080d04fb5e93354f73af0ba7817c8b14348428256a261b79e0712f5ae89d81fe95ecfb728e063 WHIRLPOOL 0a4a74aab9c01a70e63f48bc4803f4ace023565eb961026de1fb2543323b1d42d43e7482b5d391cdf8140bfb68d25016bd18ce9c1692f023eaee8ec5fb16d136
+AUX shadowsocks-libev-server_at.service 247 SHA256 83d960b02c449af5a6159f41dfeb05447928d3ef4c8ad8948a884370b771959c SHA512 6d271d8fac26c697307c18f0a2637624b2c45c619340fa61850704a3cc716758c11743f249d38be4ae344bd8d872eefe6e8cb700b0b6b9183c650bc600f8e0c6 WHIRLPOOL f0fd4be373ace87352104bb4378edc25ecac9bd40bdaeab70e27bf23f1cc03a9fad7f21a31f8f70fbc519b3687eacc5b34fabf3efdf6558beb436a6ff8634851
+AUX shadowsocks-libev-tunnel_at.service 259 SHA256 f836b5bdbc58175bf80e283ec0073cd6c519933247d49c1cf7a93f2ddd7d7ae9 SHA512 d68d5d0f96ba8269d5ea93e8c429936de35929592e7716eb1752e5604bd46fc92e417a2e89d0fd5e4bcd195c0cd2ac7f501c6f43776459fc8d4447fc44821c32 WHIRLPOOL 03ee02b2780a68c4ee8c985ae82d24a1414b10c715c3ebb584f9e5c5480dc66951b55955402b0a427e88d45fc591b1c24d80b3fee616cdb23fe1db21332515b4
+AUX shadowsocks.initd 1352 SHA256 db7b21de0bb3a2fd237cfd191de752df6ea7d0de74b16ad74db5e19150c51c52 SHA512 12b901ff23b445744e485e59a18c0c1ac63c6785038dff75d4c47c91a644185abe56b0256acdcd5015d3dc2af87fb254c9e4ad3846763f7430db44138c05cfc1 WHIRLPOOL b0bb96054d59a318bdbcceffad8139c72a70d2b8e90a452e6e6b1193681cf15853ed13a075c9ab7055511c8d62ca260fe22d1115a45e682884d296b1b58a707b
+AUX shadowsocks.json 132 SHA256 a17bf075e7dda6e1440949598c0ab770df18e15f69a41624f9daead610ff9ea4 SHA512 6bc5c406bdb25123fd43e21784028dd331f729bc56fe7ac4d31e3b1d81d12048a6906db3fd79765a64fc7f8b651095695fd8cdcc60f6d3285231e94a90611cef WHIRLPOOL e09449b396d6bd7eec06b59783256249715e2c885a3bd3c51df5555f464f9a1c1278cae9208785639c60b14705e3daf40e29054fe20858b289185462aee601bf
+DIST shadowsocks-libev-2.5.6.tar.gz 1552674 SHA256 fa232047d12d39bf19f3539828ca1662da5e5905bfc03163ba20c37fe8e94d8f SHA512 577d8a6af9eac0aa5fe419cdf7d8be7396d654cec32b274d0db756480c340b3b61500c3b60e48aa82537b57a6a8c13dc00781790691897b139e0e7cc60161fb7 WHIRLPOOL bf33e32335120bdebe0d9a86abed9c8594f6289d709089caa9099cea0502e573979c624fcf741fe39a383a3c68ced41a9b77d494f0ec28e139fb44f4481d04bc
+DIST shadowsocks-libev-2.6.2.tar.gz 1566835 SHA256 1fa5b70177f7c125cd10b46d590274c22b4bded26bf3d2372ab73829dc4b7c97 SHA512 29093b25a24d64e01877d1d9ac7d4b2966c4f9934b58a8fca45235248c3b1fb625faf083f28089a03122c2f8d1a20a59d7608ff0487c684e36cadf2f736cddfd WHIRLPOOL d1366d9fa9e24a2b749f74740b120bf5ad6817a5874532180e9c76bf8a10f41248e462e70aeebbc97090af04d412d04a4eda95ed9f7295049c70d9b400b45ba5
+DIST shadowsocks-libev-3.0.6.tar.xz 1512740 SHA256 c890bd96d73b89d9bb28031fa17d6bba3ab2262085394f03d9ea60f7f81d861b SHA512 439080b70541e828db8a60092794d8c8cfcc2ed19468f943f3c0ccd63a2ed1581d1278450ca2964f35adad3ed889f466ef55ff293e86b9a17b84fc6551ffaa8c WHIRLPOOL 559e547e171a40197363b6e7cfe472d472e7544a50c3b06cf6c209e8b04291968ac029492b445a781545dba5f1416b91ebde8d587af460393757a594e4f631da
+EBUILD shadowsocks-libev-2.5.6.ebuild 2110 SHA256 b1205b3cde77be14603a06bf31223a728033e2bf683648dd2b70a7bcd45d1aa9 SHA512 67cbee9fff5e617deb1ead4a65e4d6814ca2493dff9b49f70b8e88fba85dddc0ce2c5e55651876a06ccb8819c11063a2d2065818e4c4965f60aee4dbe2d35fb7 WHIRLPOOL 2d1a73e95c1974c7e1e6139cd99292ae640b663bb43972bfd750367ec986d56d9a2958cdaa869fb014a8970160b1e9bd6c18c6440968abee9c405484c07b2d88
+EBUILD shadowsocks-libev-2.6.2.ebuild 2110 SHA256 7f7f8b010d91fd47e9c2fea694dc7c381198646b2f446ce9f78cdbf3a18debe7 SHA512 15f335a2c8ed7de3213388031903f96a565b40440ca43c338382673230a87c19637c332801d430387ac75cb6b03f08e5adc86a2c768b5d9332f02f6319cafd66 WHIRLPOOL cca976ead9587b63e9009e7ce48b204b64f98bf9673a0a9d5d816043c6fa68a8e04a091506c0be9e953e8ef7c9ac3b98d4c7c2b230895bbe776fe9c749c076cd
+EBUILD shadowsocks-libev-3.0.6.ebuild 1945 SHA256 0e662934b0405ec7abaf6c46136c84ad7cfc313771242f0e4644674899b6d879 SHA512 94899a6a4acb1471b2bd920fe86d0cb275eb69aa5878accf7a95f0f9e1fa52db5fe67518157ee60e3dfa6807584e05a66729a5d511cf599fff6679c6caa16830 WHIRLPOOL d939cdcdc855150f23da2c4f7bd9dce410bef3b3af37bc599020492aa9a65d39dbc44d5a9fc6d9ac55f37e4bfa4ef06f1ab3ecb5df2fc4edc3f8b618382b5f91
+MISC ChangeLog 6137 SHA256 1cf3a0b19b84b6e6d3062c1683df9bcdd7fd0e3f87469a57529af8cc4fa3dd28 SHA512 31745ab5e4daa65d0fa8fc3c41edc3624823ac4696cdcf723de891033ea819753b50451d12912e8527917a1297056ec9c77f82a16355c45592b6ebcfcd0a6312 WHIRLPOOL 030604278a243c507e71e1b87792edf0f7542bd58f07b41fd0bfe5e40d987055d701d2387d24f777c3a50231d494e26b0f3e05b87ea345edc131a70da4e0697d
+MISC ChangeLog-2015 1295 SHA256 aac4216c5a7000b03396f5dec23faed81ec03680a0f7eff1ca1c38c2617a8690 SHA512 86a96da58610f179d8f674601c5f396442c1841b96fb36acb4be50f89a4a52bdf4aeede4add67ddf56c0db105ef4c645d97b33ff233f14cc6299071b7602119d WHIRLPOOL 6b1261ebf0d13aa767cc7b32e215345f3ea77a50b381eb640ba06b97d45ada8286d5312e4f032ecc5483333a538ba5bcf2f4a785ee5bf68dc6e18f3691b59741
+MISC metadata.xml 637 SHA256 0f52eee03a40229841d072a9d9f3e58f4418dbb65cb735b7f04aebc4ca6a991c SHA512 2668d0cb112e83a8200e0574a49b4db712303e34431abfd23f02f46deabddc50fd20161bcb7a357701f1008f17f42f8bb29cc63cd9a23820cb37be655b3fc876 WHIRLPOOL f4bf370e37d8fa489afdc3b22b1cdd820240cb24d933777904a812a0dd4d020c037e3caf2e10e9dbeeb4dc2b6ffd4f126b4b2ffd317c9675795982d1dd434028
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
new file mode 100644
index 000000000000..af137178380f
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-local_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
new file mode 100644
index 000000000000..1ced8f454408
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-redir_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Redir Mode for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
new file mode 100644
index 000000000000..58d934bdb1d1
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-server_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Server Service for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
new file mode 100644
index 000000000000..24b31d5a1cd9
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks-libev-tunnel_at.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Tunnel Mode for %I
+After=network.target
+
+[Service]
+Type=simple
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks.initd b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
new file mode 100644
index 000000000000..e980bb2636e8
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks.initd
@@ -0,0 +1,61 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SS_CONFIG="/etc/shadowsocks-libev/shadowsocks.json"
+
+SS_PIDFILE="/run/shadowsocks.pid"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f ${SS_CONFIG} ]; then
+ ewarn "${SS_CONFIG} does not exist."
+ fi
+
+ SS_SVCNAME="${RC_SVCNAME#*.}"
+ case ${SS_SVCNAME} in
+ client)
+ SS_COMMAND="/usr/bin/ss-local"
+ return 0
+ ;;
+ server)
+ SS_COMMAND="/usr/bin/ss-server"
+ return 0
+ ;;
+ redir)
+ SS_COMMAND="/usr/bin/ss-redir"
+ return 0
+ ;;
+ tunnel)
+ SS_COMMAND="/usr/bin/ss-tunnel"
+ return 0
+ ;;
+ *)
+ eerror "please choose to run as server or client mode"
+ eerror " server: rc-update add shadowsocks.server default"
+ eerror " client: rc-update add shadowsocks.client default"
+ eerror " client: rc-update add shadowsocks.redir default"
+ eerror " client: rc-update add shadowsocks.tunnel default"
+ return 1
+ ;;
+ esac
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Shadowsocks: ${SS_SVCNAME} mode"
+ start-stop-daemon --start --exec ${SS_COMMAND} \
+ -- -c ${SS_CONFIG} -f ${SS_PIDFILE} >/dev/null 2>&1 &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Shadowsocks"
+ start-stop-daemon --stop --pidfile ${SS_PIDFILE}
+ eend $?
+}
+
diff --git a/net-proxy/shadowsocks-libev/files/shadowsocks.json b/net-proxy/shadowsocks-libev/files/shadowsocks.json
new file mode 100644
index 000000000000..a29c3a59b0ef
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/files/shadowsocks.json
@@ -0,0 +1,8 @@
+{
+ "server":"server ip",
+ "server_port":8388,
+ "local_port":1080,
+ "password":"password",
+ "timeout":600,
+ "method":"aes-256-cfb"
+}
diff --git a/net-proxy/shadowsocks-libev/metadata.xml b/net-proxy/shadowsocks-libev/metadata.xml
new file mode 100644
index 000000000000..cb44189bcda5
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <use>
+ <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> as crypto backend</flag>
+ <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> as crypto backend</flag>
+ <flag name="system-libs">Use system libraries instead of the ones included in the upstream distribution</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">shadowsocks/shadowsocks-libev</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-2.5.6.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-2.5.6.ebuild
new file mode 100644
index 000000000000..bf924f51eeca
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-2.5.6.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils systemd
+
+DESCRIPTION="A lightweight secured SOCKS5 proxy for embedded devices and low end boxes"
+HOMEPAGE="https://github.com/shadowsocks/shadowsocks-libev"
+
+MY_PV="v${PV}"
+SRC_URI="https://github.com/shadowsocks/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +openssl mbedtls +system-libs"
+
+RDEPEND="openssl? ( dev-libs/openssl:= )
+ mbedtls? ( net-libs/mbedtls )
+ system-libs? (
+ >=dev-libs/libsodium-1.0.8
+ dev-libs/libev
+ net-libs/udns
+ )
+ dev-libs/libpcre
+ "
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )
+ "
+
+REQUIRED_USE=" ^^ ( openssl mbedtls )"
+
+src_configure() {
+ local myconf=" \
+ $(use_enable debug assert) \
+ $(use_enable system-libs system-shared-lib) \
+ --with-crypto-library=$(usex openssl openssl mbedtls)
+ "
+ use doc || myconf+="--disable-documentation"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ dodir "/etc/${PN}"
+ insinto "/etc/${PN}"
+ newins "${FILESDIR}/shadowsocks.json" shadowsocks.json
+
+ newinitd "${FILESDIR}/shadowsocks.initd" shadowsocks
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.server
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.client
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.redir
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.tunnel
+
+ dodoc -r acl
+
+ systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service"
+ systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service"
+ systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service"
+ systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service"
+}
+
+pkg_setup() {
+ elog "You need to choose the mode"
+ elog " server: rc-update add shadowsocks.server default"
+ elog " client: rc-update add shadowsocks.client default"
+ elog " redir: rc-update add shadowsocks.redir default"
+ elog " tunnel: rc-update add shadowsocks.tunnel default"
+}
diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-2.6.2.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-2.6.2.ebuild
new file mode 100644
index 000000000000..69130dcd0871
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-2.6.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils systemd
+
+DESCRIPTION="A lightweight secured SOCKS5 proxy for embedded devices and low end boxes"
+HOMEPAGE="https://github.com/shadowsocks/shadowsocks-libev"
+
+MY_PV="v${PV}"
+SRC_URI="https://github.com/shadowsocks/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc +openssl mbedtls +system-libs"
+
+RDEPEND="openssl? ( dev-libs/openssl:= )
+ mbedtls? ( net-libs/mbedtls )
+ system-libs? (
+ >=dev-libs/libsodium-1.0.8
+ dev-libs/libev
+ net-libs/udns
+ )
+ dev-libs/libpcre
+ "
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )
+ "
+
+REQUIRED_USE=" ^^ ( openssl mbedtls )"
+
+src_configure() {
+ local myconf=" \
+ $(use_enable debug assert) \
+ $(use_enable system-libs system-shared-lib) \
+ --with-crypto-library=$(usex openssl openssl mbedtls)
+ "
+ use doc || myconf+="--disable-documentation"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ dodir "/etc/${PN}"
+ insinto "/etc/${PN}"
+ newins "${FILESDIR}/shadowsocks.json" shadowsocks.json
+
+ newinitd "${FILESDIR}/shadowsocks.initd" shadowsocks
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.server
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.client
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.redir
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.tunnel
+
+ dodoc -r acl
+
+ systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service"
+ systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service"
+ systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service"
+ systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service"
+}
+
+pkg_setup() {
+ elog "You need to choose the mode"
+ elog " server: rc-update add shadowsocks.server default"
+ elog " client: rc-update add shadowsocks.client default"
+ elog " redir: rc-update add shadowsocks.redir default"
+ elog " tunnel: rc-update add shadowsocks.tunnel default"
+}
diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.0.6.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.0.6.ebuild
new file mode 100644
index 000000000000..136bc28dcc32
--- /dev/null
+++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.0.6.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils systemd
+
+DESCRIPTION="A lightweight secured SOCKS5 proxy for embedded devices and low end boxes"
+HOMEPAGE="https://github.com/shadowsocks/shadowsocks-libev"
+
+#repack with git submodule populated: libbloom, libcork, libipset
+SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+RDEPEND="net-libs/mbedtls
+ >=dev-libs/libsodium-1.0.8
+ dev-libs/libev
+ net-libs/udns
+ dev-libs/libpcre
+ "
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )
+ "
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=" \
+ $(use_enable debug assert) \
+ "
+ use doc || myconf+="--disable-documentation"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ dodir "/etc/${PN}"
+ insinto "/etc/${PN}"
+ newins "${FILESDIR}/shadowsocks.json" shadowsocks.json
+
+ newinitd "${FILESDIR}/shadowsocks.initd" shadowsocks
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.server
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.client
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.redir
+ dosym /etc/init.d/shadowsocks /etc/init.d/shadowsocks.tunnel
+
+ dodoc -r acl
+
+ systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service"
+ systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service"
+ systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service"
+ systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service"
+}
+
+pkg_setup() {
+ elog "You need to choose the mode"
+ elog " server: rc-update add shadowsocks.server default"
+ elog " client: rc-update add shadowsocks.client default"
+ elog " redir: rc-update add shadowsocks.redir default"
+ elog " tunnel: rc-update add shadowsocks.tunnel default"
+}
diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
new file mode 100644
index 000000000000..821afcbfd4ca
--- /dev/null
+++ b/net-proxy/squid/Manifest
@@ -0,0 +1,18 @@
+AUX squid-3.5.7-gentoo.patch 3414 SHA256 4fe5687c3986c2da4b496e269cf92f04e0a2e3fd41d38f96625263addec9202e SHA512 403a053e64f0061901fedab7dc65a671cb22f534a21d9f066c6ec7bd8db03519b63d402702bea85929669e37925e9a0e9fd9e918ac1ea37d399d443b2dda9766 WHIRLPOOL 8f3239b20fc7429f0cadececdfd8c3aad36a1f97e541800c4d836766407aa0d23adbfd65a600f741ff78ec2e56f6e514a44aec791ed5be684977974a39e7f7cb
+AUX squid-cppunit-1.14.patch 11414 SHA256 6e8d1645743e7fdf6b1123c3ab461fae40ed51e704f1b1c6c05a5a6d8ee8d632 SHA512 2fb02c8c92dc524c19cbbaad4dad03bddc8c18046e37f86562dcaa73a9cea0cb2af352ca0701438d2f77a55b448b34e68678961d721812135b9f7d4799cbe94a WHIRLPOOL da713acc1ee403999d2700ccd8dd5474945d207bbc6142c7db882abc30e4d0f768fcd82d9bb0da22c5efe2f1f0fe57cfeb3950ee46249545271d0e8cd56eea0a
+AUX squid.confd-r1 384 SHA256 507d8f26bdb7227c39ed0641429d32972513e4240bf59a20b076e8019201b20d SHA512 018418d0ef66c9ab5d67a8e68ed6f95c7a04ad2a8a073747f39d9db8e83cf72c685d388a727363788042e45d440a69651ec928ccdeed835915ebc8c676b43519 WHIRLPOOL 9379f8f1646192badf0e8c05dc005486917cef2b3e7d3c37485eef1890531f57954ddc1c49b5a3e8c306a4b02aa238e0d246ae23c25b1ab037b06b5d36a68a16
+AUX squid.cron 143 SHA256 4c9e2afe5b0bba583ce896233ea1f9262beeb1b6cf51b4adb48d5f5c03933b2f SHA512 cec563c20799ffea8b4fb418d5015d6dc437bd38c35e7150ed01bc298dab5214132e10f4e7b8176da1966e16a7f53f423c36e8419642cb16716f5c346c30d749 WHIRLPOOL 029c94d4e4826ee612c7dc12acc088e3100c9d1737baebb74b25b6e7ac2ba78d0bab9f744c12b5de4113c9727892c9a30dd17067409ac8da62afeee552de391e
+AUX squid.initd-r4 3262 SHA256 8a1369aab5cef61d19ea61c373819bd4eeabd2ba4c70f831e5009891993f3a4f SHA512 d1edeeafef69730429c19e07b4b39ff388047042880c61907fb2e6d8a907011edb78a29faa265f8e07d2c3bb18d63d62dd384338729e2549995f7f2a0903783d WHIRLPOOL d306dfe361655401c534f6bff44799bd99a6dad77d8b1c1ed3116234174c864f353b164a40499143e217d070cf1e5dd74b4805862d007f6b105d227d65b75d1b
+AUX squid.logrotate 103 SHA256 e5ddce1c9af851040affa15e1a59e89d8db0f2eea7c461320a1d3784578f4482 SHA512 d75a667c3ffa32fdd938ef40df8813a467d9f10b2363107bf915cb0c99834fbe8d0eb502a18a816875b67b0db1b27806ed3caf620c38516040cb644b225f5a55 WHIRLPOOL 1cbce1fb05d4661d26f80baeafad0d3a5de1108a21eb6519775b9be2c549d1ca1b85575b72941fd246e4e9fbdf466b302b767aa7ce002f990f6ca4a9844e1e41
+AUX squid.pam 209 SHA256 c99c6f53a786832d20673ec3be3c8fda516872e433a65449fc70cda2282e0380 SHA512 5501e3d9319aea99f0deed98748366d4dfbeccdde96d842474fe144a4584394d8f5563372cd7b2437a389378c49b61b646403cca1be4362c888750d027b2f594 WHIRLPOOL 3627dae5146574497165f126ac779be728e2683e31a003fdf719db2a659018a89b5a91f9ecb429007c398fda5794178f4f8f00448e7d3e63b1b1221af9506066
+DIST squid-3.5.23.tar.xz 2325884 SHA256 fa4c0c99f41e92fe1330bed3968d176c6f47ef2e3aea2f83977d5501afa40bdb SHA512 3f2b3df60fc0b2aab3d0d9e3489832d60d0aac8222f09ad2ff6afb95202b904f41f6530d713e7ce446c6f62b66f0cd792a6b12005d43c53fe68d2371f9caa880 WHIRLPOOL 39338be97e3357759b9062e3c3b353a2118ca910e56584e73560489078e76a42b230ac24468ea62f6e3df7de210492beda54b0c178804c097d4b303d16cd2914
+DIST squid-3.5.24.tar.xz 2326424 SHA256 4fe29f582eef357faa541a53835b6885e24e6f28b80a3abcdf3b57f5393bbdb2 SHA512 912a0882c71ba170e7c2eccf940cfca87d7fd0a6026a7aaa9dddacc1e17590809ad449e15913d180d5ce5b8d2828a68247ab920a4a499f3ee29ddd464e29344f WHIRLPOOL 1d245ee3bd6eff69b201ee1c57671617d06e36663d38d44bf4335ca1ebee251c0983f1f041c00cc823d7c5fc04d0a3725197beac407e2bfcfe81f679bc96f3a0
+DIST squid-3.5.25.tar.xz 2327316 SHA256 28959254c32b8cd87e9599b6beb97352cf0638524e0f5ac3e1754f08462f3585 SHA512 9adfadd962954537c3364543ce4ca862e6f60801f1fb80bc3b74fbd99b60219aed4756affff8f7d956337f4b573d0ebecad01f689d0c6554aa2958f5bcfb972f WHIRLPOOL d29a4591fc8521e3ebd864d547c86341136b1aefa7679d35a01e5fcc102b4dfe1e340089f9e7ba9489911fbcd6a1e61a4715e1669348aa6e8a4379471ab18ec6
+DIST squid-3.5.26.tar.xz 2328352 SHA256 baa1eecb7d6e18881f4455060d80ee7cb95ae7e2695fdccf7e21ccc8f879a982 SHA512 08fc7fb5d1dea8d91cc318e5be9044fd75c69d0d2053a0c79ab594155aeb4a0f48bb0ff1dd754497485dc8db117b71f1787b0265842cf61b474293d5d38a9222 WHIRLPOOL 4d069b5beb91a0c688dacd72067f360a22bbf5565705c4d0a4ee9c6131c857adcbaa2130b0785f242bde23902cd32344f3c264f46f567088283f3de65d6acbd0
+EBUILD squid-3.5.23.ebuild 7306 SHA256 f22dd602baaaf4f677ab58325b81a5c2fc6d3e8686b1c5c06183ff6b079a8edf SHA512 0858bea28bdc074663f2a280e58fb133527073a0b72e2b13ae806af103ba894464942733a484aefa179ba5a8db6ae564abb0ea1ab13b521e0da330c69882d6a4 WHIRLPOOL f74b963da688fb07027975b48fc88c2e4732e6e008bbaf11bbf03c97f70ca0d62348b42c5a7f290d9c302669f33b85236c077b0cb92a3f202b6f8196742a992f
+EBUILD squid-3.5.24.ebuild 7315 SHA256 96969a0a432abf413a8390b88892de6d9e1782fb0b79ded6c96f1f9e1c0ae088 SHA512 b6c55e52177b5c901ad9ef61119103fe1fbb8fc7553a6e1d506684ab35dcc2ed2e57b19d1549fec2aa417bb5899f5807dc356c3a094c17337aa6b5a655bfe0e1 WHIRLPOOL 49e70447fa5ac07da2d4ef5e39150c9f5524aee4cb25b7cfee5e28257fcdd6dcb6fe573ab56d7c00279022b43054a6342332911cf60e272cdab5896eca629762
+EBUILD squid-3.5.25.ebuild 7315 SHA256 96969a0a432abf413a8390b88892de6d9e1782fb0b79ded6c96f1f9e1c0ae088 SHA512 b6c55e52177b5c901ad9ef61119103fe1fbb8fc7553a6e1d506684ab35dcc2ed2e57b19d1549fec2aa417bb5899f5807dc356c3a094c17337aa6b5a655bfe0e1 WHIRLPOOL 49e70447fa5ac07da2d4ef5e39150c9f5524aee4cb25b7cfee5e28257fcdd6dcb6fe573ab56d7c00279022b43054a6342332911cf60e272cdab5896eca629762
+EBUILD squid-3.5.26.ebuild 7359 SHA256 541385afd03584c8f40acb37757da56466110c337562cae1595856384d55d04b SHA512 89c4dd7744138780c3b3a74064ac68e70bc6ed7c0bd598675ec9fa6ada16216d5cfc555892666d20f97d58365b71c1cea11ceeb846f0645a3743b56024c5313e WHIRLPOOL fa372527cd4e3daaace77ea892f54e3d1722715e573d3ec10d946ef505f2b477386e9aec67e34f9dd9280d35b22892693ca16497f94a273e82c29b7485db9aaf
+MISC ChangeLog 11617 SHA256 3462208cfe311d6e2774fa69c877135f42fab56369aa97d18084d4d4977f7c15 SHA512 eb447e3bd41d33f62d0a96105b5923ca658f28ca2d7eb7c4cef7f48f10229342cbd86bd11dcd9b535872fb75666a04438c0a82e7397c9de30a2cc9c37daee7a7 WHIRLPOOL 17fee0a65c4f561ae04ad80352b0057355c7fa7a9f302ecce225d2b28eb58d5cdfa6d94b0f3f110fb7aa8014e96cdf0e8b0c3fb388a4b553fb4dbeea36144158
+MISC ChangeLog-2015 97633 SHA256 1015b1d282884c639ec17fcaec41953e1e9b1fccb1cda1db913707e7e6e62288 SHA512 a9373b0624bc2a8f47b7ca5be6243e5d0ec183023374dad843ccffb8daf451042a7e9771b38eb6027369e3e31314c62776b7ae5f075bcf738c35c8ba31d367f5 WHIRLPOOL 0baca988640a5320a7b27d6fc57731b1fbc7a3231af566527cb38fcf7fd80d7c335206c87fec297b892e2ce470e4f0144187bfac17c05af6041b2561584995cc
+MISC metadata.xml 1539 SHA256 cd56af34fc45e24ddaa2d049f314a0590a7887bed745ad1fe470ce088f050da1 SHA512 7e28e289a27097bc5b2a4caca81506c9c76898c416842e0858dc82b5a03e5f473818ccd52b43c47ee549cf1bebe7e83a0d125eb24995c1a2d74db4e998825c6d WHIRLPOOL 7ed06826c97b3d5731e8eec0b57086acb1c689f6d8db3cbf005527cbe40ea8047a51042a11d91fbb2e9e63ea571a504eceb8da30bd9e549f9ea160e84d612956
diff --git a/net-proxy/squid/files/squid-3.5.7-gentoo.patch b/net-proxy/squid/files/squid-3.5.7-gentoo.patch
new file mode 100644
index 000000000000..c4def050a2d0
--- /dev/null
+++ b/net-proxy/squid/files/squid-3.5.7-gentoo.patch
@@ -0,0 +1,100 @@
+diff --git a/configure.ac b/configure.ac
+index a863327..deb44ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,9 +26,9 @@ PRESET_CFLAGS="$CFLAGS"
+ PRESET_LDFLAGS="$LDFLAGS"
+
+ dnl Set default LDFLAGS
+-if test "x$LDFLAGS" = "x" ; then
+- LDFLAGS="-g"
+-fi
++dnl if test "x$LDFLAGS" = "x" ; then
++dnl LDFLAGS="-g"
++dnl fi
+
+ # Check for GNU cc
+ AC_PROG_CC
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6b69267..10f506a 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -867,8 +867,8 @@ DEFAULT_LOG_PREFIX = $(DEFAULT_LOG_DIR)
+ DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
+ DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
+ DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
+-DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state
+-DEFAULT_SSL_DB_DIR = $(localstatedir)/lib/ssl_db
++DEFAULT_NETDB_FILE = $(localstatedir)/lib/squid/netdb.state
++DEFAULT_SSL_DB_DIR = $(localstatedir)/lib/squid/ssl_db
+ DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
+ DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
+ DEFAULT_LOGFILED = $(libexecdir)/`echo log_file_daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
+diff --git a/src/debug.cc b/src/debug.cc
+index 64ab0ba..062119a 100644
+--- a/src/debug.cc
++++ b/src/debug.cc
+@@ -450,7 +450,7 @@ _db_init(const char *logfile, const char *options)
+ #if HAVE_SYSLOG && defined(LOG_LOCAL4)
+
+ if (Debug::log_syslog)
+- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, syslog_facility);
++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, syslog_facility);
+
+ #endif /* HAVE_SYSLOG */
+
+diff --git a/src/main.cc b/src/main.cc
+index d6eb01a..0b93f0e 100644
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -1657,7 +1657,7 @@ watch_child(char *argv[])
+ if (!IamMasterProcess())
+ return;
+
+- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4);
+
+ if ((pid = fork()) < 0)
+ syslog(LOG_ALERT, "fork failed: %s", xstrerror());
+@@ -1720,7 +1720,7 @@ watch_child(char *argv[])
+
+ if ((pid = fork()) == 0) {
+ /* child */
+- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4);
+ prog = argv[0];
+ argv[0] = const_cast<char*>(kid.name().termedBuf());
+ execvp(prog, argv);
+@@ -1733,7 +1733,7 @@ watch_child(char *argv[])
+ }
+
+ /* parent */
+- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4);
+
+ squid_signal(SIGINT, SIG_IGN, SA_RESTART);
+
+--- a/src/cf.data.pre 2013-04-29 11:17:59.256167134 +0300
++++ b/src/cf.data.pre 2013-04-29 11:20:17.043924313 +0300
+@@ -1019,6 +1019,7 @@
+ acl Safe_ports port 488 # gss-http
+ acl Safe_ports port 591 # filemaker
+ acl Safe_ports port 777 # multiling http
++acl Safe_ports port 901 # SWAT
+ acl CONNECT method CONNECT
+ NOCOMMENT_END
+ DOC_END
+@@ -5300,11 +5301,11 @@
+
+ NAME: cache_mgr
+ TYPE: string
+-DEFAULT: webmaster
++DEFAULT: root
+ LOC: Config.adminEmail
+ DOC_START
+ Email-address of local cache manager who will receive
+- mail if the cache dies. The default is "webmaster".
++ mail if the cache dies. The default is "root".
+ DOC_END
+
+ NAME: mail_from
diff --git a/net-proxy/squid/files/squid-cppunit-1.14.patch b/net-proxy/squid/files/squid-cppunit-1.14.patch
new file mode 100644
index 000000000000..f31268fc61d5
--- /dev/null
+++ b/net-proxy/squid/files/squid-cppunit-1.14.patch
@@ -0,0 +1,417 @@
+# backport rev 14707 from trunk
+--- Makefile.am 2016-01-30 09:09:25 +0000
++++ Makefile.am 2016-06-13 07:46:59 +0000
+@@ -48,7 +48,7 @@
+ check: have-cppunit check-recursive
+
+ have-cppunit:
+- @if test "$(SQUID_CPPUNIT_INC)$(SQUID_CPPUNIT_LA)$(SQUID_CPPUNIT_LIBS)" = "" ; then \
++ @if test "$(LIBCPPUNIT_CFLAGS)$(LIBCPPUNIT_LIBS)" = "" ; then \
+ echo "FATAL: 'make check' requires cppunit and cppunit development packages. They do not appear to be installed." ; \
+ exit 1 ; \
+ fi
+
+--- compat/Makefile.am 2016-02-09 08:57:33 +0000
++++ compat/Makefile.am 2016-06-13 07:46:59 +0000
+@@ -94,7 +94,7 @@
+ testPreCompiler_SOURCES= \
+ testPreCompiler.h \
+ testPreCompiler.cc
+-testPreCompiler_LDADD= $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS)
++testPreCompiler_LDADD= $(LIBCPPUNIT_LIBS)
+ testPreCompiler_LDFLAGS=
+
+ # os/ subdir prevents us using src/TestHeaders.am
+
+--- configure.ac 2016-06-11 05:28:18 +0000
++++ configure.ac 2016-06-13 07:46:59 +0000
+@@ -115,10 +115,11 @@
+ AC_PATH_PROG(CHMOD, chmod, $FALSE)
+ AC_PATH_PROG(TR, tr, $FALSE)
+ AC_PATH_PROG(RM, rm, $FALSE)
+-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
+ dnl Libtool 2.2.6 requires: rm -f
+ RM="$RM -f"
+
++PKG_PROG_PKG_CONFIG
++
+ AC_PATH_PROG(PERL, perl, none)
+ if test "x$ac_cv_path_PERL" = "xnone"; then
+ AC_MSG_FAILURE([Perl is required to compile Squid. Please install Perl and then re-run configure ])
+@@ -984,9 +985,6 @@
+ ]
+ )
+
+-dnl Necessary if the first PKG_CHECK_MODULES call is conditional
+-PKG_PROG_PKG_CONFIG
+-
+ dnl Perform configuration consistency checks for eCAP
+ if test "x$squid_opt_use_ecap" != "xno";
+ then
+@@ -2725,45 +2723,29 @@
+ [Enable support for the X-Accelerator-Vary HTTP header])
+ AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary])
+
+-
+-if $CPPUNITCONFIG --help >/dev/null; then
+- squid_cv_cppunit_version="`$CPPUNITCONFIG --version`"
+- AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version])
+- unset squid_cv_cppunit_version
+- SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`"
+- SQUID_CPPUNIT_LA=''
+- SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`"
+-else
+- AC_MSG_WARN([cppunit does not appear to be installed. squid does not require this, but code testing with 'make check' will fail.])
+- SQUID_CPPUNIT_LA=''
+- SQUID_CPPUNIT_LIBS=''
+- SQUID_CPPUNIT_INC=''
+-fi
+-
+-AC_ARG_WITH(cppunit-basedir,
+- AS_HELP_STRING([--with-cppunit-basedir=PATH],
+- [Path where the cppunit headers are libraries can be found ]), [
+-if test -f "$withval/include/cppunit/TestCase.h"; then
+- AC_MSG_NOTICE([Using cppunit includes from $withval])
+- SQUID_CPPUNIT_INC="-I${withval}/include"
+-else
+- AC_MSG_ERROR(Cannot find cppunit at $withval)
+-fi
+-if test -f "$withval/lib/libcppunit.la"; then
+- AC_MSG_NOTICE([Using cppunit lib from $withval])
+- SQUID_CPPUNIT_LA="${withval}/lib/libcppunit.la"
+- SQUID_CPPUNIT_LIBS='$(SQUID_CPPUNIT_LA)'
+-else
+- AC_MSG_ERROR(Cannot find cppunit at $withval)
+-fi
+-])
+-SQUID_STATE_SAVE(squid_cppunit_state)
+-CXXFLAGS="$CXXFLAGS $SQUID_CPPUNIT_INC"
+-AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h)
+-SQUID_STATE_ROLLBACK(squid_cppunit_state)
+-AC_SUBST(SQUID_CPPUNIT_LIBS)
+-AC_SUBST(SQUID_CPPUNIT_LA)
+-AC_SUBST(SQUID_CPPUNIT_INC)
++AC_ARG_WITH([cppunit], AS_HELP_STRING([--without-cppunit],[Do not use cppunit test framework]),[
++ AS_CASE($with_cppunit, [yes|no],[],
++ [
++ AS_IF([test ! -d "$withval"],AC_MSG_ERROR([--with-cppunit PATH does not point to a directory]))
++ LIBCPPUNIT_CFLAGS="-I$with_cppunit/include"
++ LIBCPPUNIT_LIBS="-L$with_cppunit/lib -lcppunit"
++ ])
++])
++AS_IF([test "x$with_cppunit" != "xno"],[
++ PKG_CHECK_MODULES([LIBCPPUNIT],[cppunit],[
++ squid_cv_cppunit_version="`pkg-config cppunit --version`"
++ AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version])
++ AS_UNSET(squid_cv_cppunit_version)
++
++ SQUID_STATE_SAVE(squid_cppunit_state)
++ AS_VAR_APPEND(CXXFLAGS,[$LIBCPPUNIT_CFLAGS])
++ AS_VAR_APPEND(LIBS,[$LIBCPPUNIT_LIBS])
++ AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h)
++ SQUID_STATE_ROLLBACK(squid_cppunit_state)
++ ],[
++ AC_MSG_WARN([cppunit does not appear to be installed. Squid does not require this, but code testing with 'make check' will fail.])
++ ])
++])
+
+ # Force some compilers to use ANSI features
+ #
+
+--- src/Common.am 2017-06-01 16:49:00.000000000 +0300
++++ src/Common.am 2017-06-15 16:10:20.000000000 +0300
+@@ -26,7 +26,7 @@
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/include \
+- $(SQUID_CPPUNIT_INC)
++ $(LIBCPPUNIT_CFLAGS)
+
+ ## Kerberos headers require their include path.
+ ## Because we use libcompat for comm_err.h header protections ...
+--- src/Makefile.am 2017-06-01 16:49:00.000000000 +0300
++++ src/Makefile.am 2017-06-15 16:38:40.000000000 +0300
+@@ -1112,9 +1112,9 @@
+ # $(TESTSOURCES)
+ #tests_testX_LDFLAGS = $(LIBADD_DL)
+ #tests_testX_LDADD=\
+-# $(SQUID_CPPUNIT_LIBS) \
+-# $(SQUID_CPPUNIT_LA) \
+-# $(COMPAT_LIB) \
++# $(LIBCPPUNIT_LIBS) \
++# $(COMPAT_LIB) \
++# $(XTRA_LIBS)
+ #tests_testX_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
+
+
+@@ -1221,8 +1221,7 @@
+ $(top_builddir)/lib/libmisccontainers.la \
+ $(top_builddir)/lib/libmiscencoding.la \
+ $(top_builddir)/lib/libmiscutil.la \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
++ $(LIBCPPUNIT_LIBS) \
+ $(NETTLELIB) \
+ $(SSLLIB) \
+ $(COMPAT_LIB) \
+@@ -1363,7 +1362,7 @@
+ $(DISK_OS_LIBS) \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(SSLLIB) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+@@ -1383,14 +1382,14 @@
+ tests/stub_MemBuf.cc \
+ $(TESTSOURCES)
+ tests_testBoilerplate_LDADD= \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
+ base/libbase.la \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testBoilerplate_LDFLAGS = $(LIBADD_DL)
+ tests_testBoilerplate_DEPENDENCIES = \
+- $(SQUID_CPPUNIT_LA)
++ $(LIBCPPUNIT_LIBS)
+
+ ## Tests of base/libbase.la objects
+ tests_testCharacterSet_SOURCES = \
+@@ -1405,9 +1404,8 @@
+ tests_testCharacterSet_LDFLAGS = $(LIBADD_DL)
+ tests_testCharacterSet_LDADD= \
+ base/libbase.la \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+- $(SQUID_CPPUNIT_LA) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(XTRA_LIBS)
+
+ ## Tests of the CacheManager module.
+@@ -1646,8 +1644,7 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
++ $(LIBCPPUNIT_LIBS) \
+ $(SSLLIB) \
+ $(KRB5LIBS) \
+ $(COMPAT_LIB) \
+@@ -1829,8 +1826,8 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+
+@@ -2076,9 +2073,8 @@
+ $(SNMP_LIBS) \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(KRB5LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+@@ -2323,10 +2319,9 @@
+ $(SNMP_LIBS) \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+ $(SSLLIB) \
+ $(KRB5LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testEventLoop_LDFLAGS = $(LIBADD_DL)
+@@ -2564,10 +2559,9 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+ $(SSLLIB) \
+ $(KRB5LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_test_http_range_LDFLAGS = $(LIBADD_DL)
+@@ -2613,7 +2607,7 @@
+ base/libbase.la \
+ ip/libip.la \
+ $(top_builddir)/lib/libmiscutil.la \
+- $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testHttpParser_LDFLAGS = $(LIBADD_DL)
+@@ -2639,9 +2633,8 @@
+ parser/libsquid-parser.la \
+ base/libbase.la \
+ $(top_builddir)/lib/libmiscutil.la \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+- $(SQUID_CPPUNIT_LA) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(XTRA_LIBS)
+
+ ## Tests of the HttpRequest module.
+@@ -2875,10 +2868,9 @@
+ $(DISK_OS_LIBS) \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+ $(SSLLIB) \
+ $(KRB5LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
+@@ -2902,9 +2894,8 @@
+ icmp/libicmp-core.la \
+ ip/libip.la \
+ base/libbase.la \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+- $(SQUID_CPPUNIT_LA) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(XTRA_LIBS)
+
+ ## Tests for ip/* objects
+@@ -2918,9 +2909,8 @@
+ tests_testIpAddress_LDADD= \
+ ip/libip.la \
+ base/libbase.la \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+- $(SQUID_CPPUNIT_LA) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(XTRA_LIBS)
+ tests_testIpAddress_LDFLAGS= $(LIBADD_DL)
+
+@@ -3087,10 +3077,10 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
+ CommCalls.o \
+ DnsLookupDetails.o \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testStore_LDFLAGS = $(LIBADD_DL)
+@@ -3130,8 +3120,8 @@
+ ip/libip.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testString_LDFLAGS = $(LIBADD_DL)
+@@ -3326,8 +3316,8 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testUfs_LDFLAGS = $(LIBADD_DL)
+@@ -3506,8 +3496,8 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testRock_LDFLAGS = $(AM_CPPFLAGS) $(LIBADD_DL)
+@@ -3751,10 +3741,9 @@
+ $(top_builddir)/lib/libmiscutil.la \
+ $(NETTLELIB) \
+ $(COMPAT_LIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+ $(SSLLIB) \
+ $(KRB5LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testURL_LDFLAGS = $(LIBADD_DL)
+@@ -3794,7 +3783,7 @@
+ mgr/libmgr.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
+@@ -3838,7 +3827,7 @@
+ ip/libip.la \
+ mgr/libmgr.la \
+ $(top_builddir)/lib/libmiscutil.la \
+- $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testSBufList_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
+@@ -3876,8 +3865,8 @@
+ ip/libip.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(REGEXLIB) \
+- $(SQUID_CPPUNIT_LIBS) \
+ $(SSLLIB) \
++ $(LIBCPPUNIT_LIBS) \
+ $(COMPAT_LIB) \
+ $(XTRA_LIBS)
+ tests_testConfigParser_LDFLAGS = $(LIBADD_DL)
+@@ -3922,9 +3911,9 @@
+ base/libbase.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(top_builddir)/lib/libmisccontainers.la \
+- $(SQUID_CPPUNIT_LIBS) \
+- $(SQUID_CPPUNIT_LA) \
+- $(COMPAT_LIB)
++ $(LIBCPPUNIT_LIBS) \
++ $(COMPAT_LIB) \
++ $(XTRA_LIBS)
+ tests_testStatHist_DEPENDENCIES = $(SQUID_CPPUNIT_LA)
+
+ TESTS += testHeaders
+--- lib/Makefile.am 2017-06-01 16:49:00.000000000 +0300
++++ lib/Makefile.am 2017-06-16 07:19:54.000000000 +0300
+@@ -91,7 +91,7 @@
+ tests/testRFC1035.cc
+
+ tests_testRFC1035_LDADD= \
+- $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(top_builddir)/lib/libmiscencoding.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(COMPAT_LIB)
+@@ -103,7 +103,7 @@
+ tests/testRFC1738.cc
+
+ tests_testRFC1738_LDADD= \
+- $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \
++ $(LIBCPPUNIT_LIBS) \
+ $(top_builddir)/lib/libmiscencoding.la \
+ $(top_builddir)/lib/libmiscutil.la \
+ $(COMPAT_LIB)
diff --git a/net-proxy/squid/files/squid.confd-r1 b/net-proxy/squid/files/squid.confd-r1
new file mode 100644
index 000000000000..a29d33defb07
--- /dev/null
+++ b/net-proxy/squid/files/squid.confd-r1
@@ -0,0 +1,12 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/squid
+
+SQUID_OPTS="-YC"
+
+# Kerberos keytab file to use. This is required if you enable kerberos authentication.
+SQUID_KEYTAB=""
+
+# Use max_filedescriptors setting in squid.conf to determine the maximum number
+# of filedescriptors squid can open.
diff --git a/net-proxy/squid/files/squid.cron b/net-proxy/squid/files/squid.cron
new file mode 100644
index 000000000000..8726ddd72955
--- /dev/null
+++ b/net-proxy/squid/files/squid.cron
@@ -0,0 +1,5 @@
+#!/bin/sh
+if test -e /var/run/squid.pid ; then
+ test -n "$(cat /var/run/squid.pid|xargs ps -p|grep squid)" && \
+ /usr/sbin/squid -k rotate
+fi
diff --git a/net-proxy/squid/files/squid.initd-r4 b/net-proxy/squid/files/squid.initd-r4
new file mode 100644
index 000000000000..3e84eda38a6d
--- /dev/null
+++ b/net-proxy/squid/files/squid.initd-r4
@@ -0,0 +1,117 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload rotate"
+
+depend() {
+ use dns net
+}
+
+checkconfig() {
+ if [ ! -f /etc/squid/${SVCNAME}.conf ]; then
+ eerror "You need to create /etc/squid/${SVCNAME}.conf first."
+ eerror "An example can be found in /etc/squid/squid.conf.default"
+ return 1
+ fi
+
+ local PIDFILE=$(awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }' < /etc/squid/${SVCNAME}.conf)
+ [ -z ${PIDFILE} ] && PIDFILE=/run/squid.pid
+ if [ /run/${SVCNAME}.pid != ${PIDFILE} ]; then
+ eerror "/etc/squid/${SVCNAME}.conf must set pid_filename to"
+ eerror " /run/${SVCNAME}.pid"
+ eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than"
+ eerror " in any other instance of squid."
+ return 1
+ fi
+
+ # Maximum file descriptors squid can open is determined by:
+ # a basic default of N=1024
+ # ... altered by ./configure --with-filedescriptors=N
+ # ... overridden on production by squid.conf max_filedescriptors (if,
+ # and only if, setrlimit() RLIMIT_NOFILE is able to be built+used).
+ # Since we do not configure hard coded # of filedescriptors anymore,
+ # there is no need for ulimit calls in the init script.
+ # Use max_filedescriptors in squid.conf instead.
+
+ local CACHE_SWAP=$(awk '/^[ \t]*cache_dir[ \t]+/ { if ( $2 == "rock" ) printf "%s/rock ", $3; else if ( $2 == "coss" ) printf "%s/stripe ", $3; else printf "%s/00 ", $3; }' < /etc/squid/${SVCNAME}.conf)
+ [ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00"
+
+ local x
+ for x in $CACHE_SWAP ; do
+ if [ ! -e $x ] ; then
+ ebegin "Initializing cache directory ${x%/*}"
+ local ORIG_UMASK=$(umask)
+ umask 027
+
+ if ! (mkdir -p ${x%/*} && chown squid ${x%/*}) ; then
+ eend 1
+ return 1
+ fi
+
+ local INIT_CACHE_RESPONSE="$(/usr/sbin/squid -z -N -f /etc/squid/${SVCNAME}.conf 2>&1)"
+ if [ $? != 0 ] || echo "$INIT_CACHE_RESPONSE" | grep -q "erminated abnormally" ; then
+ umask $ORIG_UMASK
+ eend 1
+ echo "$INIT_CACHE_RESPONSE"
+ return 1
+ fi
+
+ umask $ORIG_UMASK
+ eend 0
+ break
+ fi
+ done
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ checkpath -d -q -m 0750 -o squid:squid /run/${SVCNAME}
+
+ ebegin "Starting ${SVCNAME}"
+ KRB5_KTNAME="${SQUID_KEYTAB}" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${SVCNAME}.conf
+ eend $? && sleep 1
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ if /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf ; then
+ # Now we have to wait until squid has _really_ stopped.
+ sleep 1
+ if [ -f /run/${SVCNAME}.pid ] ; then
+ einfon "Waiting for squid to shutdown ."
+ cnt=0
+ while [ -f /run/${SVCNAME}.pid ] ; do
+ cnt=$(expr $cnt + 1)
+ if [ $cnt -gt 60 ] ; then
+ # Waited 120 seconds now. Fail.
+ echo
+ eend 1 "Failed."
+ break
+ fi
+ sleep 2
+ echo -n "."
+ done
+ echo
+ fi
+ else
+ eerror "Squid shutdown failed, probably service is already down."
+ fi
+ eend 0
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME}"
+ /usr/sbin/squid -k reconfigure -f /etc/squid/${SVCNAME}.conf
+ eend $?
+}
+
+rotate() {
+ service_started ${SVCNAME} || return 1
+ ebegin "Rotating ${SVCNAME} logs"
+ /usr/sbin/squid -k rotate -f /etc/squid/${SVCNAME}.conf
+ eend $?
+}
diff --git a/net-proxy/squid/files/squid.logrotate b/net-proxy/squid/files/squid.logrotate
new file mode 100644
index 000000000000..5bf289691aec
--- /dev/null
+++ b/net-proxy/squid/files/squid.logrotate
@@ -0,0 +1,8 @@
+/var/log/squid/*.log {
+ copytruncate
+ compress
+ notifempty
+ missingok
+ sharedscripts
+}
+
diff --git a/net-proxy/squid/files/squid.pam b/net-proxy/squid/files/squid.pam
new file mode 100644
index 000000000000..75eeaa9db38d
--- /dev/null
+++ b/net-proxy/squid/files/squid.pam
@@ -0,0 +1,7 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth include system-auth
+account include system-auth
+password include system-auth
+session optional pam_limits.so
+session include system-auth
diff --git a/net-proxy/squid/metadata.xml b/net-proxy/squid/metadata.xml
new file mode 100644
index 000000000000..b001b2a98b0d
--- /dev/null
+++ b/net-proxy/squid/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>eras@gentoo.org</email>
+ <name>Eray Aslan</name>
+ </maintainer>
+ <longdescription>A full-featured web proxy cache</longdescription>
+ <use>
+ <flag name="ecap">Adds support for loadable content adaptation modules
+ (http://www.e-cap.org)</flag>
+ <flag name="esi">Enable ESI for accelerators, will cause squid reverse proxies
+ to be capable of the Edge Acceleration Specification (www.esi.org)</flag>
+ <flag name="htcp">Enable HTCP protocol</flag>
+ <flag name="ipf-transparent">Adds transparent proxy support for systems
+ using IP-Filter (only for *bsd)</flag>
+ <flag name="logrotate">Use <pkg>app-admin/logrotate</pkg> for rotating
+ logs</flag>
+ <flag name="kqueue">Enables *BSD kqueue() support</flag>
+ <flag name="pf-transparent">Adds transparent proxy support for systems using
+ PF (only for *bsd)</flag>
+ <flag name="qos">Adds support for Quality of Service using netfilter conntrack
+ - see qos_flow directive for more info</flag>
+ <flag name="ssl-crtd">Adds support for dynamic SSL certificate generation in
+ SslBump environments</flag>
+ <flag name="tproxy">Enables real Transparent Proxy support for Linux Netfilter
+ TPROXY</flag>
+ <flag name="wccp">Enable Web Cache Coordination Protocol</flag>
+ <flag name="wccpv2">Enable Web Cache Coordination V2 Protocol</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-proxy/squid/squid-3.5.23.ebuild b/net-proxy/squid/squid-3.5.23.ebuild
new file mode 100644
index 000000000000..3022f9bcb2ba
--- /dev/null
+++ b/net-proxy/squid/squid-3.5.23.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info pam toolchain-funcs user
+
+DESCRIPTION="A full-featured web proxy cache"
+HOMEPAGE="http://www.squid-cache.org/"
+SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \
+ ecap esi ssl-crtd \
+ mysql postgres sqlite \
+ qos tproxy \
+ +htcp +wccp +wccpv2 \
+ pf-transparent ipf-transparent kqueue \
+ elibc_uclibc kernel_linux"
+
+COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
+ pam? ( virtual/pam )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ qos? ( net-libs/libnetfilter_conntrack )
+ ssl? (
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ dev-libs/nettle >=net-libs/gnutls-3.1.5 )
+ sasl? ( dev-libs/cyrus-sasl )
+ ecap? ( net-libs/libecap:1 )
+ esi? ( dev-libs/expat dev-libs/libxml2 )
+ !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
+ >=sys-libs/db-4:*
+ dev-lang/perl
+ dev-libs/libltdl:0"
+DEPEND="${COMMON_DEPEND}
+ ecap? ( virtual/pkgconfig )
+ test? ( dev-util/cppunit )"
+RDEPEND="${COMMON_DEPEND}
+ samba? ( net-fs/samba )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ selinux? ( sec-policy/selinux-squid )
+ sqlite? ( dev-perl/DBD-SQLite )
+ !<=sci-biology/meme-4.8.1-r1"
+
+REQUIRED_USE="tproxy? ( caps )
+ qos? ( caps )"
+
+pkg_pretend() {
+ if use tproxy; then
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
+ sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
+ INSTALL QUICKSTART \
+ scripts/fileno-to-pathname.pl \
+ scripts/check_cache.pl \
+ tools/cachemgr.cgi.8 \
+ tools/purge/conffile.hh \
+ tools/purge/README || die
+ sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
+ INSTALL QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
+ QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
+ QUICKSTART \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
+ helpers/external_acl/unix_group/ext_unix_group_acl.8 \
+ helpers/external_acl/session/ext_session_acl.8 \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
+ scripts/check_cache.pl || die
+ sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ # /var/run/squid to /run/squid
+ sed -i -e 's:$(localstatedir)::' \
+ src/ipc/Makefile.am || die
+ sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
+ libltdl/configure.ac || die
+
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam"
+ use samba && basic_modules+=",SMB"
+ use ldap && basic_modules+=",LDAP"
+ use pam && basic_modules+=",PAM"
+ use sasl && basic_modules+=",SASL"
+ use nis && ! use elibc_uclibc && basic_modules+=",NIS"
+ use radius && basic_modules+=",RADIUS"
+ if use mysql || use postgres || use sqlite ; then
+ basic_modules+=",DB"
+ fi
+
+ local digest_modules="file"
+ use ldap && digest_modules+=",LDAP,eDirectory"
+
+ local negotiate_modules="none"
+ local myconf="--without-mit-krb5 --without-heimdal-krb5"
+ if use kerberos ; then
+ negotiate_modules="kerberos,wrapper"
+ if has_version app-crypt/heimdal ; then
+ myconf="--without-mit-krb5 --with-heimdal-krb5"
+ else
+ myconf="--with-mit-krb5 --without-heimdal-krb5"
+ fi
+ fi
+
+ local ntlm_modules="none"
+ use samba && ntlm_modules="smb_lm"
+
+ local ext_helpers="file_userip,session,unix_group"
+ use samba && ext_helpers+=",wbinfo_group"
+ use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
+ use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
+
+ local storeio_modules="aufs,diskd,rock,ufs"
+
+ local transparent
+ if use kernel_linux ; then
+ transparent+=" --enable-linux-netfilter"
+ use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
+ fi
+
+ if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
+ transparent+=" $(use_enable kqueue)"
+ if use pf-transparent; then
+ transparent+=" --enable-pf-transparent"
+ elif use ipf-transparent; then
+ transparent+=" --enable-ipf-transparent"
+ fi
+ fi
+
+ tc-export CC AR
+
+ econf \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/libexec/squid \
+ --localstatedir=/var \
+ --with-pidfile=/run/squid.pid \
+ --datadir=/usr/share/squid \
+ --with-logdir=/var/log/squid \
+ --with-default-user=squid \
+ --enable-removal-policies="lru,heap" \
+ --enable-storeio="${storeio_modules}" \
+ --enable-disk-io \
+ --enable-auth-basic="${basic_modules}" \
+ --enable-auth-digest="${digest_modules}" \
+ --enable-auth-ntlm="${ntlm_modules}" \
+ --enable-auth-negotiate="${negotiate_modules}" \
+ --enable-external-acl-helpers="${ext_helpers}" \
+ --enable-log-daemon-helpers \
+ --enable-url-rewrite-helpers \
+ --enable-cache-digests \
+ --enable-delay-pools \
+ --enable-eui \
+ --enable-icmp \
+ --enable-follow-x-forwarded-for \
+ --with-large-files \
+ --disable-strict-error-checking \
+ --disable-arch-native \
+ --with-ltdl-includedir=/usr/include \
+ --with-ltdl-libdir=/usr/$(get_libdir) \
+ $(use_with caps libcap) \
+ $(use_enable ipv6) \
+ $(use_enable snmp) \
+ $(use_with ssl openssl) \
+ $(use_with ssl nettle) \
+ $(use_with ssl gnutls) \
+ $(use_enable ssl-crtd) \
+ $(use_enable ecap) \
+ $(use_enable esi) \
+ $(use_enable htcp) \
+ $(use_enable wccp) \
+ $(use_enable wccpv2) \
+ ${transparent} \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # need suid root for looking into /etc/shadow
+ fowners root:squid /usr/libexec/squid/basic_ncsa_auth
+ fperms 4750 /usr/libexec/squid/basic_ncsa_auth
+ if use pam; then
+ fowners root:squid /usr/libexec/squid/basic_pam_auth
+ fperms 4750 /usr/libexec/squid/basic_pam_auth
+ fi
+ # pinger needs suid as well
+ fowners root:squid /usr/libexec/squid/pinger
+ fperms 4750 /usr/libexec/squid/pinger
+
+ # cleanup
+ rm -f "${D}"/usr/bin/Run*
+ rm -rf "${D}"/run/squid "${D}"/var/cache/squid
+
+ dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
+ newdoc helpers/negotiate_auth/kerberos/README README.kerberos
+ newdoc helpers/basic_auth/RADIUS/README README.RADIUS
+ newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group
+ newdoc tools/purge/README README.purge
+ newdoc tools/helper-mux.README README.helper-mux
+ dodoc RELEASENOTES.html
+
+ newpamd "${FILESDIR}/squid.pam" squid
+ newconfd "${FILESDIR}/squid.confd-r1" squid
+ newinitd "${FILESDIR}/squid.initd-r4" squid
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/squid.logrotate" squid
+ else
+ exeinto /etc/cron.weekly
+ newexe "${FILESDIR}/squid.cron" squid.cron
+ fi
+
+ diropts -m0750 -o squid -g squid
+ keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
+}
diff --git a/net-proxy/squid/squid-3.5.24.ebuild b/net-proxy/squid/squid-3.5.24.ebuild
new file mode 100644
index 000000000000..b499ec5ba110
--- /dev/null
+++ b/net-proxy/squid/squid-3.5.24.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info pam toolchain-funcs user
+
+DESCRIPTION="A full-featured web proxy cache"
+HOMEPAGE="http://www.squid-cache.org/"
+SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \
+ ecap esi ssl-crtd \
+ mysql postgres sqlite \
+ qos tproxy \
+ +htcp +wccp +wccpv2 \
+ pf-transparent ipf-transparent kqueue \
+ elibc_uclibc kernel_linux"
+
+COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
+ pam? ( virtual/pam )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ qos? ( net-libs/libnetfilter_conntrack )
+ ssl? (
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ dev-libs/nettle >=net-libs/gnutls-3.1.5 )
+ sasl? ( dev-libs/cyrus-sasl )
+ ecap? ( net-libs/libecap:1 )
+ esi? ( dev-libs/expat dev-libs/libxml2 )
+ !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
+ >=sys-libs/db-4:*
+ dev-lang/perl
+ dev-libs/libltdl:0"
+DEPEND="${COMMON_DEPEND}
+ ecap? ( virtual/pkgconfig )
+ test? ( dev-util/cppunit )"
+RDEPEND="${COMMON_DEPEND}
+ samba? ( net-fs/samba )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ selinux? ( sec-policy/selinux-squid )
+ sqlite? ( dev-perl/DBD-SQLite )
+ !<=sci-biology/meme-4.8.1-r1"
+
+REQUIRED_USE="tproxy? ( caps )
+ qos? ( caps )"
+
+pkg_pretend() {
+ if use tproxy; then
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
+ sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
+ INSTALL QUICKSTART \
+ scripts/fileno-to-pathname.pl \
+ scripts/check_cache.pl \
+ tools/cachemgr.cgi.8 \
+ tools/purge/conffile.hh \
+ tools/purge/README || die
+ sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
+ INSTALL QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
+ QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
+ QUICKSTART \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
+ helpers/external_acl/unix_group/ext_unix_group_acl.8 \
+ helpers/external_acl/session/ext_session_acl.8 \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
+ scripts/check_cache.pl || die
+ sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ # /var/run/squid to /run/squid
+ sed -i -e 's:$(localstatedir)::' \
+ src/ipc/Makefile.am || die
+ sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
+ libltdl/configure.ac || die
+
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam"
+ use samba && basic_modules+=",SMB"
+ use ldap && basic_modules+=",LDAP"
+ use pam && basic_modules+=",PAM"
+ use sasl && basic_modules+=",SASL"
+ use nis && ! use elibc_uclibc && basic_modules+=",NIS"
+ use radius && basic_modules+=",RADIUS"
+ if use mysql || use postgres || use sqlite ; then
+ basic_modules+=",DB"
+ fi
+
+ local digest_modules="file"
+ use ldap && digest_modules+=",LDAP,eDirectory"
+
+ local negotiate_modules="none"
+ local myconf="--without-mit-krb5 --without-heimdal-krb5"
+ if use kerberos ; then
+ negotiate_modules="kerberos,wrapper"
+ if has_version app-crypt/heimdal ; then
+ myconf="--without-mit-krb5 --with-heimdal-krb5"
+ else
+ myconf="--with-mit-krb5 --without-heimdal-krb5"
+ fi
+ fi
+
+ local ntlm_modules="none"
+ use samba && ntlm_modules="smb_lm"
+
+ local ext_helpers="file_userip,session,unix_group"
+ use samba && ext_helpers+=",wbinfo_group"
+ use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
+ use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
+
+ local storeio_modules="aufs,diskd,rock,ufs"
+
+ local transparent
+ if use kernel_linux ; then
+ transparent+=" --enable-linux-netfilter"
+ use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
+ fi
+
+ if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
+ transparent+=" $(use_enable kqueue)"
+ if use pf-transparent; then
+ transparent+=" --enable-pf-transparent"
+ elif use ipf-transparent; then
+ transparent+=" --enable-ipf-transparent"
+ fi
+ fi
+
+ tc-export CC AR
+
+ econf \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/libexec/squid \
+ --localstatedir=/var \
+ --with-pidfile=/run/squid.pid \
+ --datadir=/usr/share/squid \
+ --with-logdir=/var/log/squid \
+ --with-default-user=squid \
+ --enable-removal-policies="lru,heap" \
+ --enable-storeio="${storeio_modules}" \
+ --enable-disk-io \
+ --enable-auth-basic="${basic_modules}" \
+ --enable-auth-digest="${digest_modules}" \
+ --enable-auth-ntlm="${ntlm_modules}" \
+ --enable-auth-negotiate="${negotiate_modules}" \
+ --enable-external-acl-helpers="${ext_helpers}" \
+ --enable-log-daemon-helpers \
+ --enable-url-rewrite-helpers \
+ --enable-cache-digests \
+ --enable-delay-pools \
+ --enable-eui \
+ --enable-icmp \
+ --enable-follow-x-forwarded-for \
+ --with-large-files \
+ --disable-strict-error-checking \
+ --disable-arch-native \
+ --with-ltdl-includedir=/usr/include \
+ --with-ltdl-libdir=/usr/$(get_libdir) \
+ $(use_with caps libcap) \
+ $(use_enable ipv6) \
+ $(use_enable snmp) \
+ $(use_with ssl openssl) \
+ $(use_with ssl nettle) \
+ $(use_with ssl gnutls) \
+ $(use_enable ssl-crtd) \
+ $(use_enable ecap) \
+ $(use_enable esi) \
+ $(use_enable htcp) \
+ $(use_enable wccp) \
+ $(use_enable wccpv2) \
+ ${transparent} \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # need suid root for looking into /etc/shadow
+ fowners root:squid /usr/libexec/squid/basic_ncsa_auth
+ fperms 4750 /usr/libexec/squid/basic_ncsa_auth
+ if use pam; then
+ fowners root:squid /usr/libexec/squid/basic_pam_auth
+ fperms 4750 /usr/libexec/squid/basic_pam_auth
+ fi
+ # pinger needs suid as well
+ fowners root:squid /usr/libexec/squid/pinger
+ fperms 4750 /usr/libexec/squid/pinger
+
+ # cleanup
+ rm -f "${D}"/usr/bin/Run*
+ rm -rf "${D}"/run/squid "${D}"/var/cache/squid
+
+ dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
+ newdoc helpers/negotiate_auth/kerberos/README README.kerberos
+ newdoc helpers/basic_auth/RADIUS/README README.RADIUS
+ newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group
+ newdoc tools/purge/README README.purge
+ newdoc tools/helper-mux.README README.helper-mux
+ dodoc RELEASENOTES.html
+
+ newpamd "${FILESDIR}/squid.pam" squid
+ newconfd "${FILESDIR}/squid.confd-r1" squid
+ newinitd "${FILESDIR}/squid.initd-r4" squid
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/squid.logrotate" squid
+ else
+ exeinto /etc/cron.weekly
+ newexe "${FILESDIR}/squid.cron" squid.cron
+ fi
+
+ diropts -m0750 -o squid -g squid
+ keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
+}
diff --git a/net-proxy/squid/squid-3.5.25.ebuild b/net-proxy/squid/squid-3.5.25.ebuild
new file mode 100644
index 000000000000..b499ec5ba110
--- /dev/null
+++ b/net-proxy/squid/squid-3.5.25.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info pam toolchain-funcs user
+
+DESCRIPTION="A full-featured web proxy cache"
+HOMEPAGE="http://www.squid-cache.org/"
+SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \
+ ecap esi ssl-crtd \
+ mysql postgres sqlite \
+ qos tproxy \
+ +htcp +wccp +wccpv2 \
+ pf-transparent ipf-transparent kqueue \
+ elibc_uclibc kernel_linux"
+
+COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
+ pam? ( virtual/pam )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ qos? ( net-libs/libnetfilter_conntrack )
+ ssl? (
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ dev-libs/nettle >=net-libs/gnutls-3.1.5 )
+ sasl? ( dev-libs/cyrus-sasl )
+ ecap? ( net-libs/libecap:1 )
+ esi? ( dev-libs/expat dev-libs/libxml2 )
+ !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
+ >=sys-libs/db-4:*
+ dev-lang/perl
+ dev-libs/libltdl:0"
+DEPEND="${COMMON_DEPEND}
+ ecap? ( virtual/pkgconfig )
+ test? ( dev-util/cppunit )"
+RDEPEND="${COMMON_DEPEND}
+ samba? ( net-fs/samba )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ selinux? ( sec-policy/selinux-squid )
+ sqlite? ( dev-perl/DBD-SQLite )
+ !<=sci-biology/meme-4.8.1-r1"
+
+REQUIRED_USE="tproxy? ( caps )
+ qos? ( caps )"
+
+pkg_pretend() {
+ if use tproxy; then
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
+ sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
+ INSTALL QUICKSTART \
+ scripts/fileno-to-pathname.pl \
+ scripts/check_cache.pl \
+ tools/cachemgr.cgi.8 \
+ tools/purge/conffile.hh \
+ tools/purge/README || die
+ sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
+ INSTALL QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
+ QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
+ QUICKSTART \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
+ helpers/external_acl/unix_group/ext_unix_group_acl.8 \
+ helpers/external_acl/session/ext_session_acl.8 \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
+ scripts/check_cache.pl || die
+ sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ # /var/run/squid to /run/squid
+ sed -i -e 's:$(localstatedir)::' \
+ src/ipc/Makefile.am || die
+ sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
+ libltdl/configure.ac || die
+
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam"
+ use samba && basic_modules+=",SMB"
+ use ldap && basic_modules+=",LDAP"
+ use pam && basic_modules+=",PAM"
+ use sasl && basic_modules+=",SASL"
+ use nis && ! use elibc_uclibc && basic_modules+=",NIS"
+ use radius && basic_modules+=",RADIUS"
+ if use mysql || use postgres || use sqlite ; then
+ basic_modules+=",DB"
+ fi
+
+ local digest_modules="file"
+ use ldap && digest_modules+=",LDAP,eDirectory"
+
+ local negotiate_modules="none"
+ local myconf="--without-mit-krb5 --without-heimdal-krb5"
+ if use kerberos ; then
+ negotiate_modules="kerberos,wrapper"
+ if has_version app-crypt/heimdal ; then
+ myconf="--without-mit-krb5 --with-heimdal-krb5"
+ else
+ myconf="--with-mit-krb5 --without-heimdal-krb5"
+ fi
+ fi
+
+ local ntlm_modules="none"
+ use samba && ntlm_modules="smb_lm"
+
+ local ext_helpers="file_userip,session,unix_group"
+ use samba && ext_helpers+=",wbinfo_group"
+ use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
+ use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
+
+ local storeio_modules="aufs,diskd,rock,ufs"
+
+ local transparent
+ if use kernel_linux ; then
+ transparent+=" --enable-linux-netfilter"
+ use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
+ fi
+
+ if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
+ transparent+=" $(use_enable kqueue)"
+ if use pf-transparent; then
+ transparent+=" --enable-pf-transparent"
+ elif use ipf-transparent; then
+ transparent+=" --enable-ipf-transparent"
+ fi
+ fi
+
+ tc-export CC AR
+
+ econf \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/libexec/squid \
+ --localstatedir=/var \
+ --with-pidfile=/run/squid.pid \
+ --datadir=/usr/share/squid \
+ --with-logdir=/var/log/squid \
+ --with-default-user=squid \
+ --enable-removal-policies="lru,heap" \
+ --enable-storeio="${storeio_modules}" \
+ --enable-disk-io \
+ --enable-auth-basic="${basic_modules}" \
+ --enable-auth-digest="${digest_modules}" \
+ --enable-auth-ntlm="${ntlm_modules}" \
+ --enable-auth-negotiate="${negotiate_modules}" \
+ --enable-external-acl-helpers="${ext_helpers}" \
+ --enable-log-daemon-helpers \
+ --enable-url-rewrite-helpers \
+ --enable-cache-digests \
+ --enable-delay-pools \
+ --enable-eui \
+ --enable-icmp \
+ --enable-follow-x-forwarded-for \
+ --with-large-files \
+ --disable-strict-error-checking \
+ --disable-arch-native \
+ --with-ltdl-includedir=/usr/include \
+ --with-ltdl-libdir=/usr/$(get_libdir) \
+ $(use_with caps libcap) \
+ $(use_enable ipv6) \
+ $(use_enable snmp) \
+ $(use_with ssl openssl) \
+ $(use_with ssl nettle) \
+ $(use_with ssl gnutls) \
+ $(use_enable ssl-crtd) \
+ $(use_enable ecap) \
+ $(use_enable esi) \
+ $(use_enable htcp) \
+ $(use_enable wccp) \
+ $(use_enable wccpv2) \
+ ${transparent} \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # need suid root for looking into /etc/shadow
+ fowners root:squid /usr/libexec/squid/basic_ncsa_auth
+ fperms 4750 /usr/libexec/squid/basic_ncsa_auth
+ if use pam; then
+ fowners root:squid /usr/libexec/squid/basic_pam_auth
+ fperms 4750 /usr/libexec/squid/basic_pam_auth
+ fi
+ # pinger needs suid as well
+ fowners root:squid /usr/libexec/squid/pinger
+ fperms 4750 /usr/libexec/squid/pinger
+
+ # cleanup
+ rm -f "${D}"/usr/bin/Run*
+ rm -rf "${D}"/run/squid "${D}"/var/cache/squid
+
+ dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
+ newdoc helpers/negotiate_auth/kerberos/README README.kerberos
+ newdoc helpers/basic_auth/RADIUS/README README.RADIUS
+ newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group
+ newdoc tools/purge/README README.purge
+ newdoc tools/helper-mux.README README.helper-mux
+ dodoc RELEASENOTES.html
+
+ newpamd "${FILESDIR}/squid.pam" squid
+ newconfd "${FILESDIR}/squid.confd-r1" squid
+ newinitd "${FILESDIR}/squid.initd-r4" squid
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/squid.logrotate" squid
+ else
+ exeinto /etc/cron.weekly
+ newexe "${FILESDIR}/squid.cron" squid.cron
+ fi
+
+ diropts -m0750 -o squid -g squid
+ keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
+}
diff --git a/net-proxy/squid/squid-3.5.26.ebuild b/net-proxy/squid/squid-3.5.26.ebuild
new file mode 100644
index 000000000000..6a79f8eeb07e
--- /dev/null
+++ b/net-proxy/squid/squid-3.5.26.ebuild
@@ -0,0 +1,241 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info pam toolchain-funcs user
+
+DESCRIPTION="A full-featured web proxy cache"
+HOMEPAGE="http://www.squid-cache.org/"
+SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \
+ ecap esi ssl-crtd \
+ mysql postgres sqlite \
+ qos tproxy \
+ +htcp +wccp +wccpv2 \
+ pf-transparent ipf-transparent kqueue \
+ elibc_uclibc kernel_linux"
+
+COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
+ pam? ( virtual/pam )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ qos? ( net-libs/libnetfilter_conntrack )
+ ssl? (
+ libressl? ( dev-libs/libressl:0 )
+ !libressl? ( dev-libs/openssl:0 )
+ dev-libs/nettle >=net-libs/gnutls-3.1.5 )
+ sasl? ( dev-libs/cyrus-sasl )
+ ecap? ( net-libs/libecap:1 )
+ esi? ( dev-libs/expat dev-libs/libxml2 )
+ !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
+ >=sys-libs/db-4:*
+ dev-lang/perl
+ dev-libs/libltdl:0"
+DEPEND="${COMMON_DEPEND}
+ ecap? ( virtual/pkgconfig )
+ test? ( dev-util/cppunit )"
+RDEPEND="${COMMON_DEPEND}
+ samba? ( net-fs/samba )
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+ selinux? ( sec-policy/selinux-squid )
+ sqlite? ( dev-perl/DBD-SQLite )
+ !<=sci-biology/meme-4.8.1-r1"
+
+REQUIRED_USE="tproxy? ( caps )
+ qos? ( caps )"
+
+pkg_pretend() {
+ if use tproxy; then
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
+ linux-info_pkg_setup
+ fi
+}
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
+ eapply -p0 "${FILESDIR}/${PN}-cppunit-1.14.patch"
+ sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
+ INSTALL QUICKSTART \
+ scripts/fileno-to-pathname.pl \
+ scripts/check_cache.pl \
+ tools/cachemgr.cgi.8 \
+ tools/purge/conffile.hh \
+ tools/purge/README || die
+ sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
+ INSTALL QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
+ QUICKSTART || die
+ sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
+ QUICKSTART \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
+ src/log/access_log.cc || die
+ sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
+ helpers/external_acl/unix_group/ext_unix_group_acl.8 \
+ helpers/external_acl/session/ext_session_acl.8 \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
+ scripts/check_cache.pl || die
+ sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
+ src/ssl/ssl_crtd.8 || die
+ # /var/run/squid to /run/squid
+ sed -i -e 's:$(localstatedir)::' \
+ src/ipc/Makefile.am || die
+ sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
+ libltdl/configure.ac || die
+
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam"
+ use samba && basic_modules+=",SMB"
+ use ldap && basic_modules+=",LDAP"
+ use pam && basic_modules+=",PAM"
+ use sasl && basic_modules+=",SASL"
+ use nis && ! use elibc_uclibc && basic_modules+=",NIS"
+ use radius && basic_modules+=",RADIUS"
+ if use mysql || use postgres || use sqlite ; then
+ basic_modules+=",DB"
+ fi
+
+ local digest_modules="file"
+ use ldap && digest_modules+=",LDAP,eDirectory"
+
+ local negotiate_modules="none"
+ local myconf="--without-mit-krb5 --without-heimdal-krb5"
+ if use kerberos ; then
+ negotiate_modules="kerberos,wrapper"
+ if has_version app-crypt/heimdal ; then
+ myconf="--without-mit-krb5 --with-heimdal-krb5"
+ else
+ myconf="--with-mit-krb5 --without-heimdal-krb5"
+ fi
+ fi
+
+ local ntlm_modules="none"
+ use samba && ntlm_modules="smb_lm"
+
+ local ext_helpers="file_userip,session,unix_group"
+ use samba && ext_helpers+=",wbinfo_group"
+ use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
+ use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
+
+ local storeio_modules="aufs,diskd,rock,ufs"
+
+ local transparent
+ if use kernel_linux ; then
+ transparent+=" --enable-linux-netfilter"
+ use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
+ fi
+
+ if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
+ transparent+=" $(use_enable kqueue)"
+ if use pf-transparent; then
+ transparent+=" --enable-pf-transparent"
+ elif use ipf-transparent; then
+ transparent+=" --enable-ipf-transparent"
+ fi
+ fi
+
+ tc-export CC AR
+
+ econf \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/libexec/squid \
+ --localstatedir=/var \
+ --with-pidfile=/run/squid.pid \
+ --datadir=/usr/share/squid \
+ --with-logdir=/var/log/squid \
+ --with-default-user=squid \
+ --enable-removal-policies="lru,heap" \
+ --enable-storeio="${storeio_modules}" \
+ --enable-disk-io \
+ --enable-auth-basic="${basic_modules}" \
+ --enable-auth-digest="${digest_modules}" \
+ --enable-auth-ntlm="${ntlm_modules}" \
+ --enable-auth-negotiate="${negotiate_modules}" \
+ --enable-external-acl-helpers="${ext_helpers}" \
+ --enable-log-daemon-helpers \
+ --enable-url-rewrite-helpers \
+ --enable-cache-digests \
+ --enable-delay-pools \
+ --enable-eui \
+ --enable-icmp \
+ --enable-follow-x-forwarded-for \
+ --with-large-files \
+ --disable-strict-error-checking \
+ --disable-arch-native \
+ --with-ltdl-includedir=/usr/include \
+ --with-ltdl-libdir=/usr/$(get_libdir) \
+ $(use_with caps libcap) \
+ $(use_enable ipv6) \
+ $(use_enable snmp) \
+ $(use_with ssl openssl) \
+ $(use_with ssl nettle) \
+ $(use_with ssl gnutls) \
+ $(use_enable ssl-crtd) \
+ $(use_enable ecap) \
+ $(use_enable esi) \
+ $(use_enable htcp) \
+ $(use_enable wccp) \
+ $(use_enable wccpv2) \
+ ${transparent} \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # need suid root for looking into /etc/shadow
+ fowners root:squid /usr/libexec/squid/basic_ncsa_auth
+ fperms 4750 /usr/libexec/squid/basic_ncsa_auth
+ if use pam; then
+ fowners root:squid /usr/libexec/squid/basic_pam_auth
+ fperms 4750 /usr/libexec/squid/basic_pam_auth
+ fi
+ # pinger needs suid as well
+ fowners root:squid /usr/libexec/squid/pinger
+ fperms 4750 /usr/libexec/squid/pinger
+
+ # cleanup
+ rm -f "${D}"/usr/bin/Run*
+ rm -rf "${D}"/run/squid "${D}"/var/cache/squid
+
+ dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
+ newdoc helpers/negotiate_auth/kerberos/README README.kerberos
+ newdoc helpers/basic_auth/RADIUS/README README.RADIUS
+ newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group
+ newdoc tools/purge/README README.purge
+ newdoc tools/helper-mux.README README.helper-mux
+ dodoc RELEASENOTES.html
+
+ newpamd "${FILESDIR}/squid.pam" squid
+ newconfd "${FILESDIR}/squid.confd-r1" squid
+ newinitd "${FILESDIR}/squid.initd-r4" squid
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/squid.logrotate" squid
+ else
+ exeinto /etc/cron.weekly
+ newexe "${FILESDIR}/squid.cron" squid.cron
+ fi
+
+ diropts -m0750 -o squid -g squid
+ keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
+}
diff --git a/net-proxy/squidclamav/Manifest b/net-proxy/squidclamav/Manifest
new file mode 100644
index 000000000000..a78318467867
--- /dev/null
+++ b/net-proxy/squidclamav/Manifest
@@ -0,0 +1,7 @@
+DIST squidclamav-6.10.tar.gz 436639 SHA256 4d1ed7012b5b8db4143d38196b0928bd44f2461226a3f9ae2cdc3643524a054b SHA512 36a49720ea8984d3075364cc6150bd5063983aaeaaad538f6e4fde013b92243b0aeb39ef151e0a6752259739e1258d8170fa27eedf3a91384a5814fd81ae9382 WHIRLPOOL 7d96880458303f974e0f4af166944936e2dc44e4ad026d77016d038ef6088d089394e531d5b35e919efdc78e86c0c1ab6d74401af80e4532ff4a6a374844efb0
+DIST squidclamav-6.8.tar.gz 840634 SHA256 70dc1de6aa1a5cc705e336512699a0da530cf6f6e1130b261c5983ee89b34c49 SHA512 03d4ccbb970c1b3c9f0d632eae2b0c43fa0d2fc4b2fd495ef972018c069e20b7a4d198989a6010a1778c87a173fa90c49ea3d2332b89a5a9f6b5b7cb914879d0 WHIRLPOOL 4502a912f60af6f48bf662b67957f8c919a04627d02b120e64ef0566f9108c89fef45793d3a6646ffb41892718acf90bfc5c493cfef29ca3b9cbb1c4bcdb3d8d
+EBUILD squidclamav-6.10.ebuild 1747 SHA256 15de9370c06f916e9e6502944eb4c1bbb3fa376a2714b94bd4f23cc02f27f7a9 SHA512 01199da2721253eabf538bf76b3bad0278b541eb41692cddba1266b216af744ed33bfd4b0211012f0d28f61934bd7365e4df88a8c7f66029c1bab6e23d8cbeba WHIRLPOOL 65ca2dfb6bd45e89e3e726c5bc6b53d312173dc3ee48d2974254772f534894862cddcc56d9db85336cca7dfa804eb3cecd05a87013e99b9d1cbd5d169b36fdc0
+EBUILD squidclamav-6.8.ebuild 1679 SHA256 cd986c11caf676d1b49b0e1c57248f7e23f69d331093566b3741c80fb57282dd SHA512 e1044c83f7f02f9dfc0b32335d74c0fe839d4416ed7fd30621582f53506afbebef36119d49530f22c5b6ad51320d81ea475c4826ebe8e9070a3abec445d2f8b3 WHIRLPOOL 87a19ce8ca34af34e4244984bf91d33bf6890e0c02ad24b8334516402b79794d15da91e4f87eccf8d753a1bf2824b3d42c89bb8f9c3f92ab54e7c34d545d1419
+MISC ChangeLog 2401 SHA256 b8fb3d54d6f4d6fbfa2607de5a7795399065973a1e3919d0ba624d08a2b87be8 SHA512 c2cc2c0be3f90aa965564f0d971bf3a48283f5b04c9591f4adb34ac1f8eb923ee333f76cbb1ea2dab6100d097fb6c97042a113f98293c5d59e8900270f4d49ad WHIRLPOOL 5b2566e0b72e370bcb0804316c9ae5c6c1bd2e868c255d86bacfdbc86deb8389605ecef6c9a4cd6dc263dcf7a0fda36574e0f5c695c009aed7b4d13ea706e90e
+MISC ChangeLog-2015 5077 SHA256 2ae05aeb348ca65e2be2e3225725ae4f95b9d8bbf96d219d391eb31fecfabed5 SHA512 1f750f0fecadb76889c212d8625f961b93fbbc4fadc3d76757047787665c729418de005397d907b14a6b7952ae913a06d36294289ec6589dde156025413dce10 WHIRLPOOL a8b81fa725630279ec58781be5e9ac273a58b3f205a61f02a86dc44d8d1e04dbf974d1633a6cbf1e59f322cf7991ac61bd13c407de0bb651f3f60a6fca02752d
+MISC metadata.xml 510 SHA256 db8a67f0b4bf935e3db6cf50cb9b02e198141d4bf12dc11b8674616cab7454c5 SHA512 e01fb33026918dca0635228a3b5eec99b5257f1ec90889480e3e75b62b448a28c76aad0e4e742b5017c6b310d9176372123bb76535caa23044db9ad0ecc45280 WHIRLPOOL 824d0abf0ffccdee4f67cd1844134d9dd1e44fa80e2cda3aec95ce25b5b7651ee33bd0a1005ad2a281716a7f25d2ff0c01a775a83def3da5b66a91e95e715bbc
diff --git a/net-proxy/squidclamav/metadata.xml b/net-proxy/squidclamav/metadata.xml
new file mode 100644
index 000000000000..4f9c96bd930a
--- /dev/null
+++ b/net-proxy/squidclamav/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription>
+ SquidClamAV is a <pkg>net-proxy/squid</pkg> redirector which allows easy antivirus file
+ scanning. It can use either a local or a remote ClamAV daemon. As
+ of version 6.0, it is now an ICAP module for
+ <pkg>net-proxy/c-icap</pkg>.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">squidclamav</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/squidclamav/squidclamav-6.10.ebuild b/net-proxy/squidclamav/squidclamav-6.10.ebuild
new file mode 100644
index 000000000000..ecfc677d0e8f
--- /dev/null
+++ b/net-proxy/squidclamav/squidclamav-6.10.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit libtool autotools
+
+DESCRIPTION="HTTP Antivirus for Squid based on ClamAv and ICAP"
+HOMEPAGE="http://squidclamav.darold.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="net-proxy/c-icap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # version 6.3 causes maintainer-mode rebuild from tarball, and
+ # contains acinclude.m4 with libtool macros which cause trouble.
+ rm acinclude.m4 || die
+ eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf --disable-static --enable-shared
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ find "${D}" -name '*.la' -delete || die
+
+ # delete its own documentation installed
+ rm -r "${D}"/usr/share/${PN} || die
+
+ dodoc README AUTHORS ChangeLog
+
+ # Fix configuration file to adapt to the Gentoo configuration
+ sed -i \
+ -e '/clamd_local/s:\.ctl:.sock:' \
+ "${D}"/etc/squidclamav.conf || die
+}
+
+pkg_postinst() {
+ elog "Starting from version 6, Squid Clamav is now a module for the c-icap"
+ elog "server, which is called from squid, rather than being a redirector"
+ elog "directly."
+ elog ""
+ elog "To enable the service, you should add this to your c-icap.conf file:"
+ elog ""
+ elog " Service clamav squidclamav.so"
+ elog ""
+ elog "And then this to squid.conf (for a local ICAP server):"
+ elog ""
+ elog " icap_enable on"
+ elog ""
+ elog " # not strictly needed, but useful for special access"
+ elog " icap_send_client_ip on"
+ elog " icap_send_client_username on"
+ elog ""
+ elog " icap_service clamav respmod_precache bypass=0 icap://localhost:1344/clamav"
+ elog " adaptation_access clamav allow all"
+}
diff --git a/net-proxy/squidclamav/squidclamav-6.8.ebuild b/net-proxy/squidclamav/squidclamav-6.8.ebuild
new file mode 100644
index 000000000000..045c33fafdcd
--- /dev/null
+++ b/net-proxy/squidclamav/squidclamav-6.8.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit libtool autotools
+
+DESCRIPTION="HTTP Antivirus for Squid based on ClamAv and ICAP"
+HOMEPAGE="http://squidclamav.darold.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="net-proxy/c-icap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # version 6.3 causes maintainer-mode rebuild from tarball, and
+ # contains acinclude.m4 with libtool macros which cause trouble.
+ rm acinclude.m4 || die
+ eautoreconf
+ elibtoolize
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ find "${D}" -name '*.la' -delete || die
+
+ # delete its own documentation installed
+ rm -r "${D}"/usr/share/${PN} || die
+
+ dodoc README AUTHORS ChangeLog
+
+ # Fix configuration file to adapt to the Gentoo configuration
+ sed -i \
+ -e '/clamd_local/s:\.ctl:.sock:' \
+ "${D}"/etc/squidclamav.conf || die
+}
+
+pkg_postinst() {
+ elog "Starting from version 6, Squid Clamav is now a module for the c-icap"
+ elog "server, which is called from squid, rather than being a redirector"
+ elog "directly."
+ elog ""
+ elog "To enable the service, you should add this to your c-icap.conf file:"
+ elog ""
+ elog " Service clamav squidclamav.so"
+ elog ""
+ elog "And then this to squid.conf (for a local ICAP server):"
+ elog ""
+ elog " icap_enable on"
+ elog ""
+ elog " # not strictly needed, but useful for special access"
+ elog " icap_send_client_ip on"
+ elog " icap_send_client_username on"
+ elog ""
+ elog " icap_service clamav respmod_precache bypass=0 icap://localhost:1344/clamav"
+ elog " adaptation_access clamav allow all"
+}
diff --git a/net-proxy/squidguard/Manifest b/net-proxy/squidguard/Manifest
new file mode 100644
index 000000000000..768deba4cbcd
--- /dev/null
+++ b/net-proxy/squidguard/Manifest
@@ -0,0 +1,10 @@
+AUX blockedsites 8 SHA256 20169b61056128def8ac7b7eb393f7933362392b8d583b610b21bd3ce5c2015f SHA512 5b7ae0ece304235c61be154d285c52a622c82270d8af3447eabb05a3705a1f6987c51cc71a14fe2b75eb48440133674f22e5700630e5a96b3097f8d10ade1479 WHIRLPOOL 0a35f86d989ae69f218dd24c8d76a7182d5ab05fdc6bfc294de2b9f46100f844246ca48fa91a9111a634900b9d29b4271423a70c87fa8722affbaab3f0572bdc
+AUX squidGuard.conf.blocksites 192 SHA256 6fab8600cbc8945f94260c68a5c4743244dd35ce195edaf3da453e284c4f8f3a SHA512 a6bab8318df1937c68c99de188c095b3deb61ae32cc0e96fe5f5652697bafa8f3591a7a239f93d3c3db84a7dfa2dab3f6c3a4e621c4b1a147bc7f1ec2d34fc19 WHIRLPOOL 9d81bc118ada60afdc766e69253dc1673df4d4f09f9b299277fc8addba24f7294d2dfbf622d826961a72ccfa2a6654e3cd329fc50d372774aa05e64ca97581f7
+AUX squidGuard.conf.minimal 61 SHA256 7070372be0dca55ade0a1beea8ac8d0461c38a8f5ef9d0a71ab47a9678f8f5df SHA512 301263fcfaf345c34b5a988ce237bc578fb48f63ab2187b5dd2f146e4cf914bf823fcce49c27f8282e745f3125e32455d9c5a5f425d40ce7785f492663eb959c WHIRLPOOL d134e5e731f64e33b0886daa4e906dab737a079a10433cfdeb616a07b56d1bd86cf2f134aab70eb3541b5be4aea47ba9168d51679bdfc12f2bb545f4459ed664
+AUX squidguard-1.5_beta-gentoo.patch 1562 SHA256 ff9969dfaa5a3f8949b7d6145cb59807c598b9a729ef9bb467c4058903437333 SHA512 bdeb6b5a526200f290ce39e3e9c7f4142eb168ec3c47cf4ec2c6dc713fd9c5915c92ca4188c9bfc8c6795f6f170ade62bca3ace0ccfa5149addb0ae932064f8a WHIRLPOOL 18117355a8c52694b7243f866622ed728ef271828c54193f704bdde1c5e207269336541042a36fa7927437215893846764f2dbe8a2298718b2f3c9ae322b5072
+AUX squidguard-1.5_beta-protocol.patch 4489 SHA256 c9618bc10309455f10d8a87ec4bd1e387d6c947797edf136b8ac0d8b567cb6fa SHA512 f8828d10b7ca55debf5aa80ef7e88741b10e9c566921fc2fd38652080fef025bff91851a14c1ee610fabce2562b1c8ca797dd9ae924a1fcc62ab95cb365ff8b1 WHIRLPOOL 090c986f59d8f6e34b663355d81ccb3a7cad4decf73af75d9ca25ddc17ac6415d6e317e12f00ef58a12e524d6af97aa3059095dd7e5ae213aa773cbcc03751c0
+DIST squidGuard-1.5-beta.tar.gz 1983030 SHA256 ba4b79cd193bd3095f3fd27a6e2fc1b36effc2e12a33e17159d4a51993fb3c8e SHA512 37ddc2ac82596e9d24aac6a610763f2eeb7c15b3a2d7babb85948e1da912aebb1dc85309766f7d8c3d7c22713e24a51f4cdef4520117a03d839662ef2494b6e7 WHIRLPOOL 6f65c6a9b23396a7c4a10f344a20cb4824e0abae451fb95a1b563084d0c9755b20f67a74d991b76a54d239ad3dbc6ba468d3c687fdbd80c31567608a927154fc
+EBUILD squidguard-1.5_beta-r2.ebuild 2276 SHA256 9462a6064adc33e3590840631e5882da42df7cdd4e2bee4095fc2d13af71d092 SHA512 fcfce62692dc0d9cac271cca6cf4a344e4c67d1e9bee780fc508ed46f84ed5ff42098ea929f72b7161f57b4f6165d1e9f45f5ed4ee886861d22e3b82c4ac6391 WHIRLPOOL 55e2502d9547521f78d6baed753ecb3e12bd70765f9aeb2f9cca7820ae028442bd6d68c7de5b7e89d098a580df681cf5762b5b2bbaa19847bb87b8309dd5246b
+MISC ChangeLog 4719 SHA256 5f2f1d47fc39226f077f0624544327f476c2fb02dd3fb51e6448b343f6c4c836 SHA512 91f7f4b217baa3f63a0dd44e520575d8a911a99995d1e7cbb1fc00ba8d29448fe720f797a3c548d9ca7b8f1bfc1f0094bb3d0467c6f139c80d5fde2a3b17573d WHIRLPOOL 2220e93a3a330a5f4bad92b940d47df02362793a9c2e36c6bb866d288a52da2805f6ac617bce075d1f28b59bdb4047b319e9c30e94d6df36049a5c4d99cf77db
+MISC ChangeLog-2015 10580 SHA256 69051cb88d2367465efa4afaf2be6a618ad508f439046503dfd2c4da991ef0a5 SHA512 f960c367c104fe4008529c563ef147b0d1925f4b09c904920dde6676a521b0afd3e40a2ca347afd7c1bcbb2d756bdcfcbfe76f7c4b017f804343d84e15b20202 WHIRLPOOL e8c11a0e893c0c1469cbc890d0b63e28877ec301fb763ea07ad8265aa364470fab2ecba62c0c3471eaa30ff6b35a88bbd25267ac1086630c29f32ee0a3b46da4
+MISC metadata.xml 247 SHA256 fb925313d1ae70feaa6db91150f34a2157b48e884e8f47d773640af149e3744b SHA512 96c55c2979dd6a4c4761fce9b5a0be387b11fcf197ef903d8680ae82f01a2caea93b1238bed1ac96d3eb250744e2149a507e0424ac017b4324f0806a54e72c4a WHIRLPOOL 142b4295733faec48b0ca9eb6d3561799ff743481aabf2b74ecf6d717d972b4961979c7b6bf32b9840cb34e47d22fe2befb9b0ef8ec0d3f28f6416069128d3c7
diff --git a/net-proxy/squidguard/files/blockedsites b/net-proxy/squidguard/files/blockedsites
new file mode 100644
index 000000000000..46279a47eed4
--- /dev/null
+++ b/net-proxy/squidguard/files/blockedsites
@@ -0,0 +1 @@
+sex.com
diff --git a/net-proxy/squidguard/files/squidGuard.conf.blocksites b/net-proxy/squidguard/files/squidGuard.conf.blocksites
new file mode 100644
index 000000000000..eaa8cdeef051
--- /dev/null
+++ b/net-proxy/squidguard/files/squidGuard.conf.blocksites
@@ -0,0 +1,13 @@
+logdir /var/log/squidGuard
+dbhome /etc/squidGuard/db
+
+dest blockedsites {
+ domainlist blockedsites
+}
+
+acl {
+ default {
+ pass !blockedsites all
+ redirect http://www.sample.com/empty.png
+ }
+}
diff --git a/net-proxy/squidguard/files/squidGuard.conf.minimal b/net-proxy/squidguard/files/squidGuard.conf.minimal
new file mode 100644
index 000000000000..3b0ebf55c766
--- /dev/null
+++ b/net-proxy/squidguard/files/squidGuard.conf.minimal
@@ -0,0 +1,7 @@
+logdir /var/log/squidGuard
+
+acl {
+ default {
+ pass all
+ }
+}
diff --git a/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch
new file mode 100644
index 000000000000..814079764a3f
--- /dev/null
+++ b/net-proxy/squidguard/files/squidguard-1.5_beta-gentoo.patch
@@ -0,0 +1,50 @@
+diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
+--- squidGuard-1.4.orig/Makefile.in 2008-05-17 18:36:44.000000000 +0000
++++ squidGuard-1.4/Makefile.in 2009-01-10 13:02:14.000000000 +0000
+@@ -43,7 +43,7 @@
+ # Dependencies for installing
+ #
+
+-install: install-build install-conf
++install: install-build
+
+ install-conf:
+ @echo Installing configuration file ;
+@@ -85,10 +85,10 @@
+
+ install-build:
+ @echo Installing squidGuard
+- @if [ ! -d $(bindir) ]; then \
+- $(MKINSTALLDIRS) $(bindir) ; \
++ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
++ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
+ fi ; \
+- cp src/squidGuard $(bindir) || exit 1 ; \
++ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \
+ echo Done. ;
+
+ clean::
+diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
+--- squidGuard-1.4.orig/src/Makefile.in 2009-01-03 20:05:39.000000000 +0000
++++ squidGuard-1.4/src/Makefile.in 2009-01-10 13:02:14.000000000 +0000
+@@ -110,6 +110,8 @@
+ mv -f y.tab.c y.tab.c.bison
+ mv -f y.tab.h y.tab.h.bison
+
++sg.y sg.l:
++
+ #
+ # Dependencies for installing
+ #
+@@ -122,8 +124,8 @@
+
+ install.bin:: squidGuard
+ @echo making $@ in `basename \`pwd\``
+- @$(MKDIR) $(bindir) $(logdir) $(cfgdir)
+- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
++ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
++ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
+
+ uninstall.bin::
+ @echo making $@ in `basename \`pwd\``
+diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c
diff --git a/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch b/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch
new file mode 100644
index 000000000000..289fc7563b72
--- /dev/null
+++ b/net-proxy/squidguard/files/squidguard-1.5_beta-protocol.patch
@@ -0,0 +1,130 @@
+Patch for compatibility with new(>=3.4) Squid helper protocol
+
+Bugreport: http://bugs.squid-cache.org/show_bug.cgi?id=3978
+
+diff -ur squidGuard-1.5-beta.orig/src/main.c squidGuard-1.5-beta/src/main.c
+--- squidGuard-1.5-beta.orig/src/main.c 2013-12-12 11:47:31.000000000 +1300
++++ squidGuard-1.5-beta/src/main.c 2013-12-12 11:50:38.000000000 +1300
+@@ -185,7 +185,7 @@
+ sgReloadConfig();
+ }
+ if(failsafe_mode) {
+- puts("");
++ puts("ERR message=\"squidGuard failsafe mode\"");
+ fflush(stdout);
+ if(sig_hup){
+ sgReloadConfig();
+@@ -194,7 +194,7 @@
+ }
+ if(parseLine(buf,&squidInfo) != 1){
+ sgLogError("ERROR: Error parsing squid line: %s",buf);
+- puts("");
++ puts("BH message=\"squidGuard error parsing squid line\"");
+ }
+ else {
+ src = Source;
+@@ -206,14 +206,14 @@
+ acl = sgAclCheckSource(src);
+ if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
+ if(src == NULL || src->cont_search == 0){
+- puts("");
++ puts("ERR");
+ break;
+ } else
+ if(src->next != NULL){
+ src = src->next;
+ continue;
+ } else {
+- puts("");
++ puts("ERR");
+ break;
+ }
+ } else {
+@@ -228,6 +228,10 @@
+ fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
+ squidInfo.srcDomain,squidInfo.ident,
+ squidInfo.method);
++ if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
++ fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
++ } else
++ fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
+ /* sgLogDebug("DEBUG: %s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
+ break;
+ }
+diff -ur squidGuard-1.5-beta.orig/src/main.c.in squidGuard-1.5-beta/src/main.c.in
+--- squidGuard-1.5-beta.orig/src/main.c.in 2013-12-12 11:47:31.000000000 +1300
++++ squidGuard-1.5-beta/src/main.c.in 2013-12-12 11:53:18.000000000 +1300
+@@ -185,7 +185,7 @@
+ sgReloadConfig();
+ }
+ if(failsafe_mode) {
+- puts("");
++ puts("ERR message=\"squidGuard failsafe mode\"");
+ fflush(stdout);
+ if(sig_hup){
+ sgReloadConfig();
+@@ -194,7 +194,7 @@
+ }
+ if(parseLine(buf,&squidInfo) != 1){
+ sgLogError("ERROR: Error parsing squid line: %s",buf);
+- puts("");
++ puts("BH message=\"squidGuard error parsing squid line\"");
+ }
+ else {
+ src = Source;
+@@ -206,14 +206,14 @@
+ acl = sgAclCheckSource(src);
+ if((redirect = sgAclAccess(src,acl,&squidInfo)) == NULL){
+ if(src == NULL || src->cont_search == 0){
+- puts("");
++ puts("ERR");
+ break;
+ } else
+ if(src->next != NULL){
+ src = src->next;
+ continue;
+ } else {
+- puts("");
++ puts("ERR");
+ break;
+ }
+ } else {
+@@ -225,9 +225,11 @@
+ squidInfo.ident[0] = '-';
+ squidInfo.ident[1] = '\0';
+ }
+- fprintf(stdout,"%s %s/%s %s %s\n",redirect,squidInfo.src,
+- squidInfo.srcDomain,squidInfo.ident,
+- squidInfo.method);
++ if (isdigit(redirect[0]) && isdigit(redirect[1]) && isdigit(redirect[2]) && redirect[3]==':') {
++ fprintf(stdout,"OK status=%c%c%c url=\"%s\"\n", redirect[0], redirect[1], redirect[2], &redirect[4]);
++ } else
++ fprintf(stdout,"OK rewrite-url=\"%s\"\n",redirect);
++
+ /* sgLogDebug("DEBUG: %s %s/%s %s %s\n",redirect,squidInfo.src,squidInfo.srcDomain,squidInfo.ident,squidInfo.method); */
+ break;
+ }
+diff -ur squidGuard-1.5-beta.orig/src/sgDiv.c squidGuard-1.5-beta/src/sgDiv.c
+--- squidGuard-1.5-beta.orig/src/sgDiv.c 2013-12-12 11:47:31.000000000 +1300
++++ squidGuard-1.5-beta/src/sgDiv.c 2013-12-12 11:48:36.000000000 +1300
+@@ -782,7 +782,7 @@
+ }
+ sgLogError("ERROR: Going into emergency mode");
+ while(fgets(buf, MAX_BUF, stdin) != NULL){
+- puts("");
++ puts("ERR");
+ fflush(stdout);
+ }
+ sgLogError("ERROR: Ending emergency mode, stdin empty");
+diff -ur squidGuard-1.5-beta.orig/src/sgDiv.c.in squidGuard-1.5-beta/src/sgDiv.c.in
+--- squidGuard-1.5-beta.orig/src/sgDiv.c.in 2013-12-12 11:47:31.000000000 +1300
++++ squidGuard-1.5-beta/src/sgDiv.c.in 2013-12-12 11:48:36.000000000 +1300
+@@ -782,7 +782,7 @@
+ }
+ sgLogError("ERROR: Going into emergency mode");
+ while(fgets(buf, MAX_BUF, stdin) != NULL){
+- puts("");
++ puts("ERR");
+ fflush(stdout);
+ }
+ sgLogError("ERROR: Ending emergency mode, stdin empty");
diff --git a/net-proxy/squidguard/metadata.xml b/net-proxy/squidguard/metadata.xml
new file mode 100644
index 000000000000..5b159fbcadd1
--- /dev/null
+++ b/net-proxy/squidguard/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild b/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
new file mode 100644
index 000000000000..235a6ac00ed2
--- /dev/null
+++ b/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+WANT_AUTOMAKE=none
+
+inherit autotools db-use eutils user
+
+MY_P="squidGuard-${PV/_/-}"
+
+DESCRIPTION="Combined filter, redirector and access controller plugin for Squid"
+HOMEPAGE="http://www.squidguard.org"
+SRC_URI="http://www.squidguard.org/Downloads/Devel/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 sparc x86"
+
+IUSE="ldap"
+
+RDEPEND="|| (
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ )
+ ldap? ( net-nds/openldap:0 )"
+
+DEPEND="${RDEPEND}
+ sys-devel/bison:0
+ sys-devel/flex:0"
+
+S="${WORKDIR}/${MY_P}"
+
+suitable_db_version() {
+ local tested_slots="4.8 4.7 4.6 4.5 4.4 4.3 4.2"
+ for ver in ${tested_slots}; do
+ if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
+ echo ${ver}
+ return 0
+ fi
+ done
+ die "No suitable BerkDB versions found, aborting"
+}
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ mv configure.in configure.ac || die
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-protocol.patch"
+
+ # Link only with specific BerkDB versions
+ db_version="$(suitable_db_version)"
+ sed -i -e "/\$LIBS -ldb/s/-ldb/-l$(db_libname ${db_version})/" configure.ac || die
+
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with ldap) \
+ --with-db-inc="$(db_includedir ${db_version})" \
+ --with-sg-config=/etc/squidGuard/squidGuard.conf \
+ --with-sg-logdir=/var/log/squidGuard
+}
+
+src_install() {
+ emake prefix="/usr" INSTDIR="${D}" install
+
+ keepdir /var/log/squidGuard
+ fowners squid:squid /var/log/squidGuard
+
+ insinto /etc/squidGuard/sample
+ doins "${FILESDIR}"/squidGuard.conf.*
+ insinto /etc/squidGuard/sample/db
+ doins "${FILESDIR}"/blockedsites
+
+ dodoc ANNOUNCE CHANGELOG README
+ docinto html
+ dodoc doc/*.html
+ docinto text
+ dodoc doc/*.txt
+}
+
+pkg_postinst() {
+ einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:"
+ einfo " url_rewrite_program /usr/bin/squidGuard"
+ einfo " url_rewrite_children 10"
+ einfo ""
+ einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!"
+ einfo "Examples can be found in /etc/squidGuard/sample/"
+}
diff --git a/net-proxy/squirm/Manifest b/net-proxy/squirm/Manifest
new file mode 100644
index 000000000000..9f5e6486e37a
--- /dev/null
+++ b/net-proxy/squirm/Manifest
@@ -0,0 +1,7 @@
+AUX squirm-1.26-gcc5.patch 182 SHA256 1496842ff062cb10431dcbdc306dc5bd045984c44912a23613606dc0f9b39eee SHA512 ca757dd978c15e32ddca80bd402c4b10b953add88350dadd05615812973104cc788916974ff92b56c73e922477ef892dee4427ef5211a2e4281f29316a828050 WHIRLPOOL 2ac7c3f341981441a8412ff9be219f4377c1ffdfb949e02af297c76ba728f51ea4a16ccd2a73c6cc887a97bdaa3d957433b65e0161ed03b65ffff6a94492aaad
+AUX squirm-1.26-gentoo.patch 1019 SHA256 474ad2ef46699e901d06cfb554753a3c2b94fb27394e082ef8ae9b847d928b4c SHA512 673997c76a660d276f628007e4a2a66ea9afb502f6803e2ef9c9b289b7e50c86428cb95abb48aee992cb7afe5c7684790328549adc0b69e70888528d076636b9 WHIRLPOOL b5a4d94a80d8df237f7a4b92f9165f302e2e5e44e6020dca7a327489dc951730d9fe3a9ac00ea25d0c5fe902f5f63a3c5d1d92d4271b2c454160140aac82079f
+DIST squirm-1.26.tgz 24151 SHA256 0ff1521b8070f0e8e376d9857a34eb38953992a1f90e25769a5d7c7fe66cff88 SHA512 f6d0ec06d796b053cbe77e3099aa15665dc42a0e48e7c5b48c25c35a02677152bbb868ed822460cd52a1e898ec0ad605c43fe408c19e85e473e04257c8ffd9be WHIRLPOOL f150811ebcc859889b1ea1e8459ad4a16c07ae72c5bb6e9a94049687ab2033303b5cf0ecbba01c543df18a5af97574e53c34a5e3e7f75ae81e7a2e9548d511ca
+EBUILD squirm-1.26-r1.ebuild 761 SHA256 1713899bcb032909d2c68aaf2dae7e8ef7c1210b6368be725451d46c75592250 SHA512 3cf9af0e0221e15e3243ee4b80d4767b8bb62a1bf197238f391a24c80e2967d5afe14d732f8f2d2798ad82433437b7bc6dab1e8e99cefac9f2ad651f44460adb WHIRLPOOL e5918fa93598a4c257345bf926778e3f9466ffb02da4800b5f8817707258dc678e177ca3ce8c15beeaae3b86787742f4dcbcd46f06788bc21addc16f903534fd
+MISC ChangeLog 2861 SHA256 74b4e86f1bd3efca47a4617887a8e470514b0f7d87605206ad1b9da056cd5bea SHA512 e3d37cb395924c62494c03314cc3db7f0747465d7f72a36ed30133e7dacf7995ca35b581f0f5b8f988ad2c20ad201333567e6c170d2d319662622750bd6bf8a2 WHIRLPOOL ede7300536d99095eb9087cd86780c8d382f6c80dd2a5495b1a0fbc9b96822026ba2082b89fefffbec7ac86f56bb2448a45b4d6e8b82bf1706689c3fb8d0c09e
+MISC ChangeLog-2015 2933 SHA256 653d25422a82e6f9c5b7b0ddae447a7c5d6b67894bb575324632cf1770cdff93 SHA512 a1b8035885a410ecce623c88bfe38f81d5eb3f7ae3b98c335dce8543824f7a099272a3b99b3db82ab18693b98f01c3dd3516f51ae969aa9d1b55e5f2d0e42781 WHIRLPOOL c8796ba7ef590f5a4ab70ef23890190e04d7243f5d8d825ff8b50a106bed9a1d3c15ab85f56c67bd2f9367e43501d25e69f6ee20f8a1d0044ff318362d08666e
+MISC metadata.xml 224 SHA256 cb1bdfa60b019e9be41d860e9e20a28e9f1d24af075c7afd6aa8ca704fbb35b9 SHA512 e043725d9ce38bc38f1ba8e83df62662ef680b4c101172b6e4782e4125816234dac3bded9e57f621ca9b9a86b09cab0249a190ed5826cf241d70e07a871402fc WHIRLPOOL f47ff70ce22dcf4e17d3dd593f388af6d73a8587face4c210248aaa3aca6dda5b833866bda8e1286ba55006db22398f653ffe23205eb3aa6e5ccc503385dfa6d
diff --git a/net-proxy/squirm/files/squirm-1.26-gcc5.patch b/net-proxy/squirm/files/squirm-1.26-gcc5.patch
new file mode 100644
index 000000000000..71063718b7a7
--- /dev/null
+++ b/net-proxy/squirm/files/squirm-1.26-gcc5.patch
@@ -0,0 +1,9 @@
+--- a/util.h
++++ b/util.h
+@@ -24,5 +24,5 @@
+ information.
+ */
+
+-inline void lower_case(char *str);
++extern inline void lower_case(char *str);
+ char *safe_strdup(const char *str);
diff --git a/net-proxy/squirm/files/squirm-1.26-gentoo.patch b/net-proxy/squirm/files/squirm-1.26-gentoo.patch
new file mode 100644
index 000000000000..16b6e21c7aa2
--- /dev/null
+++ b/net-proxy/squirm/files/squirm-1.26-gentoo.patch
@@ -0,0 +1,34 @@
+diff -Nru squirm-1.26.orig/Makefile squirm-1.26/Makefile
+--- squirm-1.26.orig/Makefile 2005-08-19 09:31:06.000000000 +0200
++++ squirm-1.26/Makefile 2009-06-20 14:58:18.000000000 +0200
+@@ -1,7 +1,7 @@
+ # $Id$
+
+ # The path to install squirm under
+-PREFIX=/usr/local/squirm
++PREFIX=/opt/squirm
+
+ # The username that squid runs as (see cache_effective_user in squid.conf)
+ USER=squid
+@@ -29,10 +29,10 @@
+ CC=gcc
+
+
+-OPTIMISATION=-O3
++OPTIMISATION=
+ BINARIES = squirm
+
+-CFLAGS = -O3 -Wall -funroll-loops -DPREFIX=\"$(PREFIX)\"
++CFLAGS += -DPREFIX=\"$(PREFIX)\"
+ #CFLAGS = -Wall -g -DPREFIX=\"$(PREFIX)\"
+ #CFLAGS = -Wall -g -DDEBUG
+
+@@ -45,7 +45,7 @@
+ install -m 750 -o $(USER) -g $(GROUP) -d $(PREFIX)/logs
+ install -m 660 -c -o root -g $(GROUP) squirm.conf.dist squirm.patterns.dist \
+ $(PREFIX)/etc
+- install -m 755 -o root -g $(ROOT_GROUP) --strip squirm $(PREFIX)/bin
++ install -m 755 -o root -g $(ROOT_GROUP) squirm $(PREFIX)/bin
+
+ squirm.o: squirm.c $(HFILES)
+ $(CC) -c squirm.c $(CFLAGS)
diff --git a/net-proxy/squirm/metadata.xml b/net-proxy/squirm/metadata.xml
new file mode 100644
index 000000000000..979868f666de
--- /dev/null
+++ b/net-proxy/squirm/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>A redirector for Squid</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/squirm/squirm-1.26-r1.ebuild b/net-proxy/squirm/squirm-1.26-r1.ebuild
new file mode 100644
index 000000000000..e5e323ec0781
--- /dev/null
+++ b/net-proxy/squirm/squirm-1.26-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="A redirector for Squid"
+HOMEPAGE="http://squirm.foote.com.au"
+SRC_URI="http://squirm.foote.com.au/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+RDEPEND="net-proxy/squid"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-gcc5.patch
+)
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDOPTS="${LDFLAGS}"
+}
+
+src_install() {
+ emake PREFIX="${ED%/}/opt/squirm" install
+}
+
+pkg_postinst() {
+ einfo "To enable squirm, add the following lines to /etc/squid/squid.conf:"
+ einfo " url_rewrite_program /opt/squirm/bin/squirm"
+ einfo " url_rewrite_children 10"
+}
diff --git a/net-proxy/sshuttle/Manifest b/net-proxy/sshuttle/Manifest
new file mode 100644
index 000000000000..9a57414c6197
--- /dev/null
+++ b/net-proxy/sshuttle/Manifest
@@ -0,0 +1,5 @@
+DIST sshuttle-0.78.3.tar.gz 69460 SHA256 8aa31a645e6532d381d0298071960845fbdfa5c7683649a765a7ac7360c1be8b SHA512 581955d9868bdd369a37386b273d53448944b1fb5458a25d5930b348630521cadcaea8cf45371942f96c789889d2a405e8bbe824af3d0c6def73f017f1149a1e WHIRLPOOL 33e1f57ecefcce46240569554e623ae0865cc034232735b4361baf6e43f027b2b2be6ef54120944d3eb7281baecc376cd2a4cbede3b51d2bb8340eeb5e40a89c
+EBUILD sshuttle-0.78.3.ebuild 1040 SHA256 f0f44f31eeae3ce38c351902f7eba19379556006474e7995dc545a449e1955e7 SHA512 1b5176e1e6a154922a93102f36822ac2ffdf1ede3abdd9e31d212bad8093af202ec5db77f7e7f6ded46bf70499935cfc53831d3f42b36764be6b6f711ae8b2cd WHIRLPOOL 522455a5af68b37cc0a7b9aa221ed6c9fc31780f49c8f675a7674c033a130ca190cd00ae45c8eefa705f3b2a1e297d00bddbc4040044123971c5c6a6257b40ee
+MISC ChangeLog 3846 SHA256 c27cb1142a77a49b494477da140c6a4542cfdc3e0d5d787f051d4a6ff1d07b2f SHA512 932857de5812e05070e9e4b669605a4b1c6f423e96a6a6e6caa9315e2cce51b458278603b978011e7c5c48988e54e90375bb0bb204c7ffcab97e7c0713d3752e WHIRLPOOL 5a36faef689b23ffcbafd719cd02bc4c25b6ab3a0199a026655c0ad4cf1ebb61c18d2408e318eef2eedd73cfb2af0b2f7bae35c6d88598078b83ab11b95f4831
+MISC ChangeLog-2015 2876 SHA256 24d5090ebfb7eec8741e33c2bac010e42406b80014f9c430acf58e3fdea45014 SHA512 0306da8621f05e3294434fc71eed238066018f7a77dddcd6f7cc4623cb6c31cc279f71568b0f89a98bb796acb375e40c0aa4698dac1e92f39030692076cc7414 WHIRLPOOL f13db3a074396bba7c5fc4e73acb5eaed488ad50ce07ce98475c0ca76f0359aa1bfca826720c75272fb5173b672e224321b0361cdfd249e8793242a7f1dd6efd
+MISC metadata.xml 386 SHA256 458a38d09137ef5ec73289a8986ffb819fc58704bfe652b757a69026ff9ffef9 SHA512 988f65a4a15eac0630b83d0e090749c12ef58ca1284ed94f45f6eb9c4a5ff0678a481519f435a992f572b98a8878fbfeb7bf573443c128cd29e5c365a8eb2e32 WHIRLPOOL 90b3eeac266e8afe7a279ff964267f5c3915e4db9170d0bc94746ce1ef15ada078c91b459e628212cd512529e048ab585d9ce5dc6020a03ba66ffc82b3635377
diff --git a/net-proxy/sshuttle/metadata.xml b/net-proxy/sshuttle/metadata.xml
new file mode 100644
index 000000000000..6956e63728ab
--- /dev/null
+++ b/net-proxy/sshuttle/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">sshuttle</remote-id>
+ <remote-id type="github">sshuttle/sshuttle</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/sshuttle/sshuttle-0.78.3.ebuild b/net-proxy/sshuttle/sshuttle-0.78.3.ebuild
new file mode 100644
index 000000000000..b627c1c8e0c7
--- /dev/null
+++ b/net-proxy/sshuttle/sshuttle-0.78.3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_5,3_6} )
+
+inherit linux-info distutils-r1
+
+DESCRIPTION="Transparent proxy server that works as a poor man's VPN using ssh"
+HOMEPAGE="https://github.com/sshuttle/sshuttle https://pypi.python.org/pypi/sshuttle"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ net-firewall/iptables
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+
+CONFIG_CHECK="~NETFILTER_XT_TARGET_HL ~IP_NF_TARGET_REDIRECT ~IP_NF_MATCH_TTL ~NF_NAT"
+
+python_prepare_all() {
+ # don't run tests via setup.py pytest
+ sed -i "/setup_requires=/s/'pytest-runner'//" setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ py.test || die "Tests fail under ${EPYTHON}"
+}
diff --git a/net-proxy/tayga/Manifest b/net-proxy/tayga/Manifest
new file mode 100644
index 000000000000..9e3543d2ed18
--- /dev/null
+++ b/net-proxy/tayga/Manifest
@@ -0,0 +1,5 @@
+DIST tayga-0.9.2.tar.bz2 86022 SHA256 2b1f7927a9d2dcff9095aff3c271924b052ccfd2faca9588b277431a44f0009c SHA512 a7a81cccb7c3e32f00f142b1bac598b732dd748772b307561239d695418ada5302182d487e51d1cf95ed736c0180c01db2f33409d0b9343d6587b76cbb3bc573 WHIRLPOOL 7aeca19448270fedd1096e2f28946d5498bcef864ff55b6d6be31846d3b47dfea7fd4ff502411c8ec062600803856cb58e090fde06ed8a4032d5f8a705c44caf
+EBUILD tayga-0.9.2.ebuild 530 SHA256 be2d36430bc67c3cb2defce741e55ef3ec0cfb809b5c7c42213d96f445c55c79 SHA512 7c2924671bc8fc7cfe808a68ae3da2348bf70130e1718e52e8a21c709ec20b6c940b7f1604575922288aa5f8ff9b9f81cf742cad9c3de8ad37934721d2fd4226 WHIRLPOOL 2b5342a2e8538ea8abbb88cfada6bcc20be4dd1546abbc913e3d5063859ce27fd083a053d481abadc3496119e13eb687688737e7775fd0237e00f308c1b166e9
+MISC ChangeLog 2564 SHA256 49ebc030b81bb12b7d35d740323f9e8e7f836a02a8b7fbfaa6dbf75c8605d232 SHA512 220e4f5c80ad8f588ee33f28b3a2f841c72bf01b660665a3ddc30e30b8d071c9543405a4a7827555606eda93d245363a926b14dab98c85c5f8a283b3ad358216 WHIRLPOOL 5c054947ccb907759f0bd54ef37bf69577336c02ea17a9f5c6874de4ba62f10abdbd227f5af6fbcc4d9c5ef3ba9adf853b2f72036a24357bff7c10bda4245e7e
+MISC ChangeLog-2015 436 SHA256 41ef43e7dfae74d8c61eb610825c903c87b493361a07800caa89be5bdee59e72 SHA512 da0087cfbdf5ffec0955dc1c29877b9f3c857f49fa86e368cd198f1d70302fcba7f75c90266f7a49f13569b77cb2ea91c0af56e9090dd362ba10a2d19bea1acb WHIRLPOOL b8d28032ae3901fbaa2023ac31ed92d4d7b96ef9efd1d609cf18ef265d1f2fb2633888498141166d27c0caaa6af68b57a12838925167cac6e374065835d466e6
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/net-proxy/tayga/metadata.xml b/net-proxy/tayga/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/net-proxy/tayga/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-proxy/tayga/tayga-0.9.2.ebuild b/net-proxy/tayga/tayga-0.9.2.ebuild
new file mode 100644
index 000000000000..ad5952e38af4
--- /dev/null
+++ b/net-proxy/tayga/tayga-0.9.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+inherit autotools
+
+DESCRIPTION="out-of-kernel stateless NAT64 implementation based on TUN"
+HOMEPAGE="http://www.litech.org/tayga/"
+SRC_URI="http://www.litech.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -e '/^CFLAGS/d' \
+ -i configure.ac
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README || die
+}
diff --git a/net-proxy/tinyproxy/Manifest b/net-proxy/tinyproxy/Manifest
new file mode 100644
index 000000000000..26034fe4f3bb
--- /dev/null
+++ b/net-proxy/tinyproxy/Manifest
@@ -0,0 +1,11 @@
+AUX tinyproxy-1.8.1-ldflags.patch 306 SHA256 ab1377eb43902c44c44f29f82968f45852e33cd11345b20a24145e57492c1388 SHA512 d9daf50c1fcd2237ec59e7701adce76ba09347193439a1940c24e942600ab10bfc192e6c30a3fbcc3e1194f52b7aaab2fe5ef69468c01041f1a9d5fc6deacc8b WHIRLPOOL 0c0d9a5da91fc064c9b8a11d45f80bb15a106770939ed1b85ad173a9155319c53c9f01dc459095743d497543ca29fab4f654a9dea8dad30d6568972c2268b12b
+AUX tinyproxy-1.8.1-minimal.patch 109 SHA256 c2ee0a0cd073f00b7ea37eff078f84eb790bf7bb478e79fad5b1731aaec8f5dc SHA512 56126f4e315dfade7983a9961ab3a30687e5fb575d9fd0964f081cb1e4be718f54b3999f69f769832717ebae1dd832aaff5e60289b465976b2f95325af48d79d WHIRLPOOL 21d98b7c45c30771917959c2603e8e5690c2e8e28e62286d3eef2b9b2e56dea43d963a2997280a24ddefd647e597c840498792a9cfc2aa2f4b7d741912e792ce
+AUX tinyproxy-1.8.3-r2-DoS-Prevention.patch 6100 SHA256 34d666fecef0755bc42da2e102186f858f4966c47719ac864062050e1cf4b606 SHA512 ea023535ecf5fc9b0ab63d5e3ab4fe6222a54218de43894699ae742ff89e38ba65ea2a601f17de130e1169f37b0b7189ec55af471074222aecd827104d8f4ce0 WHIRLPOOL acaa8d758f1f616a0ef2a62a3cccf7f333cc77e54169994b5d424744211bdb2a25ed8db563e6106d6274ffc155403ac07d1496c0aaa181e55ffeca09b24c5ebc
+AUX tinyproxy-1.8.3-r2.initd 848 SHA256 abec9cc9ff85a9e4658696199ec3b473fe4977f633f210a388e8f4de58bc779b SHA512 424533167e6c50f6061190123203121f46d9e4e725de779ecb09a8695a8d3a22adb9b966de427cc9100a541ec0f12862323233af5a5b04dcb53357d332335098 WHIRLPOOL d9da997fedc0ebf20d2389c0b2273e9feaf68205cfcff45a9c8aece031354f7f2f3bfe52c6b5923a4601f9c7310c8d85c177bfc8ba8cfd9ccf832cc4aea0162a
+AUX tinyproxy.service 172 SHA256 2cef4ad5e765cd85d11aa145c87efaa7a14bdc4f1cf37416d2a9598a320c5665 SHA512 4c4cd36a7e34d9ee27c05475b72d1b61f90592ccb44c9deb96a1375bb681b7901702f078ed24b7c633074c83e450275a4a66829f3b270f75fc786a50d1ef393f WHIRLPOOL e434cc4efece2c383164b84a5a79978ed58f80a997eb4085bfcabd22c381a8f54d7008ccc89ba6979716cee23bfee679dd97410c3ddb1ea20a308a70d1437b54
+AUX tinyproxy.tmpfiles.conf 48 SHA256 3db13a4ecfaf8c90bda09ef2f613c8c10c176f700e39cf81ba1b17f00d02539d SHA512 24440cdaed0af6cbdb191acb1769e0a17871ef95e03e62a6621a413a2616e5d90d748d909bb5d18c029b25d7bf91485dbe46ee11e8703a1cb9008be470536715 WHIRLPOOL d6382d231ff013d69598b919a5131c96383e4f016415316d5feb8e4b5e656ee6accecfaa426af2ceb8e19e7feb2593c7ee16c54cea84e0aa8ce50b4cc82e7fe2
+DIST tinyproxy-1.8.3.tar.bz2 202430 SHA256 be559b54eb4772a703ad35239d1cb59d32f7cf8a739966742622d57df88b896e SHA512 69f1262b39d37f44a42621a0d25985632cdb790c8d9b49335a49a68c0f5237b97b111252856cba119895ac066770645560d2d7cd2de31f02103fa55fb4b3290c WHIRLPOOL f423b49e7cef6c98f69070e0598f4447cf8333cfc9e253dd6c459541922e5b2ed5c7604dc2e3f3de61a616d6381ff83df1625a8ad40a83d32d44f633ac98447c
+EBUILD tinyproxy-1.8.3-r4.ebuild 1968 SHA256 d1083d1f528e9c7a065845e2fca48c89c3806cbedc8c54621cfb359cf4c5a8af SHA512 63f04e0b44a85b1ba26275ddf72ce1a752702349a28da8ca01ff5fb014a45fbbd2abb0097403eec9f8e2d39b41fed2a89b39ba0183b2bf6be87f0fc76bf3d554 WHIRLPOOL 9b5e8732df8e57930f737d0d19950a47bed03cdef67145a039e4c29410105fc05a9596d80997e00e2846b8ddd09c1d2c0a99e84b51815498fb48fd97a13d81da
+MISC ChangeLog 4015 SHA256 9356a5e8a5849d62479d58e66507b110d46027e65fe271da957487a02dc1384c SHA512 aeb6c95ab61ae22f4de834a018ea3ac75c7d80b6434d361092c1792c9ce4b09fa8b4cb40e85f02d995bc6cb6d0695c00116c246c08cd3a536b850011e64a94b4 WHIRLPOOL 04199bc23c4dfbb0d7e68c43259e634a8b047edd1b96280545659e8ce205b9cdecc9c1fefc62dd5c1b9a5b76030312d0eb0c028ad6c7c290af27e08a7e0f4b6e
+MISC ChangeLog-2015 10247 SHA256 bb4a3f069da17ebab67f4692ac6ed375aea408c07d8df039deace4cf5f8ee9bd SHA512 154ca5cac4aa1a46048785bbc5e9b9395318ce3fc6a6bfb3a2762540484aec0101d7ca1c968ac4e59f0a0ff0f5952cdbe8e3d1f191ce7c083f179fbc35cad10b WHIRLPOOL f61a81c44bcc91f2e078c595756252fd4d55c2fce71f6ed49efa0c4abf307ab15922567412a1f1a3e8be4ce23f174bb86526f3922c4e7f8818fd48c76ad769b3
+MISC metadata.xml 567 SHA256 0db96daca30091f5bcca600c0bd05532762b7340bf688779ddc27555e52b6fb1 SHA512 58a7a1bb222e94bc0104bcbda8860a3cff2b6e4f3036c3e797188396e0f55e7b2314d5df77009898c478a933fe17b372c1b656fa8728fe5161e4e9b18fc54c6f WHIRLPOOL 10e61899b136fd5b84dfb037fc06cb5ecaf44274e005e57845237a6a43cef4b7ae0ba4d19a122eacf84401eb05067d13e21b37c6f7f7aae788a041f1f0153d8f
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.1-ldflags.patch b/net-proxy/tinyproxy/files/tinyproxy-1.8.1-ldflags.patch
new file mode 100644
index 000000000000..bd40ec33e31a
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.1-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac 2010-03-09 12:41:45.000000000 +0100
++++ b/configure.ac 2010-05-17 23:07:39.000000000 +0200
+@@ -222,7 +222,7 @@
+ CFLAGS="-DNDEBUG $CFLAGS"
+ fi
+
+-LDFLAGS="-Wl,-z,defs"
++LDFLAGS="$LDFLAGS -Wl,-z,defs"
+
+ dnl
+ dnl Make sure we can actually handle the "--with-*" and "--enable-*" stuff.
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.1-minimal.patch b/net-proxy/tinyproxy/files/tinyproxy-1.8.1-minimal.patch
new file mode 100644
index 000000000000..82793a8894d0
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.1-minimal.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,7 +2,6 @@
+ src \
+ data \
+ etc \
+- docs \
+ m4macros \
+ tests
+
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch
new file mode 100644
index 000000000000..059f178c1ee2
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch
@@ -0,0 +1,183 @@
+https://banu.com/bugzilla/show_bug.cgi?id=110#c4
+
+From 526215dbb4abb1cff9a170343fa50dbda9492eb1 Mon Sep 17 00:00:00 2001
+From: Michael Adam <obnox@samba.org>
+Date: Fri, 15 Mar 2013 12:34:01 +0100
+Subject: [PATCH 1/2] [BB#110] secure the hashmaps by adding a seed
+
+Based on patch provided by gpernot@praksys.org on bugzilla.
+
+Signed-off-by: Michael Adam <obnox@samba.org>
+---
+ configure.ac | 2 ++
+ src/child.c | 1 +
+ src/hashmap.c | 14 ++++++++------
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ecbcba0..cc40e85 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -205,6 +205,8 @@ AC_CHECK_FUNCS([gethostname inet_ntoa memchr memset select socket strcasecmp \
+ AC_CHECK_FUNCS([isascii memcpy setrlimit ftruncate regcomp regexec])
+ AC_CHECK_FUNCS([strlcpy strlcat])
+
++AC_CHECK_FUNCS([time rand srand])
++
+
+ dnl Enable extra warnings
+ DESIRED_FLAGS="-fdiagnostics-show-option -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wfloat-equal -Wundef -Wformat=2 -Wlogical-op -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Waggregate-return -Winit-self -Wpacked --std=c89 -ansi -pedantic -Wno-overlength-strings -Wc++-compat -Wno-long-long -Wno-overlength-strings -Wdeclaration-after-statement -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-qual -Wcast-align -Wwrite-strings -Wp,-D_FORTIFY_SOURCE=2 -fno-common"
+diff --git a/src/child.c b/src/child.c
+index 34e20e0..0d778d9 100644
+--- a/src/child.c
++++ b/src/child.c
+@@ -196,6 +196,7 @@ static void child_main (struct child_s *ptr)
+ }
+
+ ptr->connects = 0;
++ srand(time(NULL));
+
+ while (!config.quit) {
+ ptr->status = T_WAITING;
+diff --git a/src/hashmap.c b/src/hashmap.c
+index f46fdcb..8cf7c6b 100644
+--- a/src/hashmap.c
++++ b/src/hashmap.c
+@@ -50,6 +50,7 @@ struct hashbucket_s {
+ };
+
+ struct hashmap_s {
++ uint32_t seed;
+ unsigned int size;
+ hashmap_iter end_iterator;
+
+@@ -65,7 +66,7 @@ struct hashmap_s {
+ *
+ * If any of the arguments are invalid a negative number is returned.
+ */
+-static int hashfunc (const char *key, unsigned int size)
++static int hashfunc (const char *key, unsigned int size, uint32_t seed)
+ {
+ uint32_t hash;
+
+@@ -74,7 +75,7 @@ static int hashfunc (const char *key, unsigned int size)
+ if (size == 0)
+ return -ERANGE;
+
+- for (hash = tolower (*key++); *key != '\0'; key++) {
++ for (hash = seed; *key != '\0'; key++) {
+ uint32_t bit = (hash & 1) ? (1 << (sizeof (uint32_t) - 1)) : 0;
+
+ hash >>= 1;
+@@ -104,6 +105,7 @@ hashmap_t hashmap_create (unsigned int nbuckets)
+ if (!ptr)
+ return NULL;
+
++ ptr->seed = (uint32_t)rand();
+ ptr->size = nbuckets;
+ ptr->buckets = (struct hashbucket_s *) safecalloc (nbuckets,
+ sizeof (struct
+@@ -201,7 +203,7 @@ hashmap_insert (hashmap_t map, const char *key, const void *data, size_t len)
+ if (!data || len < 1)
+ return -ERANGE;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -382,7 +384,7 @@ ssize_t hashmap_search (hashmap_t map, const char *key)
+ if (map == NULL || key == NULL)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -416,7 +418,7 @@ ssize_t hashmap_entry_by_key (hashmap_t map, const char *key, void **data)
+ if (!map || !key || !data)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -451,7 +453,7 @@ ssize_t hashmap_remove (hashmap_t map, const char *key)
+ if (map == NULL || key == NULL)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+--
+1.7.9.5
+
+https://banu.com/bugzilla/show_bug.cgi?id=110#c5
+
+From f1189daec6866efeb44f24073cd19d7ece86e537 Mon Sep 17 00:00:00 2001
+From: Michael Adam <obnox@samba.org>
+Date: Fri, 15 Mar 2013 13:10:01 +0100
+Subject: [PATCH 2/2] [BB#110] limit the number of headers per request to
+ prevent DoS
+
+Based on patch provided by gpernot@praksys.org on bugzilla.
+
+Signed-off-by: Michael Adam <obnox@samba.org>
+---
+ src/reqs.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/reqs.c b/src/reqs.c
+index 2de43a8..af014ba 100644
+--- a/src/reqs.c
++++ b/src/reqs.c
+@@ -611,12 +611,19 @@ add_header_to_connection (hashmap_t hashofheaders, char *header, size_t len)
+ }
+
+ /*
++ * define max number of headers.
++ * big enough to handle legitimate cases, but limited to avoid DoS
++ */
++#define MAX_HEADERS 10000
++
++/*
+ * Read all the headers from the stream
+ */
+ static int get_all_headers (int fd, hashmap_t hashofheaders)
+ {
+ char *line = NULL;
+ char *header = NULL;
++ int count;
+ char *tmp;
+ ssize_t linelen;
+ ssize_t len = 0;
+@@ -625,7 +632,7 @@ static int get_all_headers (int fd, hashmap_t hashofheaders)
+ assert (fd >= 0);
+ assert (hashofheaders != NULL);
+
+- for (;;) {
++ for (count = 0; count < MAX_HEADERS; count++) {
+ if ((linelen = readline (fd, &line)) <= 0) {
+ safefree (header);
+ safefree (line);
+@@ -691,6 +698,14 @@ static int get_all_headers (int fd, hashmap_t hashofheaders)
+
+ safefree (line);
+ }
++
++ /*
++ * if we get there, this is we reached MAX_HEADERS count
++ * bail out with error
++ */
++ safefree (header);
++ safefree (line);
++ return -1;
+ }
+
+ /*
+--
+1.7.9.5
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
new file mode 100644
index 000000000000..9df4ef5046d7
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+get_config() {
+ res=$(awk '$1 == "'$1'" { s=$2 } END { print s }' "$CONFFILE")
+
+ if [ "x$res" = "x" ]; then
+ echo "$2"
+ else
+ eval echo "$res"
+ fi
+}
+
+: ${CONFFILE:="/etc/${SVCNAME}.conf"}
+
+command=/usr/sbin/tinyproxy
+command_args="-c ${CONFFILE}"
+pidfile=$(get_config PidFile /run/tinyproxy/${SVCNAME}.pid)
+
+depend() {
+ config "$CONFFILE"
+
+ use dns
+
+ [ "$(get_config Syslog Off)" = "On" ] && \
+ use logger
+}
+
+start_pre() {
+ piddir=$(dirname ${pidfile})
+
+ if [ "${piddir}" = "/run" ]; then
+ eerror "Please change your PidFile settings to be within the"
+ eerror "/run/tinyproxy directory"
+ eend 1
+ else
+ checkpath -d -o $(get_config User tinyproxy):$(get_config Group tinyproxy) ${piddir}
+ fi
+}
diff --git a/net-proxy/tinyproxy/files/tinyproxy.service b/net-proxy/tinyproxy/files/tinyproxy.service
new file mode 100644
index 000000000000..4d860df76938
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Tinyproxy Web Proxy Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/tinyproxy -d -c /etc/tinyproxy.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/tinyproxy/files/tinyproxy.tmpfiles.conf b/net-proxy/tinyproxy/files/tinyproxy.tmpfiles.conf
new file mode 100644
index 000000000000..80251df0d20c
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy.tmpfiles.conf
@@ -0,0 +1 @@
+d /var/run/tinyproxy 0770 tinyproxy tinyproxy -
diff --git a/net-proxy/tinyproxy/metadata.xml b/net-proxy/tinyproxy/metadata.xml
new file mode 100644
index 000000000000..b2a94affab61
--- /dev/null
+++ b/net-proxy/tinyproxy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>A lightweight HTTP/SSL proxy</longdescription>
+<use>
+ <flag name="filter-proxy">Enable filtering of domains/URLS</flag>
+ <flag name="reverse-proxy">Enable reverse proxying</flag>
+ <flag name="transparent-proxy">Enable transparent proxying</flag>
+ <flag name="upstream-proxy">Enable upstream proxying</flag>
+ <flag name="xtinyproxy-header">Include the X-Tinyproxy header</flag>
+</use>
+</pkgmetadata>
diff --git a/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild b/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild
new file mode 100644
index 000000000000..9f8aa70a55f5
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd user
+
+DESCRIPTION="A lightweight HTTP/SSL proxy"
+HOMEPAGE="http://www.banu.com/tinyproxy/"
+SRC_URI="http://www.banu.com/pub/${PN}/1.8/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc sparc x86"
+
+IUSE="test debug +filter-proxy minimal reverse-proxy
+ transparent-proxy +upstream-proxy +xtinyproxy-header"
+
+REQUIRED_USE="test? ( xtinyproxy-header )"
+
+DEPEND="!minimal? ( app-text/asciidoc )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.1-ldflags.patch
+ "${FILESDIR}"/${P}-r2-DoS-Prevention.patch
+
+)
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} "" "" "" ${PN}
+}
+
+src_prepare() {
+ use minimal && PATCHES+=( "${FILESDIR}/${PN}-1.8.1-minimal.patch" )
+
+ default
+
+ sed -i \
+ -e "s|nobody|${PN}|g" \
+ -e 's|/var/run/|/run/|g' \
+ etc/${PN}.conf.in || die "sed failed"
+
+ sed -i \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ if use minimal; then
+ ln -s /bin/true "${T}"/a2x
+ export PATH="${T}:${PATH}"
+ fi
+
+ econf \
+ $(use_enable debug) \
+ $(use_enable filter-proxy filter) \
+ $(use_enable reverse-proxy reverse) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upstream-proxy upstream) \
+ $(use_enable xtinyproxy-header xtinyproxy) \
+ --disable-silent-rules \
+ --localstatedir=/var
+}
+
+src_test() {
+ # The make check target does not run the test suite
+ emake test
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ diropts -m0775 -o ${PN} -g ${PN}
+ keepdir /var/log/${PN}
+
+ newinitd "${FILESDIR}"/${PN}-1.8.3-r2.initd tinyproxy
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
+}
+
+pkg_postinst() {
+ elog "For filtering domains and URLs, enable filter option in the configuration"
+ elog "file and add them to the filter file (one domain or URL per line)."
+}
diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest
new file mode 100644
index 000000000000..31cbc70e0d86
--- /dev/null
+++ b/net-proxy/torsocks/Manifest
@@ -0,0 +1,5 @@
+DIST torsocks-2.2.0.tar.gz 115269 SHA256 36216a1e30f47fa0e5be84761e0d72133196c8a042716017da56e9439338c87d SHA512 903d11d58ece76eaf75ff8fc11a27e4a29f94be530f2d77d1a6f0982d556a4b9c78677a43eed88f2451054d0e985672900ecf73b360fa09e80195c3b9006622b WHIRLPOOL 3ce3ec9807a9b0bb55572f71541b0ba918223e3037914ed070cd97927446bd0b8666a70b568ebd5d7a5d310cd3c6fd4103f1ae8e616cc35e8a6a92d4a6b9051e
+EBUILD torsocks-2.2.0.ebuild 1010 SHA256 9b0be9754b03bac872ed1259bc9395ca8da4985bb8ad3df36ad5448370351b87 SHA512 bcb08ee5636cc37573f456c22af6e0a1b56ade236263e56a8392d2f267bf64819e80343088e8483a9353978d8d128a529a934bfdb30aba4e3caf11a1fcc01a79 WHIRLPOOL ea3c683e8c4841fbc1a382aa8168f314ef4937193638bbac0f328a71cc9ec5ebd468d584268ed1502d0d99868859cf461cb471869acc1b74e44253f67810ec45
+MISC ChangeLog 4653 SHA256 643659bb143f599df40ac818597af3a398e4ec499b0121bcfdafe6b6d62998a5 SHA512 bdfa076d530b888e479cce63a0557adeb4100f049f152f1e6289ae5877213a5bb17fcc93163bfe6343d32f362e8032be91ba90f88c5e00d74898038b74e2e922 WHIRLPOOL 90638156236e7989d1054009754815ca8cc78e5ae5a95a52e804c2dca3662d3f1f1d02360f6a2d900357fb6f3742bbc32a1919b921449f123ce7aa9c1282090e
+MISC ChangeLog-2015 2890 SHA256 89bb7710ceb093497d487b5054083a2e1e3c05bc31fb36ce138e3f20684e3af8 SHA512 9e501e2119a4e4866ca4fe4b0b8cf54b511ea624491ad46099b565df0f0a8390340ebae0a19afd3dd996cd1bcb6e09ce522a49180e9382a07cab492baf90768d WHIRLPOOL 3a92a173f95efb018e5ff0a7d88174aa5da20a3fff4b52322927726e6bf47ad8fd51b440ba13966c2b1dd5f0c5d4f36049f11c55e3bb327c1b206faf3585cc3a
+MISC metadata.xml 386 SHA256 75557de86df52e19f87027c8d59504f957a291693c8ea4c360c38a41f7bf3acf SHA512 3ab13f567b539e1b4e8dd45fc088bb2d83abbfc161647c4f50c3a8566d13d5b14b88c851f64933ee0940ab56ae9b7cd273dd4a5e8b47faae6441a6e237ce1079 WHIRLPOOL 834a1ad2a8cd1d6b7b846181a9c6b87fdc155451d0bffc4efb5b52609c1555d9ffe776e288325644111c957ed480856b1f4bb21e95bf340e3f14f5739586b78f
diff --git a/net-proxy/torsocks/metadata.xml b/net-proxy/torsocks/metadata.xml
new file mode 100644
index 000000000000..a68cbcd82c17
--- /dev/null
+++ b/net-proxy/torsocks/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">torsocks</remote-id>
+ <remote-id type="github">dgoulet/torsocks</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/torsocks/torsocks-2.2.0.ebuild b/net-proxy/torsocks/torsocks-2.2.0.ebuild
new file mode 100644
index 000000000000..e6454f696b72
--- /dev/null
+++ b/net-proxy/torsocks/torsocks-2.2.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools versionator
+
+MY_PV="$(replace_version_separator 3 -)"
+MY_PF="${PN}-${MY_PV}"
+S=${WORKDIR}/${MY_PF}
+
+DESCRIPTION="Use most socks-friendly applications with Tor"
+HOMEPAGE="https://github.com/dgoulet/torsocks"
+SRC_URI="https://github.com/dgoulet/torsocks/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="static-libs"
+
+# We do not depend on tor which might be running on a different box
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Disable tests requiring network access.
+ local test
+ for test in dns fd_passing getpeername; do
+ sed -i -e "/^ test_${test} \\\\\$/d" tests/Makefile.am || \
+ die "failed to disable network tests"
+ done
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # Remove libtool .la files
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/net-proxy/tsocks/Manifest b/net-proxy/tsocks/Manifest
new file mode 100644
index 000000000000..9dec6dde0c6c
--- /dev/null
+++ b/net-proxy/tsocks/Manifest
@@ -0,0 +1,11 @@
+AUX tsocks-1.8_beta5-bsd.patch 932 SHA256 c49851ca7581684788945f0c5cca17536459975b966b65bccb4f0588fc85a42d SHA512 15e126ccc183f4217b4862bb0cb0d5da49c7895b1a51e00ff43fadb3e66cc9f9dc70208672f92c10da438fa4af17506a8dade9517b5eeae29fea171d04b90093 WHIRLPOOL e13fdc6fb62e8ae2b0d55f9869391a8a8127b78f26649e9c99e82b79b5f41328aa62319e738c7c3c0f4d3ee85a320d6e733f34d156ced9ebf26b61163ab0b3a2
+AUX tsocks-1.8_beta5-flags.patch 1339 SHA256 eecc072bad2d620d756b07bf4a22cb82b7afe2b8ddf1bdb691e31525ffb6b9b0 SHA512 a25acc848a7fa29479109a49147d3a1e6332fa90ed00ab5fc0c99ca546e7f7c4d9b45662ba4ece9c03cc970438d86ead79ed64c6d244d76d98d7fc8dde4060bf WHIRLPOOL ab161f58c0086ec7b22c0063f52e479f55515b959fa49578ba716b6361a8e29d508eb5bd870af773a321cec95cb5044ce081a5ff51a70e177e69661458078135
+AUX tsocks-1.8_beta5-ld_preload.patch 1127 SHA256 8b6a28d3b647790464579e416694903acdcf777fbb02ac205114f73084785f15 SHA512 a202c7a2db1f0b98f6fc6bf36ab56906be7b3516726a4ae002916a91b6fc67e6630876eadfb970a91465b3526dc00249f5b9222dd90f96a1b9cdf4f2aff13e22 WHIRLPOOL 621cd32bdfb1315448ae2b021648f2ef55cbf33ba2442f8738a6533f8269587c6b8f569bd12acee352d03be9b72f650213b7ca83e6bb7f41b20a8e7bb6c12643
+AUX tsocks-1.8_beta5-poll.patch 617 SHA256 d203f3199b84749b9149f4a445cba780596c85d4f4d0452f940dd950845c147a SHA512 931a50b2c62c6fead52073dbe8287bfeda807f1c2e6ef3f9a3798cd79754e2fcd06e4d88c49bc0d748ee7a42eca3727503b2c1f261bd994b1a63e5eefac73956 WHIRLPOOL 12b2b4b5f0a2ae81bd1722168a6e589a1f868f919cb9611cdb951988a24a2ff8104e067539b7a765f2df917f9b157573ddcd94598ca85455dc0276d8a962c67b
+AUX tsocks-1.8_beta5-rename.patch 3104 SHA256 27f01ad46bb28831b3f1ba9020e61c43da175596b1bc86e7f6de40d82717dc70 SHA512 d9c4b015c9408a455b357718fd40cf07f40430aef45acb1680a939b414e75ccdef43bac6e3d046268990c228aa402e9917dcf08a13d605264925c5766e9f0758 WHIRLPOOL 06cabf563446871f3e10ca4e36e71f2a15c7902dbe007bbf53dd8aaf067debac4493ee23ed738e12ca5733c0b0a0809e09388c6936664593dec90ece69a38f46
+DIST tsocks-1.8b5-tordns1-gentoo-r3.patch.xz 18468 SHA256 4b25f473ef08ce698bd12a92d65b3e6dffb706ec76289db8d5b75fac0bca16f8 SHA512 86cbc7a8733e9f9e19e0924d2a2b8481a66eb67a8d548b90c7bd02cc6ae42064a295ee6a002cf19a7b3d7d811388db2a34b641d9dbe239f4c0bc8a1f78c90682 WHIRLPOOL 5a4228be84b4797121b8deaf52c1030ea2d6716694f14602a473deca4919753abe5df9608e28056dcaecb8e57bbb0b5a290b7bcdacbda17fdc12df08a0f29fcb
+DIST tsocks-1.8beta5.tar.gz 83928 SHA256 849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347 SHA512 b41636ea6b77abf0d1e3cda7bbca4e7ee96f3cdb1843f3a2c530650931e5567f67921de67b28ba9bab0f51df39770a3f7fb458cf7ac78aad7aa861923df2c4a9 WHIRLPOOL 9b50f66d63c870a37111450d76ea027fab79ecc4f62be8d6fab380f9fbfa6d1573f8bad5afe284571de3ee557460454826967449518d7665a80f563a2cfe5151
+EBUILD tsocks-1.8_beta5-r8.ebuild 2231 SHA256 9344536f086ce3208c837bbac1194bf5843a8cc844373b9e65902c3ec7670a73 SHA512 8805ced695c03c23bd908e0ad427596804461ca32f1a4183748d968c517b1d56ffd0e4b9fa0d985425943bdbdedd3b03f2c5af99e8f6ef050200447d446f19c6 WHIRLPOOL 5b612da49efe06405af0981f41971b83ea59f80dd4072f0d2367c100fdfa5e3adb243c7a28d12031cb6cf06d586e25b33fb9c667397a8b6103589cb115b28ed2
+MISC ChangeLog 2519 SHA256 bbac6965a694afcf863ee141235da0a810f99da3cc90d201a4f44ff946dfc7b3 SHA512 5fa6c72ec3f375931ec99712dde304c0dcb88c6794bb1eb4dd251d281c23b6dba3ea511fe8df200d9b11e06ae7cfd23be5f37509156a468b7ce0dd43356b6e7a WHIRLPOOL 698ba0fd3838a9b2b1905488e9143ba63b62233d09659df799c9d202f98c1dd29abdc17569e556e7da4c478a7b09a7e97eda6ea65ef86b2bc49b18dedf027484
+MISC ChangeLog-2015 8298 SHA256 5452df0f4d861215039a7750333541fb27b2d87bf7952eb889cb196cc5205345 SHA512 7dc91c97550c53572b7e6e7134dd27c977ed11b3bbe4e308047083a84cce9c176486f7845c6873126093de0fe37a268c875c73c2c1b0b1d600b6027364b16fa2 WHIRLPOOL c0ab9af28b6b1a95add9f475709a400da056ad3b5fed1be3ee62c2d92656df8a092d1878657e55d93cc57e8cfec1a97123981eb57fd6184ebd5afb2b33b9202f
+MISC metadata.xml 981 SHA256 e90c0f342c391e516ee75fb1bae7cdecb1dbf6151b81bb956462adf838a5da8c SHA512 483a93183cdedf77df2dbefff201c35d36f755969e28c6fefc6a44cfb56b0464ed78dfa7100ccbb3519a8ae30322c1346fb0d4cf2b1cbfa79dded237aff22d73 WHIRLPOOL 69be4cc07cea707401821f18f724c08976cb870ea8c51f78af8f08f29655255a7b46ca78afcd46240daede1669aeb55a9938f397eedeb2d59f61fe8cbc0ab6ef
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch
new file mode 100644
index 000000000000..e003475da5a3
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-bsd.patch
@@ -0,0 +1,22 @@
+Index: tsocks-1.8/configure.in
+===================================================================
+--- tsocks-1.8.orig/configure.in
++++ tsocks-1.8/configure.in
+@@ -122,7 +122,7 @@ LIBS=
+
+ dnl Checks for libraries.
+ dnl Replace `main' with a function in -ldl:
+-AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required"))
++AC_CHECK_FUNC([dlsym], [], [AC_CHECK_LIB(dl, dlsym,,AC_MSG_ERROR("libdl is required"))])
+
+ dnl If we're using gcc here define _GNU_SOURCE
+ AC_MSG_CHECKING("for RTLD_NEXT from dlfcn.h")
+@@ -312,7 +312,7 @@ AC_DEFINE_UNQUOTED(CLOSE_SIGNATURE, [${P
+ dnl Find the correct poll prototype on this machine
+ AC_MSG_CHECKING(for correct poll prototype)
+ PROTO=
+-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout'
++for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' 'struct pollfd ufds[[]], nfds_t nfds, int timeout'
+ do
+ if test "${PROTO}" = ""; then
+ AC_TRY_COMPILE([
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch
new file mode 100644
index 000000000000..70d8786c196b
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-flags.patch
@@ -0,0 +1,31 @@
+--- tsocks-1.8.orig/Makefile.in 2002-03-16 11:12:40.000000000 +0100
++++ tsocks-1.8/Makefile.in 2009-06-20 13:56:56.000000000 +0200
+@@ -28,6 +28,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ CFLAGS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ INCLUDES = -I.
+ LIBS = @LIBS@
+ SPECIALLIBS = @SPECIALLIBS@
+@@ -41,16 +42,16 @@
+ all: ${TARGETS}
+
+ ${VALIDATECONF}: ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o
+- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS}
++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS}
+
+ ${INSPECT}: ${INSPECT}.c ${COMMON}.o
+- ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS}
++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS}
+
+ ${SAVE}: ${SAVE}.c
+- ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -o ${SAVE} ${SAVE}.c
+
+ ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o
+- ${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
++ ${SHCC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
+ ln -sf ${SHLIB} ${LIB_NAME}.so
+
+ %.so: %.c
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch
new file mode 100644
index 000000000000..360e5b297fb6
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-ld_preload.patch
@@ -0,0 +1,35 @@
+--- tsocks-1.8.orig/tsocks 2002-03-16 11:27:18.000000000 +0100
++++ tsocks-1.8/tsocks 2009-06-20 13:56:38.000000000 +0200
+@@ -46,14 +46,14 @@
+ on)
+ if [ -z "$LD_PRELOAD" ]
+ then
+- export LD_PRELOAD="/usr/lib/libtsocks.so"
++ export LD_PRELOAD="libtsocks.so"
+ else
+- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \
++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD"
+ fi
+ ;;
+ off)
+- export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib\/libtsocks.so \?//'`
++ export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/libtsocks.so \?//'`
+ if [ -z "$LD_PRELOAD" ]
+ then
+ unset LD_PRELOAD
+@@ -68,10 +68,10 @@
+ *)
+ if [ -z "$LD_PRELOAD" ]
+ then
+- export LD_PRELOAD="/usr/lib/libtsocks.so"
++ export LD_PRELOAD="libtsocks.so"
+ else
+- echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+- export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
++ echo $LD_PRELOAD | grep -q "libtsocks\.so" || \
++ export LD_PRELOAD="libtsocks.so $LD_PRELOAD"
+ fi
+
+ if [ $# = 0 ]
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch
new file mode 100644
index 000000000000..233539564c61
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-poll.patch
@@ -0,0 +1,16 @@
+--- a/tsocks.c
++++ b/tsocks.c
+@@ -659,10 +659,11 @@
+ * be ready for writing), otherwise we'll just let the select loop
+ * come around again (since we can't flag it for read, we don't know
+ * if there is any data to be read and can't be bothered checking) */
+- if (conn->selectevents & WRITE) {
+- setevents |= POLLOUT;
++ if (conn->selectevents & POLLOUT) {
++ ufds[i].revents |= POLLOUT;
+ nevents++;
+ }
++ ufds[i].events = conn->selectevents;
+ }
+ }
+ } while (nevents == 0);
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch
new file mode 100644
index 000000000000..4962aacd6801
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-rename.patch
@@ -0,0 +1,62 @@
+--- tsocks-1.8.orig/validateconf.c 2002-02-07 11:49:59.000000000 +0100
++++ tsocks-1.8/validateconf.c 2009-06-20 13:56:38.000000000 +0200
+@@ -23,7 +23,7 @@
+ */
+
+ /* Global configuration variables */
+-char *progname = "validateconf"; /* Name for error msgs */
++char *progname = "tsocks-validateconf"; /* Name for error msgs */
+
+ /* Header Files */
+ #include <config.h>
+--- tsocks-1.8.orig/tsocks.8 2002-03-16 11:20:51.000000000 +0100
++++ tsocks-1.8/tsocks.8 2009-06-20 13:56:38.000000000 +0200
+@@ -127,8 +127,8 @@
+ libtsocks in /etc/ld.so.preload. Please make sure you correctly enter the
+ full path to the library in this file if you do this. If you get it wrong,
+ you will be UNABLE TO DO ANYTHING with the machine and will have to boot
+-it with a rescue disk and remove the file (or try the saveme program, see
+-the INSTALL file for more info). THIS IS A ***WARNING***, please be
++it with a rescue disk and remove the file (or try the tsocks-saveme program,
++simply unlinks /etc/ld.so.preload ). THIS IS A ***WARNING***, please be
+ careful. Also be sure the library is in the root filesystem as all hell
+ will break loose if the directory it is in is not available at boot time.
+
+--- tsocks-1.8.orig/tsocks.conf.5 2002-05-18 04:13:08.000000000 +0200
++++ tsocks-1.8/tsocks.conf.5 2009-06-20 13:56:38.000000000 +0200
+@@ -139,21 +139,20 @@
+ the version that server supports.
+
+ .TP
+-validateconf
+-validateconf can be used to verify the configuration file. It checks the format
+-of the file and also the contents for errors. Having read the file it dumps
+-the configuration to the screen in a formatted, readable manner. This can be
+-extremely useful in debugging problems.
+-
+-validateconf can read a configuration file from a location other than the
+-location specified at compile time with the -f <filename> command line
+-option.
+-
+-Normally validateconf simply dumps the configuration read to the screen (in
+-a nicely readable format), however it also has a useful 'test' mode. When
+-passed a hostname/ip on the command line like -t <hostname/ip>, validateconf
+-determines which of the SOCKS servers specified in the configuration file
+-would be used by tsocks to access the specified host.
++tsocks-validateconf
++tsocks-validateconf can be used to verify the configuration file. It checks
++the format of the file and also the contents for errors. Having read the file
++it dumps the configuration to the screen in a formatted, readable manner.
++This can be extremely useful in debugging problems.
++
++tsocks-validateconf can read a configuration file from a location other than the
++location specified at compile time with the -f <filename> command line option.
++
++Normally tsocks-validateconf simply dumps the configuration read to the screen
++(in a nicely readable format), however it also has a useful 'test' mode. When
++passed a hostname/ip on the command line like -t <hostname/ip>,
++tsocks-validateconf determines which of the SOCKS servers specified in the
++configuration file would be used by tsocks to access the specified host.
+
+ .SH SEE ALSO
+ tsocks(8)
diff --git a/net-proxy/tsocks/metadata.xml b/net-proxy/tsocks/metadata.xml
new file mode 100644
index 000000000000..09598a26d525
--- /dev/null
+++ b/net-proxy/tsocks/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ </maintainer>
+ <longdescription>tsocks' role is to allow non SOCKS aware applications (e.g telnet, ssh, ftp etc) to use SOCKS
+without any modification. It does this by intercepting the calls that applications make to establish network connections
+and negotating them through a SOCKS server as necessary.</longdescription>
+ <use>
+ <flag name="dns">Force DNS queries to use SOCKS server via tcp</flag>
+ <flag name="envconf">Allow TSOCKS_CONF_FILE to specify configuration file</flag>
+ <flag name="server-lookups">Allow hostname resolution _for_ SOCKS servers</flag>
+ <flag name="tordns">Apply tordns patch which allows transparent TORification of the DNS queries</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">tsocks</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild
new file mode 100644
index 000000000000..e6d4d3170977
--- /dev/null
+++ b/net-proxy/tsocks/tsocks-1.8_beta5-r8.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools eutils multilib multilib-minimal toolchain-funcs
+
+DESCRIPTION="Transparent SOCKS v4 proxying library"
+HOMEPAGE="http://tsocks.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz
+ tordns? ( https://dev.gentoo.org/~bircoph/patches/${PN}-${PV/_beta/b}-tordns1-gentoo-r3.patch.xz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="dns envconf tordns server-lookups"
+
+REQUIRED_USE="
+ dns? ( !tordns !server-lookups )
+ tordns? ( !dns !server-lookups )
+"
+
+S="${WORKDIR}/${P%%_*}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-flags.patch" \
+ "${FILESDIR}/${P}-ld_preload.patch" \
+ "${FILESDIR}/${P}-rename.patch" \
+ "${FILESDIR}/${P}-bsd.patch" \
+ "${FILESDIR}/${P}-poll.patch"
+ use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo-r3.patch"
+
+ sed -i 's/TSOCKS_CONFFILE/TSOCKS_CONF_FILE/' tsocks.8 || die "sed tsocks.8 failed"
+
+ mv configure.in configure.ac || die
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ tc-export CC
+
+ # NOTE: the docs say to install it into /lib. If you put it into
+ # /usr/lib and add it to /etc/ld.so.preload on many systems /usr isn't
+ # mounted in time :-( (Ben Lutgens) <lamer@gentoo.org>
+ econf \
+ $(use_enable dns socksdns) \
+ $(use_enable envconf) \
+ $(use_enable server-lookups hostnames) \
+ --with-conf="${EPREFIX}"/etc/socks/tsocks.conf \
+ --libdir="${EPREFIX}"/$(get_libdir)
+}
+
+multilib_src_compile() {
+ # Fix QA notice lack of SONAME
+ emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi; then
+ newbin validateconf tsocks-validateconf
+ newbin saveme tsocks-saveme
+ dobin inspectsocks
+ insinto /etc/socks
+ doins tsocks.conf.*.example
+ dodoc FAQ
+ use tordns && dodoc README*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Make sure you create /etc/socks/tsocks.conf from one of the examples in that directory"
+ einfo "The following executables have been renamed:"
+ einfo " /usr/bin/saveme renamed to tsocks-saveme"
+ einfo " /usr/bin/validateconf renamed to tsocks-validateconf"
+}
diff --git a/net-proxy/ufdbguard/Manifest b/net-proxy/ufdbguard/Manifest
new file mode 100644
index 000000000000..3adb1d321665
--- /dev/null
+++ b/net-proxy/ufdbguard/Manifest
@@ -0,0 +1,11 @@
+AUX ufdb.confd 558 SHA256 7f9031f7cd7597d3dd7581e4d1b3068569a1e99f18ae8be924d730e39ce99347 SHA512 1f010ae16ee196243b4515832fe8c1979c591b1a0f43368d6eeceda8348183f7e0c758eee403ef922276006cd8721d1b642fc08c0d46581c4912f6a6804d4ad5 WHIRLPOOL 85beb99a72a421644419119ca3f382282cc8a8a7b00ff4892937858686275ceb19aa95f4f4e08f5cc8ec03480893ab20a7e3ae9e89791ab78c9c2c4d6259ae1d
+AUX ufdb.initd 1792 SHA256 6b984c2219423bd77aab1a6c4b367a66b77329324d1ddfb09aa764b8f453c499 SHA512 3a4c8cd3f79242f46c3bb34019680db2502ff1d0c614814079dbba3cb9a0e6722727bb8ca23ceedd837d11b0a605b3d7612e0acb774d09c4c6579925da76c433 WHIRLPOOL 22fcb672723e1d360508585d34ce6b37075f613f9c28368587de7ad69df43a82b388eee43732bc7000216e7d178a5dd1936b186fb9241f633ad1070554299a7a
+AUX ufdb.initd.2 1510 SHA256 83c62bd9ad139100ee8df9b7f966aff400e1050fd4e3be78f1f4c82afb2745e4 SHA512 aca83823cab027ae38a9e63f885c5ffecebf3c6352eeb672a90c92360168544691dfdb2a70b967b718856624a36435b0c9263693b4c7b90af06204f16ffe7309 WHIRLPOOL d9400b09dea4564029b43e14a9fb6fad42d92fe9642bd3db248522258edc726fa19e8e4ee07d520c699a82c3c11aab54d95242685a4f4d929396cf538204d619
+AUX ufdbUpdate.cron 351 SHA256 924b3c267dffa86cdd4de10fb4d4a0702f3c06aa6e01c5f1f81665796e4b3ce6 SHA512 17a6b17e0bb1d6f0a80609d8341c6c803749d4d38f37f1bbc0ab01c5614d07fd3dae580222ed38825480bfeb74cb4af4f81448e843ab61f4044cf755602c3cf6 WHIRLPOOL 061d99416f07eb23e98be80aae5746e19a2fecd38927692a31710757cefaaf28dd7d67baa3fd6b488dcb2f46c72c53d0dee8f13b4aa3cca4664886ffde5b9a30
+AUX ufdbguard-1.24-gentoo.patch 536 SHA256 3e22a42b73c6aa6ff6737455b19d202d661990c9931ffa3785b6aaa78af73d90 SHA512 ddd39b4841d740df5102717dbe2eb41917e49d42338343f7f402e4049a5ab252841138541b7c659934d30cf9a31a7274bf226c108af80826b608fbc2e709f6e4 WHIRLPOOL a463f073cb6255e7c5300e08bcdb649e3dfbf863148261fec91077d98213624c60cab918ada0fa89e696b49bc8d528f080f13c29fada9a253ac940139ef99ab3
+DIST ufdbGuard-1.32.4.tar.gz 2499206 SHA256 037d2652087a544e4bfa10fefcb9e155e730536baf39331b3e9dca26c605e3df SHA512 189cb67c533ab71ba1d3292a376d746e0565a3bf5de17f4407c5892ee24c20cd2574752bdcb08be19621a93114cc69a89767c581d531027ecbf6487ef3119d91 WHIRLPOOL 56ae089ff7463bf2184ae04d15105fe183fa39be807b8440fbd0b4520d47282136e4f07cd5821502a57b2698aab37b8e3ff585b69a2b553bd08c4bbe00f6022d
+DIST ufdbguard-1.32.4-manual.pdf 642626 SHA256 42a954d45697a1ea7c4dc8d97faa7e02e2f52414461b4bf73fe975a7a3ebb57d SHA512 98444689c07da3ce9937675b45607ea88fc5a10c65051746cd821650788ec21cbc836a043a486de51813b85d836e255bb3a64a62252808dfe93310e6e169fdb1 WHIRLPOOL 2cb798f2e201e1b7e203ae9d8742336c2b0036b139a842df6c5943a52d4e118aaea97d68fc9e8dbec15a489273f96191c45c82263208fab0644b16c0eabece1d
+EBUILD ufdbguard-1.32.4.ebuild 3559 SHA256 a1e3854076b202b7c2bb5a609ec6aa2b63b8a96570c1d41ab57807caf8fa199a SHA512 b73210979b0aa21293783ddf54b956ed4be257c89da4443fd3d887fb3b92931998da8456029e450c1f2e72230d398a91cec24ad432d3f909bd3b0965c2927c82 WHIRLPOOL 825197a41a2ed1699336c1c90759c52d8a9e14e0311faa6f898fc68b6a86183dff643999b32df2cf7f81467ce38f93b9b3f4a3b6cebf60086620faaea1b1040d
+MISC ChangeLog 2723 SHA256 007c1cafd7bc5f23c7e71ac6d22a87c56a68df13965543a517e956a735669c8c SHA512 9e3ac43172d234bb2d8a1d4b9bff39aa1be0a978081b3f13ce6e95b7f526a5ffcbe28f5ec34ab223bcb7d5804eb4ea498dab8ef6e1f88c99d8dc19b7b3eb802b WHIRLPOOL f281da5e112f070e4b5372c807f6dd03c6e6fb6a766792a7054c2b5891aa9cf044e03ca35989f6a1430dc22192afee83dadcb5469f8cd6d7bf5314c73c7b9319
+MISC ChangeLog-2015 6485 SHA256 8798a2eea0a3cfa804e4073c96f16189e53c9e1b6f87f52b649b236177408c50 SHA512 8c190580483aefe2e6d449b66a6ed4465f78fd48ef6db832b3a95b1d978e6057c83f1555b36e7e8383b9ea2795a467a1a589fbab4f920f64c78a816e194e4276 WHIRLPOOL f3a3890abe6c5b40b469527299d924198539716a57dcb5e6719979d8f526bc20c83e5ca140cab01a0d90dee257f16cbaed954e58d69a1ca77faebbb6be06df63
+MISC metadata.xml 766 SHA256 38608d2c11064a87bf41ea78d1dc9ebee2c0d9b83837aea270d9b6fb26ccd8c9 SHA512 c01ba7f9fcea23fa66901809d2bef786ecf0ca6673d99ce082840d164a26870c388652ea6ba9764a62773c49f090a236824ae06f6bb36052ebb4767fef38edd9 WHIRLPOOL 8e2f33f15d72bc6e8ea02624ab16a4a2aa290f15174e9a184f6fce07a359f04a6c4fd416c4462aa1ecf2066342871d484dd0df2dba95a574062c994287c80e50
diff --git a/net-proxy/ufdbguard/files/ufdb.confd b/net-proxy/ufdbguard/files/ufdb.confd
new file mode 100644
index 000000000000..08c7e5f1a8fa
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.confd
@@ -0,0 +1,20 @@
+# -*- sh -*-
+
+# Tables to re-generate when starting or reloading ufdbguard
+UFDB_GT="alwaysallow alwaysdeny"
+
+# Options passed to ufdbGenTable when generating the tables listed in
+# UFDB_GT
+GENTABLE_OPTIONS="-W"
+
+# User under which to run ufdbguard; it should be the same as the
+# proxy server you're using, so by default it is squid.
+UFDB_USER="squid"
+
+# Options to pass to ufdbguardd; see /usr/libexec/ufdbguard/ufdbguardd
+# -h for a brief list.
+UFDB_OPTS=""
+
+# Options used by the modified ufdbUpdate script in Gentoo
+DOWNLOAD_USER=""
+DOWNLOAD_PASSWORD=""
diff --git a/net-proxy/ufdbguard/files/ufdb.initd b/net-proxy/ufdbguard/files/ufdb.initd
new file mode 100644
index 000000000000..e55c0e7d1a1e
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.initd
@@ -0,0 +1,82 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# reconfig is what the upstream documentation suggests, so let's
+# provide it for compatibility.
+extra_started_commands="reload reconfig"
+
+depend() {
+ need net
+ before squid
+ use logger
+}
+
+get_config() {
+ awk '$1 == "'$1'" { print $2 }' "/etc/ufdbGuard.conf"
+}
+
+gentables() {
+ local dbhome=$(get_config dbhome)
+
+ for gt in ${UFDB_GT} ; do
+ [ -f "${dbhome}/${gt}/domains" ] || continue
+
+ urls=
+ [ -f "${dbhome}/${gt}/urls" ] && urls="${dbhome}/${gt}/urls"
+
+ ebegin "Generating domainlist ${gt}"
+ ufdbGenTable ${GENTABLE_OPTIONS} -t "${gt}" -d "${dbhome}/${gt}/domains" ${urls:+-u "${urls}"}
+ eend $?
+ done
+}
+
+start() {
+ gentables
+
+ local logdir=$(get_config logdir)
+
+ if [ ! -d "${logdir}" ] ; then
+ mkdir -p ${logdir}
+ chown -R ${UFDB_USER} ${logdir}
+ fi
+
+ if [ ! -d /var/run/ufdbguardd ] ; then
+ mkdir -p /var/run/ufdbguard
+ chown -R ${UFDB_USER} /var/run/ufdbguard
+ fi
+
+ ebegin "Starting ufdbGuard"
+ start-stop-daemon --start \
+ --user ${UFDB_USER} \
+ --wait 1500 \
+ --exec /usr/libexec/ufdbguard/ufdbguardd \
+ --pidfile /var/run/ufdbguard/ufdbguardd.pid -- \
+ -c /etc/ufdbGuard.conf ${UFDB_OPTS}
+ eend $? "Failed to start ufdbGuard"
+}
+
+stop() {
+ ebegin "Stopping ufdbGuard"
+ start-stop-daemon --stop \
+ --exec /usr/libexec/ufdbguard/ufdbguardd \
+ --pidfile /var/run/ufdbguard/ufdbguardd.pid
+ eend $? "Failed to stop ufdbGuard"
+}
+
+reload() {
+ if ! [ -f /var/run/ufdbguard/ufdbguardd.pid ]; then
+ eerror "Unable to find PID file for ufdbguardd, was it just started?"
+ return 1
+ fi
+
+ gentables
+
+ ebegin "Reloading ufdbGuard"
+ kill -HUP "$(cat /var/run/ufdbguard/ufdbguardd.pid)"
+ eend $? "Failed to reload ufdbGuard"
+}
+
+reconfig() {
+ reload
+}
diff --git a/net-proxy/ufdbguard/files/ufdb.initd.2 b/net-proxy/ufdbguard/files/ufdb.initd.2
new file mode 100644
index 000000000000..44a7f59026e0
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.initd.2
@@ -0,0 +1,67 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# reconfig is what the upstream documentation suggests, so let's
+# provide it for compatibility.
+extra_started_commands="reload reconfig"
+
+: ${configfile:=/etc/ufdbGuard.conf}
+
+pidfile=/var/run/ufdbguard/ufdbguardd.pid
+command=/usr/libexec/ufdbguard/ufdbguardd
+command_arguments="-c ${configfile} ${FUDB_OPTS}"
+
+start_stop_daemon_args="--user ${UFDB_USER} --wait 1500"
+
+name="ufdbGuard Daemon"
+
+depend() {
+ need localmount
+ before squid
+ use logger
+}
+
+get_config() {
+ # Okay this sounds silly, but it is important because the settings
+ # in ufdbGuard are quoted, so this unquotes them.
+ eval echo $(awk '$1 == "'$1'" { print $2 }' "${configfile}")
+}
+
+gentables() {
+ local dbhome=$(get_config dbhome)
+
+ for gt in ${UFDB_GT} ; do
+ [ -f "${dbhome}/${gt}/domains" ] || continue
+
+ urls=
+ [ -f "${dbhome}/${gt}/urls" ] && urls="${dbhome}/${gt}/urls"
+
+ ebegin "Generating domainlist ${gt}"
+ ufdbGenTable ${GENTABLE_OPTIONS} -t "${gt}" -d "${dbhome}/${gt}/domains" ${urls:+-u "${urls}"}
+ eend $?
+ done
+}
+
+start_pre() {
+ gentables
+
+ checkpath -d -m 0755 -o ${UFDB_USER} $(get_config logdir) "$(dirname "${pidfile}")"
+}
+
+reload() {
+ if ! [ -f ${pidfile} ]; then
+ eerror "Unable to find PID file for ufdbguardd, was it just started?"
+ return 1
+ fi
+
+ gentables
+
+ ebegin "Reloading ufdbGuard"
+ kill -HUP "$(cat ${pidfile})"
+ eend $? "Failed to reload ufdbGuard"
+}
+
+reconfig() {
+ reload
+}
diff --git a/net-proxy/ufdbguard/files/ufdbUpdate.cron b/net-proxy/ufdbguard/files/ufdbUpdate.cron
new file mode 100644
index 000000000000..f9147648c8b7
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbUpdate.cron
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# cron.daily file to update the ufdb database
+
+# Avoid doing anything if no download user is set in the configuration
+# file
+( . /etc/conf.d/ufdb ; [ -z "${DOWNLOAD_USER}" ]; ) && exit
+
+/usr/sbin/ufdbUpdate
+
+/etc/init.d/squid rotate
diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch b/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch
new file mode 100644
index 000000000000..63da98175a0e
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch
@@ -0,0 +1,13 @@
+Index: ufdbGuard-1.24/src/ufdbUpdate.in
+===================================================================
+--- ufdbGuard-1.24.orig/src/ufdbUpdate.in
++++ ufdbGuard-1.24/src/ufdbUpdate.in
+@@ -39,6 +39,8 @@ WGET_COMMAND="@WGET@"
+ NOTIFY_UFDBGUARDD="yes" # send HUP signal to ufdbguardd
+ SYSLOG_FACILITY="local6" # errors/warnings in system log have this facility name
+
++source /etc/conf.d/ufdb
++
+ # end of user settings.
+ # DO NOT EDIT ANYTHING BELOW THIS LINE. ########################################
+
diff --git a/net-proxy/ufdbguard/metadata.xml b/net-proxy/ufdbguard/metadata.xml
new file mode 100644
index 000000000000..3914a0ffa999
--- /dev/null
+++ b/net-proxy/ufdbguard/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription>
+ The fastest URL filter with 25,000 URL verifications/sec to filter
+ unwanted web content. ufdbGuard is a redirector for the Squid
+ internet proxy.
+ </longdescription>
+ <use>
+ <flag name="httpd">
+ Build, install and start the provided mini-http daemon with the
+ redirect CGI integrated. Since there is no way to tell ufdbguard
+ to not start it, this is a build-time option.
+ </flag>
+ <flag name="doc">
+ Download and install the ufdbguard reference manual in PDF.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ufdbguard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/ufdbguard/ufdbguard-1.32.4.ebuild b/net-proxy/ufdbguard/ufdbguard-1.32.4.ebuild
new file mode 100644
index 000000000000..49efe94f7e60
--- /dev/null
+++ b/net-proxy/ufdbguard/ufdbguard-1.32.4.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic user
+
+MY_P="ufdbGuard-${PV}"
+
+DESCRIPTION="ufdbGuard is a redirector for the Squid internet proxy"
+HOMEPAGE="http://www.urlfilterdb.com/en/products/ufdbguard.html"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ doc? ( mirror://sourceforge/${PN}/${PV/\.?/}/ReferenceManual.pdf -> ${P}-manual.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +httpd"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ dev-libs/openssl:0=
+ net-misc/wget
+"
+DEPEND="${COMMON_DEPEND}
+ sys-devel/bison
+ sys-devel/flex
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/openrc
+"
+
+DOCS=( CHANGELOG README src/sampleufdbGuard.conf )
+
+PATCHES=( "${FILESDIR}"/${PN}-1.24-gentoo.patch )
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_configure() {
+ # better safe than sorry, the code has a number of possible
+ # breakage, and at least one certain breakage.
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --with-ufdb-user=squid \
+ --with-ufdb-config="${EPREFIX}"/etc \
+ --with-ufdb-bindir="${EPREFIX}"/usr/libexec/ufdbguard \
+ --with-ufdb-logdir="${EPREFIX}"/var/log/ufdbguard \
+ --with-ufdb-dbhome="${EPREFIX}"/usr/share/ufdbguard/blacklists \
+ --with-ufdb-images_dir="${EPREFIX}"/usr/share/ufdbguard/images
+}
+
+src_install() {
+ einstalldocs
+ doman doc/*.1
+
+ dobin src/ufdbAnalyse src/ufdbGenTable src/ufdbGrab \
+ src/ufdbConvertDB
+ dosbin src/ufdbUpdate
+
+ exeinto /usr/libexec/ufdbguard
+ doexe src/mtserver/ufdbguardd src/mtserver/ufdbgclient
+
+ if use httpd; then
+ exeinto /usr/libexec/ufdbguard
+ doexe src/ufdbhttpd
+ fi
+
+ keepdir /usr/share/ufdbguard/blacklists
+
+ insinto /etc
+ doins src/ufdbGuard.conf
+
+ insinto /usr/share/ufdbguard/images
+ doins -r src/images/.
+
+ newconfd "${FILESDIR}"/ufdb.confd ufdb
+ newinitd "${FILESDIR}"/ufdb.initd.2 ufdb
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/ufdbUpdate.cron ufdbUpdate
+
+ use doc && newdoc "${DISTDIR}"/${P}-manual.pdf ReferenceManual.pdf
+}
+
+pkg_postinst() {
+ elog "The default location for the blacklist database has been"
+ elog "moved to ${EROOT%/}/usr/share/ufdbguard/blacklists."
+ elog ""
+ elog "The configuration file is no longer configurable in the"
+ elog "service file, and now resides at ${EROOT%/}/etc/ufdbGuard.conf ."
+ elog ""
+ elog "The service script has been renamed from ufdbguad to simply"
+ elog "${EROOT%/}/etc/init.d/ufdb, to follow the official documentation, and"
+ elog "it gained a reload option with a reconfig alias."
+ elog ""
+ elog "You can configure the username and password parameters for"
+ elog "ufdbUpdate, to fetch the blacklist database provided by"
+ elog "URLfilterDB, directly in ${EROOT%/}/etc/conf.d/ufdb without touching"
+ elog "the script itself."
+ elog ""
+ elog "To enable ufdbguard in squid, you should add this to your"
+ elog "squid.conf:"
+ elog ""
+ elog " url_rewrite_program ${EROOT%/}/usr/libexec/ufdbguard/ufdbgclient -l ${EROOT%/}/var/log/ufdbguard"
+ elog " url_rewrite_children 64"
+ elog ""
+ if ! use httpd; then
+ elog "You chose to not install the lightweight http daemon that"
+ elog "comes with ufdbguard."
+ else
+ elog "The ufdb service will start both the ufdbguardd daemon and"
+ elog "the ufdbhttpd http daemon to provide a local redirect CGI."
+ elog "If you don't want this to happen, disable the httpd USE flag."
+ fi
+ if use doc; then
+ elog ""
+ elog "The reference manual has been installed as"
+ elog " ${EROOT%/}/usr/share/doc/${PF}/ReferenceManual.pdf"
+ fi
+}
diff --git a/net-proxy/wwwoffle/Manifest b/net-proxy/wwwoffle/Manifest
new file mode 100644
index 000000000000..6fcf30858832
--- /dev/null
+++ b/net-proxy/wwwoffle/Manifest
@@ -0,0 +1,9 @@
+AUX wwwoffle-2.9i-define.patch 336 SHA256 65575f9a93e59a9b7ceb1a724ebeb0bff0a1fefafdebfff5810882d1d4c36060 SHA512 cc59994bb94fd137214fbed66de76ae49e52b6798a603d4204c35007a38fdbe67e85d1c204f04eea2da2052027a821d0890aa33fd7ab02fed571f9f1f17990b9 WHIRLPOOL 5b495cbbebd7a8103b328622aa3d9d2681630d647545f26c38f3b137a8b3b637c765d8725c6b9247d45a757163cdad27d8c2753cc59026d141bddc46bd1d0ac2
+AUX wwwoffle-online.confd 305 SHA256 5c14f69f1081e9cb686036ccc264c2bedca15a3f0eac437a6107914e83822042 SHA512 d8d72bb77d88aac80b18f3571ae45177c936ccef7596bede87fede91f0cef1426aaf81bc4cfed74f35ac434243e3f4e87c54e48fa2ccdfc952e431b834c50124 WHIRLPOOL 35aa04277e8e19a844736f97875a2bd0e1816c8d7f39f9aef420d6bc8352c24b7e0515a674a6e026f0f4538d75d3656d144e79aa223cf35b2253548aa9dbd72a
+AUX wwwoffle-online.initd 576 SHA256 5ce4d9966af3d655e0bb1ff851b1909fb0df7855c5f423fb7ca8e37ea25b1b40 SHA512 bd5950969e19e8b99b798939e00c00d0325369502a5552507066900ab02b67e06ee8ae25f450fc7df48ce9dd19e4fc6aae969f9fd3e055564fea000a34904af8 WHIRLPOOL c7504312ffc51c4636878bf8f9f9624453c2a86657a70577bd6834482d6d67dd1949f5ea0bc032ad589ab5cb9eb6e970e96b765ee385dfc77e7ca4980b3e1041
+AUX wwwoffle.initd 426 SHA256 1acb509ebfe326307f8b54d01a3970e919aad319400f1307cab5b960e85c285c SHA512 3fc856cdb481a21a39c9874c2170148750968a776d54b43e7f0add51c2f3d4274d8050e04001241401878fa45369063b2e0736b8d84aa6d9f1c939a7b59589df WHIRLPOOL 5edd538791f51d07697888494b99ea0f3d24bfed8e6b21f4c432d71a5d233e7035be1504b44c0af11f52f91569dd095cc19a3d2014fae3366cfbd579b75d2ed4
+DIST wwwoffle-2.9i.tgz 1113771 SHA256 e6341a4ec2631dc22fd5209c7e5ffe628a5832ad191d444c56aebc3837eed2ae SHA512 c9e9d67df9a0e40b584916857221a9a728f36a677cba28527f8c2febea1a23379d3b112d96723bf01ec1718a0897d8980715864ac7ef898b2585dd3f01d9a456 WHIRLPOOL 21e66a08e4da68e612a6cde4c1355cef46d2dfdce5cb8d0e3170709ee5abc2d5b3fb91d89581185f131995c38591cf98b25dfb2075f36099b6b2f183358d42e1
+EBUILD wwwoffle-2.9i-r1.ebuild 3416 SHA256 73ae5d86e25d5264e29103ac112fd3f861f6a64303a7d79eb0d7f51e755ba1fb SHA512 5091098bd2f1cd014447462dffbab0a67cea60e555e04fd198ba998a7bb38b3c5608c48ce21040ed4ff17148212adbcf37a57b200b177e6ddbbefc6ac27e2bb1 WHIRLPOOL 6f9fe4ee57a1fd4f3a96d3f5d511c97ba8f4a92dc7917ea1db6f51e83f61b56dfb8b65af0749a509e8412cdfb9f68a7a9c43bd483405a34e8068e1131aede145
+MISC ChangeLog 3082 SHA256 669458b0fcc659cc6f036c5be1b6dc959c272961828439331b2afd1ca1e7ca1c SHA512 b072949469ac0ed5440cea76b5c8d108bf7b8604f61a5bf6321d4f39cbe74a1241116bda7c58ed8393938debdbb6a556fc6bfb78570e0e708db4e9811d1e858c WHIRLPOOL 79ffdfee65476ea7e52ccf5d6281506be2021a601a3dbfe106853ab1ac7ee2891683acdb51253cb0b1bf6081f45d9221dd00df24c820cb0fe14c1366d011704c
+MISC ChangeLog-2015 13558 SHA256 2bafe16adb8d988624f78b2e7c183b925610bccc9ee404d15a864da9d9f7bc47 SHA512 52a31461e774c31a6176f541ba40ac0d42c78739122e84d0e66ce7f535965f37d805e6403acf3e9042e871003bba84946b2f1259e7586586083e593295a4c2ab WHIRLPOOL bee2e961d1e676fd35852f699f8baef1967de028b3b02b36a1340c49beb31e691adb481f3cb759193c6a44f90900ea75768ca49fa15a4ee33f724f89f496d467
+MISC metadata.xml 411 SHA256 635a7254fcffdd5963e27d7def188be871985ee1e979f96f30c837933cac4c9b SHA512 5fda409241cb042a9d6fc2e40f1af97a92b75294477b15303d4413ea4a2cf358e52c64ade1dff386afa8582f84e7c7b75034bb95e1032e65de0bf5bf61c50d7e WHIRLPOOL 916304cb2cd81cfdff41522217f0801e0792810acebebc65a469fa065e0cbe68c86f6f9a16d3e5f069e1ad8abc46727fe9c80c085495ffe534d5eedf3fbe6e86
diff --git a/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch b/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch
new file mode 100644
index 000000000000..3bcc10d761e6
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-2.9i-define.patch
@@ -0,0 +1,20 @@
+--- a/src/wwwoffled.c
++++ b/src/wwwoffled.c
+@@ -15,6 +15,7 @@
+
+ #include "autoconfig.h"
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- a/src/cgi.c
++++ b/src/cgi.c
+@@ -16,6 +16,7 @@
+
+ #include "autoconfig.h"
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/net-proxy/wwwoffle/files/wwwoffle-online.confd b/net-proxy/wwwoffle/files/wwwoffle-online.confd
new file mode 100644
index 000000000000..63d1f821e7fb
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-online.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Enter the interface that connects you to the outside world
+# This will correspond to /etc/wwwoffle/init.d/net.${IFACE}
+
+# IMPORTANT: Be sure to run depscan.sh after modifiying IFACE
+
+#IFACE=ppp0
diff --git a/net-proxy/wwwoffle/files/wwwoffle-online.initd b/net-proxy/wwwoffle/files/wwwoffle-online.initd
new file mode 100644
index 000000000000..e8c9c677b8b6
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle-online.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need wwwoffled
+ use dns
+
+ if [ -n ${IFACE} ];
+ then
+ need net.${IFACE}
+ else
+ ewarn "No IFACE is defined in /etc/conf.d/wwwoffle-online"
+ need net
+ fi
+}
+
+start() {
+ ebegin "Starting wwwoffled-online"
+ wwwoffle -online -c /etc/wwwoffle/wwwoffle.conf
+ wwwoffle -fetch -c /etc/wwwoffle/wwwoffle.conf & > /dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wwwoffled-online"
+ wwwoffle -offline -c /etc/wwwoffle/wwwoffle.conf
+ eend $?
+}
diff --git a/net-proxy/wwwoffle/files/wwwoffle.initd b/net-proxy/wwwoffle/files/wwwoffle.initd
new file mode 100644
index 000000000000..628c29f23cc0
--- /dev/null
+++ b/net-proxy/wwwoffle/files/wwwoffle.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting wwwoffled"
+ start-stop-daemon --start --quiet --exec /usr/sbin/wwwoffled \
+ -u wwwoffle -- -c /etc/wwwoffle/wwwoffle.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wwwoffled"
+ start-stop-daemon --stop --quiet --name wwwoffled
+ eend $?
+}
diff --git a/net-proxy/wwwoffle/metadata.xml b/net-proxy/wwwoffle/metadata.xml
new file mode 100644
index 000000000000..682c98a3cc5f
--- /dev/null
+++ b/net-proxy/wwwoffle/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>The wwwoffled program is a simple proxy server with special features for use
+with dial-up internet links. This means that it is possible to browse web pages and read them
+without having to remain connected.
+</longdescription>
+</pkgmetadata>
diff --git a/net-proxy/wwwoffle/wwwoffle-2.9i-r1.ebuild b/net-proxy/wwwoffle/wwwoffle-2.9i-r1.ebuild
new file mode 100644
index 000000000000..053f7395776f
--- /dev/null
+++ b/net-proxy/wwwoffle/wwwoffle-2.9i-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils user
+
+DESCRIPTION="Web caching proxy suitable for non-permanent Internet connections"
+HOMEPAGE="http://www.gedanken.org.uk/software/wwwoffle/"
+SRC_URI="http://www.gedanken.org.uk/software/${PN}/download/${P}.tgz"
+
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="gnutls ipv6 zlib"
+
+RDEPEND="gnutls? ( net-libs/gnutls )
+ zlib? ( sys-libs/zlib )"
+DEPEND="dev-lang/perl
+ sys-devel/flex
+ ${RDEPEND}"
+
+# Unsure whether to depend on >=www-misc/htdig-3.1.6-r4 or not
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-2.9i-define.patch
+ sed -i cache/Makefile.in \
+ -e 's#$(TAR) xpf #$(TAR) --no-same-owner -xpf #' \
+ || die
+ default
+}
+
+src_configure() {
+ econf \
+ $(use_with gnutls) \
+ $(use_with ipv6) \
+ $(use_with zlib)
+}
+
+src_install() {
+ default
+
+ # documentation fix
+ # del empty doc dirs
+ rmdir "${D}/usr/doc/${PN}"/{it,nl,ru} || die
+ dodir /usr/share/doc
+ mv "${D}/usr/doc/${PN}" "${D}/usr/share/doc/${PF}" || die
+ rmdir "${D}/usr/doc" || die
+
+ # install the wwwoffled init script
+ newinitd "${FILESDIR}/${PN}.initd" wwwoffled
+ newinitd "${FILESDIR}/${PN}-online.initd" wwwoffled-online
+ newconfd "${FILESDIR}/${PN}-online.confd" wwwoffled-online
+
+ keepdir /var/spool/wwwoffle/{http,outgoing,monitor,lasttime,lastout,local}
+ for number in 1 2 3 4 5 6 7 8 9; do
+ keepdir "/var/spool/wwwoffle/prevtime${number}" "/var/spool/wwwoffle/prevout${number}"
+ done
+
+ # empty dirs are removed during update
+ keepdir \
+ /var/spool/wwwoffle/search/{mnogosearch/db,htdig/tmp,htdig/db-lasttime,htdig/db,namazu/db}
+
+ touch \
+ "${D}/var/spool/wwwoffle/search/htdig/wwwoffle-htdig.log" \
+ "${D}/var/spool/wwwoffle/search/mnogosearch/wwwoffle-mnogosearch.log" \
+ "${D}/var/spool/wwwoffle/search/namazu/wwwoffle-namazu.log"
+
+ # TODO htdig indexing as part of initscripts
+
+ # robots.txt modification - /var/spool/wwwoffle/html/en
+ # - remove Disallow: /index
+ sed -i -e "s|Disallow:.*/index|#Disallow: /index|" "${D}/var/spool/wwwoffle/html/en/robots.txt"
+}
+
+pkg_preinst() {
+ # Add a wwwoffle user
+ enewgroup wwwoffle
+ enewuser wwwoffle -1 -1 /var/spool/wwwoffle wwwoffle
+
+ # Changing the user:group to wwwoffle:woffle
+ fowners -R wwwoffle:wwwoffle /var/spool/wwwoffle /etc/wwwoffle
+ sed -i -e 's/^[# \t]\(run-[gu]id[ \t]*=[ \t]*\)[a-zA-Z0-9]*[ \t]*$/ \1wwwoffle/g' \
+ "${D}/etc/wwwoffle/wwwoffle.conf"
+
+}
+
+pkg_postinst() {
+ # fix permissions for those upgrading
+ for number in 1 2 3 4 5 6 7 8 9;
+ do
+ [ ! -d "${ROOT}/var/spool/wwwoffle/prevtime${number}" ] && \
+ keepdir "${ROOT}/var/spool/wwwoffle/prevtime${number}"
+ [ ! -d "${ROOT}/var/spool/wwwoffle/prevout${number}" ] && \
+ keepdir "${ROOT}/var/spool/wwwoffle/prevout${number}"
+ done
+ chown -R wwwoffle:wwwoffle "${ROOT}/var/spool/wwwoffle" "${ROOT}/etc/wwwoffle"
+
+ [ -f "${T}/stopped" ] && \
+ ewarn "wwwoffled was stopped. /etc/init.d/wwwoffled start to restart AFTER etc-update"
+
+ einfo "wwwoffled should run as an ordinary user now. The run-uid and run-gid should be set"
+ einfo "to \"wwwoffle\" in your /etc/wwwoffle/wwwoffle.conf. Please uncomment this if it hasn't been already"
+
+ einfo "This is for your own security. Otherwise wwwoffle is run as root which is relay bad if"
+ einfo "there is an exploit in this program that allows remote/local users to execute arbitary"
+ einfo "commands as the root user."
+}
diff --git a/net-proxy/ziproxy/Manifest b/net-proxy/ziproxy/Manifest
new file mode 100644
index 000000000000..237789989bb9
--- /dev/null
+++ b/net-proxy/ziproxy/Manifest
@@ -0,0 +1,8 @@
+AUX ziproxy-3.3.1-giflib5.patch 1399 SHA256 34771c1f1a0014584dd1d1c4670b8a2960a8e3de81205593f3e2ecaddcc7cda3 SHA512 d8ab2e6d89fdfb7fa7e86905e9525cff6704a57ef4c25a83eb64fde39769c0196472645eaccdaa7363338cecd18855151ff82995887391e6d428227d0a516a6e WHIRLPOOL 3eeb19ae5e05eee5e5ecbc0c46d2ce993cc4d1b66fc4a531477e6fb42926b527490da074105d3c61601c1a8b9b876cf604e33acf59f182c01c66ae8894ef785a
+AUX ziproxy.confd 650 SHA256 dad7db324941944a35c87d4e061a004f5d9638ea24f139bc9bad80a51e0e8d78 SHA512 77d730705c652c59acbd20c10d06801427cc3736ef3f9e06771fcadb0470599b3f6b84bd6e4d35c10e90927077e35e0547051b638a4bbafe4a596c38aa1af0eb WHIRLPOOL 1300e3a97f7069d868bf11a4caca39948c02862eacce6bf5e8d92dbc87bc5de6278c87a2023986973cb585cbd5a494ad256dec53aaa1b79b14a360e79f61d0ad
+AUX ziproxy.initd-r1 558 SHA256 41603c39d32f8b725b6786a0e839bb90c721e0ba667ea633b13d38ed8499c273 SHA512 81fd2c24876e6cc2be6c1b77e9c3ff916a7a8b541655aeb0dab3122c7b40a5f23ddc7db3d3867441c3f61509e0c75e321681e7fcd4e6b268f45faab55460542f WHIRLPOOL 4c1051d0c4f56d60db6b67a51bde010753bff6aabce967968fd71a32c974b03d85effa107b1414b063026ba4acd46d635264c301692176fd4700e705c91b62d8
+DIST ziproxy-3.3.1.tar.xz 205972 SHA256 358396f5b5c469be15b0c43cae9d40a183072d0b9a35621ed8ff22a0bedb2206 SHA512 bff87a63320e721091ccdcdbe409f59db7f7f681ee8b7f093f18f3c0391579a25b9a8daf6ccfea4d94384142247ce36cfaec68d294b2a23caa56ede436da2d87 WHIRLPOOL b57da63dd76fb39461c1ed9959fe022c662c2309a1735ac0e0bb517420c93682fcb7a72a7c1507c1cf689d051a2fd89748c776ae45a476b25dfa93c5e755c93e
+EBUILD ziproxy-3.3.1-r1.ebuild 1699 SHA256 538987e1ba830ac343023d78f3e815786e96f85a4c19cc80e6fb3e856cf6fe7f SHA512 ff68726c66e33eff25cb1c3b5f7bb85a60cd06e8d0969d017f353dfbc1fe36caedc638edd323585622ae92b345866063029930ce1a4f0b78b49cde3491f87fba WHIRLPOOL 334d10f85e0c258f7830485a53e9521b76040044d05d24af0022d4ae25813122ded94ee709a85f0491b6de14311332e0b42b72024d4ba10654e7f46e9772ecfd
+MISC ChangeLog 3542 SHA256 c2aef17db8bab9824d3b1f0b0abc00bef4624c26703ac509d1a1cae4a6f64566 SHA512 f5ef495e8861999e3cf84e159fed523a51aa575e643a764e9ce39f5f478772c4a99b15668a2dc42f3dfa127b6b229c7191e7965127d1ca1dcc95abe7778ef625 WHIRLPOOL 5a1503d5346bb1da737e7d55e47a25bf768691676e676cce7973f4966981868086bd392575b74512d716b7074a44c7f851cd990f20afebab549841fef1de7142
+MISC ChangeLog-2015 5934 SHA256 5dfebe4e5b76036baf1ed0c870e08f21280128361de43681ecc774237ca38732 SHA512 e9f5e14e1a6e1ada46b1e8976b690ab55808ad9849f15928464761fd4a9dc031522e37b343303dfa5f867b8a36f94bac08f0bb5c8fed97b970bae91e77536889 WHIRLPOOL 44c53d6bded9102cd423ff471d86d8e00220f1907a38759f3c65850f421394d9e8c0c10ca2e2bb635095914a9d8bea68336969c5ca13805512e6a78b41b29375
+MISC metadata.xml 516 SHA256 0b102e59974022123569945a9ba759c33dc4d4d30f6c157708453ef362af4900 SHA512 477983c8d8f5e65f6bb6f8462711e6920da429c4c17dbcabfe5743da8cd693d016df2743bc4cedf042ccbe2d2f406486173ce7e118a117634eb3c2fee7cf4e6f WHIRLPOOL 0cfae7ebb657a814e20f251909d1e61a8fbf1badfe445df4d19b8ae9d0f5fa64b481388d480542515ef05e5229364cdda2849a40bd710ad17f7b0ba471b65ea4
diff --git a/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch b/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch
new file mode 100644
index 000000000000..e8404ecc47b4
--- /dev/null
+++ b/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch
@@ -0,0 +1,46 @@
+Description: Build using giflib5
+Forwarded: yes
+Author: Marcos Talau <talau@users.sourceforge.net>
+Author: Matthias Klose <doko@debian.org>
+Last-Update: 2015-11-04
+
+Index: ziproxy-3.3.1/src/image.c
+===================================================================
+--- ziproxy-3.3.1.orig/src/image.c
++++ ziproxy-3.3.1/src/image.c
+@@ -905,7 +905,11 @@ int gif2bitmap(char *inbuf, int insize,
+ desc.size=insize;
+ desc.x.pos=0;
+
++#if GIFLIB_MAJOR >= 5
++ if ((GifFile = DGifOpen((void*)&desc, &gif_mem_input, NULL)) == NULL)
++#else
+ if ((GifFile = DGifOpen((void*)&desc, &gif_mem_input)) == NULL)
++#endif
+ return( IMG_RET_ERR_UNKNOWN + IMG_RET_FLG_WHILE_DECOMP);//more possible reasons
+
+ bmp = new_raw_bitmap();
+@@ -1083,7 +1087,11 @@ int gif2bitmap(char *inbuf, int insize,
+ }
+ bmp->pal_bpp = bmp->bpp;
+
++#if GIFLIB_MAJOR >= 5
++ DGifCloseFile(GifFile, NULL);
++#else
+ DGifCloseFile(GifFile);
++#endif
+ return IMG_RET_OK;
+ }
+
+@@ -1738,7 +1746,11 @@ static int bitmap2jp2 (raw_bitmap *bmp,
+ cmptparm->width = cwidth [cmptno];
+ cmptparm->height = cheight [cmptno];
+ cmptparm->prec = cbitlen [cmptno];
++#if GIFLIB_MAJOR >= 5
++ cmptparm->sgnd = 0; // we only generate unsigned components
++#else
+ cmptparm->sgnd = false; // we only generate unsigned components
++#endif
+
+ cshiftR [cmptno] = 8 - cbitlen [cmptno]; // calculate the resampling shift for this component
+ }
diff --git a/net-proxy/ziproxy/files/ziproxy.confd b/net-proxy/ziproxy/files/ziproxy.confd
new file mode 100644
index 000000000000..9a4a12137c6a
--- /dev/null
+++ b/net-proxy/ziproxy/files/ziproxy.confd
@@ -0,0 +1,18 @@
+# configuraton file for /etc/init.d/ziproxy
+#
+# you can symlink /etc/init.d/ziproxy to a different name
+# and then copy this config to a new file with the same name
+# as the symlinked init-script to run multiple instances of
+# ziproxy. You have to change the location for CONFIG then
+# of course... ;-)
+
+# Full path to ziproxy.conf file (instead of default one).
+#
+#CONFIG="/etc/ziproxy/ziproxy.conf"
+
+# Limit incoming connections only from the specified address(es).
+# This option has the same meaning, but higher precedence as
+# "OnlyFrom=" option in configuration file. Uncomment it
+# if you want to set it.
+#
+#ONLYFROM="<IP.address or hostname>"
diff --git a/net-proxy/ziproxy/files/ziproxy.initd-r1 b/net-proxy/ziproxy/files/ziproxy.initd-r1
new file mode 100644
index 000000000000..7336e3c9f658
--- /dev/null
+++ b/net-proxy/ziproxy/files/ziproxy.initd-r1
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ local OPT="-d"
+ ebegin "Starting ${SVCNAME}"
+
+ [ -n "${CONFIG}" ] && OPT="${OPT} -c ${CONFIG}"
+ [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}"
+
+ start-stop-daemon --start \
+ --exec /usr/sbin/ziproxy -- ${OPT} -u ziproxy -g ziproxy -p /var/run/${SVCNAME}.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
diff --git a/net-proxy/ziproxy/metadata.xml b/net-proxy/ziproxy/metadata.xml
new file mode 100644
index 000000000000..8f01fac0ec5f
--- /dev/null
+++ b/net-proxy/ziproxy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Ziproxy is a http compression and optimizer, non-caching, fully configurable
+ proxy. Ziproxy features JPEG, GIF, PNG, JPEG2k and GZIP recompression for
+ lower HTTP traffic through low speed links, among other features.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ziproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
new file mode 100644
index 000000000000..7ac3b1b6f333
--- /dev/null
+++ b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user
+
+DESCRIPTION="A forwarding, non-caching, compressing web proxy server"
+HOMEPAGE="http://ziproxy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="jpeg2k sasl xinetd"
+
+RDEPEND="
+ media-libs/giflib:0=
+ media-libs/libpng:0=
+ virtual/jpeg:0
+ sys-libs/zlib
+ jpeg2k? ( media-libs/jasper:= )
+ sasl? ( dev-libs/cyrus-sasl )
+ xinetd? ( virtual/inetd )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-giflib5.patch )
+
+pkg_setup() {
+ enewgroup ziproxy
+ enewuser ziproxy -1 -1 -1 ziproxy
+}
+
+src_prepare() {
+ default
+
+ # fix sample config file
+ sed -i \
+ -e "s:/var/ziproxy/:/var/lib/ziproxy/:g" \
+ -e "s:%j-%Y.log:/var/log/ziproxy/%j-%Y.log:g" \
+ etc/ziproxy/ziproxy.conf || die
+
+ # fix sample xinetd config
+ sed -i \
+ -e "s:/usr/bin/:/usr/sbin/:g" \
+ -e "s:\(.*port.*\):\1\n\ttype\t\t\t= UNLISTED:g" \
+ -e "s:root:ziproxy:g" \
+ etc/xinetd.d/ziproxy || die
+}
+
+src_configure() {
+ econf \
+ $(use_with jpeg2k jasper) \
+ $(use_with sasl sasl2) \
+ --with-cfgfile=/etc/ziproxy/ziproxy.conf
+}
+
+src_install() {
+ default
+
+ dodir /usr/sbin
+ mv -vf "${D}"usr/{,s}bin/ziproxy || die
+
+ dobin src/tools/ziproxy_genhtml_stats.sh
+
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ use jpeg2k && dodoc JPEG2000.txt
+
+ insinto /etc
+ doins -r etc/ziproxy
+
+ insinto /var/lib/ziproxy/error
+ doins var/ziproxy/error/*.html
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins etc/xinetd.d/ziproxy
+ fi
+
+ diropts -m0750 -o ziproxy -g ziproxy
+ keepdir /var/log/ziproxy
+}