summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-ftp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-ftp')
-rw-r--r--net-ftp/atftp/Manifest2
-rw-r--r--net-ftp/atftp/atftp-0.7-r3.ebuild72
-rw-r--r--net-ftp/atftp/files/atftp-0.7-blockno.patch136
-rw-r--r--net-ftp/atftp/files/atftp-0.7-glibc24.patch22
-rw-r--r--net-ftp/atftp/files/atftp-0.7-illreply.patch12
-rw-r--r--net-ftp/atftp/files/atftp-0.7-password.patch94
-rw-r--r--net-ftp/atftp/files/atftp-0.7-pcre.patch14
-rw-r--r--net-ftp/atftp/files/atftp-0.7-spaced_filename.patch96
-rw-r--r--net-ftp/atftp/files/atftp-0.7-tests.patch23
-rw-r--r--net-ftp/atftp/files/atftp.confd4
-rwxr-xr-xnet-ftp/atftp/files/atftp.init28
-rw-r--r--net-ftp/atftp/files/atftp.service9
-rw-r--r--net-ftp/atftp/files/atftp.service.conf2
-rw-r--r--net-ftp/atftp/metadata.xml7
-rw-r--r--net-ftp/axyftp/Manifest1
-rw-r--r--net-ftp/axyftp/axyftp-0.5.1-r2.ebuild43
-rw-r--r--net-ftp/axyftp/files/axyftp-0.5.1-built-in-function-exit.patch18
-rw-r--r--net-ftp/axyftp/metadata.xml10
-rw-r--r--net-ftp/bareftp/Manifest2
-rw-r--r--net-ftp/bareftp/bareftp-0.3.10.ebuild33
-rw-r--r--net-ftp/bareftp/bareftp-0.3.9.ebuild33
-rw-r--r--net-ftp/bareftp/metadata.xml5
-rw-r--r--net-ftp/cmdftp/Manifest1
-rw-r--r--net-ftp/cmdftp/cmdftp-0.9.8.ebuild24
-rw-r--r--net-ftp/cmdftp/metadata.xml9
-rw-r--r--net-ftp/filezilla/Manifest7
-rw-r--r--net-ftp/filezilla/files/filezilla-3.10.2-debug.patch13
-rw-r--r--net-ftp/filezilla/files/filezilla-3.3.5.1-debug.patch13
-rw-r--r--net-ftp/filezilla/files/filezilla-3.7.4-debug.patch13
-rw-r--r--net-ftp/filezilla/filezilla-3.10.1.1.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.11.0.1.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.11.0.2.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.12.0.2.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.7.3.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.8.1.ebuild68
-rw-r--r--net-ftp/filezilla/filezilla-3.9.0.6.ebuild68
-rw-r--r--net-ftp/filezilla/metadata.xml15
-rw-r--r--net-ftp/frox/Manifest1
-rw-r--r--net-ftp/frox/files/0.7.18-netfilter-includes.patch16
-rw-r--r--net-ftp/frox/files/0.7.18-respect-CFLAGS.patch15
-rw-r--r--net-ftp/frox/files/config-0.7.18.patch66
-rw-r--r--net-ftp/frox/files/frox-0.7.18-config.patch66
-rw-r--r--net-ftp/frox/files/frox.initd38
-rw-r--r--net-ftp/frox/files/frox.rc46
-rw-r--r--net-ftp/frox/frox-0.7.18-r4.ebuild84
-rw-r--r--net-ftp/frox/frox-0.7.18-r5.ebuild82
-rw-r--r--net-ftp/frox/metadata.xml14
-rw-r--r--net-ftp/ftp/Manifest4
-rw-r--r--net-ftp/ftp/ftp-0.17-r7.ebuild49
-rw-r--r--net-ftp/ftp/ftp-0.17.23.0.2.1.ebuild57
-rw-r--r--net-ftp/ftp/metadata.xml5
-rw-r--r--net-ftp/ftpbase/files/ftp-pamd18
-rw-r--r--net-ftp/ftpbase/files/ftp-pamd-include18
-rw-r--r--net-ftp/ftpbase/files/ftpusers37
-rw-r--r--net-ftp/ftpbase/ftpbase-0.01-r2.ebuild54
-rw-r--r--net-ftp/ftpbase/metadata.xml10
-rw-r--r--net-ftp/gftp/Manifest1
-rw-r--r--net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch21
-rw-r--r--net-ftp/gftp/gftp-2.0.19-r2.ebuild39
-rw-r--r--net-ftp/gftp/metadata.xml5
-rw-r--r--net-ftp/gproftpd/Manifest1
-rw-r--r--net-ftp/gproftpd/gproftpd-8.3.2-r1.ebuild64
-rw-r--r--net-ftp/gproftpd/metadata.xml7
-rw-r--r--net-ftp/lftp/Manifest1
-rw-r--r--net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch21
-rw-r--r--net-ftp/lftp/files/lftp-4.5.3-autopoint.patch10
-rw-r--r--net-ftp/lftp/files/lftp-4.5.5-am_config_header.patch11
-rw-r--r--net-ftp/lftp/files/lftp-4.6.3a-autopoint.patch10
-rw-r--r--net-ftp/lftp/lftp-4.6.3a.ebuild90
-rw-r--r--net-ftp/lftp/lftp-9999.ebuild89
-rw-r--r--net-ftp/lftp/metadata.xml13
-rw-r--r--net-ftp/linksys-tftp/Manifest1
-rw-r--r--net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch28
-rw-r--r--net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch20
-rw-r--r--net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild29
-rw-r--r--net-ftp/linksys-tftp/metadata.xml6
-rw-r--r--net-ftp/metadata.xml38
-rw-r--r--net-ftp/ncftp/Manifest2
-rw-r--r--net-ftp/ncftp/metadata.xml18
-rw-r--r--net-ftp/ncftp/ncftp-3.2.5-r3.ebuild50
-rw-r--r--net-ftp/netkit-ftpd/Manifest2
-rw-r--r--net-ftp/netkit-ftpd/files/ftp.xinetd13
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-CVE-2008-4247.patch108
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-build.patch43
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup-ssl.patch10
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup.patch10
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cross.patch45
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-fclose-CVE-2007-6263.patch24
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-gcc41.patch32
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-setguid.patch66
-rw-r--r--net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-shadowfix.patch28
-rw-r--r--net-ftp/netkit-ftpd/metadata.xml5
-rw-r--r--net-ftp/netkit-ftpd/netkit-ftpd-0.17-r8.ebuild60
-rw-r--r--net-ftp/oftpd/Manifest2
-rw-r--r--net-ftp/oftpd/files/conf.d.oftpd-r726
-rw-r--r--net-ftp/oftpd/files/init.d.oftpd-r729
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-delay-root-check.patch30
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch20
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch23
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-htons.patch16
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch354
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch17
-rw-r--r--net-ftp/oftpd/files/oftpd-0.3.7-unistd.patch19
-rw-r--r--net-ftp/oftpd/metadata.xml8
-rw-r--r--net-ftp/oftpd/oftpd-0.3.7-r10.ebuild52
-rw-r--r--net-ftp/oftpd/oftpd-0.3.7-r7.ebuild46
-rw-r--r--net-ftp/oftpd/oftpd-0.3.7-r8.ebuild49
-rw-r--r--net-ftp/oftpd/oftpd-0.3.7-r9.ebuild50
-rw-r--r--net-ftp/oneclickftp/Manifest1
-rw-r--r--net-ftp/oneclickftp/files/oneclickftp-0.5.1-qt47.patch13
-rw-r--r--net-ftp/oneclickftp/metadata.xml8
-rw-r--r--net-ftp/oneclickftp/oneclickftp-0.5.1.ebuild34
-rw-r--r--net-ftp/proftpd/Manifest7
-rw-r--r--net-ftp/proftpd/files/proftpd-tmpfiles.d.conf1
-rw-r--r--net-ftp/proftpd/files/proftpd.conf.sample53
-rw-r--r--net-ftp/proftpd/files/proftpd.initd52
-rw-r--r--net-ftp/proftpd/files/proftpd.service12
-rw-r--r--net-ftp/proftpd/files/proftpd.xinetd15
-rw-r--r--net-ftp/proftpd/metadata.xml62
-rw-r--r--net-ftp/proftpd/proftpd-1.3.5a.ebuild236
-rw-r--r--net-ftp/profxp/Manifest2
-rw-r--r--net-ftp/profxp/metadata.xml7
-rw-r--r--net-ftp/profxp/profxp-3_pre2-r2.ebuild46
-rw-r--r--net-ftp/pure-ftpd/Manifest3
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch20
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd.conf_d-390
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd.rc1177
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd.xinetd13
-rw-r--r--net-ftp/pure-ftpd/metadata.xml26
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-1.0.40.ebuild141
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-1.0.41.ebuild141
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-1.0.42.ebuild141
-rw-r--r--net-ftp/pureadmin/Manifest1
-rw-r--r--net-ftp/pureadmin/files/pureadmin-0.4-gold.patch28
-rw-r--r--net-ftp/pureadmin/metadata.xml11
-rw-r--r--net-ftp/pureadmin/pureadmin-0.4-r1.ebuild63
-rw-r--r--net-ftp/pybootd/Manifest1
-rw-r--r--net-ftp/pybootd/files/pybootd-scripts.patch36
-rw-r--r--net-ftp/pybootd/metadata.xml9
-rw-r--r--net-ftp/pybootd/pybootd-1.5.0_pre20110524131526.ebuild28
-rw-r--r--net-ftp/qshare/Manifest1
-rw-r--r--net-ftp/qshare/files/qshare-2.1.5-desktop.patch16
-rw-r--r--net-ftp/qshare/metadata.xml5
-rw-r--r--net-ftp/qshare/qshare-2.1.5-r1.ebuild24
-rw-r--r--net-ftp/scythia/Manifest1
-rw-r--r--net-ftp/scythia/metadata.xml5
-rw-r--r--net-ftp/scythia/scythia-0.9.3_p2.ebuild40
-rw-r--r--net-ftp/tftp-hpa/Manifest1
-rw-r--r--net-ftp/tftp-hpa/files/in.tftpd.confd-0.4415
-rw-r--r--net-ftp/tftp-hpa/files/in.tftpd.rc620
-rw-r--r--net-ftp/tftp-hpa/files/tftp.service6
-rw-r--r--net-ftp/tftp-hpa/files/tftp.socket8
-rw-r--r--net-ftp/tftp-hpa/files/tftp.xinetd10
-rw-r--r--net-ftp/tftp-hpa/metadata.xml5
-rw-r--r--net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild56
-rw-r--r--net-ftp/tftp-hpa/tftp-hpa-5.2.ebuild48
-rw-r--r--net-ftp/tlswrap/Manifest1
-rw-r--r--net-ftp/tlswrap/files/tlswrap.init20
-rw-r--r--net-ftp/tlswrap/metadata.xml9
-rw-r--r--net-ftp/tlswrap/tlswrap-1.04.ebuild30
-rw-r--r--net-ftp/tnftp/Manifest3
-rw-r--r--net-ftp/tnftp/metadata.xml9
-rw-r--r--net-ftp/tnftp/tnftp-20100108.ebuild32
-rw-r--r--net-ftp/tnftp/tnftp-20130505.ebuild32
-rw-r--r--net-ftp/tnftp/tnftp-20141104.ebuild32
-rw-r--r--net-ftp/vsftpd/Manifest2
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.1.0-caps.patch15
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.2.0-dont-link-caps.patch21
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.2.0-gentoo.patch264
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.3.2-as-needed.patch13
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch20
-rw-r--r--net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch207
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.0-Makefile.patch34
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch16
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.2-aslim.patch13
-rw-r--r--net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch57
-rw-r--r--net-ftp/vsftpd/files/vsftpd-checkconfig.sh29
-rw-r--r--net-ftp/vsftpd/files/vsftpd.conf105
-rw-r--r--net-ftp/vsftpd/files/vsftpd.init51
-rw-r--r--net-ftp/vsftpd/files/vsftpd.logrotate4
-rw-r--r--net-ftp/vsftpd/files/vsftpd.service11
-rw-r--r--net-ftp/vsftpd/files/vsftpd.socket9
-rw-r--r--net-ftp/vsftpd/files/vsftpd.xinetd15
-rw-r--r--net-ftp/vsftpd/files/vsftpd_at.service10
-rw-r--r--net-ftp/vsftpd/metadata.xml23
-rw-r--r--net-ftp/vsftpd/vsftpd-2.3.5.ebuild115
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild122
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2-r2.ebuild132
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2-r3.ebuild135
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2-r4.ebuild135
-rw-r--r--net-ftp/vsftpd/vsftpd-3.0.2.ebuild118
-rw-r--r--net-ftp/weex/Manifest1
-rw-r--r--net-ftp/weex/files/formatstring.patch11
-rw-r--r--net-ftp/weex/files/weex-2.6.1.5-va_list.patch23
-rw-r--r--net-ftp/weex/metadata.xml10
-rw-r--r--net-ftp/weex/weex-2.6.1.5-r1.ebuild32
-rw-r--r--net-ftp/yafc/Manifest1
-rw-r--r--net-ftp/yafc/metadata.xml12
-rw-r--r--net-ftp/yafc/yafc-1.2.6.ebuild46
199 files changed, 7298 insertions, 0 deletions
diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest
new file mode 100644
index 000000000000..5d5c28955676
--- /dev/null
+++ b/net-ftp/atftp/Manifest
@@ -0,0 +1,2 @@
+DIST atftp-0.7.tar.gz 202234 SHA256 9c548c44d3cfdf259118d9fd4e468e1fe4567456dbff8ff59838c5f70ef62ea3 SHA512 81c51b613a640f7db4d26da0fb891bda345d11d3f39e0af37f393d2abf619094c1de83f92f04ac75367f546cc70e37d7d47c1535c241c941036fd4df7863a440 WHIRLPOOL 6af7ae6603ce44a17d5368c794c9e01b1bb03baa0406926ef35d9083dc77c57f9a7f3cfb9a5fb9231330f739f417c06a81089dd58f33c5d06682cdbef4be42bd
+DIST atftp_0.7-11.diff.gz 26055 SHA256 77accd1f5b5d4759fe9572f7a917c629e35692e484ac4dc6fd4415fe745036ff SHA512 28747f8f3ef2fc3b122361f682fe26ba93acf09b190f61efb3cfcbb6bdeef78cfe1348aeaf1699003a7e02586579be670d85b65baad1b1165a4bec9a9279adb5 WHIRLPOOL 9dc3678862d994810bdbfae2189c074345fa895dd8d2612dea155774abb804a3d7dee1465e4b0a2beec7a429440d0d971a3d67db57d43341b87f3533b72bea8a
diff --git a/net-ftp/atftp/atftp-0.7-r3.ebuild b/net-ftp/atftp/atftp-0.7-r3.ebuild
new file mode 100644
index 000000000000..1d50afe43d18
--- /dev/null
+++ b/net-ftp/atftp/atftp-0.7-r3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic systemd
+
+DEBIAN_PV="11"
+DEBIAN_A="${PN}_${PV}-${DEBIAN_PV}.diff.gz"
+
+DESCRIPTION="Advanced TFTP implementation client/server"
+HOMEPAGE="ftp://ftp.mamalinux.com/pub/atftp/"
+SRC_URI="ftp://ftp.mamalinux.com/pub/atftp/${P}.tar.gz
+ mirror://debian/pool/main/a/${PN}/${DEBIAN_A}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 ~s390 sparc x86"
+IUSE="selinux tcpd readline pcre"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ readline? ( sys-libs/readline )
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}
+ !net-ftp/netkit-tftp
+ !net-ftp/tftp-hpa
+ selinux? ( sec-policy/selinux-tftp )"
+
+src_prepare() {
+ epatch "${DISTDIR}"/${DEBIAN_A}
+ epatch "${FILESDIR}"/${P}-pcre.patch
+ epatch "${FILESDIR}"/${P}-password.patch
+ epatch "${FILESDIR}"/${P}-tests.patch
+ epatch "${FILESDIR}"/${P}-glibc24.patch
+ epatch "${FILESDIR}"/${P}-blockno.patch
+ epatch "${FILESDIR}"/${P}-spaced_filename.patch
+ epatch "${FILESDIR}"/${P}-illreply.patch
+ # remove upstream's broken CFLAGS
+ sed -i.orig -e \
+ '/^CFLAGS="-g -Wall -D_REENTRANT"/s,".*","",g' \
+ "${S}"/configure
+}
+
+src_configure() {
+ append-flags -D_REENTRANT -DRATE_CONTROL
+ econf \
+ $(use_enable tcpd libwrap) \
+ $(use_enable readline libreadline) \
+ $(use_enable pcre libpcre) \
+ --enable-mtftp
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ newinitd "${FILESDIR}"/atftp.init atftp
+ newconfd "${FILESDIR}"/atftp.confd atftp
+
+ systemd_dounit "${FILESDIR}"/atftp.service
+ systemd_install_serviced "${FILESDIR}"/atftp.service.conf
+
+ dodoc README* BUGS FAQ Changelog INSTALL TODO
+ dodoc "${S}"/docs/*
+
+ docinto test
+ cd "${S}"/test
+ dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt
+}
diff --git a/net-ftp/atftp/files/atftp-0.7-blockno.patch b/net-ftp/atftp/files/atftp-0.7-blockno.patch
new file mode 100644
index 000000000000..6a3184f98bec
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-blockno.patch
@@ -0,0 +1,136 @@
+--- atftp-0.7/tftp_file.c~ 2010-05-27 13:05:12.000000000 -0500
++++ atftp-0.7/tftp_file.c 2010-05-27 12:50:05.000000000 -0500
+@@ -133,19 +133,21 @@
+ int mcast_sockfd = 0;
+ struct sockaddr_in sa_mcast;
+ struct ip_mreq mreq;
+ struct hostent *host;
+ int master_client = 0;
+ unsigned int file_bitmap[NB_BLOCK];
+ int prev_bitmap_hole = -1; /* the previous hole found in the bitmap */
+ char string[MAXLEN];
++ int rx_block_number;
+
+ int prev_block_number = 0; /* needed to support netascii convertion */
+ int temp = 0;
++ size_t ignore;
+
+ data->file_size = 0;
+ tftp_cancel = 0;
+ from.sin_addr.s_addr = 0;
+
+ memset(&sa_mcast, 0, sizeof(struct sockaddr_in));
+ memset(&file_bitmap, 0, sizeof(file_bitmap));
+
+@@ -300,17 +302,17 @@
+ {
+ connect(sockfd, (struct sockaddr *)&sa, sizeof(sa));
+ connected = 1;
+ }
+ state = S_OACK_RECEIVED;
+ break;
+ case GET_ERROR:
+ fprintf(stderr, "tftp: error received from server <");
+- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr);
++ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr);
+ fprintf(stderr, ">\n");
+ state = S_ABORT;
+ break;
+ case GET_DATA:
+ number_of_timeout = 0;
+ /* if the socket if not connected, connect it */
+ if (!connected)
+ {
+@@ -513,21 +515,24 @@
+ state = S_WAIT_PACKET;
+ break;
+ case S_DATA_RECEIVED:
+ if ((multicast && master_client) || (!multicast))
+ timeout_state = S_SEND_ACK;
+ else
+ timeout_state = S_WAIT_PACKET;
+
+- block_number = ntohs(tftphdr->th_block);
++ rx_block_number = ntohs(tftphdr->th_block);
+ if (data->trace)
+ fprintf(stderr, "received DATA <block: %d, size: %d>\n",
+ ntohs(tftphdr->th_block), data_size - 4);
+
++ if ((uint16_t)rx_block_number == (uint16_t)(block_number+1))
++ ++block_number;
++
+ if (tftp_file_write(fp, tftphdr->th_data, data->data_buffer_size - 4, block_number,
+ data_size - 4, convert, &prev_block_number, &temp)
+ != data_size - 4)
+ {
+
+ fprintf(stderr, "tftp: error writing to file %s\n",
+ data->local_file);
+ tftp_send_error(sockfd, &sa, ENOSPACE, data->data_buffer,
+@@ -613,19 +618,21 @@
+ int connected; /* 1 when sockfd is connected */
+ struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer;
+ FILE *fp; /* the local file pointer */
+ int number_of_timeout = 0;
+ struct stat file_stat;
+ int convert = 0; /* if true, do netascii convertion */
+ char string[MAXLEN];
+
++ int ack_block_number;
+ int prev_block_number = 0; /* needed to support netascii convertion */
+ int prev_file_pos = 0;
+ int temp = 0;
++ size_t ignore;
+
+ data->file_size = 0;
+ tftp_cancel = 0;
+ from.sin_addr.s_addr = 0;
+
+ /* make sure the socket is not connected */
+ sa.sin_family = AF_UNSPEC;
+ connect(sockfd, (struct sockaddr *)&sa, sizeof(sa));
+@@ -759,20 +766,23 @@
+ case GET_ACK:
+ number_of_timeout = 0;
+ /* if the socket if not connected, connect it */
+ if (!connected)
+ {
+ //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa));
+ connected = 1;
+ }
+- block_number = ntohs(tftphdr->th_block);
++ ack_block_number = ntohs(tftphdr->th_block);
++ if ((uint16_t)(block_number+1) == ack_block_number)
++ ++block_number;
+ if (data->trace)
+ fprintf(stderr, "received ACK <block: %d>\n",
+- block_number);
++ ack_block_number);
++
+ if ((last_block != -1) && (block_number > last_block))
+ {
+ state = S_END;
+ break;
+ }
+ state = S_SEND_DATA;
+ break;
+ case GET_OACK:
+@@ -782,17 +792,17 @@
+ {
+ //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa));
+ connected = 1;
+ }
+ state = S_OACK_RECEIVED;
+ break;
+ case GET_ERROR:
+ fprintf(stderr, "tftp: error received from server <");
+- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr);
++ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr);
+ fprintf(stderr, ">\n");
+ state = S_ABORT;
+ break;
+ case GET_DISCARD:
+ /* consider discarded packet as timeout to make sure when don't lock up
+ if routing is broken */
+ number_of_timeout++;
+ fprintf(stderr, "tftp: packet discard <%s:%d>.\n",
diff --git a/net-ftp/atftp/files/atftp-0.7-glibc24.patch b/net-ftp/atftp/files/atftp-0.7-glibc24.patch
new file mode 100644
index 000000000000..195aec69b021
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-glibc24.patch
@@ -0,0 +1,22 @@
+--- atftp-0.7/stats.c.org
++++ atftp-0.7/stats.c
+@@ -18,6 +18,7 @@
+
+ #include <limits.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "tftp_def.h"
+ #include "stats.h"
+ #include "logger.h"
+@@ -157,8 +158,9 @@
+
+ logger(LOG_INFO, " Load measurements:");
++ long sc_clk_tck = sysconf(_SC_CLK_TCK);
+ logger(LOG_INFO, " User: %8.3fs Sys:%8.3fs",
+- (double)(s_stats.tms.tms_utime) / CLK_TCK,
+- (double)(s_stats.tms.tms_stime) / CLK_TCK);
++ (double)(s_stats.tms.tms_utime) / sc_clk_tck,
++ (double)(s_stats.tms.tms_stime) / sc_clk_tck);
+ logger(LOG_INFO, " Total:%8.3fs CPU:%8.3f%%",
+ (double)(tmp.tv_sec + tmp.tv_usec * 1e-6),
+ (double)(s_stats.tms.tms_utime + s_stats.tms.tms_stime) /
diff --git a/net-ftp/atftp/files/atftp-0.7-illreply.patch b/net-ftp/atftp/files/atftp-0.7-illreply.patch
new file mode 100644
index 000000000000..e18bbd99c9e9
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-illreply.patch
@@ -0,0 +1,12 @@
+*** tftp_def.old.c 2009-02-28 17:56:12.000000000 +0100
+--- tftp_def.c 2009-02-28 17:57:02.000000000 +0100
+***************
+*** 141,146 ****
+--- 141,147 ----
+ */
+ inline char *Strncpy(char *to, const char *from, size_t size)
+ {
++ if (size <= 0) { *to = '\000'; return to; }
+ to[size-1] = '\000';
+ return strncpy(to, from, size - 1);
+ }
diff --git a/net-ftp/atftp/files/atftp-0.7-password.patch b/net-ftp/atftp/files/atftp-0.7-password.patch
new file mode 100644
index 000000000000..26b59085dde5
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-password.patch
@@ -0,0 +1,94 @@
+diff -Naur atftp-0.7.orig/tftp.c atftp-0.7/tftp.c
+--- atftp-0.7.orig/tftp.c 2004-03-15 18:55:56.000000000 -0500
++++ atftp-0.7/tftp.c 2005-08-29 21:40:06.000000000 -0400
+@@ -525,6 +525,10 @@
+ fprintf(stderr, " multicast: enabled\n");
+ else
+ fprintf(stderr, " multicast: disabled\n");
++ if (data.tftp_options[OPT_PASSWORD].specified)
++ fprintf(stderr, " password: enabled\n");
++ else
++ fprintf(stderr, " password: disabled\n");
+ return ERR;
+ }
+ /* if disabling an option */
+@@ -971,6 +975,7 @@
+ { "put", 0, NULL, 'p'},
+ { "local-file", 1, NULL, 'l'},
+ { "remote-file", 1, NULL, 'r'},
++ { "password", 1, NULL, 'P'},
+ { "tftp-timeout", 1, NULL, 'T'},
+ { "mode", 1, NULL, 'M'},
+ { "option", 1, NULL, 'O'},
+@@ -993,7 +998,7 @@
+ };
+
+ /* Support old argument until 0.8 */
+- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm",
++ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smP:",
+ options, &option_index)) != EOF)
+ {
+ switch (c)
+@@ -1028,6 +1033,11 @@
+ else
+ action = PUT;
+ break;
++ case 'P':
++ snprintf(string, sizeof(string), "option password %s", optarg);
++ make_arg(string, &ac, &av);
++ process_cmd(ac, av);
++ break;
+ case 'l':
+ interactive = 0;
+ Strncpy(local_file, optarg, MAXLEN);
+@@ -1169,6 +1179,7 @@
+ " -p, --put : put file\n"
+ " -l, --local-file <file> : local file name\n"
+ " -r, --remote-file <file> : remote file name\n"
++ " -P, --password <password>: specify password (Linksys ext.)\n"
+ " --tftp-timeout <value> : delay before retransmission, client side\n"
+ #if 0
+ " t, --timeout <value> : delay before retransmission, "
+diff -Naur atftp-0.7.orig/tftp_def.c atftp-0.7/tftp_def.c
+--- atftp-0.7.orig/tftp_def.c 2004-02-12 22:16:09.000000000 -0500
++++ atftp-0.7/tftp_def.c 2005-08-29 21:36:57.000000000 -0400
+@@ -37,6 +37,7 @@
+ { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */
+ { "blksize", "512", 0, 1 }, /* This is the default option */
+ { "multicast", "", 0, 1 }, /* structure */
++ { "password", "", 0, 1}, /* password */
+ { "", "", 0, 0}
+ };
+
+diff -Naur atftp-0.7.orig/tftp_def.h atftp-0.7/tftp_def.h
+--- atftp-0.7.orig/tftp_def.h 2004-02-12 22:16:09.000000000 -0500
++++ atftp-0.7/tftp_def.h 2005-08-29 20:16:27.000000000 -0400
+@@ -40,6 +40,7 @@
+ #define OPT_TIMEOUT 3
+ #define OPT_BLKSIZE 4
+ #define OPT_MULTICAST 5
++#define OPT_PASSWORD 6
+ #define OPT_NUMBER 7
+
+ #define OPT_SIZE 12
+diff -Naur atftp-0.7.orig/tftp_io.c atftp-0.7/tftp_io.c
+--- atftp-0.7.orig/tftp_io.c 2004-02-18 20:30:00.000000000 -0500
++++ atftp-0.7/tftp_io.c 2005-08-29 22:05:11.000000000 -0400
+@@ -70,10 +70,13 @@
+ break;
+ if (tftp_options[i].enabled && tftp_options[i].specified)
+ {
+- Strncpy(data_buffer + buf_index, tftp_options[i].option,
+- data_buffer_size - buf_index);
+- buf_index += strlen(tftp_options[i].option);
+- buf_index++;
++ if (i != OPT_PASSWORD)
++ {
++ Strncpy(data_buffer + buf_index, tftp_options[i].option,
++ data_buffer_size - buf_index);
++ buf_index += strlen(tftp_options[i].option);
++ buf_index++;
++ }
+ Strncpy(data_buffer + buf_index, tftp_options[i].value,
+ data_buffer_size - buf_index);
+ buf_index += strlen(tftp_options[i].value);
diff --git a/net-ftp/atftp/files/atftp-0.7-pcre.patch b/net-ftp/atftp/files/atftp-0.7-pcre.patch
new file mode 100644
index 000000000000..1f24b67471e2
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-pcre.patch
@@ -0,0 +1,14 @@
+--- atftp-0.7/tftpd_pcre.c~ 2005-10-17 23:14:52.000000000 +0200
++++ atftp-0.7/tftpd_pcre.c 2005-10-17 23:14:52.000000000 +0200
+@@ -211,9 +211,9 @@
+ chp++; /* point to value indicating substring */
+ rc = pcre_get_substring(str, ovector, matches, *chp - 0x30, &tmpstr);
+ /* found string */
+- if (rc > 0)
++ if (rc > 0 && outchp - outstr + rc+1 < outsize)
+ {
+- Strncpy(outchp, tmpstr, rc);
++ Strncpy(outchp, tmpstr, rc+1);
+ outchp += rc;
+ pcre_free_substring(tmpstr);
+ continue;
diff --git a/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch b/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch
new file mode 100644
index 000000000000..da96d9f6b820
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch
@@ -0,0 +1,96 @@
+--- atftp-0.7/tftp.c~ 2010-06-03 08:51:14.000000000 -0500
++++ atftp-0.7/tftp.c 2010-06-03 09:40:56.000000000 -0500
+@@ -18,16 +18,17 @@
+ #include "config.h"
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <getopt.h>
+ #include <string.h>
++#include <stdarg.h>
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
+
+ #include <signal.h>
+@@ -344,16 +345,41 @@
+
+ /* If no names matched, then return NULL. */
+ return NULL;
+ }
+ # endif
+ #endif
+
+ /*
++ * set argc/argv from variadic string arguments
++*/
++void make_arg_vector(int *argc, char***argv, ...)
++{
++ char **p;
++ char *s;
++ va_list argp;
++
++ // how many args?
++ *argc = 0;
++ va_start(argp, argv);
++ while ( (s=va_arg(argp, char*)) )
++ ++*argc;
++
++ // allocate storage
++ *argv = malloc(*argc * sizeof (char*));
++
++ // store args
++ p = *argv;
++ va_start(argp, argv);
++ while ( (s=va_arg(argp, char*)) )
++ *p++ = s;
++}
++
++/*
+ * Split a string into args.
+ */
+ void make_arg(char *string, int *argc, char ***argv)
+ {
+ static char *tmp = NULL;
+ size_t argz_len;
+
+ /* split the string to an argz vector */
+@@ -1142,30 +1168,26 @@
+ argv[optind+1]);
+ make_arg(string, &ac, &av);
+ process_cmd(ac, av);
+ }
+
+ if (!interactive)
+ {
+ if (action == PUT)
+- snprintf(string, sizeof(string), "put %s %s", local_file,
+- remote_file);
++ make_arg_vector(&ac,&av,"put",local_file,remote_file,NULL);
+ else if (action == GET)
+- snprintf(string, sizeof(string), "get %s %s", remote_file,
+- local_file);
++ make_arg_vector(&ac,&av,"get",remote_file,local_file,NULL);
+ else if (action == MGET)
+- snprintf(string, sizeof(string), "mget %s %s", remote_file,
+- local_file);
++ make_arg_vector(&ac,&av,"mget",remote_file,local_file,NULL);
+ else
+ {
+ fprintf(stderr, "No action specified in batch mode!\n");
+ exit(ERR);
+ }
+- make_arg(string, &ac, &av);
+ if (process_cmd(ac, av) == ERR)
+ exit(ERR);
+ }
+ return OK;
+ }
+
+ void tftp_usage(void)
+ {
diff --git a/net-ftp/atftp/files/atftp-0.7-tests.patch b/net-ftp/atftp/files/atftp-0.7-tests.patch
new file mode 100644
index 000000000000..9e087950e659
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-tests.patch
@@ -0,0 +1,23 @@
+diff -Naur atftp-0.7.orig/test/test.sh atftp-0.7/test/test.sh
+--- atftp-0.7.orig/test/test.sh 2003-04-28 21:59:51.000000000 -0400
++++ atftp-0.7/test/test.sh 2005-10-26 22:42:15.000000000 -0400
+@@ -151,7 +151,7 @@
+ test_blocksize 1428
+ test_blocksize 16000
+ test_blocksize 64000
+-test_blocksize 65465
++test_blocksize 65464
+
+ #
+ # testing fot tsize
+@@ -162,9 +162,9 @@
+ TSIZE=`grep "OACK <tsize:" out | sed -e "s/[^0-9]//g"`
+ if [ "$TSIZE" != "2048" ]; then
+ echo "ERROR (server report $TSIZE bytes but it should be 2048)"
++ ERROR=1
+ else
+ echo "OK"
+- ERROR=1
+ fi
+
+ #
diff --git a/net-ftp/atftp/files/atftp.confd b/net-ftp/atftp/files/atftp.confd
new file mode 100644
index 000000000000..a46a7047dbb6
--- /dev/null
+++ b/net-ftp/atftp/files/atftp.confd
@@ -0,0 +1,4 @@
+# Config file for tftp server
+
+TFTPD_ROOT="/tftproot"
+TFTPD_OPTS="--daemon --user nobody --group nobody"
diff --git a/net-ftp/atftp/files/atftp.init b/net-ftp/atftp/files/atftp.init
new file mode 100755
index 000000000000..4fc8b14413b4
--- /dev/null
+++ b/net-ftp/atftp/files/atftp.init
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -d ${TFTPD_ROOT} ]
+ then
+ eerror "You need a tftp root directory"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting tftpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/in.tftpd \
+ -- ${TFTPD_OPTS} ${TFTPD_ROOT}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tftpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/in.tftpd
+ eend $?
+}
diff --git a/net-ftp/atftp/files/atftp.service b/net-ftp/atftp/files/atftp.service
new file mode 100644
index 000000000000..e6570f63445c
--- /dev/null
+++ b/net-ftp/atftp/files/atftp.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Advanced TFTP implementation client/server
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/atftpd --daemon --no-fork --user nobody --group nobody $TFTPD_ROOT
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/atftp/files/atftp.service.conf b/net-ftp/atftp/files/atftp.service.conf
new file mode 100644
index 000000000000..d8aa19abe32f
--- /dev/null
+++ b/net-ftp/atftp/files/atftp.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="TFTPD_ROOT=/tftproot"
diff --git a/net-ftp/atftp/metadata.xml b/net-ftp/atftp/metadata.xml
new file mode 100644
index 000000000000..684b730dbaa5
--- /dev/null
+++ b/net-ftp/atftp/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>
+<email>klausman@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-ftp/axyftp/Manifest b/net-ftp/axyftp/Manifest
new file mode 100644
index 000000000000..7037e014c971
--- /dev/null
+++ b/net-ftp/axyftp/Manifest
@@ -0,0 +1 @@
+DIST axyftp-0.5.1.tar.gz 518736 SHA256 f35735393de275b6bed3070fc879791014961e3ec16f0305397759df60ebef89 SHA512 b818537dd8aff34996bdbc770ee01f5927d0c8be05ff5b1220fc72741c07a141cc41c86432c0da60ca3289f34fc5f516c4b35fcf20178efa7c7e96f1d84477b7 WHIRLPOOL 33419bc93945291669f311dd2a90303ab67432baa862f48595da8f86d6824ed9c786f9850cbc7096bdd47ad9e0d8b077213666feeabd4b6e43dfb5e82edf9bfe
diff --git a/net-ftp/axyftp/axyftp-0.5.1-r2.ebuild b/net-ftp/axyftp/axyftp-0.5.1-r2.ebuild
new file mode 100644
index 000000000000..3f41a1becef4
--- /dev/null
+++ b/net-ftp/axyftp/axyftp-0.5.1-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="GUI FTP client for X Window System (former WXftp)"
+HOMEPAGE="http://freecode.com/projects/axyftp/ http://www.wxftp.seul.org"
+SRC_URI="http://www.wxftp.seul.org/download/${P}.tar.gz"
+
+LICENSE="Artistic LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/motif-2.3:0
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXaw"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-built-in-function-exit.patch
+}
+
+src_configure(){
+ econf --with-help=/usr/share/doc/${PF}/html \
+ --with-gui=motif
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc CHANGES README TODO
+ newicon icons/${PN}-ball64.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "AxY FTP" ${PN} "Network;FileTransfer;Motif"
+}
diff --git a/net-ftp/axyftp/files/axyftp-0.5.1-built-in-function-exit.patch b/net-ftp/axyftp/files/axyftp-0.5.1-built-in-function-exit.patch
new file mode 100644
index 000000000000..8937114251e3
--- /dev/null
+++ b/net-ftp/axyftp/files/axyftp-0.5.1-built-in-function-exit.patch
@@ -0,0 +1,18 @@
+diff -ur axyftp-0.5.1.orig/src/buttonbar.c axyftp-0.5.1/src/buttonbar.c
+--- axyftp-0.5.1.orig/src/buttonbar.c 2000-01-17 21:50:04.000000000 +0200
++++ axyftp-0.5.1/src/buttonbar.c 2008-01-17 15:46:22.000000000 +0200
+@@ -1,4 +1,5 @@
+ /* Copyright (c) 1998 Alexander Yukhimets. All rights reserved. */
++#include<stdlib.h>
+ #include"axyftp.h"
+ #include"utils.h"
+ #include"multi.h"
+diff -ur axyftp-0.5.1.orig/src/utils.c axyftp-0.5.1/src/utils.c
+--- axyftp-0.5.1.orig/src/utils.c 2000-01-17 22:03:59.000000000 +0200
++++ axyftp-0.5.1/src/utils.c 2008-01-17 15:45:51.000000000 +0200
+@@ -1,4 +1,5 @@
+ /* Copyright (c) 1998 Alexander Yukhimets. All rights reserved. */
++#include<stdlib.h>
+ #include<string.h>
+ #include<stdio.h>
+
diff --git a/net-ftp/axyftp/metadata.xml b/net-ftp/axyftp/metadata.xml
new file mode 100644
index 000000000000..0b8e9160ebb8
--- /dev/null
+++ b/net-ftp/axyftp/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="freecode">axyftp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/bareftp/Manifest b/net-ftp/bareftp/Manifest
new file mode 100644
index 000000000000..8123d11c4216
--- /dev/null
+++ b/net-ftp/bareftp/Manifest
@@ -0,0 +1,2 @@
+DIST bareftp-0.3.10.tar.gz 618615 SHA256 d36f10485762d93e38e81618981b540f2130945d7f41c7c0b60b6a0c059cd849 SHA512 944ef7d533b68c772e02e57526b7a4e11afd02a95c4100fcc8902616f1b3b5f14c78df1bba4e67c290a6e2db973dcf979f4a761ac84fc9ca139cc5e49dedf43b WHIRLPOOL 6f3869cbd10405a7a727ab9c3e13e12255118bf877327334c22c3ad9e4208c72766b66fab923207991a0b117b059a2c370691432602b81574073cb279a17bb8c
+DIST bareftp-0.3.9.tar.gz 593672 SHA256 ac799d0b38695c8dbff85ef497746868a4b07ff2a86e61a901d8e61f125aeaef
diff --git a/net-ftp/bareftp/bareftp-0.3.10.ebuild b/net-ftp/bareftp/bareftp-0.3.10.ebuild
new file mode 100644
index 000000000000..5d0632d4c4d0
--- /dev/null
+++ b/net-ftp/bareftp/bareftp-0.3.10.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit mono gnome2
+
+DESCRIPTION="Mono based file transfer client"
+HOMEPAGE="http://www.bareftp.org/"
+SRC_URI="http://www.bareftp.org/release/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnome-keyring"
+
+RDEPEND=">=dev-lang/mono-2.0
+ >=dev-dotnet/gtk-sharp-2.12
+ >=dev-dotnet/gnome-sharp-2.20
+ >=dev-dotnet/gnomevfs-sharp-2.20
+ >=dev-dotnet/gconf-sharp-2.20
+ gnome-keyring? ( >=dev-dotnet/gnome-keyring-sharp-1.0.0-r2 )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog CREDITS README"
+ G2CONF="--disable-caches
+ --disable-static
+ $(use_with gnome-keyring gnomekeyring)"
+}
diff --git a/net-ftp/bareftp/bareftp-0.3.9.ebuild b/net-ftp/bareftp/bareftp-0.3.9.ebuild
new file mode 100644
index 000000000000..451ac00b4320
--- /dev/null
+++ b/net-ftp/bareftp/bareftp-0.3.9.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit mono gnome2
+
+DESCRIPTION="Mono based file transfer client"
+HOMEPAGE="http://www.bareftp.org/"
+SRC_URI="http://www.bareftp.org/release/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gnome-keyring"
+
+RDEPEND=">=dev-lang/mono-2.0
+ >=dev-dotnet/gtk-sharp-2.12
+ >=dev-dotnet/gnome-sharp-2.20
+ >=dev-dotnet/gnomevfs-sharp-2.20
+ >=dev-dotnet/gconf-sharp-2.20
+ gnome-keyring? ( >=dev-dotnet/gnome-keyring-sharp-1.0.0-r2 )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog CREDITS README"
+ G2CONF="--disable-caches
+ --disable-static
+ $(use_with gnome-keyring gnomekeyring)"
+}
diff --git a/net-ftp/bareftp/metadata.xml b/net-ftp/bareftp/metadata.xml
new file mode 100644
index 000000000000..e85974a7fa17
--- /dev/null
+++ b/net-ftp/bareftp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dotnet</herd>
+</pkgmetadata>
diff --git a/net-ftp/cmdftp/Manifest b/net-ftp/cmdftp/Manifest
new file mode 100644
index 000000000000..41ea5a866b79
--- /dev/null
+++ b/net-ftp/cmdftp/Manifest
@@ -0,0 +1 @@
+DIST cmdftp-0.9.8.tar.gz 145985 SHA256 e769f06bf81473edd88ab006bb38607f5dec0e277306b612dd80d4d4c655b45d SHA512 8c8bb670988c439838493f1c6d31e47ae01e3fd6a1521602267dc8cb8dcc6ed18605277bdbf22a06b3af61e33a676ff3f188648f54af5d0839c7039eaab6b262 WHIRLPOOL 48fae2d047cfc074742fda9a40e10624343b9233f9e75dfde796099d56fd60555e34ee41b83328a7c34e5908dd0035588f0e20292f6ced94c6f6d5d7afe3e8ac
diff --git a/net-ftp/cmdftp/cmdftp-0.9.8.ebuild b/net-ftp/cmdftp/cmdftp-0.9.8.ebuild
new file mode 100644
index 000000000000..98b59fc87757
--- /dev/null
+++ b/net-ftp/cmdftp/cmdftp-0.9.8.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Light weight, yet robust command line FTP client with shell-like
+functions."
+HOMEPAGE="http://savannah.nongnu.org/projects/cmdftp/"
+SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+DOCS=( NEWS README AUTHORS )
+
+src_configure() {
+ econf --enable-largefile
+}
diff --git a/net-ftp/cmdftp/metadata.xml b/net-ftp/cmdftp/metadata.xml
new file mode 100644
index 000000000000..6710eddd2582
--- /dev/null
+++ b/net-ftp/cmdftp/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-ftp</herd>
+<longdescription lang="en">
+ Light weight, yet robust command line FTP client with shell-like
+ functions.
+</longdescription>
+</pkgmetadata>
diff --git a/net-ftp/filezilla/Manifest b/net-ftp/filezilla/Manifest
new file mode 100644
index 000000000000..f98832f066b1
--- /dev/null
+++ b/net-ftp/filezilla/Manifest
@@ -0,0 +1,7 @@
+DIST FileZilla_3.10.1.1_src.tar.bz2 4572160 SHA256 67dbd801b15edd446f35b8df093a24440b5fd41966928d018f03f81db12e636d SHA512 92ecf8a7943975b218ee44d24dcb7dde937125ba056059eed2b7217416269d73e8ed50fc79258cb544606e7949cb7c4ff6aedd27095e083d5ac645a27c5cd068 WHIRLPOOL 56a7be2cdd33b776e41546fcb6e4781e3689ea482a01242b9e096cef782cba6e5f49747d0626f3dc124203d2d7a6421c5706290e91322823f29b2197b310b54d
+DIST FileZilla_3.11.0.1_src.tar.bz2 4434678 SHA256 0309d5fbb12988a615b7e57eaf5a1b3ffad23ea4cc0e932d9ddea185fdd44c72 SHA512 b0ac96fe29e219a6fe0cab63616980de6b5e89cbc489ffffa4d4843c1f9790e52e6bfc75cec55653ca77ba0474a1f7e5b20d79d6bfc2ea6ebc56232ed626ccea WHIRLPOOL d54e19da26d74e80bf5febcc9f1465f1ca79ad5e1990a7a97f9a4c4f1759eb49741ea4d43b9dbd59d146054496b80a8ac483c98d7db68cd50b546e7367041849
+DIST FileZilla_3.11.0.2_src.tar.bz2 4421399 SHA256 341ba02803c29bdd1f9c3ce524723fe9288433d22d286b5a4b7d7c2e0d6989d9 SHA512 7bc59b685a64c243e02db2078592044d94d38c61fc97b8167d2fa026f978a435177b0cc92b557d7804f4d0ff341a9cef426b390d69f078ee03b7a3350a91b19e WHIRLPOOL b0c968a7552d85b1b391d0486fc58e64a590f5bc8d7f9ca2aec4e1598a932c457177f958497432c4cc76dff5740c600d8ebd20d9eb18fd002fb660f4e412ed73
+DIST FileZilla_3.12.0.2_src.tar.bz2 4440836 SHA256 7a296fc2cd94d00d3a14ad29b84ff081c60a791f4cddc07f0bd8022bd57e1d0d SHA512 163ab37d0b15ffd511c9237727b2a2879c2ff38f264853148633c87ec2d6e07cca1847104eb8c7190a0d27a6978ddb10b10dd8e1ef6e157051567b04d1ec5930 WHIRLPOOL 1b3c859f77ab1c10adcbbbdf6201adfd388d25af4ff91c4a96cba7ff57eadf66a181ddd421b01dc124b2a58ca96599d5cfd11e321dac76afc18a69698dd8d8e1
+DIST FileZilla_3.7.3_src.tar.bz2 3682494 SHA256 2b012970a6033d8ffd4629b1d57b50ace62cd3750efad70001109f25e520c042 SHA512 b20ec013110e643dd0afca960b4577dd4f17ae744caf63be64e0c8435b8812064aebb4167d0efb186ba171b26967bbc61b6b22a8866b2460530f5793d7d5ecfb WHIRLPOOL acfceb3976f53abcce8da25ea1358761ee6e1a5f556e335067ed665b710fb4a873cce4f62916a19ec784a542db367bed9380a17df37c6ae200fa52e5cd7cc910
+DIST FileZilla_3.8.1_src.tar.bz2 4089186 SHA256 66bc9c082843ffdcb915c7902900b92bdf921ed7310f2a40ff6b96b03cfa1e4f SHA512 abe4b653ac0627f1dda8ae7b6bb3d1a92454b98ce69f6eb6fcced2e63b5d35edba578ba24f06b16218fcfd23edff21cc7c76fe1c7056efb129b081fddbd83101 WHIRLPOOL 94db8545244d1cd4bf0c3f4ed1daaabf150df262334c2311196b916a1d84d06026aa34707ce7d4e74a575a7eda18cb2da4c5e326d591bdc4bf71b69a6935fff9
+DIST FileZilla_3.9.0.6_src.tar.bz2 4181121 SHA256 ce7f56b383fa59dc55b16d8695e9f03b6e86d59a04dce44a16b5d02b2391b0b7 SHA512 750bb9afc12d0015cab7f775878def5bbbc0d16eed7ab3d876888ebc1f72480e338acfd16cd2bbe9520c26d491a996c85f712f47d6cd7e05d083c189cd23899c WHIRLPOOL 4bdbbd570b2a0290e2c4dff1e02aec2484891f5100fc7829e75b3ccf4ff004a1cfacc328b85efbb60be9d058499d0b4b4e1e28927c345a9450e7204cd25746b2
diff --git a/net-ftp/filezilla/files/filezilla-3.10.2-debug.patch b/net-ftp/filezilla/files/filezilla-3.10.2-debug.patch
new file mode 100644
index 000000000000..74e3fc30ea21
--- /dev/null
+++ b/net-ftp/filezilla/files/filezilla-3.10.2-debug.patch
@@ -0,0 +1,13 @@
+--- configure.ac.orig 2015-03-03 17:04:56.300296016 +0100
++++ configure.ac 2015-03-03 17:05:20.739299967 +0100
+@@ -46,8 +46,8 @@
+ if ! test "$localesonly" = "yes"; then
+
+ if test "X$GCC" = Xyes; then
+- CFLAGS="$CFLAGS -Wall -g"
+- CXXFLAGS="$CXXFLAGS -Wall -g"
++ CFLAGS="$CFLAGS -Wall"
++ CXXFLAGS="$CXXFLAGS -Wall"
+ fi
+
+ # Check for C++11 support
diff --git a/net-ftp/filezilla/files/filezilla-3.3.5.1-debug.patch b/net-ftp/filezilla/files/filezilla-3.3.5.1-debug.patch
new file mode 100644
index 000000000000..843ea2d14a2c
--- /dev/null
+++ b/net-ftp/filezilla/files/filezilla-3.3.5.1-debug.patch
@@ -0,0 +1,13 @@
+--- configure.in 2011-02-28 20:47:05.746530082 +0100
++++ configure.in 2011-02-28 20:48:14.889939315 +0100
+@@ -44,8 +44,8 @@
+ if ! test "$localesonly" = "yes"; then
+
+ if test "X$GCC" = Xyes; then
+- CFLAGS="$CFLAGS -Wall -g -fexceptions"
+- CXXFLAGS="$CXXFLAGS -Wall -g -fexceptions"
++ CFLAGS="$CFLAGS -Wall -fexceptions"
++ CXXFLAGS="$CXXFLAGS -Wall -fexceptions"
+ fi
+
+ # Add build information to config.h
diff --git a/net-ftp/filezilla/files/filezilla-3.7.4-debug.patch b/net-ftp/filezilla/files/filezilla-3.7.4-debug.patch
new file mode 100644
index 000000000000..3f4a4dbc4e28
--- /dev/null
+++ b/net-ftp/filezilla/files/filezilla-3.7.4-debug.patch
@@ -0,0 +1,13 @@
+--- configure.ac.orig 2014-02-10 00:55:32.716237174 +0100
++++ configure.ac 2014-02-10 00:58:37.390508206 +0100
+@@ -44,8 +44,8 @@
+ if ! test "$localesonly" = "yes"; then
+
+ if test "X$GCC" = Xyes; then
+- CFLAGS="$CFLAGS -Wall -g -fexceptions"
+- CXXFLAGS="$CXXFLAGS -Wall -g -fexceptions"
++ CFLAGS="$CFLAGS -Wall -fexceptions"
++ CXXFLAGS="$CXXFLAGS -Wall -fexceptions"
+ fi
+
+ CHECK_CXX0X
diff --git a/net-ftp/filezilla/filezilla-3.10.1.1.ebuild b/net-ftp/filezilla/filezilla-3.10.1.1.ebuild
new file mode 100644
index 000000000000..896c5dc9f68c
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.10.1.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.7.4-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.11.0.1.ebuild b/net-ftp/filezilla/filezilla-3.11.0.1.ebuild
new file mode 100644
index 000000000000..5a739dec9b1d
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.11.0.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.10.2-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.11.0.2.ebuild b/net-ftp/filezilla/filezilla-3.11.0.2.ebuild
new file mode 100644
index 000000000000..5a739dec9b1d
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.11.0.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.10.2-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.12.0.2.ebuild b/net-ftp/filezilla/filezilla-3.12.0.2.ebuild
new file mode 100644
index 000000000000..5a739dec9b1d
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.12.0.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-3.0.2.0-r1:3.0[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.10.2-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.7.3.ebuild b/net-ftp/filezilla/filezilla-3.7.3.ebuild
new file mode 100644
index 000000000000..385c07b303f6
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.7.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ppc sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-2.8.3
+ aqua? ( >=x11-libs/wxGTK-2.8.12:2.8[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-2.8.12:2.8[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.3.5.1-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.8.1.ebuild b/net-ftp/filezilla/filezilla-3.8.1.ebuild
new file mode 100644
index 000000000000..50a8205204e9
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.8.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-2.8.12:2.8[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-2.8.12:2.8[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.7.4-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/filezilla-3.9.0.6.ebuild b/net-ftp/filezilla/filezilla-3.9.0.6.ebuild
new file mode 100644
index 000000000000..f947d1981b2c
--- /dev/null
+++ b/net-ftp/filezilla/filezilla-3.9.0.6.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit autotools eutils flag-o-matic multilib wxwidgets
+
+MY_PV=${PV/_/-}
+MY_P="FileZilla_${MY_PV}"
+
+DESCRIPTION="FTP client with lots of useful features and an intuitive interface"
+HOMEPAGE="http://filezilla-project.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="aqua dbus nls test"
+
+RDEPEND=">=app-eselect/eselect-wxwidgets-0.7-r1
+ >=dev-db/sqlite-3.7
+ >=dev-libs/tinyxml-2.6.1-r1[stl]
+ net-dns/libidn
+ >=net-libs/gnutls-3.1.12
+ aqua? ( >=x11-libs/wxGTK-3.0.1:3.0[aqua] )
+ !aqua? ( >=x11-libs/wxGTK-3.0.1:3.0[X] x11-misc/xdg-utils )
+ dbus? ( sys-apps/dbus )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/libtool-1.4
+ nls? ( >=sys-devel/gettext-0.11 )
+ test? ( dev-util/cppunit )"
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.7.4-debug.patch
+ append-cppflags -DTIXML_USE_STL
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with dbus) $(use_enable nls locales) \
+ --with-tinyxml=system \
+ --disable-autoupdatecheck
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doicon src/interface/resources/48x48/${PN}.png
+
+ dodoc AUTHORS ChangeLog NEWS
+
+ if use aqua ; then
+ cat > "${T}/${PN}" <<-EOF
+ #!${EPREFIX}/bin/bash
+ open "${EPREFIX}"/Applications/FileZilla.app
+ EOF
+ rm "${ED}/usr/bin/${PN}" || die
+ dobin "${T}/${PN}"
+ insinto /Applications
+ doins -r "${S}"/FileZilla.app
+ fi
+}
diff --git a/net-ftp/filezilla/metadata.xml b/net-ftp/filezilla/metadata.xml
new file mode 100644
index 000000000000..86db3c1f8f04
--- /dev/null
+++ b/net-ftp/filezilla/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-ftp</herd>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription lang="en">
+ The native linux ftp/sftp client GUI built on wxGTK
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">filezilla</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/frox/Manifest b/net-ftp/frox/Manifest
new file mode 100644
index 000000000000..e282fb519516
--- /dev/null
+++ b/net-ftp/frox/Manifest
@@ -0,0 +1 @@
+DIST frox-0.7.18.tar.bz2 173355 SHA256 f7b637dd108444ff9c2302aa134f434e1606a2f965c01492abfbdc9b1c0bd0fc SHA512 bdffe4b70c91b920378a422dcf386088c3bb34f26e10de8ff57f487ccef6356803c93057eee2b3801a79120a6b2e1618a51dde5bc8c42e13211abf4182c4ff8c WHIRLPOOL 9b7c4d4c2e9e14d1d2d753096b06935fa9ad18ac6fba5c28c05f45b0e5bfb28d9574cdfe649f8cf7bfa0ac666f9e341769db0a57253ac15c72ed1508657de0e1
diff --git a/net-ftp/frox/files/0.7.18-netfilter-includes.patch b/net-ftp/frox/files/0.7.18-netfilter-includes.patch
new file mode 100644
index 000000000000..e40ce52862c9
--- /dev/null
+++ b/net-ftp/frox/files/0.7.18-netfilter-includes.patch
@@ -0,0 +1,16 @@
+--- configure.in.ori 2012-03-01 22:32:17.044450088 +0100
++++ configure.in 2012-03-01 22:36:40.995882948 +0100
+@@ -331,7 +331,12 @@
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(fcntl.h strings.h sys/ioctl.h sys/time.h syslog.h unistd.h)
+-AC_CHECK_HEADERS(linux/netfilter_ipv4.h, , , [#include <limits.h>])
++AC_CHECK_HEADERS(linux/netfilter_ipv4.h, , ,[
++ #include <limits.h>
++ #include <sys/socket.h>
++ #include <linux/in.h>
++ #include <linux/in6.h>
++])
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
diff --git a/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch b/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch
new file mode 100644
index 000000000000..9fb54ac153cd
--- /dev/null
+++ b/net-ftp/frox/files/0.7.18-respect-CFLAGS.patch
@@ -0,0 +1,15 @@
+--- configure.in 2005-02-04 11:24:55.000000000 +0100
++++ configure.in 2012-03-01 22:56:25.985725178 +0100
+@@ -46,11 +46,9 @@
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+- CFLAGS="$CFLAGS -O2"
+ ;;
+ esac],
+- [AC_MSG_RESULT(no)
+- CFLAGS="$CFLAGS -O2"]
++ [AC_MSG_RESULT(no)]
+ )
+
+ AC_MSG_CHECKING(whether to compile in profiling info)
diff --git a/net-ftp/frox/files/config-0.7.18.patch b/net-ftp/frox/files/config-0.7.18.patch
new file mode 100644
index 000000000000..216e5ea2672d
--- /dev/null
+++ b/net-ftp/frox/files/config-0.7.18.patch
@@ -0,0 +1,66 @@
+--- a/frox.conf 2005-02-04 19:54:55.000000000 +0930
++++ b/frox.conf 2005-02-07 19:35:32.995421344 +0930
+@@ -18,7 +18,9 @@
+ # commented out to listen on all local IPs.
+ #
+ # Listen firewall.localnet
+-Listen 192.168.2.1
++# Listen 192.168.2.1
++
++Listen 127.0.0.1
+
+ # Port to listen on. Must be supplied.
+ #
+@@ -26,7 +28,7 @@
+
+ # If specified then bind to this device
+ #
+-BindToDevice eth0
++#BindToDevice eth0
+
+ # Whether to run from inetd. You should still define Port above, but
+ # it isn't used for much.
+@@ -69,12 +71,12 @@
+ ####################################################################
+ # General Options #
+ ####################################################################
+-# User and group to drop priveliges to. This must be specified - if
++User ftpproxy
+ # you really want to run as root (not a good idea) you must say so
+ # specifically, and have compiled with --enable-run-as-root.
+ #
+-# User nobody
+-# Group nogroup
++User ftpproxy
++Group ftpproxy
+
+ # This is frox's working directory - it must be specified. Temporary
+ # files and sockets will be created here. If you are using local
+@@ -83,7 +85,7 @@
+ # also chroot to this dir on startup. To avoid this you must specifically
+ # set DontChroot to Yes.
+ #
+-# WorkingDir /usr/local/lib/frox
++WorkingDir /var/spool/frox
+ # DontChroot Yes
+
+ # Logging level. 0=No logging. 5=Critical errors only. 10= All errors.
+@@ -96,15 +98,15 @@
+ # transferred irrespective of the log level. You can turn this off
+ # below.
+ #
+-# LogLevel 15
+-# LogFile /usr/local/lib/frox/frox-log
++LogLevel 20
++LogFile /var/log/frox/frox-log
+ # XferLogging no
+
+ # File to store PID in. Default is not to. If this file is not within
+ # the Chroot directory then it cannot be deleted on exit, but will
+ # otherwise work fine.
+ #
+-PidFile /var/run/frox.pid
++PidFile /var/run/frox/frox.pid
+
+
+ ####################################################################
diff --git a/net-ftp/frox/files/frox-0.7.18-config.patch b/net-ftp/frox/files/frox-0.7.18-config.patch
new file mode 100644
index 000000000000..feee37e3674e
--- /dev/null
+++ b/net-ftp/frox/files/frox-0.7.18-config.patch
@@ -0,0 +1,66 @@
+--- a/src/frox.conf 2005-02-04 19:54:55.000000000 +0930
++++ b/src/frox.conf 2005-02-07 19:35:32.995421344 +0930
+@@ -18,7 +18,9 @@
+ # commented out to listen on all local IPs.
+ #
+ # Listen firewall.localnet
+-Listen 192.168.2.1
++# Listen 192.168.2.1
++
++Listen 127.0.0.1
+
+ # Port to listen on. Must be supplied.
+ #
+@@ -26,7 +28,7 @@
+
+ # If specified then bind to this device
+ #
+-BindToDevice eth0
++#BindToDevice eth0
+
+ # Whether to run from inetd. You should still define Port above, but
+ # it isn't used for much.
+@@ -69,12 +71,12 @@
+ ####################################################################
+ # General Options #
+ ####################################################################
+-# User and group to drop priveliges to. This must be specified - if
++User ftpproxy
+ # you really want to run as root (not a good idea) you must say so
+ # specifically, and have compiled with --enable-run-as-root.
+ #
+-# User nobody
+-# Group nogroup
++User ftpproxy
++Group ftpproxy
+
+ # This is frox's working directory - it must be specified. Temporary
+ # files and sockets will be created here. If you are using local
+@@ -83,7 +85,7 @@
+ # also chroot to this dir on startup. To avoid this you must specifically
+ # set DontChroot to Yes.
+ #
+-# WorkingDir /usr/local/lib/frox
++WorkingDir /var/spool/frox
+ # DontChroot Yes
+
+ # Logging level. 0=No logging. 5=Critical errors only. 10= All errors.
+@@ -96,15 +98,15 @@
+ # transferred irrespective of the log level. You can turn this off
+ # below.
+ #
+-# LogLevel 15
+-# LogFile /usr/local/lib/frox/frox-log
++LogLevel 20
++LogFile /var/log/frox/frox-log
+ # XferLogging no
+
+ # File to store PID in. Default is not to. If this file is not within
+ # the Chroot directory then it cannot be deleted on exit, but will
+ # otherwise work fine.
+ #
+-PidFile /var/run/frox.pid
++PidFile /var/run/frox/frox.pid
+
+
+ ####################################################################
diff --git a/net-ftp/frox/files/frox.initd b/net-ftp/frox/files/frox.initd
new file mode 100644
index 000000000000..1e4da49d5293
--- /dev/null
+++ b/net-ftp/frox/files/frox.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="reload"
+
+FROX_CONFIG="/etc/frox.conf"
+FROX_PID_FILE="/var/run/frox/frox.pid"
+FROX_OPTS="-f ${FROX_CONFIG}"
+
+checkconfig() {
+ local piddir="$(dirname ${FROX_PID_FILE})"
+ checkpath -q -d -o ftpproxy:ftpproxy -m 0770 "${piddir}" || return 1
+ if [ ! -f "${FROX_CONFIG}" ] ; then
+ eerror "missing ${FROX_CONFIG}"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/frox -- ${FROX_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/frox --pidfile "${FROX_PID_FILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${FROX_PID_FILE}"
+ eend $?
+}
diff --git a/net-ftp/frox/files/frox.rc b/net-ftp/frox/files/frox.rc
new file mode 100644
index 000000000000..87032cd58364
--- /dev/null
+++ b/net-ftp/frox/files/frox.rc
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PROGNAME=frox
+
+opts="depend start stop reload"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/frox.conf ] ; then
+ eerror "missing /etc/frox.conf"
+ return 1
+ fi
+
+}
+
+start() {
+ checkconfig || return 1
+ FROX_OPTS=" -f /etc/frox.conf"
+
+ ebegin "Starting ${PROGNAME}..."
+ start-stop-daemon --start --quiet --exec /usr/sbin/${PROGNAME} -- ${OPTIONS} ${FROX_OPTS} &> /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stop ${PROGNAME}..."
+ start-stop-daemon --stop --quiet --exec /usr/sbin/${PROGNAME} &> /dev/null
+ eend $?
+}
+
+reload() {
+ if [ ! -f /var/run/frox/frox.pid ]; then
+ eerror "frox isn't running"
+ return 1
+ fi
+ ebegin "Reloading configuration"
+ kill -HUP `cat /var/run/frox/frox.pid` &>/dev/null
+ eend $?
+}
+
diff --git a/net-ftp/frox/frox-0.7.18-r4.ebuild b/net-ftp/frox/frox-0.7.18-r4.ebuild
new file mode 100644
index 000000000000..235ae8b6b297
--- /dev/null
+++ b/net-ftp/frox/frox-0.7.18-r4.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils autotools user
+
+IUSE="clamav ssl transparent"
+
+MY_P=${P/_/}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="A transparent ftp proxy"
+SRC_URI="http://frox.sourceforge.net/download/${MY_P}.tar.bz2"
+HOMEPAGE="http://frox.sourceforge.net/"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="clamav? ( >=app-antivirus/clamav-0.80 )
+ ssl? ( dev-libs/openssl )
+ kernel_linux? ( >=sys-kernel/linux-headers-2.6 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup ftpproxy
+ enewuser ftpproxy -1 -1 /var/spool/frox ftpproxy
+
+ use clamav && ewarn "Virus scanner potentialy broken in chroot - see bug #81035"
+}
+
+src_prepare () {
+ epatch "${FILESDIR}"/${PV}-respect-CFLAGS.patch
+ epatch "${FILESDIR}"/${PV}-netfilter-includes.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-http-cache --enable-local-cache \
+ --enable-procname \
+ --enable-configfile=/etc/frox.conf \
+ $(use_enable !kernel_linux libiptc) \
+ $(use_enable clamav virus-scan) \
+ $(use_enable ssl) \
+ $(use_enable transparent transparent-data) \
+ $(use_enable !transparent ntp)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ keepdir /var/run/frox
+ keepdir /var/spool/frox
+ keepdir /var/log/frox
+
+ fperms 700 /var/spool/frox
+ fowners ftpproxy:ftpproxy /var/run/frox /var/spool/frox /var/log/frox
+
+ # INSTALL has useful filewall rules
+ dodoc BUGS README \
+ doc/CREDITS doc/ChangeLog doc/FAQ doc/INSTALL \
+ doc/INTERNALS doc/README.transdata doc/RELEASE \
+ doc/SECURITY doc/TODO
+
+ dohtml doc/*.html doc/*.sgml
+
+ mv doc/frox.man doc/frox.man.8
+ mv doc/frox.conf.man doc/frox.conf.man.8
+ doman doc/frox.man.8 doc/frox.conf.man.8
+
+ newinitd "${FILESDIR}"/frox.rc frox
+
+ cd src
+ epatch "${FILESDIR}/config-${PV}.patch"
+
+ cp frox.conf "${D}/etc/frox.conf.example"
+ if use clamav ; then
+ sed -i \
+ -e "s:^# VirusScanner.*:# VirusScanner '\"/usr/bin/clamscan\" \"%s\"':" \
+ "${D}/etc/frox.conf.example" || die
+ fi
+}
diff --git a/net-ftp/frox/frox-0.7.18-r5.ebuild b/net-ftp/frox/frox-0.7.18-r5.ebuild
new file mode 100644
index 000000000000..97666b3db561
--- /dev/null
+++ b/net-ftp/frox/frox-0.7.18-r5.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils user
+
+DESCRIPTION="A transparent ftp proxy"
+SRC_URI="http://frox.sourceforge.net/download/${P}.tar.bz2"
+HOMEPAGE="http://frox.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+IUSE="clamav ssl transparent"
+
+DEPEND="clamav? ( >=app-antivirus/clamav-0.80 )
+ ssl? ( dev-libs/openssl )
+ kernel_linux? ( >=sys-kernel/linux-headers-2.6 )"
+RDEPEND="${DEPEND}"
+
+# INSTALL has useful filewall rules
+DOCS=(
+ BUGS README
+ doc/CREDITS doc/ChangeLog doc/FAQ doc/INSTALL
+ doc/INTERNALS doc/README.transdata doc/RELEASE
+ doc/SECURITY doc/TODO
+)
+
+pkg_setup() {
+ enewgroup ftpproxy
+ enewuser ftpproxy -1 -1 /var/spool/frox ftpproxy
+
+ use clamav && ewarn "Virus scanner potentialy broken in chroot - see bug #81035"
+}
+
+src_prepare () {
+ epatch "${FILESDIR}/${PV}-respect-CFLAGS.patch"
+ epatch "${FILESDIR}/${PV}-netfilter-includes.patch"
+ epatch "${FILESDIR}/${P}-config.patch"
+
+ if use clamav ; then
+ sed -i -e "s:^# VirusScanner.*:# VirusScanner '\"/usr/bin/clamscan\" \"%s\"':" \
+ "src/${PN}.conf" || die
+ fi
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-http-cache --enable-local-cache \
+ --enable-procname \
+ --enable-configfile=/etc/frox.conf \
+ $(use_enable !kernel_linux libiptc) \
+ $(use_enable clamav virus-scan) \
+ $(use_enable ssl) \
+ $(use_enable transparent transparent-data) \
+ $(use_enable !transparent ntp)
+}
+
+src_install() {
+ default
+
+ keepdir /var/{log,spool}/"${PN}"
+
+ fperms 700 /var/spool/frox
+ fowners ftpproxy:ftpproxy /var/{log,spool}/frox
+
+ dohtml doc/*.html doc/*.sgml
+
+ newman "doc/${PN}.man" "${PN}.man.8"
+ newman "doc/${PN}.conf.man" "${PN}.conf.man.5"
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+
+ insinto /etc
+ newins "src/${PN}.conf" "${PN}.conf.example"
+}
diff --git a/net-ftp/frox/metadata.xml b/net-ftp/frox/metadata.xml
new file mode 100644
index 000000000000..c10e7012aecf
--- /dev/null
+++ b/net-ftp/frox/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>beber@meleeweb.net</email>
+ <name>Bertrand Jacquin</name>
+ <description>Proxied maintainer.</description>
+ </maintainer>
+ <use>
+ <flag name="transparent">Enable transparent proxying of data connections</flag>
+ </use>
+ <longdescription>A transparent ftp proxy</longdescription>
+</pkgmetadata>
diff --git a/net-ftp/ftp/Manifest b/net-ftp/ftp/Manifest
new file mode 100644
index 000000000000..4521403822d7
--- /dev/null
+++ b/net-ftp/ftp/Manifest
@@ -0,0 +1,4 @@
+DIST netkit-ftp-0.17-patches-1.tar.bz2 17549 SHA256 5de0537b109040862f57538ee73a2493674c60d260daf26a8dbeefe49bada326 SHA512 0344316cade2cfe35a9987582e0e381177d412f9be296d1ba4b917699f5112ec48c90e8480a009acf9ba7f14fb5f42a76d9d3551db7d9f8a036eb3ce8fce2113 WHIRLPOOL 8d076a842fca933ad0b5694780044af7b950d6d94efa153a1410e4538e2afd922f8e546ac108771e98772e59910d2d114eedbf6a1fcaccd1b87a744c30a54070
+DIST netkit-ftp-0.17-patches-2.tar.bz2 4307 SHA256 8d47f0c9c4aec0a37f4caa554c8625a1927045a37125cea9f86b84c7af65b09e SHA512 6a9adfd33eae4ac2e1a9e070ed89467804dc484eda084694398bb7e3ebbaf04bf70d00ffaa637bace078c4c0024115ba3620fd75d4a3558a44dc991798885461 WHIRLPOOL 62e4aa120259bb1639fc2ca38296cd05b17672c724502b907d7ac565caa2ce8a90e75e9c2f05f1628ea6fd37fd2d78a2af9419949699a7f59a3c420d9a693a3c
+DIST netkit-ftp-0.17.tar.gz 53934 SHA256 61c913299b81a4671ff089aac821329f7db9bc111aa812993dd585798b700349 SHA512 ba8e411d0230c78e9e4555c03dc1036c6e506ef8edb72ecee4d6a7559d85143721bffbe8b8a6e42918b3098072ac8f207584be9e3a241f6bd31e361c92de6554 WHIRLPOOL fa60506e817ac0e61a3deb41dc7a143a4506e49c91e81aea03ec58f31802c8cbb7025712d13fc164f931e275c01fb88b787991e89f7a75b5e9d8c88058cb88c2
+DIST netkit-ftp-ssl_0.17.23+0.2-1.debian.tar.gz 48189 SHA256 82f2c3f6d999df6e1014c6016a6a3c861a861b2eca1c1143530603f44e2f0574 SHA512 c2fa882c185987298a73e7cef8c073ab0aee7627b60b412be90eef8619bf02d97721c15197fe4f443eab53bcca87876633924872f3102ef9e92dc7511c065228 WHIRLPOOL c4024d406ce1002fe8b9184f5a29ebe1f5c678488fab2166523655762e305f6bdff0aaddfc052f2433fb27c101a29af2d092ea4712ce11d0ced89a9b6de3fbfe
diff --git a/net-ftp/ftp/ftp-0.17-r7.ebuild b/net-ftp/ftp/ftp-0.17-r7.ebuild
new file mode 100644
index 000000000000..188d1217d436
--- /dev/null
+++ b/net-ftp/ftp/ftp-0.17-r7.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PATCHLEVEL=1
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P=netkit-${P}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="Standard Linux FTP client"
+HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="ssl ipv6"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ EPATCH_DIR="${WORKDIR}"/patch \
+ EPATCH_SUFFIX="patch" \
+ epatch
+ append-lfs-flags #101038
+}
+
+src_compile() {
+ ./configure \
+ --prefix=/usr \
+ $(use_enable ssl) \
+ $(use_enable ipv6) \
+ ${EXTRA_ECONF} \
+ || die "configure failed"
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "make failed"
+}
+
+src_install() {
+ dobin ftp/ftp || die
+ doman ftp/ftp.1 ftp/netrc.5
+ dodoc ChangeLog README BUGS
+}
diff --git a/net-ftp/ftp/ftp-0.17.23.0.2.1.ebuild b/net-ftp/ftp/ftp-0.17.23.0.2.1.ebuild
new file mode 100644
index 000000000000..1fcb67345276
--- /dev/null
+++ b/net-ftp/ftp/ftp-0.17.23.0.2.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic versionator
+
+PATCH_VER="2"
+MY_PN="netkit-ftp"
+MY_PV="$(get_version_component_range 1-2)"
+MY_P="netkit-${PN}-${MY_PV}"
+DEB_PN="${MY_PN}-ssl"
+DEB_PV="$(get_version_component_range 1-3)+$(get_version_component_range 4-5)-$(get_version_component_range 6)"
+DESCRIPTION="Standard Linux FTP client"
+HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SRC_URI="ftp://sunsite.unc.edu/pub/Linux/system/network/netkit/${MY_P}.tar.gz
+ mirror://debian/pool/main/n/${DEB_PN}/${DEB_PN}_${DEB_PV}.debian.tar.gz
+ mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="ipv6 readline ssl"
+
+RDEPEND=">=sys-libs/ncurses-5.2:=
+ readline? ( sys-libs/readline:0= )
+ ssl? ( dev-libs/openssl:0= )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="diff" epatch "${WORKDIR}"/debian/patches
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ sed -i \
+ -e 's:echo -n:printf %s :' \
+ configure || die
+}
+
+src_configure() {
+ append-lfs-flags #101038
+ tc-export CC
+ # not an autoconf script
+ ./configure \
+ --prefix=/usr \
+ $(use_enable ipv6) \
+ $(use_enable readline) \
+ $(use_enable ssl) \
+ || die
+}
+
+src_install() {
+ dobin ftp/ftp
+ doman ftp/ftp.1 ftp/netrc.5
+ dodoc ChangeLog README BUGS
+}
diff --git a/net-ftp/ftp/metadata.xml b/net-ftp/ftp/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-ftp/ftp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/net-ftp/ftpbase/files/ftp-pamd b/net-ftp/ftpbase/files/ftp-pamd
new file mode 100644
index 000000000000..c32d2ba076f7
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftp-pamd
@@ -0,0 +1,18 @@
+# Provided by ftpbase (dont remove this line!)
+# Standard pam.d file for ftp service packages.
+# $Id$
+
+auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth required pam_stack.so service=system-auth
+
+# If this is enabled, anonymous logins will fail because the 'ftp' user does
+# not have a "valid" shell, as listed in /etc/shells.
+#
+# If you enable this, it is recommended that you do *not* give the 'ftp'
+# user a real shell. Instead, give the 'ftp' user /bin/false for a shell and
+# add /bin/false to /etc/shells.
+# auth required pam_shells.so
+
+account required pam_stack.so service=system-auth
+
+session required pam_stack.so service=system-auth
diff --git a/net-ftp/ftpbase/files/ftp-pamd-include b/net-ftp/ftpbase/files/ftp-pamd-include
new file mode 100644
index 000000000000..8f081537d822
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftp-pamd-include
@@ -0,0 +1,18 @@
+# Provided by ftpbase (dont remove this line!)
+# Standard pam.d file for ftp service packages.
+# $Id$
+
+auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth include system-auth
+
+# If this is enabled, anonymous logins will fail because the 'ftp' user does
+# not have a "valid" shell, as listed in /etc/shells.
+#
+# If you enable this, it is recommended that you do *not* give the 'ftp'
+# user a real shell. Instead, give the 'ftp' user /bin/false for a shell and
+# add /bin/false to /etc/shells.
+# auth required pam_shells.so
+
+account include system-auth
+
+session include system-auth
diff --git a/net-ftp/ftpbase/files/ftpusers b/net-ftp/ftpbase/files/ftpusers
new file mode 100644
index 000000000000..3e26eda6dde1
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftpusers
@@ -0,0 +1,37 @@
+# Provided by ftpbase (dont remove this line!)
+# /etc/ftpusers: list of users disallowed FTP access
+# $Id$
+
+halt
+operator
+root
+shutdown
+sync
+bin
+daemon
+adm
+lp
+mail
+postmaster
+news
+uucp
+man
+games
+at
+cron
+www
+named
+squid
+gdm
+mysql
+postgres
+guest
+nobody
+alias
+qmaild
+qmaill
+qmailp
+qmailq
+qmailr
+qmails
+postfix
diff --git a/net-ftp/ftpbase/ftpbase-0.01-r2.ebuild b/net-ftp/ftpbase/ftpbase-0.01-r2.ebuild
new file mode 100644
index 000000000000..359abbc51619
--- /dev/null
+++ b/net-ftp/ftpbase/ftpbase-0.01-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils pam user
+
+DESCRIPTION="FTP layout package"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="pam"
+
+DEPEND="pam? ( virtual/pam )
+ !<net-ftp/proftpd-1.2.10-r6
+ !<net-ftp/pure-ftpd-1.0.20-r2
+ !<net-ftp/vsftpd-2.0.3-r1"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ # Check if home exists
+ local exists=false
+ [[ -d "${ROOT}home/ftp" ]] && exists=true
+
+ # Add our default ftp user
+ enewgroup ftp 21
+ enewuser ftp 21 -1 /home/ftp ftp
+
+ # If home did not exist and does now then we created it in the enewuser
+ # command. Now we have to change it's permissions to something sane.
+ if [[ ${exists} == "false" && -d "${ROOT}home/ftp" ]] ; then
+ chown root:ftp "${ROOT}"home/ftp
+ fi
+}
+
+src_install() {
+ # The ftpusers file is a list of people who are NOT allowed
+ # to use the ftp service.
+ insinto /etc
+ doins "${FILESDIR}/ftpusers" || die
+
+ # Ideally we would create the home directory here with a dodir.
+ # But we cannot until bug #9849 is solved - so we kludge in pkg_postinst()
+
+ cp "${FILESDIR}/ftp-pamd-include" "${T}" || die
+ if use elibc_FreeBSD; then
+ sed -i -e "/pam_listfile.so/s/^.*$/account required pam_ftpusers.so no_warn disallow/" \
+ "${T}"/ftp-pamd-include || die
+ fi
+ newpamd "${T}"/ftp-pamd-include ftp
+}
diff --git a/net-ftp/ftpbase/metadata.xml b/net-ftp/ftpbase/metadata.xml
new file mode 100644
index 000000000000..f417ba208b00
--- /dev/null
+++ b/net-ftp/ftpbase/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ FTP base package
+ </longdescription>
+</pkgmetadata>
diff --git a/net-ftp/gftp/Manifest b/net-ftp/gftp/Manifest
new file mode 100644
index 000000000000..5154d3e1a14b
--- /dev/null
+++ b/net-ftp/gftp/Manifest
@@ -0,0 +1 @@
+DIST gftp-2.0.19.tar.bz2 1687167 SHA256 5306a46be96d6f4d23906cb1836fb3d732039621a6c7fcfa921acc21ac110bfd SHA512 59968786d66aaf6fb520f73d52ed0f8b57751a5ed222a5c65a7257628cd9addfd0ff3213206311bfd24441d7e6cc6d245d74d6687a1ad9739361da61ca078172 WHIRLPOOL 511572735b97d504e660cc6db2acc9898cb75bf4ef00304b9c225a2340aa4378ad1aa341a83db1c5c0ad637c4645655616effca901fc6990632c2c8a401df1b2
diff --git a/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch b/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch
new file mode 100644
index 000000000000..f3e029dea0ca
--- /dev/null
+++ b/net-ftp/gftp/files/gftp-2.0.19-gftp-expand-path-sigsegv.patch
@@ -0,0 +1,21 @@
+Fix segmentation fault, when gftpui_run_chdir is called with directory=0x0,
+and then calls gftp_expand_path (src=0x0),
+the NULL string was cloned using g_strdup, which returns NULL if
+its only argument is NULL, then this returned string was unreferenced.
+
+ lib/misc.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/lib/misc.c b/lib/misc.c
+index 16c019b..2791466 100644
+--- a/lib/misc.c
++++ b/lib/misc.c
+@@ -143,6 +143,8 @@ gftp_expand_path (gftp_request * request, const char *src)
+ tempchar;
+ struct passwd *pw;
+
++ g_return_val_if_fail(src != NULL, NULL);
++
+ pw = NULL;
+ str = g_strdup (src);
+
diff --git a/net-ftp/gftp/gftp-2.0.19-r2.ebuild b/net-ftp/gftp/gftp-2.0.19-r2.ebuild
new file mode 100644
index 000000000000..6107322b23c8
--- /dev/null
+++ b/net-ftp/gftp/gftp-2.0.19-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Gnome based FTP Client"
+SRC_URI="http://www.gftp.org/${P}.tar.bz2"
+HOMEPAGE="http://www.gftp.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="gtk ssl"
+
+RDEPEND="dev-libs/glib:2
+ sys-devel/gettext
+ sys-libs/ncurses
+ sys-libs/readline:0
+ gtk? ( x11-libs/gtk+:2 )
+ ssl? ( dev-libs/openssl:0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Fix SIGSEGV for gftp_expand_path function
+ epatch "${FILESDIR}/${P}-${PN}-expand-path-sigsegv.patch"
+}
+
+src_configure() {
+ econf $(use_enable gtk gtkport) $(use_enable ssl)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog* README* THANKS TODO docs/USERS-GUIDE
+}
diff --git a/net-ftp/gftp/metadata.xml b/net-ftp/gftp/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/net-ftp/gftp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/net-ftp/gproftpd/Manifest b/net-ftp/gproftpd/Manifest
new file mode 100644
index 000000000000..0cb943513189
--- /dev/null
+++ b/net-ftp/gproftpd/Manifest
@@ -0,0 +1 @@
+DIST gproftpd-8.3.2.tar.gz 605797 SHA256 6afd290ea8b68c3258f5c355144a8c6adbeb9c2c88ff85a2563916c2f1e3b468 SHA512 71a3b80b2bf18ec17719b1484d45fb6110764d28492edafcd97538ad99ad7cc182ed25723b721226329b61f29e511b48e0153cf01f90c3c7f5ce939f7b233f59 WHIRLPOOL d6929a981b5a44815daae0e4d2d4cce7e5a54e998b663f65cbcc237f215c0cf2882169d4805acdefcc0877c43dba88b4dbb0cc4d746fe8267b68cab0de200814
diff --git a/net-ftp/gproftpd/gproftpd-8.3.2-r1.ebuild b/net-ftp/gproftpd/gproftpd-8.3.2-r1.ebuild
new file mode 100644
index 000000000000..aeeb27429c87
--- /dev/null
+++ b/net-ftp/gproftpd/gproftpd-8.3.2-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="GTK frontend to proftpd"
+HOMEPAGE="http://mange.dynup.net/linux.html"
+SRC_URI="http://mange.dynup.net/linux/gproftpd/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc sparc x86"
+SLOT="0"
+
+IUSE="gnome ssl"
+
+# Requiring ProFTPD 1.2.9 due to security fixes
+RDEPEND="x11-libs/gtk+:2
+ dev-libs/glib:2
+ >=x11-libs/pango-1.0
+ >=dev-libs/atk-1.0
+ >=media-libs/freetype-2.0
+ ssl? ( >=dev-libs/openssl-0.9.6f )
+ >=net-ftp/proftpd-1.2.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ local modules includes myconf
+
+ #location of proftpd.conf
+ myconf="/etc/proftpd"
+
+ if use ssl; then
+ # enable mod_tls
+ modules="${modules}:mod_tls"
+ includes="${include}:/usr/kerberos/include"
+ fi
+
+ econf --sysconfdir=${myconf} \
+ --localstatedir=/var \
+ --with-modules=${modules} \
+ --with-includes=${includes}
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+# Add the Gnome menu entry
+ if use gnome; then
+ insinto /usr/share/gnome/apps/Internet/
+ doins "${S}"/desktop/net-gproftpd.desktop
+ fi
+
+ dodoc AUTHORS ChangeLog README
+
+ rm -r "${D}/usr/share/doc/gproftpd" || die
+}
+
+pkg_postinst() {
+ elog "gproftpd looks for your proftpd.conf file in /etc/proftpd"
+ elog "run gproftpd with the option -c to specify an alternate location"
+ elog "ex: gproftpd -c /etc/proftpd.conf"
+ elog "Do NOT edit /etc/conf.d/proftpd with this program"
+}
diff --git a/net-ftp/gproftpd/metadata.xml b/net-ftp/gproftpd/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-ftp/gproftpd/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-ftp/lftp/Manifest b/net-ftp/lftp/Manifest
new file mode 100644
index 000000000000..30d894867569
--- /dev/null
+++ b/net-ftp/lftp/Manifest
@@ -0,0 +1 @@
+DIST lftp-4.6.3a.tar.xz 1505164 SHA256 8c3a12a1f9ec288132b245bdd7d14d88ade1aa5cb1c14bb68c8fab3b68793840 SHA512 1ecc1e71f73b9713c14cadf1792d56afa41b59e86219743076cf59310db2063335dbc69f58de00c34a1527c3be595959867f964bc7dba2f4989b3625899eac21 WHIRLPOOL a9678e9787317d74349aae1a7bd2db94f11437c522c72f8aac85c7ffb8f8f4efdb00f7d8aeaf27c47e33730e7e11614a1c95b02ca3a3d87b5560b70e74eb0939
diff --git a/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch b/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch
new file mode 100644
index 000000000000..6180d923a8ff
--- /dev/null
+++ b/net-ftp/lftp/files/lftp-4.0.2.91-lafile.patch
@@ -0,0 +1,21 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -18,7 +18,8 @@
+ example_module1_la_SOURCES = example-module1.cc
+ example_module1_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
+
+-TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la
++TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la liblftp-tasks.la liblftp-jobs.la
++
+ JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la
+ if WITH_MODULES
+ pkgverlib_LTLIBRARIES = $(TASK_MODULES) $(JOB_MODULES)
+@@ -26,8 +27,6 @@
+ TASK_MODULES_STATIC = $(TASK_MODULES)
+ JOB_MODULES_STATIC = $(JOB_MODULES)
+ endif
+-lib_LTLIBRARIES = liblftp-tasks.la liblftp-jobs.la
+-
+ proto_ftp_la_SOURCES = ftpclass.cc ftpclass.h FtpListInfo.cc FtpListInfo.h\
+ FtpDirList.cc FtpDirList.h ftp-opie.c FileCopyFtp.cc FileCopyFtp.h
+ proto_http_la_SOURCES = Http.cc Http.h HttpDir.cc HttpDir.h HttpDirXML.cc
diff --git a/net-ftp/lftp/files/lftp-4.5.3-autopoint.patch b/net-ftp/lftp/files/lftp-4.5.3-autopoint.patch
new file mode 100644
index 000000000000..7a68843cef06
--- /dev/null
+++ b/net-ftp/lftp/files/lftp-4.5.3-autopoint.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -137,6 +137,7 @@
+ AM_ICONV
+
+ ALL_LINGUAS="de es fr it ja ko pl pt_BR ru uk zh_CN zh_TW zh_HK cs"
++AM_GNU_GETTEXT_VERSION([0.18.1])
+ AM_GNU_GETTEXT([external])
+ test "$MSGFMT" = "no" && MSGFMT ="$missing_dir/missing msgfmt"
+ test "$GMSGFMT" = "no" && GMSGFMT ="$missing_dir/missing msgfmt"
diff --git a/net-ftp/lftp/files/lftp-4.5.5-am_config_header.patch b/net-ftp/lftp/files/lftp-4.5.5-am_config_header.patch
new file mode 100644
index 000000000000..28a9e80504a5
--- /dev/null
+++ b/net-ftp/lftp/files/lftp-4.5.5-am_config_header.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -5,7 +5,7 @@
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_LIBOBJ_DIR([lib])
+ AC_CONFIG_SRCDIR([src/ftpclass.cc])
+-AM_CONFIG_HEADER([lib/config.h])
++AC_CONFIG_HEADERS([lib/config.h])
+ AM_INIT_AUTOMAKE
+
+ dnl This doesn't *require* GNU extensions; it merely enables them if
diff --git a/net-ftp/lftp/files/lftp-4.6.3a-autopoint.patch b/net-ftp/lftp/files/lftp-4.6.3a-autopoint.patch
new file mode 100644
index 000000000000..ad1cf3ede1e2
--- /dev/null
+++ b/net-ftp/lftp/files/lftp-4.6.3a-autopoint.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -137,6 +137,7 @@
+ AM_ICONV
+
+ ALL_LINGUAS="de es fr it ja ko pl pt_BR ru uk zh_CN zh_TW zh_HK cs"
++AM_GNU_GETTEXT_VERSION([0.19])
+ AM_GNU_GETTEXT([external])
+ test "$MSGFMT" = "no" && MSGFMT ="$missing_dir/missing msgfmt"
+ test "$GMSGFMT" = "no" && GMSGFMT ="$missing_dir/missing msgfmt"
diff --git a/net-ftp/lftp/lftp-4.6.3a.ebuild b/net-ftp/lftp/lftp-4.6.3a.ebuild
new file mode 100644
index 000000000000..02e122a8c7df
--- /dev/null
+++ b/net-ftp/lftp/lftp-4.6.3a.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils libtool
+
+DESCRIPTION="A sophisticated ftp/sftp/http/https/torrent client and file transfer program"
+HOMEPAGE="http://lftp.yar.ru/"
+SRC_URI="${HOMEPAGE}ftp/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+IUSE="convert-mozilla-cookies +gnutls idn nls openssl socks5 +ssl verify-file"
+LFTP_LINGUAS=( cs de es fr it ja ko pl pt_BR ru uk zh_CN zh_HK zh_TW )
+IUSE+=" ${LFTP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ ssl? ( ^^ ( openssl gnutls ) )
+"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.1
+ >=sys-libs/readline-5.1
+ dev-libs/expat
+ sys-libs/zlib
+ convert-mozilla-cookies? ( dev-perl/DBI )
+ idn? ( net-dns/libidn )
+ socks5? (
+ >=net-proxy/dante-1.1.12
+ virtual/pam
+ )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.2.3 )
+ openssl? ( >=dev-libs/openssl-0.9.6 )
+ )
+ verify-file? (
+ dev-perl/string-crc32
+ virtual/perl-Digest-MD5
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ =sys-devel/libtool-2*
+ app-arch/xz-utils
+ nls? ( >=sys-devel/gettext-0.19 )
+ virtual/pkgconfig
+"
+
+DOCS=(
+ BUGS ChangeLog FAQ FEATURES MIRRORS NEWS README README.debug-levels
+ README.dnssec README.modules THANKS TODO
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.0.2.91-lafile.patch \
+ "${FILESDIR}"/${PN}-4.5.5-am_config_header.patch \
+ "${FILESDIR}"/${PN}-4.6.3a-autopoint.patch
+
+ eautoreconf
+ elibtoolize # for Darwin bundles
+
+ # bug #536036
+ printf 'set fish:auto-confirm no\nset sftp:auto-confirm no\n' >> ${PN}.conf || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_with gnutls) \
+ $(use_with idn libidn) \
+ $(use_with openssl openssl "${EPREFIX}"/usr) \
+ $(use_with socks5 socksdante "${EPREFIX}"/usr) \
+ --enable-packager-mode \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --with-modules \
+ --without-included-regex
+}
+
+src_install() {
+ default
+ local script
+ for script in {convert-mozilla-cookies,verify-file}; do
+ use ${script} || { rm "${ED}"/usr/share/${PN}/${script} || die ;}
+ done
+}
diff --git a/net-ftp/lftp/lftp-9999.ebuild b/net-ftp/lftp/lftp-9999.ebuild
new file mode 100644
index 000000000000..f21a9be4b97c
--- /dev/null
+++ b/net-ftp/lftp/lftp-9999.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils git-r3 libtool
+
+DESCRIPTION="A sophisticated ftp/sftp/http/https/torrent client and file transfer program"
+HOMEPAGE="http://lftp.yar.ru/"
+EGIT_REPO_URI="https://github.com/lavv17/lftp"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+
+IUSE="convert-mozilla-cookies +gnutls idn nls openssl socks5 +ssl verify-file"
+LFTP_LINGUAS=( cs de es fr it ja ko pl pt_BR ru uk zh_CN zh_HK zh_TW )
+IUSE+=" ${LFTP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ ssl? ( ^^ ( openssl gnutls ) )
+"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.1
+ >=sys-libs/readline-5.1
+ dev-libs/expat
+ sys-libs/zlib
+ convert-mozilla-cookies? ( dev-perl/DBI )
+ idn? ( net-dns/libidn )
+ socks5? (
+ >=net-proxy/dante-1.1.12
+ virtual/pam
+ )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.2.3 )
+ openssl? ( >=dev-libs/openssl-0.9.6 )
+ )
+ verify-file? (
+ dev-perl/string-crc32
+ virtual/perl-Digest-MD5
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-libs/gnulib
+ =sys-devel/libtool-2*
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+"
+
+DOCS=(
+ BUGS ChangeLog FAQ FEATURES MIRRORS NEWS README README.debug-levels
+ README.dnssec README.modules THANKS TODO
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.5.3-autopoint.patch \
+ "${FILESDIR}"/${PN}-4.5.5-am_config_header.patch
+
+ gnulib-tool --update || die
+
+ eautoreconf
+ elibtoolize # for Darwin bundles
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_with gnutls) \
+ $(use_with idn libidn) \
+ $(use_with openssl openssl "${EPREFIX}"/usr) \
+ $(use_with socks5 socksdante "${EPREFIX}"/usr) \
+ --enable-packager-mode \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --with-modules \
+ --without-included-regex
+}
+
+src_install() {
+ default
+ local script
+ for script in {convert-mozilla-cookies,verify-file}; do
+ use ${script} || { rm "${ED}"/usr/share/${PN}/${script} || die ;}
+ done
+}
diff --git a/net-ftp/lftp/metadata.xml b/net-ftp/lftp/metadata.xml
new file mode 100644
index 000000000000..ea034faaa954
--- /dev/null
+++ b/net-ftp/lftp/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>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+</maintainer>
+<use>
+<flag name='convert-mozilla-cookies'>Install the convert-mozilla-cookies script and its run-time dependencies</flag>
+<flag name='openssl'>Use <pkg>dev-libs/openssl</pkg> for SSL connections</flag>
+<flag name='verify-file'>Install the verify-file script and its run-time dependencies</flag>
+</use>
+</pkgmetadata>
diff --git a/net-ftp/linksys-tftp/Manifest b/net-ftp/linksys-tftp/Manifest
new file mode 100644
index 000000000000..ea127ed13354
--- /dev/null
+++ b/net-ftp/linksys-tftp/Manifest
@@ -0,0 +1 @@
+DIST linksys-tftp-1.2.1.tar.bz2 11124 SHA256 872e9e58d0673d14ca00edfc1d2680a77c9737ba5a4654540182e5e5ffc7f16f SHA512 7d99cd7cc2144396fe008ed0fbc21053ef4e614021d6d2e24adca799d8eabd1b3c177b4bee20e14034170bc234d36e9eeaaf8e825513ef6f37e73643b91667fc WHIRLPOOL 52823f9dde9b4069b4ff6e0c742fcad8651e3206b4145e909a950dc5e24dbebbb393827e84a317b5a445e26f24f0245df11fee35cfc623964da7f23029cb4bf3
diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch
new file mode 100644
index 000000000000..b374e808ece2
--- /dev/null
+++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-Makefile.patch
@@ -0,0 +1,28 @@
+Fix LDFLAGS (bug http://bugs.gentoo.org/336956 ) and
+CFLAGS (bug http://bugs.gentoo.org/240894 ) by
+Michael Weber <xmw@gentoo.org>
+
+--- linksys-tftp-1.2.1/Makefile
++++ linksys-tftp-1.2.1/Makefile
+@@ -19,18 +19,18 @@
+ # We override /usr/include/arpa/tftp.h with our own because
+ # we want tu_block to be unsigned short, not short as on most platforms
+ #
+-CFLAGS= -I. -O2 -Dsin=sin_x
++CFLAGS += -I. -Dsin=sin_x
+ #DEBUG
+ # CFLAGS= -I. -Wall -ggdb -Dsin=sin_x
+ SRCS= main.c tftp.c tftpsubs.c
+ OBJS= main.o tftp.o tftpsubs.o
+ DOBJS= tftpsubs.o
+-CC= gcc
++CC?= gcc
+
+ all: linksys-tftp
+
+ linksys-tftp: ${OBJS}
+- ${CC} -o $@ ${CFLAGS} ${OBJS}
++ ${CC} -o $@ ${CFLAGS} ${OBJS} ${LDFLAGS}
+
+ clean:
+ rm -f ${OBJS} ${DOBJS} *core linksys-tftp
diff --git a/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
new file mode 100644
index 000000000000..386cf7b1e210
--- /dev/null
+++ b/net-ftp/linksys-tftp/files/linksys-tftp-1.2.1-r1-header.patch
@@ -0,0 +1,20 @@
+--- linksys-tftp-1.2.1/main.c
++++ linksys-tftp-1.2.1/main.c
+@@ -40,6 +40,8 @@
+ #include <setjmp.h>
+ #include <ctype.h>
+ #include <netdb.h>
++#include <stdlib.h>
++#include <strings.h>
+
+ #define TIMEOUT 5 /* secs between rexmt's */
+
+@@ -110,7 +112,7 @@
+ char *index();
+ char *rindex();
+
+-main(argc, argv)
++int main(argc, argv)
+ char *argv[];
+ {
+ struct sockaddr_in sin;
diff --git a/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
new file mode 100644
index 000000000000..7f305c1ae07d
--- /dev/null
+++ b/net-ftp/linksys-tftp/linksys-tftp-1.2.1-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TFTP client suitable for uploading to the Linksys WRT54G Wireless Router"
+HOMEPAGE="http://redsand.net/projects/linksys-tftp/linksys-tftp.php"
+SRC_URI="http://redsand.net/projects/${PN}/pub/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-r1-Makefile.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin linksys-tftp
+ dodoc README
+}
diff --git a/net-ftp/linksys-tftp/metadata.xml b/net-ftp/linksys-tftp/metadata.xml
new file mode 100644
index 000000000000..4ef473d6087e
--- /dev/null
+++ b/net-ftp/linksys-tftp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <longdescription>An extended version of BSD tftp with passwords</longdescription>
+</pkgmetadata>
diff --git a/net-ftp/metadata.xml b/net-ftp/metadata.xml
new file mode 100644
index 000000000000..48d42818c2c6
--- /dev/null
+++ b/net-ftp/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-ftp contains FTP (File Transfer Protocol) software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-ftp enthält Software für das File Transfer Protocol (FTP).
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-ftp contiene programas relacionados con FTP, el
+ protocolo de transferencia de ficheros.
+ </longdescription>
+ <longdescription lang="ja">
+ net-ftpカテゴリーにはファイル・トランスファー・プロトコルの
+ ソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-ftp categorie bevat software voor gebruik van FTP (File Transfer Protocol).
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-ftp contem programas relacionados com FTP (File Transfer
+ Protocol).
+ </longdescription>
+ <longdescription lang="sk">
+ Kategória net-ftp obsahuje aplikácie vzťahujúce sa k FTP (File Transfer Protocol).
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-ftp chứa các phần mềm FTP (File Transfer Protocol).
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-ftp contiene programmi per l'FTP (File Transfer Protocol).
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-ftp zawiera pakiety związane z FTP (File Transfer Protocol).
+ </longdescription>
+</catmetadata>
+
diff --git a/net-ftp/ncftp/Manifest b/net-ftp/ncftp/Manifest
new file mode 100644
index 000000000000..3d274886da80
--- /dev/null
+++ b/net-ftp/ncftp/Manifest
@@ -0,0 +1,2 @@
+DIST ncftp-3.2.5.474.tar.bz2 454682 SHA256 b4ebe2415761a5137cd1d313c8fc1352f26d8963cc9e9e354e29720aa2089d42 SHA512 ebd7f618e5a9ac5e59f3e3dbf9b15765e80404416865212c0b2ee7339aafe2296867faf02fad2084e5a6377796e787d5cfc6599ec3f0e544c6b137734cfdc405 WHIRLPOOL 4b9c0a6bc5b90149d3a1b9ea24dea030faefa4dfe9e361c7694a2e1f133182bf85e46041de209a9a34d7be81b70870298c718a19dd41458dbc9c90283478cfd8
+DIST ncftp-325-v6.diff.gz 23295 SHA256 7fb95240c33aeca67e53be58f6016a7e1dcd753b125940f539dab7595e0d02ba SHA512 6e2e740fba2c2b5268ab5928db979ac813bd29dd76633603d69d747fdf765858e1de893a6067518b0b1f01d0b90d8d6426998f5d9b37bbbebe144951878e2b0a WHIRLPOOL 2f7868bdc0e74707a0b0e2e8a2a1b7d0634fd86ff440e5046a48d5b01c1efb86621a5844d56b0e8793d243fa1a998b6136d147a1a9aeeb95c00e1d312415ebb6
diff --git a/net-ftp/ncftp/metadata.xml b/net-ftp/ncftp/metadata.xml
new file mode 100644
index 000000000000..79b9e28250ae
--- /dev/null
+++ b/net-ftp/ncftp/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+</maintainer>
+<longdescription>
+NcFTP Client (also known as just NcFTP) is a set of FREE application
+programs implementing the File Transfer Protocol (FTP).
+
+The program has been in service on UNIX systems since 1991 and is a
+popular alternative to the FTP program, /usr/bin/ftp. NcFTP offers many
+ease-of-use and performance enhancements over the stock ftp client, and
+runs on a wide variety of UNIX platforms as well as operating systems
+such as Microsoft Windows and Apple Mac OS X.
+</longdescription>
+</pkgmetadata>
diff --git a/net-ftp/ncftp/ncftp-3.2.5-r3.ebuild b/net-ftp/ncftp/ncftp-3.2.5-r3.ebuild
new file mode 100644
index 000000000000..c9edb0600905
--- /dev/null
+++ b/net-ftp/ncftp/ncftp-3.2.5-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="An extremely configurable ftp client"
+HOMEPAGE="http://www.ncftp.com/"
+SRC_URI="
+ ftp://ftp.${PN}.com/${PN}/${P}-src.tar.bz2 -> ${P}.474.tar.bz2
+ mirror://openbsd/distfiles/${P//.}-v6.diff.gz
+"
+
+LICENSE="Clarified-Artistic"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris"
+IUSE="ipv6 pch"
+
+DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/.474}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${P//.}-v6.diff
+ tc-export CC
+ sed -i \
+ -e "s:CC=gcc:CC ?= ${CC}:" \
+ -e 's:@SFLAG@::' \
+ -e 's:@STRIP@:true:' \
+ Makefile.in */Makefile.in || die
+ AT_M4DIR=autoconf_local/ eautoreconf
+}
+
+src_configure() {
+ LC_ALL="C" \
+ LIBS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable pch precomp) \
+ --disable-ccdv \
+ --disable-universal
+}
+
+src_install() {
+ default
+ dodoc README.txt doc/*.txt
+ dohtml doc/html/*.html
+}
diff --git a/net-ftp/netkit-ftpd/Manifest b/net-ftp/netkit-ftpd/Manifest
new file mode 100644
index 000000000000..afd1ff7cc929
--- /dev/null
+++ b/net-ftp/netkit-ftpd/Manifest
@@ -0,0 +1,2 @@
+DIST linux-ftpd-0.17-ssl.patch 36459 SHA256 0082ee6a71fdd83f61e63166f7bbba97c204cdc67f9e1bf10f2df31590fba780 SHA512 f27dd2f9a50a2b3c38131c46cdb4420f81abfdbb7cd7e70d00e864da3e4562363d585a308e57b9abce7db64ede8d02e41710101e618f6c14489193776b2b1e71 WHIRLPOOL 1c2fb70da4bd8b8e5189dc3eb4c9606b056d905e89f397938358247fcd35dea26e1728ddd752748e1cd4364c0f140cf94f6c8932e5c3ee930b8ca22379982206
+DIST linux-ftpd-0.17.tar.gz 46763 SHA256 65a0b249e38bf3c3a16dbd4d3edd2657683ca8f47b307e92007f378b21d2fa65 SHA512 160191baa904b4c404473e2c1de23813de1b31cbb11a3c28ff64f9953aec8270b74d865a57d5aaa6d25cf404c8aeadff05348a9b32847a2a137ef4c998557d58 WHIRLPOOL 5f0783a2ddc11519132db10ed837241eec8ef9cddff00891728ead29a4170858d96518bb05b8bf0dfa9204b1ed5033ffbc3d0106b9ccd1dca201e4d5a2819f46
diff --git a/net-ftp/netkit-ftpd/files/ftp.xinetd b/net-ftp/netkit-ftpd/files/ftp.xinetd
new file mode 100644
index 000000000000..b69694d1dcf6
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/ftp.xinetd
@@ -0,0 +1,13 @@
+# default: off
+# $Id$
+# description: The netkit ftp daemon with optional SSL support.
+
+service ftp
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = /usr/bin/ftpd
+ disable = yes
+}
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-CVE-2008-4247.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-CVE-2008-4247.patch
new file mode 100644
index 000000000000..e1b50c825bfc
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-CVE-2008-4247.patch
@@ -0,0 +1,108 @@
+http://bugs.gentoo.org/239047
+
+--- linux-ftpd-0.17/ftpd/extern.h
++++ linux-ftpd-0.17/ftpd/extern.h
+@@ -43,7 +43,7 @@ void dologout __P((int));
+ void fatal __P((const char *));
+ int ftpd_pclose __P((FILE *));
+ FILE *ftpd_popen __P((char *, const char *));
+-char *ftpd_getline __P((char *, int, FILE *));
++int ftpd_getline __P((char *, int, FILE *));
+ void ftpdlogwtmp __P((const char *, const char *, const char *));
+ void lreply __P((int, const char *, ...));
+ void makedir __P((char *));
+--- linux-ftpd-0.17/ftpd/ftpcmd.y
++++ linux-ftpd-0.17/ftpd/ftpcmd.y
+@@ -980,7 +980,7 @@ static struct tab *lookup(struct tab *p,
+ /*
+ * getline - a hacked up version of fgets to ignore TELNET escape codes.
+ */
+-char * ftpd_getline(char *s, int n, FILE *iop)
++int ftpd_getline(char *s, int n, FILE *iop)
+ {
+ int c;
+ register char *cs;
+@@ -995,7 +995,7 @@ char * ftpd_getline(char *s, int n, FILE
+ if (debug)
+ syslog(LOG_DEBUG, "command: %s", s);
+ tmpline[0] = '\0';
+- return(s);
++ return(0);
+ }
+ if (c == 0)
+ tmpline[0] = '\0';
+@@ -1037,11 +1037,22 @@ char * ftpd_getline(char *s, int n, FILE
+ }
+ }
+ *cs++ = c;
+- if (--n <= 0 || c == '\n')
++ if (--n <= 0) {
++ /*
++ * If command doesn't fit into buffer, discard the
++ * rest of the command and indicate truncation.
++ * This prevents the command to be split up into
++ * multiple commands.
++ */
++ while (c != '\n' && (c = getc(iop)) != EOF)
++ ;
++ return (-2);
++ }
++ if (c == '\n')
+ break;
+ }
+ if (c == EOF && cs == s)
+- return (NULL);
++ return (-1);
+ *cs++ = '\0';
+ if (debug) {
+ if (!guest && strncasecmp("pass ", s, 5) == 0) {
+@@ -1061,7 +1072,7 @@ char * ftpd_getline(char *s, int n, FILE
+ syslog(LOG_DEBUG, "command: %.*s", len, s);
+ }
+ }
+- return (s);
++ return (0);
+ }
+
+ void toolong(int signo)
+@@ -1090,9 +1101,14 @@ static int yylex(void)
+ case CMD:
+ (void) signal(SIGALRM, toolong);
+ (void) alarm((unsigned) timeout);
+- if (ftpd_getline(cbuf, sizeof(cbuf)-1, stdin)==NULL) {
++ n = ftpd_getline(cbuf, sizeof(cbuf)-1, stdin);
++ if (n == -1) {
+ reply(221, "You could at least say goodbye.");
+ dologout(0);
++ } else if (n == -2) {
++ reply(500, "Command too long.");
++ alarm(0);
++ continue;
+ }
+ (void) alarm(0);
+ if ((cp = strchr(cbuf, '\r'))) {
+--- linux-ftpd-0.17/ftpd/ftpd.c
++++ linux-ftpd-0.17/ftpd/ftpd.c
+@@ -2210,6 +2210,7 @@ void dologout(int status)
+ static void myoob(int signo)
+ {
+ char *cp;
++ int ret;
+ int save_errno = errno;
+
+ (void)signo;
+@@ -2218,9 +2219,13 @@ static void myoob(int signo)
+ if (!transflag)
+ return;
+ cp = tmpline;
+- if (ftpd_getline(cp, 7, stdin) == NULL) {
++ ret = ftpd_getline(cp, 7, stdin);
++ if (ret == -1) {
+ reply(221, "You could at least say goodbye.");
+ dologout(0);
++ } else if (ret == -2) {
++ /* Ignore truncated command */
++ return;
+ }
+ upper(cp);
+ if (strcmp(cp, "ABOR\r\n") == 0) {
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-build.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-build.patch
new file mode 100644
index 000000000000..6df58378c93f
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-build.patch
@@ -0,0 +1,43 @@
+--- configure
++++ configure
+@@ -114,40 +114,6 @@
+ echo 'no'
+ fi
+
+-if [ x$DEBUG = x ]; then
+- echo -n "Checking if $CC accepts -O2... "
+- if (
+- $CC -O2 __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -O2"
+- else
+- echo 'no'
+- echo -n "Checking if $CC accepts -O... "
+- if (
+- $CC -O __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -O"
+- else
+- echo 'no'
+- fi
+- fi
+-
+-else
+- echo -n "Checking if $CC accepts -g... "
+- if (
+- $CC -g __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -g"
+- else
+- echo 'no'
+- fi
+-
+-fi
+-
+-LDFLAGS=
+ LIBS=
+
+ rm -f __conftest*
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup-ssl.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup-ssl.patch
new file mode 100644
index 000000000000..e228eaceda5f
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup-ssl.patch
@@ -0,0 +1,10 @@
+--- ftpd/ftpcmd.y
++++ ftpd/ftpcmd.y
+@@ -109,6 +109,7 @@
+ typedef struct ssl_st SSL;
+ int SSL_write(SSL *ssl,const char *buf,int num);
+ extern int do_ssl_start(void);
++int ssl_getc(SSL *ssl_con);
+ extern int ssl_secure_flag;
+ extern int ssl_active_flag;
+ extern SSL *ssl_con;
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup.patch
new file mode 100644
index 000000000000..73289adfba05
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cleanup.patch
@@ -0,0 +1,10 @@
+--- ftpd/logwtmp.c
++++ ftpd/logwtmp.c
+@@ -43,6 +43,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
++#include <time.h>
+
+ #include <fcntl.h>
+ #include <utmp.h>
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cross.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cross.patch
new file mode 100644
index 000000000000..cb6ad986a914
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-cross.patch
@@ -0,0 +1,45 @@
+--- configure.orig 2008-05-11 12:02:50.000000000 -0700
++++ configure 2008-05-11 12:04:14.000000000 -0700
+@@ -93,7 +93,7 @@
+ echo -n 'Checking if C compiler works... '
+ if (
+ $CC __conftest.c -o __conftest || exit 1
+- ./__conftest || exit 1
++ [ -e __conftest ] || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'yes'
+ else
+@@ -169,13 +169,13 @@
+ EOF
+ if (
+ $CC $CFLAGS __conftest.c -o __conftest || exit 1
+- ./__conftest || exit 1
++ [ -e __conftest ] || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'yes'
+ else
+ if (
+ $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c -o __conftest || exit 1
+- ./__conftest || exit 1
++ [ -e ./__conftest ] || exit 1
+ ) >/dev/null 2>&1; then
+ echo '-D__USE_BSD_SIGNAL'
+ CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
+@@ -311,7 +311,7 @@
+ else
+ if (
+ $CC $CFLAGS -D_GNU_SOURCE __conftest.c -o __conftest || exit 1
+- ./__conftest || exit 1
++ [ -e ./__conftest ] || exit 1
+ ) >/dev/null 2>&1; then
+ echo '-D_GNU_SOURCE'
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+@@ -342,7 +342,7 @@
+ EOF
+ if (
+ $CC $CFLAGS __conftest.c $LIBBSD -o __conftest || exit 1
+- ./__conftest || exit 1
++ [ -e ./__conftest ] || exit 1
+ ) >/dev/null 2>&1; then
+ echo 'ok'
+ else
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-fclose-CVE-2007-6263.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-fclose-CVE-2007-6263.patch
new file mode 100644
index 000000000000..5da61aee7343
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-fclose-CVE-2007-6263.patch
@@ -0,0 +1,24 @@
+diff -u linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
+--- linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
++++ linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
+@@ -1729,7 +1729,7 @@
+ static FILE * dataconn(const char *name, off_t size, const char *mode, int stou)
+ {
+ char sizebuf[32];
+- FILE *file;
++ FILE *file = NULL;
+ int retry = 0, tos;
+
+ file_size = size;
+@@ -1822,7 +1822,10 @@
+ ERR_error_string(ERR_get_error(),NULL));
+ perror_reply(425, errbuf);
+ /* abort time methinks ... */
+- fclose(file);
++ if(file != NULL){
++ fclose(file);
++ file = NULL;
++ }
+ return NULL;
+ } else {
+ if (ssl_debug_flag) {
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-gcc41.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-gcc41.patch
new file mode 100644
index 000000000000..5f516ce5d356
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-gcc41.patch
@@ -0,0 +1,32 @@
+--- linux-ftpd-0.17/ftpd/ftpcmd.y
++++ linux-ftpd-0.17/ftpd/ftpcmd.y
+@@ -125,7 +125,14 @@
+ char cbuf[512];
+ char *fromname;
+
+-struct tab;
++struct tab {
++ const char *name;
++ short token;
++ short state;
++ short implemented; /* 1 if command is implemented */
++ const char *help;
++};
++
+ static int yylex __P((void));
+ static void sizecmd __P((char *));
+ static void help __P((struct tab *, char *));
+@@ -891,13 +898,6 @@
+ #define SITECMD 7 /* SITE command */
+ #define NSTR 8 /* Number followed by a string */
+
+-struct tab {
+- const char *name;
+- short token;
+- short state;
+- short implemented; /* 1 if command is implemented */
+- const char *help;
+-};
+
+ struct tab cmdtab[] = { /* In order defined in RFC 765 */
+ { "AUTH", AUTH, STR1, 1, "<sp> auth_type" },
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-setguid.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-setguid.patch
new file mode 100644
index 000000000000..f5d0cf75fcfd
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-setguid.patch
@@ -0,0 +1,66 @@
+--- linux-ftpd-0.17/ftpd/popen.c
++++ linux-ftpd-0.17/ftpd/popen.c
+@@ -169,8 +169,13 @@
+ * XXX: this doesn't seem right... and shouldn't
+ * we initgroups, or at least setgroups(0,0)?
+ */
+- setgid(getegid());
+- setuid(i);
++
++/*
++ * PSz 25 Aug 06 Must check the return status of these setgid/setuid calls,
++ * see http://www.bress.net/blog/archives/34-setuid-madness.html
++ */
++ if ( setgid(getegid()) != 0 ) _exit(1);
++ if ( setuid(i) != 0 ) _exit(1);
+
+ #ifndef __linux__
+ /*
+--- linux-ftpd-0.17/ftpd/ftpd.c
++++ linux-ftpd-0.17/ftpd/ftpd.c
+@@ -1159,6 +1159,13 @@
+ }
+ strcpy(pw->pw_dir, "/");
+ setenv("HOME", "/", 1);
++ }
++ /* PSz 25 Aug 06 chdir for real users done after setting UID */
++ if (seteuid((uid_t)pw->pw_uid) < 0) {
++ reply(550, "Can't set uid.");
++ goto bad;
++ }
++ if (guest || dochroot) { /* do nothing, handled above */
+ } else if (chdir(pw->pw_dir) < 0) {
+ if (chdir("/") < 0) {
+ reply(530, "User %s: can't change directory to %s.",
+@@ -1167,10 +1174,7 @@
+ } else
+ lreply(230, "No directory! Logging in with home=/");
+ }
+- if (seteuid((uid_t)pw->pw_uid) < 0) {
+- reply(550, "Can't set uid.");
+- goto bad;
+- }
++
+ sigfillset(&allsigs);
+ sigprocmask(SIG_UNBLOCK,&allsigs,NULL);
+
+@@ -1408,7 +1412,8 @@
+ goto bad;
+ sleep(tries);
+ }
+- (void) seteuid((uid_t)pw->pw_uid);
++/* PSz 25 Aug 06 Check return status */
++ if (seteuid((uid_t)pw->pw_uid) != 0) _exit(1);
+ sigfillset(&allsigs);
+ sigprocmask (SIG_UNBLOCK, &allsigs, NULL);
+
+@@ -1440,7 +1445,8 @@
+ bad:
+ /* Return the real value of errno (close may change it) */
+ t = errno;
+- (void) seteuid((uid_t)pw->pw_uid);
++/* PSz 25 Aug 06 Check return status */
++ if (seteuid((uid_t)pw->pw_uid) != 0) _exit(1);
+ sigfillset (&allsigs);
+ sigprocmask (SIG_UNBLOCK, &allsigs, NULL);
+ (void) close(s);
diff --git a/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-shadowfix.patch b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-shadowfix.patch
new file mode 100644
index 000000000000..79a241ff9c51
--- /dev/null
+++ b/net-ftp/netkit-ftpd/files/netkit-ftpd-0.17-shadowfix.patch
@@ -0,0 +1,28 @@
+--- linux-ftpd-0.17/ftpd/Makefile
++++ linux-ftpd-0.17-patched/ftpd/Makefile
+@@ -19,7 +19,11 @@
+ all: ftpd
+
+ %.o: %.c
++ ifdef USE_SHADOW
++ $(CC) $(CFLAGS) -DUSE_SHADOW -DHASSETPROCTITLE $< -c
++ else
+ $(CC) $(CFLAGS) -DHASSETPROCTITLE $< -c
++ endif
+
+ ftpcmd.c: %.c: %.y
+ $(YACC) $<
+--- linux-ftpd-0.17/support/Makefile
++++ linux-ftpd-0.17-patched/support/Makefile
+@@ -5,7 +5,11 @@
+ all: libsupport.a
+
+ %.o: %.c
++ ifdef USE_SHADOW
++ $(CC) $(CFLAGS) -DUSE_SHADOW -DHASSETPROCTITLE $< -c
++ else
+ $(CC) $(CFLAGS) -DHASSETPROCTITLE $< -c
++ endif
+
+ libsupport.a: $(OBJS)
+ ar -cruv $@ $^
diff --git a/net-ftp/netkit-ftpd/metadata.xml b/net-ftp/netkit-ftpd/metadata.xml
new file mode 100644
index 000000000000..0384a4ab03a7
--- /dev/null
+++ b/net-ftp/netkit-ftpd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/net-ftp/netkit-ftpd/netkit-ftpd-0.17-r8.ebuild b/net-ftp/netkit-ftpd/netkit-ftpd-0.17-r8.ebuild
new file mode 100644
index 000000000000..2d1a8a477e7f
--- /dev/null
+++ b/net-ftp/netkit-ftpd/netkit-ftpd-0.17-r8.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils ssl-cert toolchain-funcs
+
+MY_P="linux-ftpd-${PV}"
+DESCRIPTION="The netkit FTP server with optional SSL support"
+HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-ssl.patch"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ~ppc64 s390 sh sparc x86"
+IUSE="ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}
+ virtual/inetd
+ !www-servers/publicfile"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ cd "${S}"
+ use ssl && epatch "${DISTDIR}"/${MY_P}-ssl.patch "${FILESDIR}"/${P}-cleanup-ssl.patch
+ epatch "${FILESDIR}"/${P}-cleanup.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-shadowfix.patch
+ epatch "${FILESDIR}"/${P}-gcc41.patch
+ epatch "${FILESDIR}"/${P}-setguid.patch
+ epatch "${FILESDIR}"/${P}-cross.patch
+ epatch "${FILESDIR}"/${P}-CVE-2008-4247.patch #239047
+ use ssl && epatch "${FILESDIR}"/${P}-fclose-CVE-2007-6263.patch #199206
+}
+
+src_compile() {
+ tc-export CC
+ ./configure --prefix=/usr || die "configure failed"
+ emake || die "parallel make failed"
+}
+
+src_install() {
+ dobin ftpd/ftpd || die
+ doman ftpd/ftpd.8
+ dodoc README ChangeLog
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/ftp.xinetd ftp
+}
+
+pkg_postinst() {
+ if use ssl ; then
+ install_cert /etc/ssl/certs/ftpd
+ elog "In order to start the server with SSL support"
+ elog "You need a certificate /etc/ssl/certs/ftpd.pem."
+ elog "A temporary certificiate has been created."
+ fi
+}
diff --git a/net-ftp/oftpd/Manifest b/net-ftp/oftpd/Manifest
new file mode 100644
index 000000000000..0ed09d24424a
--- /dev/null
+++ b/net-ftp/oftpd/Manifest
@@ -0,0 +1,2 @@
+DIST oftpd-0.3.6-ipv6rel2.patch.gz 12478 SHA256 b1165052e0169e1495b5009111f07ba56cb81ce34234b9578a9eb2862e76ac3d SHA512 76d12b82424a9a338f151534df55310511d3138a1e80851e6ebb8f4a841cd075892ab1a02851d871772a2229c107ec35de2d5fb3572c72207a65629e10e55dba WHIRLPOOL f513e485f429957f1559684f6f85c2cea9fc0ae912cf46ccc21c4f272f4809587db3da473e4ebf4c717b48c2a11267ca3bfd875e88231b854d5c80aee36fb2a1
+DIST oftpd-0.3.7.tar.gz 97364 SHA256 b135cd2bc6c54e03e5374845964eab73d5e567160c15bb4226c1c922b1e6d64e SHA512 36bfd15dbe84043aee9678acbcc2c1312091887b381bee36a6a57f2516a5ec742a1733bf570c7cc71aaa28bd053d686976e6bfd549443a8bb398f8176db1a6a8 WHIRLPOOL 1d16c6fa5904700e41e0a499dc72d300823814197114ecb67211abea686a7a7d4017accb3ca3ade4a44a16b778499820b4a3d9589f0495618c6bcd3c6c1cafc4
diff --git a/net-ftp/oftpd/files/conf.d.oftpd-r7 b/net-ftp/oftpd/files/conf.d.oftpd-r7
new file mode 100644
index 000000000000..a8daed0f4f53
--- /dev/null
+++ b/net-ftp/oftpd/files/conf.d.oftpd-r7
@@ -0,0 +1,26 @@
+# Please read the oftpd(8) man page for a more detailed explaination of these
+# variables.
+#
+# FTPUSER (user-name in the man page):
+# Set this variable to the user to run the ftp daemon as
+FTPUSER=ftp
+
+# FTPROOT (root-directory in the man page):
+# The server uses chroot(2) to change the root directory of the server to this
+# directory. When a user connects, this is the directory that they will start
+# in, and is the top of their directory tree.
+#
+FTPROOT=/home/ftp
+
+# FTPPORT (TCP port)
+# 21 is the standard ftp port, but you can change it here to something else
+FTPPORT=21
+
+## Uncoment this line to activate oftpd service
+# Note: in order for passive connections to work, you must specify an IP address
+# here with the -i flag. You can make it listen to all IPv4 addresses:
+# -i 0.0.0.0
+# or make it listen to all IPv6 addresses:
+# -i ::1
+# By default, oftpd listens to all IPv4/IPv6 addresses, but passive mode fails.
+#OFTPD_OPTS="-p ${FTPPORT} ${FTPUSER} ${FTPROOT}"
diff --git a/net-ftp/oftpd/files/init.d.oftpd-r7 b/net-ftp/oftpd/files/init.d.oftpd-r7
new file mode 100644
index 000000000000..42576bf76351
--- /dev/null
+++ b/net-ftp/oftpd/files/init.d.oftpd-r7
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${OFTPD_OPTS}" ] ; then
+ eerror "You need to setup OFTPD_OPTS /etc/conf.d/oftpd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting oftpd"
+ start-stop-daemon --start --exec /usr/sbin/oftpd -- ${OFTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping oftpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/oftpd
+ eend $?
+}
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-delay-root-check.patch b/net-ftp/oftpd/files/oftpd-0.3.7-delay-root-check.patch
new file mode 100644
index 000000000000..56ab51e4d6c3
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-delay-root-check.patch
@@ -0,0 +1,30 @@
+check for root after processing args so non-root can run --help
+
+--- a/src/oftpd.c
++++ b/src/oftpd.c
+@@ -56,12 +56,6 @@ int main(int argc, char *argv[])
+ exe_name = argv[0];
+ }
+
+- /* verify we're running as root */
+- if (geteuid() != 0) {
+- fprintf(stderr, "%s: program needs root permission to run\n", exe_name);
+- exit(1);
+- }
+-
+ /* default command-line arguments */
+ port = FTP_PORT;
+ user_ptr = NULL;
+@@ -187,6 +181,12 @@ int main(int argc, char *argv[])
+ exit(1);
+ }
+
++ /* verify we're running as root */
++ if (geteuid() != 0) {
++ fprintf(stderr, "%s: program needs root permission to run\n", exe_name);
++ exit(1);
++ }
++
+ /* become a daemon */
+ if (detach) {
+ daemonize();
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch b/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch
new file mode 100644
index 000000000000..ab62220b553e
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch
@@ -0,0 +1,20 @@
+fix writing of the error message to stderr by processing the varargs
+
+--- a/src/error.c
++++ b/src/error.c
+@@ -23,7 +23,6 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...)
+ {
+ va_list args;
+
+- fprintf(stderr, "error_init: %d %s", error_code, desc_fmt);
+ daemon_assert(err != NULL);
+ daemon_assert(error_code >= 0);
+ daemon_assert(desc_fmt != NULL);
+@@ -32,6 +31,7 @@ void error_init(error_t *err, int error_code, const char *desc_fmt, ...)
+ va_start(args, desc_fmt);
+ vsnprintf(err->desc, sizeof(err->desc), desc_fmt, args);
+ va_end(args);
++ fprintf(stderr, "error_init: %d %s\n", error_code, err->desc);
+
+ daemon_assert(invariant(err));
+ }
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch b/net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch
new file mode 100644
index 000000000000..490612d8752e
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch
@@ -0,0 +1,23 @@
+Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
+Date: 2010-01-05
+Initial Package Version: 0.3.7
+Origin: http://gentoo.mirror.solnet.ch/net-ftp/oftpd/files/oftpd-0.3.7-family.patch
+Upstream Status: unkonwn
+Description: dont crash on wrong protocol family
+
+diff -Naur oftpd-0.3.7.orig/src/ftp_session.c oftpd-0.3.7/src/ftp_session.c
+--- oftpd-0.3.7.orig/src/ftp_session.c 2010-01-05 21:56:48.540303543 +0000
++++ oftpd-0.3.7/src/ftp_session.c 2010-01-05 21:57:29.995553119 +0000
+@@ -708,10 +708,12 @@
+ if ((((struct sockaddr *)host_port)->sa_family != AF_INET) &&
+ (((struct sockaddr *)host_port)->sa_family != AF_INET6)) {
+ reply(f, 521, "Only IPv4 and IPv6 supported, address families (4,6)");
++ return;
+ }
+ #else
+ if (((struct sockaddr *)host_port)->sa_family != AF_INET) {
+ reply(f, 521, "Only IPv4 supported, address family (4)");
++ return;
+ }
+ #endif
+
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-htons.patch b/net-ftp/oftpd/files/oftpd-0.3.7-htons.patch
new file mode 100644
index 000000000000..584e0a72497c
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-htons.patch
@@ -0,0 +1,16 @@
+--- oftpd-0.3.7/src/ftp_listener.c
++++ oftpd-0.3.7/src/ftp_listener.c
+@@ -159,11 +159,11 @@
+ switch (family) {
+ #ifdef INET6
+ case AF_INET6:
+- ((struct sockaddr_in6*)&sock_addr)->sin6_port = port;
++ ((struct sockaddr_in6*)&sock_addr)->sin6_port = htons(port);
+ break;
+ #endif
+ case AF_INET:
+- ((struct sockaddr_in*)&sock_addr)->sin_port = port;
++ ((struct sockaddr_in*)&sock_addr)->sin_port = htons(port);
+ break;
+ default:
+ /* handle error */
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch b/net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
new file mode 100644
index 000000000000..e3ed8df775f8
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
@@ -0,0 +1,354 @@
+Difference from upstream mentioned patch for version 0.3.6
+ftp://ftp.deepspace6.net/pub/ds6/sources/oftpd/oftpd-0.3.6-ipv6rel2.patch.gz
+to Mario Fetka (geos_one) (mario dot fetka at gmail dot com) at
+http://bugs.gentoo.org/attachment.cgi?id=220543&action=view
+
+--- oftpd-0.3.6-ipv6rel2.patch 2010-09-01 11:17:37.137000090 +0200
++++ oftpd-0.3.6-ipv6rel2.patch 2010-09-01 11:15:21.900000084 +0200
+@@ -1,146 +1,10 @@
+-diff -urN oftpd-0.3.6-orig/Makefile.in oftpd-0.3.6/Makefile.in
+---- oftpd-0.3.6-orig/Makefile.in Mon May 28 00:53:40 2001
+-+++ oftpd-0.3.6/Makefile.in Fri Jun 8 19:09:50 2001
+-@@ -72,8 +72,8 @@
+- CONFIG_HEADER = ./src/config.h
+- CONFIG_CLEAN_FILES =
+- DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
+--Makefile.in NEWS TODO acconfig.h aclocal.m4 configure configure.in \
+--install-sh missing mkinstalldirs src/config.h.in src/stamp-h.in
+-+Makefile.in NEWS TODO aclocal.m4 configure configure.in install-sh \
+-+missing mkinstalldirs
+-
+-
+- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+-@@ -83,9 +83,9 @@
+- all: all-redirect
+- .SUFFIXES:
+- $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+-- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+-+ cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
+-
+--Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+-+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+- cd $(top_builddir) \
+- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+-
+-@@ -97,34 +97,6 @@
+- $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+- cd $(srcdir) && $(AUTOCONF)
+-
+--src/config.h: src/stamp-h
+-- @if test ! -f $@; then \
+-- rm -f src/stamp-h; \
+-- $(MAKE) src/stamp-h; \
+-- else :; fi
+--src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status
+-- cd $(top_builddir) \
+-- && CONFIG_FILES= CONFIG_HEADERS=src/config.h \
+-- $(SHELL) ./config.status
+-- @echo timestamp > src/stamp-h 2> /dev/null
+--$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in
+-- @if test ! -f $@; then \
+-- rm -f $(srcdir)/src/stamp-h.in; \
+-- $(MAKE) $(srcdir)/src/stamp-h.in; \
+-- else :; fi
+--$(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+-- cd $(top_srcdir) && $(AUTOHEADER)
+-- @echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null
+--
+--mostlyclean-hdr:
+--
+--clean-hdr:
+--
+--distclean-hdr:
+-- -rm -f src/config.h
+--
+--maintainer-clean-hdr:
+--
+- # This directory's subdirectories are mostly independent; you can cd
+- # into them and run `make' without going through this Makefile.
+- # To change the values of `make' variables: instead of editing Makefiles,
+-@@ -252,6 +224,11 @@
+- -rm -rf $(distdir)
+- mkdir $(distdir)
+- -chmod 777 $(distdir)
+-+ here=`cd $(top_builddir) && pwd`; \
+-+ top_distdir=`cd $(distdir) && pwd`; \
+-+ distdir=`cd $(distdir) && pwd`; \
+-+ cd $(top_srcdir) \
+-+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
+- $(mkinstalldirs) $(distdir)/dist $(distdir)/init
+- @for file in $(DISTFILES); do \
+- d=$(srcdir); \
+-@@ -309,32 +286,32 @@
+- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+-
+- maintainer-clean-generic:
+--mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+-+mostlyclean-am: mostlyclean-tags mostlyclean-generic
+-
+- mostlyclean: mostlyclean-recursive
+-
+--clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+-+clean-am: clean-tags clean-generic mostlyclean-am
+-
+- clean: clean-recursive
+-
+--distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+-+distclean-am: distclean-tags distclean-generic clean-am
+-
+- distclean: distclean-recursive
+- -rm -f config.status
+-
+--maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+-- maintainer-clean-generic distclean-am
+-+maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
+-+ distclean-am
+- @echo "This command is intended for maintainers to use;"
+- @echo "it deletes files that may require special tools to rebuild."
+-
+- maintainer-clean: maintainer-clean-recursive
+- -rm -f config.status
+-
+--.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+--install-data-recursive uninstall-data-recursive install-exec-recursive \
+--uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+--all-recursive check-recursive installcheck-recursive info-recursive \
+--dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+-+.PHONY: install-data-recursive uninstall-data-recursive \
+-+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+-+uninstalldirs-recursive all-recursive check-recursive \
+-+installcheck-recursive info-recursive dvi-recursive \
+-+mostlyclean-recursive distclean-recursive clean-recursive \
+- maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+- distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+- dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+-diff -urN oftpd-0.3.6-orig/man/Makefile.in oftpd-0.3.6/man/Makefile.in
+---- oftpd-0.3.6-orig/man/Makefile.in Mon May 28 00:53:44 2001
+-+++ oftpd-0.3.6/man/Makefile.in Fri Jun 8 19:09:50 2001
+-@@ -84,9 +84,9 @@
+- all: all-redirect
+- .SUFFIXES:
+- $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+-- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile
+-+ cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile
+-
+--Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+-+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+- cd $(top_builddir) \
+- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+-
+-@@ -138,6 +138,11 @@
+- subdir = man
+-
+- distdir: $(DISTFILES)
+-+ here=`cd $(top_builddir) && pwd`; \
+-+ top_distdir=`cd $(top_distdir) && pwd`; \
+-+ distdir=`cd $(distdir) && pwd`; \
+-+ cd $(top_srcdir) \
+-+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu man/Makefile
+- @for file in $(DISTFILES); do \
+- d=$(srcdir); \
+- if test -d $$d/$$file; then \
++Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
++Date: 2010-01-05
++Initial Package Version: 0.3.6
++Origin: ftp://ftp.deepspace6.net/pub/ds6/sources/oftpd/oftpd-0.3.6-ipv6rel2.patch.gz
++Upstream Status: unknown
++Description: add better ipv6 support to oftpd
++
+ diff -urN oftpd-0.3.6-orig/src/Makefile.am oftpd-0.3.6/src/Makefile.am
+ --- oftpd-0.3.6-orig/src/Makefile.am Wed Apr 18 01:05:16 2001
+ +++ oftpd-0.3.6/src/Makefile.am Fri Jun 8 19:09:45 2001
+@@ -148,158 +12,6 @@
+ bin_PROGRAMS = oftpd
+ -oftpd_SOURCES = file_list.c file_list.h ftp_command.c ftp_command.h ftp_listener.c ftp_listener.h ftp_session.c ftp_session.h oftpd.c oftpd.h telnet_session.c telnet_session.h watchdog.c watchdog.h error.c error.h af_portability.h daemon_assert.c daemon_assert.h
+ +oftpd_SOURCES = file_list.c file_list.h ftp_command.c ftp_command.h ftp_listener.c ftp_listener.h ftp_session.c ftp_session.h oftpd.c oftpd.h telnet_session.c telnet_session.h watchdog.c watchdog.h error.c error.h af_portability.h af_portability.c daemon_assert.c daemon_assert.h
+-diff -urN oftpd-0.3.6-orig/src/Makefile.in oftpd-0.3.6/src/Makefile.in
+---- oftpd-0.3.6-orig/src/Makefile.in Mon May 28 00:53:42 2001
+-+++ oftpd-0.3.6/src/Makefile.in Fri Jun 8 19:09:50 2001
+-@@ -66,7 +66,7 @@
+- VERSION = @VERSION@
+-
+- bin_PROGRAMS = oftpd
+--oftpd_SOURCES = file_list.c file_list.h ftp_command.c ftp_command.h ftp_listener.c ftp_listener.h ftp_session.c ftp_session.h oftpd.c oftpd.h telnet_session.c telnet_session.h watchdog.c watchdog.h error.c error.h af_portability.h daemon_assert.c daemon_assert.h
+-+oftpd_SOURCES = file_list.c file_list.h ftp_command.c ftp_command.h ftp_listener.c ftp_listener.h ftp_session.c ftp_session.h oftpd.c oftpd.h telnet_session.c telnet_session.h watchdog.c watchdog.h error.c error.h af_portability.h af_portability.c daemon_assert.c daemon_assert.h
+- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+- CONFIG_HEADER = config.h
+- CONFIG_CLEAN_FILES =
+-@@ -78,7 +78,8 @@
+- LDFLAGS = @LDFLAGS@
+- LIBS = @LIBS@
+- oftpd_OBJECTS = file_list.o ftp_command.o ftp_listener.o ftp_session.o \
+--oftpd.o telnet_session.o watchdog.o error.o daemon_assert.o
+-+oftpd.o telnet_session.o watchdog.o error.o af_portability.o \
+-+daemon_assert.o
+- oftpd_LDADD = $(LDADD)
+- oftpd_DEPENDENCIES =
+- oftpd_LDFLAGS =
+-@@ -93,6 +94,10 @@
+-
+- TAR = gtar
+- GZIP_ENV = --best
+-+DEP_FILES = .deps/af_portability.P .deps/daemon_assert.P .deps/error.P \
+-+.deps/file_list.P .deps/ftp_command.P .deps/ftp_listener.P \
+-+.deps/ftp_session.P .deps/oftpd.P .deps/telnet_session.P \
+-+.deps/watchdog.P
+- SOURCES = $(oftpd_SOURCES)
+- OBJECTS = $(oftpd_OBJECTS)
+-
+-@@ -100,9 +105,9 @@
+- .SUFFIXES:
+- .SUFFIXES: .S .c .o .s
+- $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+-- cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
+-+ cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
+-
+--Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+-+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+- cd $(top_builddir) \
+- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+-
+-@@ -160,9 +165,6 @@
+- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+- done
+-
+--.c.o:
+-- $(COMPILE) -c $<
+--
+- .s.o:
+- $(COMPILE) -c $<
+-
+-@@ -217,6 +219,11 @@
+- subdir = src
+-
+- distdir: $(DISTFILES)
+-+ here=`cd $(top_builddir) && pwd`; \
+-+ top_distdir=`cd $(top_distdir) && pwd`; \
+-+ distdir=`cd $(distdir) && pwd`; \
+-+ cd $(top_srcdir) \
+-+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
+- @for file in $(DISTFILES); do \
+- d=$(srcdir); \
+- if test -d $$d/$$file; then \
+-@@ -228,6 +235,37 @@
+- fi; \
+- done
+-
+-+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+-+
+-+-include $(DEP_FILES)
+-+
+-+mostlyclean-depend:
+-+
+-+clean-depend:
+-+
+-+distclean-depend:
+-+ -rm -rf .deps
+-+
+-+maintainer-clean-depend:
+-+
+-+%.o: %.c
+-+ @echo '$(COMPILE) -c $<'; \
+-+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+-+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+-+ tr ' ' '\012' < .deps/$(*F).pp \
+-+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+-+ >> .deps/$(*F).P; \
+-+ rm .deps/$(*F).pp
+-+
+-+%.lo: %.c
+-+ @echo '$(LTCOMPILE) -c $<'; \
+-+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+-+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+-+ < .deps/$(*F).pp > .deps/$(*F).P; \
+-+ tr ' ' '\012' < .deps/$(*F).pp \
+-+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+-+ >> .deps/$(*F).P; \
+-+ rm -f .deps/$(*F).pp
+- info-am:
+- info: info-am
+- dvi-am:
+-@@ -268,24 +306,26 @@
+-
+- maintainer-clean-generic:
+- mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
+-- mostlyclean-compile mostlyclean-tags \
+-+ mostlyclean-compile mostlyclean-tags mostlyclean-depend \
+- mostlyclean-generic
+-
+- mostlyclean: mostlyclean-am
+-
+- clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \
+-- clean-generic mostlyclean-am
+-+ clean-depend clean-generic mostlyclean-am
+-
+- clean: clean-am
+-
+- distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \
+-- distclean-tags distclean-generic clean-am
+-+ distclean-tags distclean-depend distclean-generic \
+-+ clean-am
+-
+- distclean: distclean-am
+-
+- maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \
+- maintainer-clean-compile maintainer-clean-tags \
+-- maintainer-clean-generic distclean-am
+-+ maintainer-clean-depend maintainer-clean-generic \
+-+ distclean-am
+- @echo "This command is intended for maintainers to use;"
+- @echo "it deletes files that may require special tools to rebuild."
+-
+-@@ -296,10 +336,11 @@
+- maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+- mostlyclean-compile distclean-compile clean-compile \
+- maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+--clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+--check-am installcheck-am installcheck all-recursive-am install-exec-am \
+--install-exec install-data-am install-data install-am install \
+--uninstall-am uninstall all-redirect all-am all installdirs \
+-+clean-tags maintainer-clean-tags distdir mostlyclean-depend \
+-+distclean-depend clean-depend maintainer-clean-depend info-am info \
+-+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+-+install-exec-am install-exec install-data-am install-data install-am \
+-+install uninstall-am uninstall all-redirect all-am all installdirs \
+- mostlyclean-generic distclean-generic clean-generic \
+- maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+-
+ diff -urN oftpd-0.3.6-orig/src/af_portability.c oftpd-0.3.6/src/af_portability.c
+ --- oftpd-0.3.6-orig/src/af_portability.c Thu Jan 1 01:00:00 1970
+ +++ oftpd-0.3.6/src/af_portability.c Fri Jun 8 19:01:31 2001
+@@ -376,7 +88,7 @@
+ diff -urN oftpd-0.3.6-orig/src/config.h.in oftpd-0.3.6/src/config.h.in
+ --- oftpd-0.3.6-orig/src/config.h.in Sun May 27 23:04:05 2001
+ +++ oftpd-0.3.6/src/config.h.in Fri Jun 8 19:03:43 2001
+-@@ -100,14 +100,14 @@
++@@ -97,15 +97,15 @@
+ /* Define if you have the <limits.h> header file. */
+ #undef HAVE_LIMITS_H
+
+@@ -388,12 +100,13 @@
+
+ /* Define if you have the <sys/types.h> header file. */
+ #undef HAVE_SYS_TYPES_H
+--
++
+ -/* Define if you have the <syslog.h> header file. */
+ -#undef HAVE_SYSLOG_H
+-
++-
+ /* Define if you have the <unistd.h> header file. */
+ #undef HAVE_UNISTD_H
++
+ diff -urN oftpd-0.3.6-orig/src/error.c oftpd-0.3.6/src/error.c
+ --- oftpd-0.3.6-orig/src/error.c Wed Apr 18 23:41:04 2001
+ +++ oftpd-0.3.6/src/error.c Thu Jun 21 20:57:09 2001
+@@ -1436,7 +1149,7 @@
+ }
+ #else
+ if (memcmp(&f->client_addr.sin_addr,
+-@@ -1803,20 +1893,69 @@
++@@ -1811,20 +1901,69 @@
+ }
+ }
+
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch b/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch
new file mode 100644
index 000000000000..586885c3c08c
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch
@@ -0,0 +1,17 @@
+in order for pthread_cancel to work (which oftpd uses to close inactive
+connections), most ports need to load libgcc_s.so.1. but when oftpd uses
+a chroot, that file is no longer available (in fact, it'll try to load it
+from the chroot itself which is kind of a security issue). so have the
+code proactively link against libgcc_s when it is found so that the lib
+is already loaded when we cancel.
+
+--- a/configure.in
++++ b/configure.in
+@@ -39,6 +39,7 @@ AC_FUNC_STRFTIME
+ AC_CHECK_FUNCS(getcwd gettimeofday select socket strerror localtime_r gmtime_r)
+ dnl AC_CHECK_LIB(pthread, pthread_create)
+ dnl AC_SEARCH_LIBS(pthread_create, [ pthread pthreads thread threads ])
++AC_CHECK_LIB(gcc_s, _Unwind_Resume)
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(inet_ntoa, nsl)
+ AC_CHECK_FUNCS(inet_aton)
diff --git a/net-ftp/oftpd/files/oftpd-0.3.7-unistd.patch b/net-ftp/oftpd/files/oftpd-0.3.7-unistd.patch
new file mode 100644
index 000000000000..e7f858febd91
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd-0.3.7-unistd.patch
@@ -0,0 +1,19 @@
+--- oftpd-0.3.7/src/daemon_assert.c
++++ oftpd-0.3.7/src/daemon_assert.c
+@@ -3,6 +3,7 @@
+ #include <pthread.h>
+ #include <syslog.h>
+ #include <stdio.h>
++#include <unistd.h>
+
+ #ifndef NDEBUG
+ void daemon_assert_fail(const char *assertion,
+@@ -13,7 +13,7 @@
+ {
+ syslog(LOG_CRIT, "%s:%d: %s: %s", file, line, function, assertion);
+ fprintf(stderr, "%s:%d: %s: %s\n", file, line, function, assertion);
+- exit(1);
++ _exit(1);
+ }
+ #endif
+
diff --git a/net-ftp/oftpd/metadata.xml b/net-ftp/oftpd/metadata.xml
new file mode 100644
index 000000000000..e44d2440b3a6
--- /dev/null
+++ b/net-ftp/oftpd/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>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild b/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild
new file mode 100644
index 000000000000..b970e3ee0e8c
--- /dev/null
+++ b/net-ftp/oftpd/oftpd-0.3.7-r10.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Secure, small, anonymous only ftpd"
+HOMEPAGE="http://www.time-travellers.org/oftpd"
+SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz
+ ftp://ftp.deepspace6.net/pub/ds6/sources/${PN}/${PN}-0.3.6-ipv6rel2.patch.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="ipv6"
+
+DEPEND="net-ftp/ftpbase"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
+
+ cd "${S}" || die
+ epatch "${WORKDIR}"/${PN}-0.3.6-ipv6rel2.patch
+ epatch "${FILESDIR}"/${PN}-0.3.7-delay-root-check.patch
+ epatch "${FILESDIR}"/${PN}-0.3.7-error-output.patch
+ epatch "${FILESDIR}"/${PN}-0.3.7-pthread-cancel.patch
+
+ # Don't crash when using an unsupported address family, #159178.
+ # updated in bug #157005
+ epatch "${FILESDIR}"/${P}-family-1.patch
+
+ # htons patch #371963
+ epatch "${FILESDIR}"/${P}-htons.patch
+
+ epatch "${FILESDIR}"/${P}-unistd.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin $(use_enable ipv6)
+}
+
+src_install() {
+ default
+ keepdir /home/ftp
+ newinitd "${FILESDIR}"/init.d.oftpd-r7 oftpd
+ newconfd "${FILESDIR}"/conf.d.oftpd-r7 oftpd
+}
diff --git a/net-ftp/oftpd/oftpd-0.3.7-r7.ebuild b/net-ftp/oftpd/oftpd-0.3.7-r7.ebuild
new file mode 100644
index 000000000000..70d31eecf000
--- /dev/null
+++ b/net-ftp/oftpd/oftpd-0.3.7-r7.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools eutils
+
+DESCRIPTION="Secure, small, anonymous only ftpd"
+HOMEPAGE="http://www.time-travellers.org/oftpd"
+SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz
+ ftp://ftp.deepspace6.net/pub/ds6/sources/${PN}/${PN}-0.3.6-ipv6rel2.patch.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 sh sparc x86"
+IUSE="ipv6"
+
+DEPEND="net-ftp/ftpbase"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
+
+ cd "${S}" || die
+ epatch "${WORKDIR}"/${PN}-0.3.6-ipv6rel2.patch
+
+ # Don't crash when using an unsupported address family, #159178.
+ # updated in bug #157005
+ epatch "${FILESDIR}"/${P}-family-1.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin $(use_enable ipv6)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS BUGS FAQ NEWS README TODO || die
+ keepdir /home/ftp
+ newinitd "${FILESDIR}"/init.d.oftpd-r7 oftpd || die
+ newconfd "${FILESDIR}"/conf.d.oftpd-r7 oftpd || die
+}
diff --git a/net-ftp/oftpd/oftpd-0.3.7-r8.ebuild b/net-ftp/oftpd/oftpd-0.3.7-r8.ebuild
new file mode 100644
index 000000000000..eee4a93aefb9
--- /dev/null
+++ b/net-ftp/oftpd/oftpd-0.3.7-r8.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Secure, small, anonymous only ftpd"
+HOMEPAGE="http://www.time-travellers.org/oftpd"
+SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz
+ ftp://ftp.deepspace6.net/pub/ds6/sources/${PN}/${PN}-0.3.6-ipv6rel2.patch.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="ipv6"
+
+DEPEND="net-ftp/ftpbase"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
+
+ cd "${S}" || die
+ epatch "${WORKDIR}"/${PN}-0.3.6-ipv6rel2.patch
+
+ # Don't crash when using an unsupported address family, #159178.
+ # updated in bug #157005
+ epatch "${FILESDIR}"/${P}-family-1.patch
+
+ # htons patch #371963
+ epatch "${FILESDIR}"/${P}-htons.patch
+
+ epatch "${FILESDIR}"/${P}-unistd.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin $(use_enable ipv6)
+}
+
+src_install() {
+ default
+ keepdir /home/ftp
+ newinitd "${FILESDIR}"/init.d.oftpd-r7 oftpd
+ newconfd "${FILESDIR}"/conf.d.oftpd-r7 oftpd
+}
diff --git a/net-ftp/oftpd/oftpd-0.3.7-r9.ebuild b/net-ftp/oftpd/oftpd-0.3.7-r9.ebuild
new file mode 100644
index 000000000000..604e0f5f4c0d
--- /dev/null
+++ b/net-ftp/oftpd/oftpd-0.3.7-r9.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Secure, small, anonymous only ftpd"
+HOMEPAGE="http://www.time-travellers.org/oftpd"
+SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz
+ ftp://ftp.deepspace6.net/pub/ds6/sources/${PN}/${PN}-0.3.6-ipv6rel2.patch.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="ipv6"
+
+DEPEND="net-ftp/ftpbase"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-0.3.6-to-0.3.7.patch
+
+ cd "${S}" || die
+ epatch "${WORKDIR}"/${PN}-0.3.6-ipv6rel2.patch
+ epatch "${FILESDIR}"/${PN}-0.3.7-delay-root-check.patch
+
+ # Don't crash when using an unsupported address family, #159178.
+ # updated in bug #157005
+ epatch "${FILESDIR}"/${P}-family-1.patch
+
+ # htons patch #371963
+ epatch "${FILESDIR}"/${P}-htons.patch
+
+ epatch "${FILESDIR}"/${P}-unistd.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin $(use_enable ipv6)
+}
+
+src_install() {
+ default
+ keepdir /home/ftp
+ newinitd "${FILESDIR}"/init.d.oftpd-r7 oftpd
+ newconfd "${FILESDIR}"/conf.d.oftpd-r7 oftpd
+}
diff --git a/net-ftp/oneclickftp/Manifest b/net-ftp/oneclickftp/Manifest
new file mode 100644
index 000000000000..b439a0dd6162
--- /dev/null
+++ b/net-ftp/oneclickftp/Manifest
@@ -0,0 +1 @@
+DIST oneclickftp-0.5.1.tar.gz 109759 SHA256 91a36cd7c2fb53e7ca6e7bef4d7ff62cf2c72967b242290184b4530326bd39b5
diff --git a/net-ftp/oneclickftp/files/oneclickftp-0.5.1-qt47.patch b/net-ftp/oneclickftp/files/oneclickftp-0.5.1-qt47.patch
new file mode 100644
index 000000000000..bea8e32af477
--- /dev/null
+++ b/net-ftp/oneclickftp/files/oneclickftp-0.5.1-qt47.patch
@@ -0,0 +1,13 @@
+Index: oneclickftp-0.5.1/src/ftpwindowimpl.h
+===================================================================
+--- oneclickftp-0.5.1.orig/src/ftpwindowimpl.h
++++ oneclickftp-0.5.1/src/ftpwindowimpl.h
+@@ -38,7 +38,7 @@ class FTPWindowImpl : public QWidget, pu
+ {
+ Q_OBJECT
+ public:
+- FTPWindowImpl(QString Dir, QString Profile, QString ProxyIP = 0, QString ProxyPort = 0);
++ FTPWindowImpl(QString Dir, QString Profile, QString ProxyIP = QString::number(0), QString ProxyPort = QString::number(0));
+ bool Upload(OProfile *ProfiletoUpload, std::vector<OFileConnection*> SelectedFiles);
+ bool Download(OProfile *ProfiletoDownload, std::vector<OFileConnection*> SelectedFiles);
+
diff --git a/net-ftp/oneclickftp/metadata.xml b/net-ftp/oneclickftp/metadata.xml
new file mode 100644
index 000000000000..4b2e4c0373d9
--- /dev/null
+++ b/net-ftp/oneclickftp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <remote-id type="sourceforge">oneclickftp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/oneclickftp/oneclickftp-0.5.1.ebuild b/net-ftp/oneclickftp/oneclickftp-0.5.1.ebuild
new file mode 100644
index 000000000000..893c23551595
--- /dev/null
+++ b/net-ftp/oneclickftp/oneclickftp-0.5.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils qt4-r2
+
+DESCRIPTION="The somehow different FTP client"
+HOMEPAGE="http://oneclickftp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ || ( app-crypt/qca:2 app-crypt/qca:2[qt4] )
+ dev-qt/qtgui:4"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-qt47.patch
+)
+
+src_configure() {
+ eqmake4
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install || die
+ doicon res/icons/${PN}.png
+ make_desktop_entry ${PN} ${PN}
+ dodoc CHANGELOG
+}
diff --git a/net-ftp/proftpd/Manifest b/net-ftp/proftpd/Manifest
new file mode 100644
index 000000000000..eabba73e323a
--- /dev/null
+++ b/net-ftp/proftpd/Manifest
@@ -0,0 +1,7 @@
+DIST mod_clamav-0.11rc.tar.gz 5115 SHA256 87630eb1866066d6320ee711897d8998b8f4915c0498b2e78cc0464abd34855a SHA512 6d33ee7b1c9c8e3fb0a0014dde90cfb1d37daa0f4914f147bb800a8318bcf0e03c7c6748d84cda36c5e5c7cd11ee8114bad9978362f581f367db54d3563f4636 WHIRLPOOL b15024d1011a83a10ce52fb676f1f2162d67750dc137600b624cd04ebd498bb3c9242e4889fd7b73c18224eb483286cb543fc627b27e6a8ff4c9bf35468218b9
+DIST mod_gss-1.3.3.tar.gz 115098 SHA256 24702cf0333720730cc269eb30529061365b1384fdce274bc3d46ccfc300934e SHA512 61473f3102e2204a27d691907482a3e86108bb423be54ba47a79ef0d2a0313bcdc022529f8e620bd868453bee1b1169fce74cc454d835fdfd4be964e342bdedb WHIRLPOOL 90a15ca919326fa2b2e21fb2928e5ac39b912681bce015f3bff0b0b0c47241f41cc3c78789797ba2d8a61dafc24a9f1d18bf085808350301c228b6ed62721e80
+DIST mod_vroot-0.9.3.tar.gz 28352 SHA256 f16c61ed7fe2d7231e1421f8f1a484f29972e0efe0e8e065ab373c388b0c073c SHA512 08a3e5df26bb4d5875b57af9e97e7e7cf27b2ad6983bfae0fac8a21f4a5be0a487cf0d9d03e9e1c08701eb3f22f2cb51a14c05fe1cba5f4085eb8a31d5142776 WHIRLPOOL be30931f117fc4f0b7de87579b483e41d86ad3ecd2999267a726664b32090cd32e6a7e748d66ddec525ee784ee2974212fd2455af313c13b67ab61625efa29d0
+DIST proftpd-1.3.5a.tar.gz 29988477 SHA256 a1f48df8539c414ec56e0cea63dcf4b8e16e606c05f10156f030a4a67fae5696 SHA512 d64de12c100814c5c8a3916b3c9344f5a68c2b85902ffc8e5bb088d8975b5f13a7b9a29f82085b70dc93f4599c0e0f2645977d20998dda11981e66f534ea692c WHIRLPOOL 19b361b0481d5a2eab7fbe40de7bb8c9cd320a2ac04343d2fe858fdc9a62a747f89a5d4a619808bd252f6cfd9f15353df28405eb9bdc10c7c9f0162ab093bc1e
+DIST proftpd-mod-case-0.7.tar.gz 13184 SHA256 c3f65588250fea7771439933fa754927794f664e99b8d20f99b1e400fea62111 SHA512 c08d13ef82fec36ae75aa3213dd02e0ce4045904849f422e152f039a9da66a45e4423751074b8bcf8ce347a40ce0e7bde798a85cbadc962fd872aeaa898261fc WHIRLPOOL 27f49e9f34099c081add803aa679fd9abe7afa652dffe5d8e42889fef49aeaefd499e1009fc564d6c8f882b3c6dc31d4c6dd08cc06a42b770e7ef76a2ebfcf8a
+DIST proftpd-mod-diskuse-0.9.tar.gz 18596 SHA256 424f3fd49237245ec176d27ade0965fe21a0db1d645979d5ae3e55497e3da036 SHA512 d41976bf2810e4b783e775e8c767ca2030c3b5df116219fd31cbbac7feaf9922c315bf4ea092881b0d6cf43f2f4c5dbcae61be3c3a833058d12f962a3024b975 WHIRLPOOL aabd1dc23d6c38d308e859ff778beffd0dabfe70d3530c093cf2f95e80b5e9c94b97b6b5ae5109d031f76ff94dffc3822a7aa60fa30df04523d37ebed99730d6
+DIST proftpd-mod-msg-0.4.1.tar.gz 8082 SHA256 255b79d31dc509ffad5d0fbcd469f833a8481e880aa962910c2bc8aa608ca6da SHA512 38ea63b1d355e1e10a6a4477596bf3fa28529a871c9fb8dbf093b5317f0743ef9cb59b986d0b8c1c7ed932dad5d5d571883d596fad2d3b793431824db4487012 WHIRLPOOL ff907e26a354f53231fed94515eb60050dec77118be6f49147e0eb8b79e50c9d73354618bca19d98d32a3fb79d7ba87507cc6c8b269f259c5fcf23d44ad3a906
diff --git a/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf
new file mode 100644
index 000000000000..26ad04256b43
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf
@@ -0,0 +1 @@
+d /var/run/proftpd 0755 root root
diff --git a/net-ftp/proftpd/files/proftpd.conf.sample b/net-ftp/proftpd/files/proftpd.conf.sample
new file mode 100644
index 000000000000..7bbfa03f0bc1
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.conf.sample
@@ -0,0 +1,53 @@
+# This is a sample ProFTPD configuration file for Gentoo Linux (rename
+# it to 'proftpd.conf' for actual use). It establishes a single server
+# and a single anonymous login.
+
+ServerName "ProFTPD Default Server"
+ServerType standalone
+DefaultServer on
+RequireValidShell off
+AuthPAM off
+AuthPAMConfig ftp
+
+# Listen on the standard FTP port 21.
+Port 21
+
+# New directories and files should not be group or world writable.
+Umask 022
+
+# To prevent DoS attacks set the maximum number of child processes
+# to 30. If you need to allow more than 30 concurrent connections
+# at once simply increase this value.
+MaxInstances 30
+
+# The server will run under ftp/ftp.
+User ftp
+Group ftp
+
+# Every FTP sessions is "jailed" into the user's home directory.
+DefaultRoot ~
+
+# Generally files are overwritable.
+AllowOverwrite on
+
+# Disallow the use of the SITE CHMOD command.
+<Limit SITE_CHMOD>
+ DenyAll
+</Limit>
+
+# A basic anonymous FTP account without an upload directory.
+<Anonymous ~ftp>
+ User ftp
+ Group ftp
+
+ # Clients can login with the username "anonymous" and "ftp".
+ UserAlias anonymous ftp
+
+ # Limit the maximum number of parallel anonymous logins to 10.
+ MaxClients 10
+
+ # Prohibit the WRITE command for the anonymous users.
+ <Limit WRITE>
+ DenyAll
+ </Limit>
+</Anonymous>
diff --git a/net-ftp/proftpd/files/proftpd.initd b/net-ftp/proftpd/files/proftpd.initd
new file mode 100644
index 000000000000..6462cc8a3b2b
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.initd
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger dns mysql postgresql antivirus
+}
+
+check_configuration() {
+ if [ ! -e /etc/proftpd/proftpd.conf ] ; then
+ eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration"
+ eerror "file. In /etc/proftpd you can find a sample configuration."
+ return 1
+ fi
+ /usr/sbin/proftpd -t &>/dev/null
+ if [ $? -ne 0 ] ; then
+ eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to"
+ eerror "fix your configuration in order to run the ProFTPD server. For more information"
+ eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'."
+ return 2
+ fi
+}
+
+start() {
+ checkpath -d /var/run/proftpd
+ [ "${RC_CMD}" = "restart" ] || check_configuration || return 1
+ ebegin "Starting ProFTPD"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/proftpd \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
+
+stop() {
+ [ "${RC_CMD}" != "restart" ] || check_configuration || return 1
+ ebegin "Stopping ProFTPD"
+ start-stop-daemon --stop --quiet --retry 20 \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
+
+reload() {
+ check_configuration || return 1
+ ebegin "Reloading ProFTPD"
+ start-stop-daemon --quiet --signal HUP \
+ --pidfile /var/run/proftpd/proftpd.pid
+ eend $?
+}
diff --git a/net-ftp/proftpd/files/proftpd.service b/net-ftp/proftpd/files/proftpd.service
new file mode 100644
index 000000000000..904c90f25714
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ProFTPd FTP daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/proftpd --nodaemon
+StandardOutput=syslog
+StandardError=syslog
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/proftpd/files/proftpd.xinetd b/net-ftp/proftpd/files/proftpd.xinetd
new file mode 100644
index 000000000000..ad75aefddb6c
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd.xinetd
@@ -0,0 +1,15 @@
+#
+# ProFTPd FTP daemon - http://www.proftpd.org
+#
+service ftp
+{
+ flags = REUSE
+ socket_type = stream
+ instances = 30
+ wait = no
+ user = root
+ server = /usr/sbin/proftpd
+ log_on_success = HOST PID
+ log_on_failure = HOST
+ disable = yes
+}
diff --git a/net-ftp/proftpd/metadata.xml b/net-ftp/proftpd/metadata.xml
new file mode 100644
index 000000000000..6ab2093ca514
--- /dev/null
+++ b/net-ftp/proftpd/metadata.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bernd@lommerzheim.com</email>
+ <name>Bernd Lommerzheim</name>
+ </maintainer>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ <description>Proxy maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ <description>Mostly user.</description>
+ </maintainer>
+ <herd>net-ftp</herd>
+ <herd>proxy-maintainers</herd>
+ <longdescription>ProFTPD grew out of the desire to have a secure and
+configurable FTP server, and out of a significant admiration of the Apache web
+server.</longdescription>
+ <use>
+ <flag name="authfile">Enable support for the auth-file module</flag>
+ <flag name="ban">Enable support for the mod_ban module</flag>
+ <flag name="case">Enable support for the mod_case module</flag>
+ <flag name="ctrls">Enable support for the mod_ctrls and mod_ctrls_admin modules</flag>
+ <flag name="copy">Enable support for the mod_copy module</flag>
+ <flag name="deflate">Enable support for the mod_deflate module</flag>
+ <flag name="diskuse">Enable support for the mod_diskuse module</flag>
+ <flag name="dso">Enable support for the mod_dso module</flag>
+ <flag name="dynmasq">Enable support for the mod_dynmasq module, for dynamically updating MasqueradeAddress for dyndns-like scenarios)</flag>
+ <flag name="exec">Enable support for the mod_exec module. WARNING: this could be a security risk</flag>
+ <flag name="ident">Enable support for the mod_ident module</flag>
+ <flag name="ifsession">Enable support for the ifsession module</flag>
+ <flag name="ifversion">Enable support for the mod_ifversion module</flag>
+ <flag name="linguas_bg_BG">Language support for bg_BG</flag>
+ <flag name="linguas_fr_FR">Language support for fr_FR</flag>
+ <flag name="linguas_it_IT">Language support for it_IT</flag>
+ <flag name="linguas_ja_JP">Language support for ja_JP</flag>
+ <flag name="linguas_ru_RU">Language support for ru_RU</flag>
+ <flag name="log_forensic">Enable support for the mod_log_forensic module, log only suspicious actions.</flag>
+ <flag name="memcache">Enable support for the mod_memcache module, for using memcached servers</flag>
+ <flag name="msg">Enable support for the mod_msg module, allows system users to send messages to connected clients via the ftpdctl program.</flag>
+ <flag name="openssl">Enable <pkg>dev-libs/openssl</pkg> support</flag>
+ <flag name="qos">Enable support for the mod_qos module</flag>
+ <flag name="ratio">Enable support for the mod_ratio module</flag>
+ <flag name="readme">Enable support for the mod_readme module</flag>
+ <flag name="rewrite">Enable support for the rewrite module</flag>
+ <flag name="shaper">Enable support for the mod_shaper module</flag>
+ <flag name="sftp">Enable support for the mod_sftp module and optionally mod_sftp_sql and mod_sftp_pam if matching USE flags are enabled</flag>
+ <flag name="sitemisc">Enable support for the sitemisc module</flag>
+ <flag name="softquota">Enable support for the quotatab module</flag>
+ <flag name="trace">Build with trace support. Should not be enabled on production servers</flag>
+ <flag name="unique_id">Enable support for the mod_unique_id module, every connection gets unique ID.</flag>
+ <flag name="vroot">Enable support for the virtual root module</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gssmod</remote-id>
+ <remote-id type="github">Castaglia/proftpd-mod_vroot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/proftpd/proftpd-1.3.5a.ebuild b/net-ftp/proftpd/proftpd-1.3.5a.ebuild
new file mode 100644
index 000000000000..21963cfa2acb
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.5a.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.3"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.3"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW log_forensic memcache msg mysql ncurses nls openssl pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp softquota sqlite ssl tcpd test trace unique_id vroot xinetd"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( openssl )
+ shaper? ( ctrls )
+ ssl? ( openssl )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses )
+ openssl? ( dev-libs/openssl:0= )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+__prepare_module() {
+ local mod_name=$1
+ local mod_topdir=${WORKDIR}/${2:-${mod_name}}
+
+ mv "${mod_topdir}/${mod_name}.c" contrib || die
+ mv "${mod_topdir}/${mod_name}.html" doc/contrib || die
+ rm -r "${mod_topdir}" || die
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
+
+ # Prepare external modules
+ use case && __prepare_module mod_case
+ if use clamav ; then
+ mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
+ epatch "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
+ fi
+ use msg && __prepare_module mod_msg
+ use vroot && __prepare_module mod_vroot ${PN}-mod_vroot-mod_vroot-${MOD_VROOT}
+
+ # Prepare external kerberos module
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
+ fi
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ cd "${WORKDIR}"/mod_diskuse
+ econf
+ mv mod_diskuse.{c,h} "${S}"/contrib
+ mv mod_diskuse.html "${S}"/doc/contrib
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_diskuse
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+ if has_version app-crypt/mit-krb5 ; then
+ econf --enable-mit
+ else
+ econf --enable-heimdal
+ fi
+ mv mod_{auth_gss,gss}.c "${S}"/contrib
+ mv mod_gss.h "${S}"/include
+ mv README.mod_{auth_gss,gss} "${S}"
+ mv mod_gss.html "${S}"/doc/contrib
+ mv rfc{1509,2228}.txt "${S}"/doc/rfc
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log_forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique_id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ $(use_enable trace) \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
diff --git a/net-ftp/profxp/Manifest b/net-ftp/profxp/Manifest
new file mode 100644
index 000000000000..b063777f0a8e
--- /dev/null
+++ b/net-ftp/profxp/Manifest
@@ -0,0 +1,2 @@
+DIST SOCKS.pm 17069 SHA256 dffb26ecafc4fdd052d398a51e4edf4dd97082a7d6b56781b352bc3458a48cc1 SHA512 87029d9fb58ba384499a2ac73d661dd4c91faa81636e41c1d3c3a1d1efab1d5e01804467428d1daf8dd2fcb231666e2986f6cc806f5f7d419e7d3280a95c497e WHIRLPOOL ce63a9effc6beaea7a5d2dc462511db1c7677266eaeb6255d2e652bedb320b20e0bb9d1b0966f7f59f91dc9fcff80cff854441f1f0ddb3f603f89523bba82cc9
+DIST profxp-v3-pre2-src.tar.gz 16647 SHA256 975af5393b2a66bdca378b349d5c674551b668858e0ac505763052170e484452 SHA512 5f48e15f0c6c43c8b20b7cb72bf642e12a99d469bea21372a7a602d5f8522c4097d18918a3a007961b3ea6177ec864d50a7bc24211194ac9d791c5190978e167 WHIRLPOOL b69c6a7284d0b73288b611fd586d8a7622c6d945a50321caa73e135ec9b1e8c7b9156564cb15f1c1f2ba51ecc2489fd2ef937a23a7f53173ac69db7a236f1271
diff --git a/net-ftp/profxp/metadata.xml b/net-ftp/profxp/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-ftp/profxp/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>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-ftp/profxp/profxp-3_pre2-r2.ebuild b/net-ftp/profxp/profxp-3_pre2-r2.ebuild
new file mode 100644
index 000000000000..7299f2f1d63e
--- /dev/null
+++ b/net-ftp/profxp/profxp-3_pre2-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="FXP (server-to-server FTP) commandline client written in Perl"
+HOMEPAGE="http://duncanthrax.net/profxp/"
+SRC_URI="http://duncanthrax.net/profxp/profxp-v${PV/_/-}-src.tar.gz
+ http://search.cpan.org/src/CLINTDW/SOCKS-0.03/lib/Net/SOCKS.pm"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="virtual/perl-Time-HiRes
+ dev-perl/TermReadKey
+ dev-perl/Term-ReadLine-Perl"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack profxp-v${PV/_/-}-src.tar.gz
+ cp "${DISTDIR}"/SOCKS.pm "${S}"/
+}
+
+src_prepare() {
+ sed -i 's:/home/tom/ActivePerl-5\.6:/usr:' "${S}"/profxpv3.pl || die
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ perl_set_version
+ newbin profxpv3.pl profxp.pl
+ dosym profxp.pl /usr/bin/profxp
+ insinto ${ARCH_LIB}/Net
+ doins SOCKS.pm
+ insinto ${ARCH_LIB}/${PN}
+ doins ${PN}/*.pm
+}
diff --git a/net-ftp/pure-ftpd/Manifest b/net-ftp/pure-ftpd/Manifest
new file mode 100644
index 000000000000..24b120450ff0
--- /dev/null
+++ b/net-ftp/pure-ftpd/Manifest
@@ -0,0 +1,3 @@
+DIST pure-ftpd-1.0.40.tar.bz2 495141 SHA256 004dd4e991537f100fb6cdcdcd43460ed49847aefb60bc4577466839de95aa20 SHA512 26a9918ddb298a6fd2b684e88173466b351671ad9b5c702796fabd1a7b0abb52fefcd3537b9d17210468d7f2efc80e4c881fc60dd3c9c73dcbed5f46e59e4420 WHIRLPOOL 09d6d5fed066a5c0cfb4801e1827770cd3d909dbf85e627c30c583ca0999dd3ec44a1528004db12ccbb232d22e263a4f742f2785a111d255db0007a097146f7d
+DIST pure-ftpd-1.0.41.tar.bz2 496457 SHA256 1d48f650f366b8151d86b86c79f4bb874e95143bdac0e767038eda832d28a010 SHA512 d63fb4f245dc2f1115447de3861f1a805712fb432c461e21b5739e1bae35da9d1367d5e7f54609f2fd5c3064e8d3853dd513a6684166300f1c72a60a79fddd21 WHIRLPOOL a0ed31b912e83f07c1f3814f47f7514a22db0e5fd699a890a4640fd36b053e491a93a15fe0a8b721ce08389a2727acc0928994c495c341bbfdfc5453d5d4af31
+DIST pure-ftpd-1.0.42.tar.bz2 496652 SHA256 efd11295998453e31dbeef9159624beabbac2643a338134ae8c2ef529aa2ec10 SHA512 730ece22ce9a8562c5da6063de2b99404fbc0d0fa0b591383c319a762ea33cec74239474bcb56606b7af254dd76e31154f27a745df0c619932c9b8b4f150bc9c WHIRLPOOL bcbcd32fcfe10741f214559f7051bca302addc9bdc0a90a24e33a53c8103199a2eb40ea65e314fc66c59a47a479bd6774e332f4898d750c90b6dbf1bee01bcec
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch
new file mode 100644
index 000000000000..209cd94dc566
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.28-pam.patch
@@ -0,0 +1,20 @@
+--- src/log_pam.c
++++ src/log_pam.c
+@@ -49,7 +49,7 @@
+ # endif
+
+ #ifndef FTPD_PAM_SERVICE_NAME
+-# define FTPD_PAM_SERVICE_NAME "pure-ftpd"
++# define FTPD_PAM_SERVICE_NAME "ftp"
+ #endif
+
+ /* Static variables used to communicate between the conversation function
+@@ -164,7 +164,7 @@
+ &PAM_conversation, &pamh);
+ PAM_BAIL;
+ # ifdef PAM_TTY
+- (void) pam_set_item(pamh, PAM_TTY, "pure-ftpd");
++ (void) pam_set_item(pamh, PAM_TTY, FTPD_PAM_SERVICE_NAME);
+ # endif
+ # ifdef PAM_RUSER
+ (void) pam_set_item(pamh, PAM_RUSER, user);
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3 b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3
new file mode 100644
index 000000000000..29b15a5a8928
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d-3
@@ -0,0 +1,90 @@
+# Config file for /etc/init.d/pure-ftpd
+##Comment variables out to disable its features, or change the values in it... ##
+
+## This variable must be uncommented in order for the server to start ##
+#IS_CONFIGURED="yes"
+
+## FTP Server,Port (separated by comma) ##
+## If you prefer host names over IP addresses, it's your choice:
+## SERVER="-S ftp.rtchat.com,21"
+## IPv6 addresses are supported.
+## !!! WARNING !!!
+## Using an invalid IP will result in the server not starting,
+## but reporting a correct start!
+## SERVER="-S 192.168.0.1,21"
+## By default binds to all available IPs.
+SERVER="-S 21"
+
+## Number of simultaneous connections in total, and per IP ##
+MAX_CONN="-c 30"
+MAX_CONN_IP="-C 10"
+
+## Don't allow uploads if the partition is more full then this var ##
+DISK_FULL="-k 90%"
+
+## If your FTP server is behind a NAT box, uncomment this ##
+#USE_NAT="-N"
+
+## Authentication mechanisms (others are 'pam', ...) ##
+## Further infos can be found in the README file.
+AUTH="-l unix"
+
+## Change the maximum idle time (in minutes) ##
+## If this variable is not defined, it will default to 15 minutes.
+#TIMEOUT="-I <timeout>'"
+
+## Facility used for syslog logging ##
+## If this variable is not defined, it will default to the 'ftp' facility.
+## Logging can be disabled with '-f none'.
+#LOG="-f <facility>"
+
+## Charset conversion support *experimental* ##
+## Only works if USE "charconv" is enabled (only Pure-FTPd >=1.0.21).
+## Set the charset of the filesystem.
+# CHARCONV="--fscharset <charset>"
+
+## If you want to process each file uploaded through Pure-FTPd, enter the name
+## of the script that should process the files below.
+## man pure-uploadscript to learn more about how to write this script.
+# UPLOADSCRIPT="/path/to/uploadscript"
+
+## Misc. Others ##
+MISC_OTHER="-A -x -j -R -Z"
+
+#
+# Use these inside $MISC_OTHER
+# More can be found on "http://download.pureftpd.org/pub/pure-ftpd/doc/README"
+#
+# -A [ chroot() everyone, but root ]
+# -e [ Only allow anonymous users ]
+# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]
+# -i [ Disallow upload for anonymous users, whatever directory perms are ]
+# -j [ If the home directory of a user doesn't exist, auto-create it ]
+# -M [ Allow anonymous users to create directories. ]
+# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]
+# -x [ In normal operation mode, authenticated users can read/write
+# files beginning with a dot ('.'). Anonymous users can't, for security reasons
+# (like changing banners or a forgotten .rhosts). When '-x' is used, authenticated
+# users can download dot-files, but not overwrite/create them, even if they own
+# them. ]
+# -X [ This flag is identical to the previous one (writing
+# dot-files is prohibited), but in addition, users can't even *read* files and
+# directories beginning with a dot (like "cd .ssh"). ]
+# -D [ List files beginning with a dot ('.') even when the client doesn't
+# append the '-a' option to the list command. A workaround for badly
+# configured FTP clients. ]
+# -G [ Disallow renaming. ]
+# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]
+# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]
+# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]
+
+
+# Some filesystems don't like accesses being memory mapped. This happens for
+# example with ftpwho on JFFS2 filesystems (bug #330563). If you happen to
+# have such a filesystem on /var set TMPFS_MOUNT to "true".
+TMPFS_MOUNT="false"
+
+# Special mount options (like nosuid or nodev) for the tmpfs mount can be added
+# here. Several options must be separated by comma: "nodev,nosuid"
+#TMPFS_OPTS=""
+
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.rc11 b/net-ftp/pure-ftpd/files/pure-ftpd.rc11
new file mode 100644
index 000000000000..fe200cfb0f1a
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.rc11
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+ftpd_pidfile="/var/run/pure-ftpd.pid"
+script_pidfile="/var/run/pure-uploadscript.pid"
+ftpd_rundir="/var/lib/run/pure-ftpd"
+daemon="/usr/sbin/pure-ftpd"
+script_daemon="/usr/sbin/pure-uploadscript"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "$IS_CONFIGURED" ] ; then
+ eerror "You need to setup /etc/conf.d/pure-ftpd first!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ UPSCRIPT=""
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ UPSCRIPT="--uploadscript"
+ fi
+
+ FTPD_CONFIG="$SERVER $MAX_CONN $MAX_CONN_IP $DISK_FULL $USE_NAT $AUTH
+ $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT"
+
+ WAIT="--wait 100"
+
+ if ${TMPFS_MOUNT:-false} && grep -q tmpfs /proc/filesystems ; then
+ [ -n "${TMPFS_OPTS}" ] && MOUNT_OPTS="-o ${TMPFS_OPTS}"
+ einfo "Mounting tmpfs on ${ftpd_rundir}"
+ mount ${MOUNT_OPTS} -t tmpfs tmpfs ${ftpd_rundir} \
+ || eerror "Unable to mount tmpfs"
+ fi
+
+ ebegin "Starting Pure-FTPd"
+ start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} \
+ --make-pidfile --background --exec /usr/sbin/pure-ftpd ${WAIT} \
+ -- $(echo ${FTPD_CONFIG} | sed 's@\([[:space:]]\+\|^\)-B\([[:space:]]\+\|$\)@\1@g')
+ result=$?
+ if [ $result -ne 0 ] ; then
+ eend 1 "Could not launch Pure-FTPd"
+ else
+ eend $result
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Starting Pure-FTPd upload script"
+ start-stop-daemon --start --quiet --make-pidfile \
+ --pidfile ${script_pidfile} \
+ --exec ${script_daemon} --background ${WAIT} \
+ -- -r $UPLOADSCRIPT
+ eend $?
+ fi
+ fi
+}
+
+stop() {
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Stopping Pure-FTPd upload script"
+ start-stop-daemon --stop --retry 20 --quiet \
+ --pidfile ${script_pidfile}
+ eend $?
+ fi
+ ebegin "Stopping Pure-FTPd"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile}
+ eend $?
+
+ if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then
+ umount ${ftpd_rundir} >/dev/null 2>&1
+ fi
+}
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.xinetd b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd
new file mode 100644
index 000000000000..11022e6fde8d
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.xinetd
@@ -0,0 +1,13 @@
+#
+# Pure-FTPd FTP daemon - http://www.pureftpd.org
+#
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/pure-ftpd
+ server_args = -s -a 42
+ protocol = tcp
+ disable = yes
+}
diff --git a/net-ftp/pure-ftpd/metadata.xml b/net-ftp/pure-ftpd/metadata.xml
new file mode 100644
index 000000000000..b4871d977734
--- /dev/null
+++ b/net-ftp/pure-ftpd/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-ftp</herd>
+<maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+</maintainer>
+<longdescription>Free (BSD), secure, production-quality and standard-conformant FTP server based upon Troll-FTPd. It doesn't provide useless bells and whistles, but focuses on efficiency and ease of use.</longdescription>
+<use>
+ <flag name='anondel'>Permit anonymous to delete files</flag>
+ <flag name='anonperm'>Permit anonymous to change file permissions</flag>
+ <flag name='anonren'>Permit anonymous to rename files</flag>
+ <flag name='anonres'>Permit anonymous to resume file transfers</flag>
+ <flag name='charconv'>Enables charset conversion</flag>
+ <flag name='implicittls'>Enable TLS on Port 990</flag>
+ <flag name='noiplog'>Disables logging of IP addresses</flag>
+ <flag name='paranoidmsg'>Display paranoid messages instead of normal
+ ones</flag>
+ <flag name='resolveids'>Resolve UIDs/GIDs</flag>
+ <flag name='sysquota'>Enables system quota support (needs sys-fs/quota)
+ </flag>
+ <flag name='vchroot'>Enable support for virtual chroot (possible security
+ risk)</flag>
+</use>
+</pkgmetadata>
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.40.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.40.ebuild
new file mode 100644
index 000000000000..cb050bd820fa
--- /dev/null
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.40.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils confutils flag-o-matic
+
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+
+DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
+HOMEPAGE="http://www.pureftpd.org/"
+SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
+ http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+
+IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
+
+REQUIRED_USE="implicittls? ( ssl )"
+
+DEPEND="caps? ( sys-libs/libcap )
+ charconv? ( virtual/libiconv )
+ ldap? ( >=net-nds/openldap-2.0.25 )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql:= )
+ ssl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
+ sysquota? ( sys-fs/quota[-rpc] )
+ xinetd? ( virtual/inetd )"
+
+RDEPEND="${DEPEND}
+ dev-libs/libsodium
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.28-pam.patch
+}
+
+src_configure() {
+ # adjust max user length to something more appropriate
+ # for virtual hosts. See bug #62472 for details.
+ sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
+ -i "${S}/src/ftpd.h" || die "sed failed"
+
+ local my_conf=""
+
+ # Let's configure the USE-enabled stuff
+ enable_extension_without "capabilities" "caps"
+ enable_extension_with "rfc2640" "charconv" 0
+ enable_extension_with "ldap" "ldap" 0
+ enable_extension_with "mysql" "mysql" 0
+ enable_extension_with "pam" "pam" 0
+ enable_extension_with "paranoidmsg" "paranoidmsg" 0
+ enable_extension_with "pgsql" "postgres" 0
+ enable_extension_with "tls" "ssl" 0
+ enable_extension_with "implicittls" "implicittls" 0
+ enable_extension_with "virtualchroot" "vchroot" 0
+ enable_extension_with "sysquotas" "sysquota" 0
+ enable_extension_without "inetd" "xinetd"
+
+ # noiplog is a negative flag, we don't want that enabled by default,
+ # so we handle it manually, as confutils can't do that
+ use noiplog && my_conf="${my_conf} --without-iplogging"
+
+ # Those features are only configurable like this, see bug #179375.
+ use anondel && append-cppflags -DANON_CAN_DELETE
+ use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
+ use anonren && append-cppflags -DANON_CAN_RENAME
+ use anonres && append-cppflags -DANON_CAN_RESUME
+ use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
+
+ # Do not auto-use SSP -- let the user select this.
+ export ax_cv_check_cflags___fstack_protector_all=no
+
+ econf \
+ --with-altlog \
+ --with-cookie \
+ --with-diraliases \
+ --with-extauth \
+ --with-ftpwho \
+ --with-language=${PUREFTPD_LANG:=english} \
+ --with-peruserlimits \
+ --with-privsep \
+ --with-puredb \
+ --with-quotas \
+ --with-ratios \
+ --with-throttling \
+ --with-uploadscript \
+ --with-virtualhosts \
+ --enable-largefile \
+ ${my_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS
+
+ newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
+
+ if use implicittls ; then
+ sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
+ || die "Adjusting default server port for implicittls usage failed!"
+ fi
+
+ newinitd "${FILESDIR}/pure-ftpd.rc11" pure-ftpd
+
+ dodir /var/lib/run/${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd
+ fi
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins pureftpd.schema
+ insinto /etc/openldap
+ insopts -m 0600
+ doins pureftpd-ldap.conf
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ elog
+ elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
+ elog
+ ewarn "It's *really* important to read the README provided with Pure-FTPd!"
+ ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
+ ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
+ ewarn
+ if use charconv ; then
+ ewarn "Charset conversion is an *experimental* feature!"
+ ewarn "Remember to set a valid charset for your filesystem in the configuration!"
+ fi
+ fi
+}
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.41.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.41.ebuild
new file mode 100644
index 000000000000..8e0c1a29f1d5
--- /dev/null
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.41.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils confutils flag-o-matic
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
+HOMEPAGE="http://www.pureftpd.org/"
+SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
+ http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+
+IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
+
+REQUIRED_USE="implicittls? ( ssl )"
+
+DEPEND="caps? ( sys-libs/libcap )
+ charconv? ( virtual/libiconv )
+ ldap? ( >=net-nds/openldap-2.0.25 )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql:= )
+ ssl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
+ sysquota? ( sys-fs/quota[-rpc] )
+ xinetd? ( virtual/inetd )"
+
+RDEPEND="${DEPEND}
+ dev-libs/libsodium
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.28-pam.patch
+}
+
+src_configure() {
+ # adjust max user length to something more appropriate
+ # for virtual hosts. See bug #62472 for details.
+ sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
+ -i "${S}/src/ftpd.h" || die "sed failed"
+
+ local my_conf=""
+
+ # Let's configure the USE-enabled stuff
+ enable_extension_without "capabilities" "caps"
+ enable_extension_with "rfc2640" "charconv" 0
+ enable_extension_with "ldap" "ldap" 0
+ enable_extension_with "mysql" "mysql" 0
+ enable_extension_with "pam" "pam" 0
+ enable_extension_with "paranoidmsg" "paranoidmsg" 0
+ enable_extension_with "pgsql" "postgres" 0
+ enable_extension_with "tls" "ssl" 0
+ enable_extension_with "implicittls" "implicittls" 0
+ enable_extension_with "virtualchroot" "vchroot" 0
+ enable_extension_with "sysquotas" "sysquota" 0
+ enable_extension_without "inetd" "xinetd"
+
+ # noiplog is a negative flag, we don't want that enabled by default,
+ # so we handle it manually, as confutils can't do that
+ use noiplog && my_conf="${my_conf} --without-iplogging"
+
+ # Those features are only configurable like this, see bug #179375.
+ use anondel && append-cppflags -DANON_CAN_DELETE
+ use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
+ use anonren && append-cppflags -DANON_CAN_RENAME
+ use anonres && append-cppflags -DANON_CAN_RESUME
+ use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
+
+ # Do not auto-use SSP -- let the user select this.
+ export ax_cv_check_cflags___fstack_protector_all=no
+
+ econf \
+ --with-altlog \
+ --with-cookie \
+ --with-diraliases \
+ --with-extauth \
+ --with-ftpwho \
+ --with-language=${PUREFTPD_LANG:=english} \
+ --with-peruserlimits \
+ --with-privsep \
+ --with-puredb \
+ --with-quotas \
+ --with-ratios \
+ --with-throttling \
+ --with-uploadscript \
+ --with-virtualhosts \
+ --enable-largefile \
+ ${my_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS
+
+ newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
+
+ if use implicittls ; then
+ sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
+ || die "Adjusting default server port for implicittls usage failed!"
+ fi
+
+ newinitd "${FILESDIR}/pure-ftpd.rc11" pure-ftpd
+
+ dodir /var/lib/run/${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd
+ fi
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins pureftpd.schema
+ insinto /etc/openldap
+ insopts -m 0600
+ doins pureftpd-ldap.conf
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ elog
+ elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
+ elog
+ ewarn "It's *really* important to read the README provided with Pure-FTPd!"
+ ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
+ ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
+ ewarn
+ if use charconv ; then
+ ewarn "Charset conversion is an *experimental* feature!"
+ ewarn "Remember to set a valid charset for your filesystem in the configuration!"
+ fi
+ fi
+}
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.42.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.42.ebuild
new file mode 100644
index 000000000000..8e0c1a29f1d5
--- /dev/null
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.42.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils confutils flag-o-matic
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
+HOMEPAGE="http://www.pureftpd.org/"
+SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
+ http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+
+IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
+
+REQUIRED_USE="implicittls? ( ssl )"
+
+DEPEND="caps? ( sys-libs/libcap )
+ charconv? ( virtual/libiconv )
+ ldap? ( >=net-nds/openldap-2.0.25 )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql:= )
+ ssl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
+ sysquota? ( sys-fs/quota[-rpc] )
+ xinetd? ( virtual/inetd )"
+
+RDEPEND="${DEPEND}
+ dev-libs/libsodium
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.28-pam.patch
+}
+
+src_configure() {
+ # adjust max user length to something more appropriate
+ # for virtual hosts. See bug #62472 for details.
+ sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
+ -i "${S}/src/ftpd.h" || die "sed failed"
+
+ local my_conf=""
+
+ # Let's configure the USE-enabled stuff
+ enable_extension_without "capabilities" "caps"
+ enable_extension_with "rfc2640" "charconv" 0
+ enable_extension_with "ldap" "ldap" 0
+ enable_extension_with "mysql" "mysql" 0
+ enable_extension_with "pam" "pam" 0
+ enable_extension_with "paranoidmsg" "paranoidmsg" 0
+ enable_extension_with "pgsql" "postgres" 0
+ enable_extension_with "tls" "ssl" 0
+ enable_extension_with "implicittls" "implicittls" 0
+ enable_extension_with "virtualchroot" "vchroot" 0
+ enable_extension_with "sysquotas" "sysquota" 0
+ enable_extension_without "inetd" "xinetd"
+
+ # noiplog is a negative flag, we don't want that enabled by default,
+ # so we handle it manually, as confutils can't do that
+ use noiplog && my_conf="${my_conf} --without-iplogging"
+
+ # Those features are only configurable like this, see bug #179375.
+ use anondel && append-cppflags -DANON_CAN_DELETE
+ use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
+ use anonren && append-cppflags -DANON_CAN_RENAME
+ use anonres && append-cppflags -DANON_CAN_RESUME
+ use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
+
+ # Do not auto-use SSP -- let the user select this.
+ export ax_cv_check_cflags___fstack_protector_all=no
+
+ econf \
+ --with-altlog \
+ --with-cookie \
+ --with-diraliases \
+ --with-extauth \
+ --with-ftpwho \
+ --with-language=${PUREFTPD_LANG:=english} \
+ --with-peruserlimits \
+ --with-privsep \
+ --with-puredb \
+ --with-quotas \
+ --with-ratios \
+ --with-throttling \
+ --with-uploadscript \
+ --with-virtualhosts \
+ --enable-largefile \
+ ${my_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS
+
+ newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
+
+ if use implicittls ; then
+ sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
+ || die "Adjusting default server port for implicittls usage failed!"
+ fi
+
+ newinitd "${FILESDIR}/pure-ftpd.rc11" pure-ftpd
+
+ dodir /var/lib/run/${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/pure-ftpd.xinetd" pure-ftpd
+ fi
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins pureftpd.schema
+ insinto /etc/openldap
+ insopts -m 0600
+ doins pureftpd-ldap.conf
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ # This is a new installation
+ elog
+ elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
+ elog
+ ewarn "It's *really* important to read the README provided with Pure-FTPd!"
+ ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
+ ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
+ ewarn
+ if use charconv ; then
+ ewarn "Charset conversion is an *experimental* feature!"
+ ewarn "Remember to set a valid charset for your filesystem in the configuration!"
+ fi
+ fi
+}
diff --git a/net-ftp/pureadmin/Manifest b/net-ftp/pureadmin/Manifest
new file mode 100644
index 000000000000..eef203eb5901
--- /dev/null
+++ b/net-ftp/pureadmin/Manifest
@@ -0,0 +1 @@
+DIST pureadmin-0.4.tar.gz 386739 SHA256 d7a43da0eb16ad5d57ac4ffe045004977186b2bacb244cb8c5239e2e0b3a2112 SHA512 46fd4caff0d6c123412478690411409038d5590cc7388993eed35fc33a34302b8310ae1ede971ed31cbf29ba4ef3b4c21ce5b8c9b225659b3110c6abcd1e78c6 WHIRLPOOL 3168c872ac6c3c6d54dac0ff4dee9ac2f9878f20911b9f1f570d7be3c3201293441aaf05b8d6fcb2c43f7389320670588033e73a597b1d48228e0c58b27ebbf1
diff --git a/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch b/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch
new file mode 100644
index 000000000000..7b19565ac10a
--- /dev/null
+++ b/net-ftp/pureadmin/files/pureadmin-0.4-gold.patch
@@ -0,0 +1,28 @@
+ src/Makefile.am | 2 +-
+ src/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 94f61e0..0ebb561 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -38,5 +38,5 @@ pureadmin_CFLAGS = -std=gnu99 -Wall
+
+ pureadmin_LDFLAGS = -export-dynamic
+
+-pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@
++pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ -lm -lX11
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index b2ade45..dd9401c 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -249,7 +249,7 @@ pureadmin_SOURCES = \
+
+ pureadmin_CFLAGS = -std=gnu99 -Wall
+ pureadmin_LDFLAGS = -export-dynamic
+-pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@
++pureadmin_LDADD = @GTK_LIBS@ $(INTLLIBS) @BINRELOC_LIBS@ -lm -lX11
+ all: all-am
+
+ .SUFFIXES:
diff --git a/net-ftp/pureadmin/metadata.xml b/net-ftp/pureadmin/metadata.xml
new file mode 100644
index 000000000000..34c9a3265f6e
--- /dev/null
+++ b/net-ftp/pureadmin/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>Graphical tool used to make the management of PureFTPd a little easier.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">purify</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/pureadmin/pureadmin-0.4-r1.ebuild b/net-ftp/pureadmin/pureadmin-0.4-r1.ebuild
new file mode 100644
index 000000000000..ecd9e81f723c
--- /dev/null
+++ b/net-ftp/pureadmin/pureadmin-0.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="GUI tool used to make the management of Pure-FTPd a little easier"
+HOMEPAGE="http://purify.sourceforge.net/"
+SRC_URI="mirror://sourceforge/purify/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug doc"
+
+RDEPEND="
+ gnome-base/libglade:2.0
+ sys-libs/zlib
+ virtual/fam
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ cat >> po/POTFILES.skip <<- EOF
+ src/eggstatusicon.c
+ src/eggtrayicon.c
+ src/prereq_usrmanager.c
+ EOF
+ epatch "${FILESDIR}"/${P}-gold.patch
+}
+
+src_configure() {
+ local myconf=""
+
+ use debug && myconf="${myconf} --enable-debug"
+
+ econf ${myconf}
+}
+
+src_install() {
+ default
+
+ # Move the docs to the correct location, if we want the docs
+ if use doc ; then
+ dodoc "${ED}"usr/share/pureadmin/docs/*
+ fi
+ rm -Rfv "${ED}"usr/share/pureadmin/docs || die
+
+ make_desktop_entry pureadmin "Pure-FTPd menu config" pureadmin
+}
+
+pkg_postinst() {
+ ewarn "PureAdmin is at a beta-stage right now and it may break your"
+ ewarn "configuration. DO NOT use it for safety critical system"
+ ewarn "or production use!"
+ echo
+ elog "You need root-privileges to be able to use PureAdmin."
+ elog "This will probably change in the future."
+ echo
+}
diff --git a/net-ftp/pybootd/Manifest b/net-ftp/pybootd/Manifest
new file mode 100644
index 000000000000..37abdb0d1e89
--- /dev/null
+++ b/net-ftp/pybootd/Manifest
@@ -0,0 +1 @@
+DIST pybootd-1.5.0_pre20110524131526.tar.gz 21855 SHA256 55c7f74f32ac160a47631d2ef2f2962c2ea6c3321a3a5ef4dc8aac8be252468d SHA512 113a2195d33ba5a0196810370fedd582204de5f8323ecec37e6209fc7074cde06ba80cb8113fd83be70685c8ea18c6167d751085ea9bee5c1ab34dab152eea71 WHIRLPOOL 967322a33ae6a39f137910af9aa11f58ce58c3e0739817678d071356fa9d2a973411ca56bcdc056c2e0be1b95c410d12ee06dbbeffc960a9bc9125ccfdafdec8
diff --git a/net-ftp/pybootd/files/pybootd-scripts.patch b/net-ftp/pybootd/files/pybootd-scripts.patch
new file mode 100644
index 000000000000..71a001f44798
--- /dev/null
+++ b/net-ftp/pybootd/files/pybootd-scripts.patch
@@ -0,0 +1,36 @@
+install the pybootd.py helper as pybootd otherwise the import gets confused
+
+--- a/setup.py
++++ b/setup.py
+@@ -18,13 +18,23 @@
+ # License along with this library; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
++import shutil
+ from distutils.core import setup
++import distutils.command.install_scripts
+
+
+ def _read(fname):
+ import os
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
++class script_rename(distutils.command.install_scripts.install_scripts):
++
++ def run(self):
++ distutils.command.install_scripts.install_scripts.run(self)
++ for script in self.get_outputs():
++ if script.endswith('.py'):
++ shutil.move(script, script[:-3])
++
+ setup(
+ name='pybootd',
+ version='1.5.0',
+@@ -56,5 +66,7 @@ setup(
+ package_data = {
+ '': ['etc/*.ini', 'etc/*.cfg'],
+ },
++ cmdclass = {'install_scripts': script_rename},
++ scripts = ['pybootd.py'],
+ long_description=_read('README.rst'),
+ )
diff --git a/net-ftp/pybootd/metadata.xml b/net-ftp/pybootd/metadata.xml
new file mode 100644
index 000000000000..e256526db2cd
--- /dev/null
+++ b/net-ftp/pybootd/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <upstream>
+ <remote-id type="pypi">pybootd</remote-id>
+ <remote-id type="github">eblot/pybootd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/pybootd/pybootd-1.5.0_pre20110524131526.ebuild b/net-ftp/pybootd/pybootd-1.5.0_pre20110524131526.ebuild
new file mode 100644
index 000000000000..9707b54d22e0
--- /dev/null
+++ b/net-ftp/pybootd/pybootd-1.5.0_pre20110524131526.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+GIT_HASH="7fd7d045fd4b4cdeebf4d07c1c5cd9649c2172b8"
+
+DESCRIPTION="Simplified BOOTP/DHCP/PXE/TFTP server"
+HOMEPAGE="https://github.com/eblot/pybootd"
+SRC_URI="https://github.com/eblot/pybootd/archive/${GIT_HASH:0:6}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-python/netifaces-0.5"
+DEPEND=""
+
+S="${WORKDIR}/pybootd-${GIT_HASH}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-scripts.patch
+)
diff --git a/net-ftp/qshare/Manifest b/net-ftp/qshare/Manifest
new file mode 100644
index 000000000000..5c2bb6d1a910
--- /dev/null
+++ b/net-ftp/qshare/Manifest
@@ -0,0 +1 @@
+DIST qshare-2.1.5-src.tar.bz2 770556 SHA256 9122ecd6f4b0091a24fe664ee6254ae16acada0e315b5e30bdf95828639fcde2 SHA512 5d1ca2ffaf93d1136a2549cb4b7525f4990182a53dbff0752d60c2d24b4022f4082d39c8df2758d97e3830bc59033da9018a80474f52dd83245a8830ec3b4c1f WHIRLPOOL d67e14a5dfaf230e43250ec3946e106d43d80177f696680c7672fdc29d03c292dbaf2e6ae7d98bdbae8dfd47c944309ec644a60eeb175ea2751c0665520a1cb8
diff --git a/net-ftp/qshare/files/qshare-2.1.5-desktop.patch b/net-ftp/qshare/files/qshare-2.1.5-desktop.patch
new file mode 100644
index 000000000000..1c18e85e8db1
--- /dev/null
+++ b/net-ftp/qshare/files/qshare-2.1.5-desktop.patch
@@ -0,0 +1,16 @@
+Gentoo bug #457712.
+
+Index: distrib/linux/qshare.desktop
+===================================================================
+--- distrib/linux/qshare.desktop (revision 90)
++++ distrib/linux/qshare.desktop (working copy)
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Comment=Desktop FTP server without any configuration
+-Comment[ru_RU]Графический FTP-сервер без конфигурирования
+-Comment[uk_UA]Графічний FTP-сервер без конфігурування
++Comment[ru_RU]=Графический FTP-сервер без конфигурирования
++Comment[uk_UA]=Графічний FTP-сервер без конфігурування
+ Exec=qshare
+ GenericName=Personal FTP server
+ GenericName[fr]=Serveur FTP personnel
diff --git a/net-ftp/qshare/metadata.xml b/net-ftp/qshare/metadata.xml
new file mode 100644
index 000000000000..dc439f7e84f5
--- /dev/null
+++ b/net-ftp/qshare/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>qt</herd>
+</pkgmetadata>
diff --git a/net-ftp/qshare/qshare-2.1.5-r1.ebuild b/net-ftp/qshare/qshare-2.1.5-r1.ebuild
new file mode 100644
index 000000000000..2c7098701895
--- /dev/null
+++ b/net-ftp/qshare/qshare-2.1.5-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="FTP server with a service discovery feature"
+HOMEPAGE="http://www.zuzuf.net/qshare/"
+SRC_URI="http://www.zuzuf.net/qshare/files/${P}-src.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ net-dns/avahi[mdnsresponder-compat]"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS README )
+PATCHES=( "${FILESDIR}/${P}-desktop.patch" )
diff --git a/net-ftp/scythia/Manifest b/net-ftp/scythia/Manifest
new file mode 100644
index 000000000000..2b7a6ac7e763
--- /dev/null
+++ b/net-ftp/scythia/Manifest
@@ -0,0 +1 @@
+DIST scythia_0.9.3-2-src.tar.gz 407388 SHA256 e014f5f011b2f7464597a446490102f2dfad53a1a546043b826d6cf6cfe6b9aa
diff --git a/net-ftp/scythia/metadata.xml b/net-ftp/scythia/metadata.xml
new file mode 100644
index 000000000000..3cbebd85b7e2
--- /dev/null
+++ b/net-ftp/scythia/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+</pkgmetadata>
diff --git a/net-ftp/scythia/scythia-0.9.3_p2.ebuild b/net-ftp/scythia/scythia-0.9.3_p2.ebuild
new file mode 100644
index 000000000000..c06b4acf268d
--- /dev/null
+++ b/net-ftp/scythia/scythia-0.9.3_p2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit gnome2-utils qt4-r2
+
+DESCRIPTION="Just a small FTP client"
+HOMEPAGE="http://scythia.free.fr/"
+SRC_URI="http://scythia.free.fr/wp-content/${PN}_${PV/_p/-}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui:4"
+
+S=${WORKDIR}/${PN}
+
+DOCS="AUTHORS"
+
+src_prepare() {
+ sed -i \
+ -e 's:/usr/share/applnk/Internet:/usr/share/applications:g' \
+ -e "s:scythia/html:${PF}/html:" \
+ scythia.pro || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-ftp/tftp-hpa/Manifest b/net-ftp/tftp-hpa/Manifest
new file mode 100644
index 000000000000..2155b3d9b3a1
--- /dev/null
+++ b/net-ftp/tftp-hpa/Manifest
@@ -0,0 +1 @@
+DIST tftp-hpa-5.2.tar.xz 89564 SHA256 afee361df96a2f88344e191f6a25480fd714e1d28d176c3f10cc43fa206b718b SHA512 a5198e923a6e58281f749dc77b3f3ed8579e56b6f0fd6a17482cc88bdc8d34b6702c7c709717885b9b937ecae459d9a832328a49a2e3536dc7432cdb39d2a394 WHIRLPOOL 43fc1db9e4e88266e280402a4d499da5e22632624e1c3ad868f15cf55b5f6c6557662cd8a6739bea89b608cf5c8917ef5c7ce6d6fb16164458ac6f4cc67e2c19
diff --git a/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44 b/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44
new file mode 100644
index 000000000000..14e8d1452881
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/in.tftpd.confd-0.44
@@ -0,0 +1,15 @@
+# /etc/init.d/in.tftpd
+
+# Path to server files from
+# Depending on your application you may have to change this.
+# This is commented out to force you to look at the file!
+#INTFTPD_PATH="/var/tftp/"
+#INTFTPD_PATH="/tftpboot/"
+#INTFTPD_PATH="/tftproot/"
+
+# For more options, see in.tftpd(8)
+# -R 4096:32767 solves problems with ARC firmware, and obsoletes
+# the /proc/sys/net/ipv4/ip_local_port_range hack.
+# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
+# -l is passed by the init script in addition to these options.
+INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"
diff --git a/net-ftp/tftp-hpa/files/in.tftpd.rc6 b/net-ftp/tftp-hpa/files/in.tftpd.rc6
new file mode 100644
index 000000000000..d0e4228e98a0
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/in.tftpd.rc6
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tftpd"
+ /usr/sbin/in.tftpd -l ${INTFTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tftpd"
+ start-stop-daemon --stop --exec /usr/sbin/in.tftpd
+ eend $?
+}
diff --git a/net-ftp/tftp-hpa/files/tftp.service b/net-ftp/tftp-hpa/files/tftp.service
new file mode 100644
index 000000000000..f43937875409
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/tftp.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Tftp Server
+
+[Service]
+ExecStart=/usr/sbin/in.tftpd -R 4096:32767 -s /tftproot
+StandardInput=socket
diff --git a/net-ftp/tftp-hpa/files/tftp.socket b/net-ftp/tftp-hpa/files/tftp.socket
new file mode 100644
index 000000000000..8764c1de349c
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/tftp.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Tftp Server Activation Socket
+
+[Socket]
+ListenDatagram=69
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-ftp/tftp-hpa/files/tftp.xinetd b/net-ftp/tftp-hpa/files/tftp.xinetd
new file mode 100644
index 000000000000..c1bf20ab2929
--- /dev/null
+++ b/net-ftp/tftp-hpa/files/tftp.xinetd
@@ -0,0 +1,10 @@
+service tftp
+{
+ disable = yes
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/sbin/in.tftpd
+ server_args = -R 4096:32767 -s /tftpboot
+}
diff --git a/net-ftp/tftp-hpa/metadata.xml b/net-ftp/tftp-hpa/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-ftp/tftp-hpa/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild b/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild
new file mode 100644
index 000000000000..b43b83b74ca2
--- /dev/null
+++ b/net-ftp/tftp-hpa/tftp-hpa-5.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit systemd eutils toolchain-funcs
+
+DESCRIPTION="port of the OpenBSD TFTP server"
+HOMEPAGE="http://www.kernel.org/pub/software/network/tftp/"
+SRC_URI="mirror://kernel/software/network/tftp/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-4"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos"
+IUSE="ipv6 readline selinux tcpd"
+
+CDEPEND="
+ readline? ( sys-libs/readline:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+ !net-ftp/atftp
+ !net-ftp/netkit-tftp"
+DEPEND="${CDEPEND}
+ app-arch/xz-utils"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-tftp )
+"
+src_prepare() {
+ epatch_user
+
+ sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die
+}
+
+src_configure() {
+ econf \
+ $(use_with ipv6) \
+ $(use_with tcpd tcpwrappers) \
+ $(use_with readline)
+}
+
+src_install() {
+ emake INSTALLROOT="${D}" install
+ dodoc README* CHANGES tftpd/sample.rules
+
+ # iputils installs this
+ rm "${ED}"/usr/share/man/man8/tftpd.8 || die
+
+ newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd
+ newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd
+
+ systemd_dounit "${FILESDIR}"/tftp.service
+ systemd_dounit "${FILESDIR}"/tftp.socket
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/tftp.xinetd tftp
+}
diff --git a/net-ftp/tftp-hpa/tftp-hpa-5.2.ebuild b/net-ftp/tftp-hpa/tftp-hpa-5.2.ebuild
new file mode 100644
index 000000000000..8d0f116adf89
--- /dev/null
+++ b/net-ftp/tftp-hpa/tftp-hpa-5.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="port of the OpenBSD TFTP server"
+HOMEPAGE="http://www.kernel.org/pub/software/network/tftp/"
+SRC_URI="mirror://kernel/software/network/tftp/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-4"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos"
+IUSE="ipv6 readline selinux tcpd"
+
+RDEPEND="selinux? ( sec-policy/selinux-tftp )
+ readline? ( sys-libs/readline )
+ tcpd? ( sys-apps/tcp-wrappers )
+ !net-ftp/atftp
+ !net-ftp/netkit-tftp"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+src_prepare() {
+ sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die
+}
+
+src_configure() {
+ econf \
+ $(use_with ipv6) \
+ $(use_with tcpd tcpwrappers) \
+ $(use_with readline)
+}
+
+src_install() {
+ emake INSTALLROOT="${D}" install
+ dodoc README* CHANGES tftpd/sample.rules
+
+ # iputils installs this
+ rm "${ED}"/usr/share/man/man8/tftpd.8 || die
+
+ newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd
+ newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/tftp.xinetd tftp
+}
diff --git a/net-ftp/tlswrap/Manifest b/net-ftp/tlswrap/Manifest
new file mode 100644
index 000000000000..87905cfdc3d5
--- /dev/null
+++ b/net-ftp/tlswrap/Manifest
@@ -0,0 +1 @@
+DIST tlswrap-1.04.tar.gz 129507 SHA256 d10b8b45276695f5357d3e46212b8708a6baf42c83c5e4f4a263801890ac34b4
diff --git a/net-ftp/tlswrap/files/tlswrap.init b/net-ftp/tlswrap/files/tlswrap.init
new file mode 100644
index 000000000000..fd4eea954af5
--- /dev/null
+++ b/net-ftp/tlswrap/files/tlswrap.init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tlswrap"
+ start-stop-daemon --start --exec /usr/bin/tlswrap >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tlswrap"
+ start-stop-daemon --stop --exec /usr/sbin/tlswrap
+ eend $?
+}
diff --git a/net-ftp/tlswrap/metadata.xml b/net-ftp/tlswrap/metadata.xml
new file mode 100644
index 000000000000..7a92e30a3922
--- /dev/null
+++ b/net-ftp/tlswrap/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-ftp</herd>
+ <longdescription lang="en">
+ TLSWRAP is a TLS/SSL FTP wrapper/proxy which allows to use TLS with
+ every FTP client
+ </longdescription>
+</pkgmetadata>
diff --git a/net-ftp/tlswrap/tlswrap-1.04.ebuild b/net-ftp/tlswrap/tlswrap-1.04.ebuild
new file mode 100644
index 000000000000..f5105e2eb7a8
--- /dev/null
+++ b/net-ftp/tlswrap/tlswrap-1.04.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="TLSWRAP is a TLS/SSL FTP wrapper/proxy which allows to use TLS with every FTP client"
+HOMEPAGE="http://tlswrap.sunsite.dk"
+SRC_URI="http://tlswrap.sunsite.dk/${P}.tar.gz"
+
+# GPL-2 for Gentoo init script
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/openssl-0.9.7"
+RDEPEND=${DEPEND}
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ dodoc ChangeLog README
+ # einstall for sandbox issues
+ einstall || die "einstall failed"
+ newinitd "${FILESDIR}/tlswrap.init" tlswrap
+}
diff --git a/net-ftp/tnftp/Manifest b/net-ftp/tnftp/Manifest
new file mode 100644
index 000000000000..32de70758b51
--- /dev/null
+++ b/net-ftp/tnftp/Manifest
@@ -0,0 +1,3 @@
+DIST tnftp-20100108.tar.gz 614438 SHA256 31d9f9ae333cdf99290c30b1f409e4fff79824cd2498464a8cade881c9b5511a SHA512 fa6dd4fc421af54004523e837bd8361dacf3d0e7862567141f4d822337d295215afae3a5df37fb4a08fc36879bb9b017eb2771bb600b0636663142a976a9651b WHIRLPOOL a62f4dd56cd7b45bb844187355466e1f77f8e41f7493be83ae6981955d164f7488d527f67f2fb986d8b344e60c173f2fde588d5dfdfd4818132ff6bccad89613
+DIST tnftp-20130505.tar.gz 612475 SHA256 6f650e25f6fd51538f677b789b49379f367ae9f1dee74c94cfe24d92abc2cffb SHA512 cbae2d77a681e24d59d36c81922b122fd33eb54218bc6c132829c1b5ba2a344eef01ea30a6c09244f5b1ac8d347c2e62d30d23d4ed4def6b10848a97dfa85357 WHIRLPOOL f20803b23bc1e35676baf26da25547a4743183e36a3fe31089a4f2fec5270b869a194fd4d71ee9aa4bcbb742f9d88bd6096f85f97d4bbab9a723e141a94f4ef3
+DIST tnftp-20141104.tar.gz 613180 SHA256 124e9f263c01600acb4072f936d2d0ab5120e68cd8598b86ff4b1d15c87af7b8 SHA512 e3d99215d36d27d3d841d946975c2a2723c6ca227cc7d9469f30dbc398f32bdd5c0922933dd12d9e822d7e85826a74619fb7712a6c5a97d1ee721c79d5728d55 WHIRLPOOL aa793e70f235627cf8540bbbe6decaaacee0f137fa22b23ed2fe17999fd1859449a21d392bcc5edd7fe276b673ed5eef5d70c9bf8ccc5c14bc119772bd996f0a
diff --git a/net-ftp/tnftp/metadata.xml b/net-ftp/tnftp/metadata.xml
new file mode 100644
index 000000000000..3944ffccd484
--- /dev/null
+++ b/net-ftp/tnftp/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>
+ <email>swegener@gentoo.org</email>
+ <name>Sven Wegenery</name>
+ <description>Primary Maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-ftp/tnftp/tnftp-20100108.ebuild b/net-ftp/tnftp/tnftp-20100108.ebuild
new file mode 100644
index 000000000000..9a192f8300bc
--- /dev/null
+++ b/net-ftp/tnftp/tnftp-20100108.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="NetBSD FTP client with several advanced features"
+SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz
+ ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/old/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/"
+
+SLOT="0"
+LICENSE="BSD-4 BSD ISC"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6 socks5"
+
+DEPEND=">=sys-libs/ncurses-5.1
+ socks5? ( net-proxy/dante )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ --enable-editcomplete \
+ $(use_enable ipv6) \
+ $(use_with socks5 socks) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc ChangeLog README THANKS || die "dodoc failed"
+}
diff --git a/net-ftp/tnftp/tnftp-20130505.ebuild b/net-ftp/tnftp/tnftp-20130505.ebuild
new file mode 100644
index 000000000000..8ed1dd8daa9f
--- /dev/null
+++ b/net-ftp/tnftp/tnftp-20130505.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="NetBSD FTP client with several advanced features"
+SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz
+ ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/old/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/"
+
+SLOT="0"
+LICENSE="BSD-4 BSD ISC"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6 socks5"
+
+DEPEND=">=sys-libs/ncurses-5.1
+ socks5? ( net-proxy/dante )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ --enable-editcomplete \
+ $(use_enable ipv6) \
+ $(use_with socks5 socks) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc ChangeLog README THANKS || die "dodoc failed"
+}
diff --git a/net-ftp/tnftp/tnftp-20141104.ebuild b/net-ftp/tnftp/tnftp-20141104.ebuild
new file mode 100644
index 000000000000..8ed1dd8daa9f
--- /dev/null
+++ b/net-ftp/tnftp/tnftp-20141104.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="NetBSD FTP client with several advanced features"
+SRC_URI="ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/${P}.tar.gz
+ ftp://ftp.netbsd.org/pub/NetBSD/misc/${PN}/old/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/"
+
+SLOT="0"
+LICENSE="BSD-4 BSD ISC"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6 socks5"
+
+DEPEND=">=sys-libs/ncurses-5.1
+ socks5? ( net-proxy/dante )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ --enable-editcomplete \
+ $(use_enable ipv6) \
+ $(use_with socks5 socks) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc ChangeLog README THANKS || die "dodoc failed"
+}
diff --git a/net-ftp/vsftpd/Manifest b/net-ftp/vsftpd/Manifest
new file mode 100644
index 000000000000..a455d558d2ec
--- /dev/null
+++ b/net-ftp/vsftpd/Manifest
@@ -0,0 +1,2 @@
+DIST vsftpd-2.3.5.tar.gz 187691 SHA256 d87ee2987df8f03e1dbe294905f7907b2798deb89c67ca965f6e2f60879e54f1 SHA512 7d58d601c4a14cf16c074f238d557fd28e080d7573a1257f742e43bf97cff455b6bf083d8e3594cc7f8865f9485b307b692e91c17426c7fed11af9e4b41a0643 WHIRLPOOL 2dba4ae125bbd66522f58ce4ffc9d5be8ea2a84876fe6751593b82aa2c3e5fe1e1ed076c1c09268054f7ea6831683a2be0dd4e269e321d572d859d0ae2535406
+DIST vsftpd-3.0.2.tar.gz 192808 SHA256 be46f0e2c5528fe021fafc8dab1ecfea0c1f183063a06977f8537fcd0b195e56 SHA512 d5b978e07d8b0a623b79a531824666fb9b970ad5989a8c34c21b545b62ba07cde4bfe3d77b40a8b6e92d17890c37cae209231af8f106da3404f6548e217bd023 WHIRLPOOL 7a74ab478880d021f7a82ffc6ec3989617003234e30d97063760bc06baeee2ab207861b440896b926b95eed7b3d902ab96c05c1bbd23d494d9ff168f98d3404a
diff --git a/net-ftp/vsftpd/files/vsftpd-2.1.0-caps.patch b/net-ftp/vsftpd/files/vsftpd-2.1.0-caps.patch
new file mode 100644
index 000000000000..bd29762e9f48
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.1.0-caps.patch
@@ -0,0 +1,15 @@
+diff -ur vsftpd-2.1.0.orig/sysdeputil.c vsftpd-2.1.0/sysdeputil.c
+--- vsftpd-2.1.0.orig/sysdeputil.c 2009-02-23 18:23:26.000000000 +0100
++++ vsftpd-2.1.0/sysdeputil.c 2009-02-23 18:23:51.000000000 +0100
+@@ -160,10 +160,8 @@
+ #include <sys/capability.h>
+
+ #if defined(VSF_SYSDEP_HAVE_CAPABILITIES) && !defined(VSF_SYSDEP_HAVE_LIBCAP)
+-#include <linux/unistd.h>
+ #include <linux/capability.h>
+-#include <errno.h>
+-#include <syscall.h>
++#include <sys/syscall.h>
+ int capset(cap_user_header_t header, const cap_user_data_t data)
+ {
+ return syscall(__NR_capset, header, data);
diff --git a/net-ftp/vsftpd/files/vsftpd-2.2.0-dont-link-caps.patch b/net-ftp/vsftpd/files/vsftpd-2.2.0-dont-link-caps.patch
new file mode 100644
index 000000000000..debcf06279e3
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.2.0-dont-link-caps.patch
@@ -0,0 +1,21 @@
+diff -ur vsftpd-2.2.0.orig/vsf_findlibs.sh vsftpd-2.2.0/vsf_findlibs.sh
+--- vsftpd-2.2.0.orig/vsf_findlibs.sh 2009-08-23 22:15:39.000000000 -0700
++++ vsftpd-2.2.0/vsf_findlibs.sh 2009-08-23 22:16:31.000000000 -0700
+@@ -44,17 +44,6 @@
+ # For older HP-UX...
+ locate_library /usr/lib/libsec.sl && echo "-lsec";
+
+-# Look for libcap (capabilities)
+-if locate_library /lib/libcap.so.1; then
+- echo "/lib/libcap.so.1";
+-elif locate_library /lib/libcap.so.2; then
+- echo "/lib/libcap.so.2";
+-else
+- locate_library /usr/lib/libcap.so && echo "-lcap";
+- locate_library /lib/libcap.so && echo "-lcap";
+- locate_library /lib64/libcap.so && echo "-lcap";
+-fi
+-
+ # Solaris needs this for nanosleep()..
+ locate_library /lib/libposix4.so && echo "-lposix4";
+ locate_library /usr/lib/libposix4.so && echo "-lposix4";
diff --git a/net-ftp/vsftpd/files/vsftpd-2.2.0-gentoo.patch b/net-ftp/vsftpd/files/vsftpd-2.2.0-gentoo.patch
new file mode 100644
index 000000000000..353dff3417a7
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.2.0-gentoo.patch
@@ -0,0 +1,264 @@
+diff -NrU5 vsftpd-2.2.0.original/defs.h vsftpd-2.2.0/defs.h
+--- vsftpd-2.2.0.original/defs.h 2009-08-23 15:23:00.000000000 -0600
++++ vsftpd-2.2.0/defs.h 2009-08-23 16:01:20.000000000 -0600
+@@ -1,9 +1,9 @@
+ #ifndef VSF_DEFS_H
+ #define VSF_DEFS_H
+
+-#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf"
++#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf"
+
+ #define VSFTP_COMMAND_FD 0
+
+ #define VSFTP_PASSWORD_MAX 128
+ #define VSFTP_USERNAME_MAX 128
+diff -NrU5 vsftpd-2.2.0.original/tunables.c vsftpd-2.2.0/tunables.c
+--- vsftpd-2.2.0.original/tunables.c 2009-08-23 15:23:00.000000000 -0600
++++ vsftpd-2.2.0/tunables.c 2009-08-23 16:00:14.000000000 -0600
+@@ -244,23 +244,23 @@
+ tunable_delay_successful_login = 0;
+ tunable_max_login_fails = 3;
+ /* -rw------- */
+ tunable_chown_upload_mode = 0600;
+
+- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
++ install_str_setting("/usr/share/vsftpd/empty", &tunable_secure_chroot_dir);
+ install_str_setting("ftp", &tunable_ftp_username);
+ install_str_setting("root", &tunable_chown_username);
+ install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
+ install_str_setting("/var/log/vsftpd.log", &tunable_vsftpd_log_file);
+ install_str_setting(".message", &tunable_message_file);
+ install_str_setting("nobody", &tunable_nopriv_user);
+ install_str_setting(0, &tunable_ftpd_banner);
+- install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file);
+- install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file);
++ install_str_setting("/etc/vsftpd/banned_emails", &tunable_banned_email_file);
++ install_str_setting("/etc/vsftpd/chroot_list", &tunable_chroot_list_file);
+ install_str_setting("ftp", &tunable_pam_service_name);
+ install_str_setting("ftp", &tunable_guest_username);
+- install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file);
++ install_str_setting("/etc/vsftpd/user_list", &tunable_userlist_file);
+ install_str_setting(0, &tunable_anon_root);
+ install_str_setting(0, &tunable_local_root);
+ install_str_setting(0, &tunable_banner_file);
+ install_str_setting(0, &tunable_pasv_address);
+ install_str_setting(0, &tunable_listen_address);
+@@ -269,11 +269,11 @@
+ install_str_setting(0, &tunable_cmds_allowed);
+ install_str_setting(0, &tunable_cmds_denied);
+ install_str_setting(0, &tunable_hide_file);
+ install_str_setting(0, &tunable_deny_file);
+ install_str_setting(0, &tunable_user_sub_token);
+- install_str_setting("/etc/vsftpd.email_passwords",
++ install_str_setting("/etc/vsftpd/email_passwords",
+ &tunable_email_password_file);
+ install_str_setting("/usr/share/ssl/certs/vsftpd.pem",
+ &tunable_rsa_cert_file);
+ install_str_setting(0, &tunable_dsa_cert_file);
+ install_str_setting("DES-CBC3-SHA", &tunable_ssl_ciphers);
+diff -NrU5 vsftpd-2.2.0.original/vsftpd.8 vsftpd-2.2.0/vsftpd.8
+--- vsftpd-2.2.0.original/vsftpd.8 2009-08-23 15:23:00.000000000 -0600
++++ vsftpd-2.2.0/vsftpd.8 2009-08-23 16:10:03.000000000 -0600
+@@ -19,11 +19,11 @@
+ Alternatively, vsftpd can be launched in standalone mode, in which case vsftpd
+ itself will listen on the network. This latter mode is easier to use, and
+ recommended. It is activated by setting
+ .Pa listen=YES
+ in
+-.Pa /etc/vsftpd.conf .
++.Pa /etc/vsftpd/vsftpd.conf .
+ Direct execution of the
+ .Nm vsftpd
+ binary will then launch the FTP service ready for immediate client connections.
+ .Sh OPTIONS
+ An optional
+@@ -31,11 +31,11 @@
+ may be given on the command line. These files must be owned as root if running
+ as root. Any command line option not starting with a "-" character is treated
+ as a config file that will be loaded. Note that config files are loaded in the
+ strict order that they are encountered on the command line.
+ If no config files are specified, the default configuration file of
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ will be loaded, after all other command line options are processed.
+ .Pp
+ Supported options are:
+ .Bl -tag -width Ds
+ .It Fl v
+@@ -45,16 +45,16 @@
+ -o options are supported, and they are applied in strict order relative to
+ their appearance on the command line, including intermingling with loading of
+ config files.
+ .El
+ .Sh EXAMPLES
+-vsftpd -olisten=NO /etc/vsftpd.conf -oftpd_banner=blah
++vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah
+ .Pp
+ That example overrides vsftpd's built-in default for the "listen" option to be
+-NO, but then loads /etc/vsftpd.conf which may override that setting. Finally,
++NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. Finally,
+ the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd
+ setting and any identical setting that was in the config file.
+ .Sh FILES
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ .Sh SEE ALSO
+ .Xr vsftpd.conf 5
+ .end
+diff -NrU5 vsftpd-2.2.0.original/vsftpd.conf vsftpd-2.2.0/vsftpd.conf
+--- vsftpd-2.2.0.original/vsftpd.conf 2009-08-23 15:23:00.000000000 -0600
++++ vsftpd-2.2.0/vsftpd.conf 2009-08-23 15:35:03.000000000 -0600
+@@ -1,6 +1,6 @@
+-# Example config file /etc/vsftpd.conf
++# Example config file /etc/vsftpd/vsftpd.conf
+ #
+ # The default compiled in settings are fairly paranoid. This sample file
+ # loosens things up a bit, to make the ftp daemon more usable.
+ # Please see vsftpd.conf.5 for all compiled in defaults.
+ #
+@@ -85,19 +85,19 @@
+ #
+ # You may specify a file of disallowed anonymous e-mail addresses. Apparently
+ # useful for combatting certain DoS attacks.
+ #deny_email_enable=YES
+ # (default follows)
+-#banned_email_file=/etc/vsftpd.banned_emails
++#banned_email_file=/etc/vsftpd/banned_emails
+ #
+ # You may specify an explicit list of local users to chroot() to their home
+ # directory. If chroot_local_user is YES, then this list becomes a list of
+ # users to NOT chroot().
+ #chroot_local_user=YES
+ #chroot_list_enable=YES
+ # (default follows)
+-#chroot_list_file=/etc/vsftpd.chroot_list
++#chroot_list_file=/etc/vsftpd/chroot_list
+ #
+ # You may activate the "-R" option to the builtin ls. This is disabled by
+ # default to avoid remote users being able to cause excessive I/O on large
+ # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+ # the presence of the "-R" option, so there is a strong case for enabling it.
+diff -NrU5 vsftpd-2.2.0.original/vsftpd.conf.5 vsftpd-2.2.0/vsftpd.conf.5
+--- vsftpd-2.2.0.original/vsftpd.conf.5 2009-08-23 15:23:00.000000000 -0600
++++ vsftpd-2.2.0/vsftpd.conf.5 2009-08-23 15:49:59.000000000 -0600
+@@ -2,11 +2,11 @@
+ .SH NAME
+ vsftpd.conf \- config file for vsftpd
+ .SH DESCRIPTION
+ vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By
+ default, vsftpd looks for this file at the location
+-.BR /etc/vsftpd.conf .
++.BR /etc/vsftpd/vsftpd.conf .
+ However, you may override this by specifying a command line argument to
+ vsftpd. The command line argument is the pathname of the configuration file
+ for vsftpd. This behaviour is useful because you may wish to use an advanced
+ inetd such as
+ .BR xinetd
+@@ -136,11 +136,11 @@
+ If activated, you may provide a list of local users who are placed in a
+ chroot() jail in their home directory upon login. The meaning is slightly
+ different if chroot_local_user is set to YES. In this case, the list becomes
+ a list of users which are NOT to be placed in a chroot() jail.
+ By default, the file containing this list is
+-/etc/vsftpd.chroot_list, but you may override this with the
++/etc/vsftpd/chroot_list, but you may override this with the
+ .BR chroot_list_file
+ setting.
+
+ Default: NO
+ .TP
+@@ -175,11 +175,11 @@
+ Default: NO
+ .TP
+ .B deny_email_enable
+ If activated, you may provide a list of anonymous password e-mail responses
+ which cause login to be denied. By default, the file containing this list is
+-/etc/vsftpd.banned_emails, but you may override this with the
++/etc/vsftpd/banned_emails, but you may override this with the
+ .BR banned_email_file
+ setting.
+
+ Default: NO
+ .TP
+@@ -431,11 +431,11 @@
+ access to low-security content without needing virtual users. When enabled,
+ anonymous logins are prevented unless the password provided is listed in the
+ file specified by the
+ .BR email_password_file
+ setting. The file format is one password per line, no extra whitespace. The
+-default filename is /etc/vsftpd.email_passwords.
++default filename is /etc/vsftpd/email_passwords.
+
+ Default: NO
+ .TP
+ .B session_support
+ This controls whether vsftpd attempts to maintain sessions for logins. If
+@@ -762,11 +762,11 @@
+ This option is the name of a file containing a list of anonymous e-mail
+ passwords which are not permitted. This file is consulted if the option
+ .BR deny_email_enable
+ is enabled.
+
+-Default: /etc/vsftpd.banned_emails
++Default: /etc/vsftpd/banned_emails
+ .TP
+ .B banner_file
+ This option is the name of a file containing text to display when someone
+ connects to the server. If set, it overrides the banner string provided by
+ the
+@@ -799,11 +799,11 @@
+ is enabled. If the option
+ .BR chroot_local_user
+ is enabled, then the list file becomes a list of users to NOT place in a
+ chroot() jail.
+
+-Default: /etc/vsftpd.chroot_list
++Default: /etc/vsftpd/chroot_list
+ .TP
+ .B cmds_allowed
+ This options specifies a comma separated list of allowed FTP commands (post
+ login. USER, PASS and QUIT and others are always allowed pre-login). Other
+ commands are rejected. This is a powerful method of really locking down an
+@@ -860,11 +860,11 @@
+ .B email_password_file
+ This option can be used to provide an alternate file for usage by the
+ .BR secure_email_list_enable
+ setting.
+
+-Default: /etc/vsftpd.email_passwords
++Default: /etc/vsftpd/email_passwords
+ .TP
+ .B ftp_username
+ This is the name of the user we use for handling anonymous FTP. The home
+ directory of this user is the root of the anonymous FTP area.
+
+@@ -983,14 +983,14 @@
+ This powerful option allows the override of any config option specified in
+ the manual page, on a per-user basis. Usage is simple, and is best illustrated
+ with an example. If you set
+ .BR user_config_dir
+ to be
+-.BR /etc/vsftpd_user_conf
++.BR /etc/vsftpd/user_conf
+ and then log on as the user "chris", then vsftpd will apply the settings in
+ the file
+-.BR /etc/vsftpd_user_conf/chris
++.BR /etc/vsftpd/user_conf/chris
+ for the duration of the session. The format of this file is as detailed in
+ this manual page! PLEASE NOTE that not all settings are effective on a
+ per-user basis. For example, many settings only prior to the user's session
+ being started. Examples of settings which will not affect any behviour on
+ a per-user basis include listen_address, banner_file, max_per_ip, max_clients,
+@@ -1022,11 +1022,11 @@
+ .B userlist_file
+ This option is the name of the file loaded when the
+ .BR userlist_enable
+ option is active.
+
+-Default: /etc/vsftpd.user_list
++Default: /etc/vsftpd/user_list
+ .TP
+ .B vsftpd_log_file
+ This option is the name of the file to which we write the vsftpd style
+ log file. This log is only written if the option
+ .BR xferlog_enable
diff --git a/net-ftp/vsftpd/files/vsftpd-2.3.2-as-needed.patch b/net-ftp/vsftpd/files/vsftpd-2.3.2-as-needed.patch
new file mode 100644
index 000000000000..330026e47e94
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.3.2-as-needed.patch
@@ -0,0 +1,13 @@
+Index: vsftpd-2.3.2/Makefile
+===================================================================
+--- vsftpd-2.3.2.orig/Makefile
++++ vsftpd-2.3.2/Makefile
+@@ -21,7 +21,7 @@ OBJS = main.o utility.o prelogin.o ftpcm
+ $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
+
+ vsftpd: $(OBJS)
+- $(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS) $(LDFLAGS)
++ $(CC) -o vsftpd $(LDFLAGS) $(OBJS) $(LINK) $(LIBS)
+
+ install:
+ if [ -x /usr/local/sbin ]; then \
diff --git a/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch b/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch
new file mode 100644
index 000000000000..702363ee472b
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.3.2-kerberos.patch
@@ -0,0 +1,20 @@
+Index: vsftpd-2.3.2/twoprocess.c
+===================================================================
+--- vsftpd-2.3.2.orig/twoprocess.c
++++ vsftpd-2.3.2/twoprocess.c
+@@ -284,6 +284,7 @@ process_login_req(struct vsf_session* p_
+ {
+ enum EVSFPrivopLoginResult e_login_result = kVSFLoginNull;
+ char cmd;
++ vsf_sysutil_install_null_sighandler(kVSFSysUtilSigCHLD);
+ /* Blocks */
+ cmd = priv_sock_get_cmd(p_sess->parent_fd);
+ if (cmd != PRIV_SOCK_LOGIN)
+@@ -363,7 +364,6 @@ common_do_login(struct vsf_session* p_se
+ int was_anon = anon;
+ const struct mystr* p_orig_user_str = p_user_str;
+ int newpid;
+- vsf_sysutil_install_null_sighandler(kVSFSysUtilSigCHLD);
+ /* Tells the pre-login child all is OK (it may exit in response) */
+ priv_sock_send_result(p_sess->parent_fd, PRIV_SOCK_RESULT_OK);
+ if (!p_sess->control_use_ssl)
diff --git a/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch b/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch
new file mode 100644
index 000000000000..7f1af4beb8c7
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-2.3.5-gentoo.patch
@@ -0,0 +1,207 @@
+Index: vsftpd-2.3.5/defs.h
+===================================================================
+--- vsftpd-2.3.5.orig/defs.h
++++ vsftpd-2.3.5/defs.h
+@@ -1,7 +1,7 @@
+ #ifndef VSF_DEFS_H
+ #define VSF_DEFS_H
+
+-#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf"
++#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf"
+
+ #define VSFTP_COMMAND_FD 0
+
+Index: vsftpd-2.3.5/tunables.c
+===================================================================
+--- vsftpd-2.3.5.orig/tunables.c
++++ vsftpd-2.3.5/tunables.c
+@@ -250,7 +250,7 @@ tunables_load_defaults()
+ /* -rw------- */
+ tunable_chown_upload_mode = 0600;
+
+- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir);
++ install_str_setting("/usr/share/vsftpd/empty", &tunable_secure_chroot_dir);
+ install_str_setting("ftp", &tunable_ftp_username);
+ install_str_setting("root", &tunable_chown_username);
+ install_str_setting("/var/log/xferlog", &tunable_xferlog_file);
+@@ -258,11 +258,11 @@ tunables_load_defaults()
+ install_str_setting(".message", &tunable_message_file);
+ install_str_setting("nobody", &tunable_nopriv_user);
+ install_str_setting(0, &tunable_ftpd_banner);
+- install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file);
+- install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file);
++ install_str_setting("/etc/vsftpd/vsftpd.banned_emails", &tunable_banned_email_file);
++ install_str_setting("/etc/vsftpd/vsftpd.chroot_list", &tunable_chroot_list_file);
+ install_str_setting("ftp", &tunable_pam_service_name);
+ install_str_setting("ftp", &tunable_guest_username);
+- install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file);
++ install_str_setting("/etc/vsftpd/vsftpd.user_list", &tunable_userlist_file);
+ install_str_setting(0, &tunable_anon_root);
+ install_str_setting(0, &tunable_local_root);
+ install_str_setting(0, &tunable_banner_file);
+@@ -275,7 +275,7 @@ tunables_load_defaults()
+ install_str_setting(0, &tunable_hide_file);
+ install_str_setting(0, &tunable_deny_file);
+ install_str_setting(0, &tunable_user_sub_token);
+- install_str_setting("/etc/vsftpd.email_passwords",
++ install_str_setting("/etc/vsftpd/vsftpd.email_passwords",
+ &tunable_email_password_file);
+ install_str_setting("/usr/share/ssl/certs/vsftpd.pem",
+ &tunable_rsa_cert_file);
+Index: vsftpd-2.3.5/vsftpd.8
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.8
++++ vsftpd-2.3.5/vsftpd.8
+@@ -21,7 +21,7 @@ itself will listen on the network. This
+ recommended. It is activated by setting
+ .Pa listen=YES
+ in
+-.Pa /etc/vsftpd.conf .
++.Pa /etc/vsftpd/vsftpd.conf .
+ Direct execution of the
+ .Nm vsftpd
+ binary will then launch the FTP service ready for immediate client connections.
+@@ -33,7 +33,7 @@ as root. Any command line option not sta
+ as a config file that will be loaded. Note that config files are loaded in the
+ strict order that they are encountered on the command line.
+ If no config files are specified, the default configuration file of
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ will be loaded, after all other command line options are processed.
+ .Pp
+ Supported options are:
+@@ -47,14 +47,14 @@ their appearance on the command line, in
+ config files.
+ .El
+ .Sh EXAMPLES
+-vsftpd -olisten=NO /etc/vsftpd.conf -oftpd_banner=blah
++vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah
+ .Pp
+ That example overrides vsftpd's built-in default for the "listen" option to be
+-NO, but then loads /etc/vsftpd.conf which may override that setting. Finally,
++NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. Finally,
+ the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd
+ setting and any identical setting that was in the config file.
+ .Sh FILES
+-.Pa /etc/vsftpd.conf
++.Pa /etc/vsftpd/vsftpd.conf
+ .Sh SEE ALSO
+ .Xr vsftpd.conf 5
+ .end
+Index: vsftpd-2.3.5/vsftpd.conf
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.conf
++++ vsftpd-2.3.5/vsftpd.conf
+@@ -1,4 +1,4 @@
+-# Example config file /etc/vsftpd.conf
++# Example config file /etc/vsftpd/vsftpd.conf
+ #
+ # The default compiled in settings are fairly paranoid. This sample file
+ # loosens things up a bit, to make the ftp daemon more usable.
+@@ -87,7 +87,7 @@ connect_from_port_20=YES
+ # useful for combatting certain DoS attacks.
+ #deny_email_enable=YES
+ # (default follows)
+-#banned_email_file=/etc/vsftpd.banned_emails
++#banned_email_file=/etc/vsftpd/vsftpd.banned_emails
+ #
+ # You may specify an explicit list of local users to chroot() to their home
+ # directory. If chroot_local_user is YES, then this list becomes a list of
+@@ -98,7 +98,7 @@ connect_from_port_20=YES
+ #chroot_local_user=YES
+ #chroot_list_enable=YES
+ # (default follows)
+-#chroot_list_file=/etc/vsftpd.chroot_list
++#chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
+ #
+ # You may activate the "-R" option to the builtin ls. This is disabled by
+ # default to avoid remote users being able to cause excessive I/O on large
+Index: vsftpd-2.3.5/vsftpd.conf.5
+===================================================================
+--- vsftpd-2.3.5.orig/vsftpd.conf.5
++++ vsftpd-2.3.5/vsftpd.conf.5
+@@ -4,7 +4,7 @@ vsftpd.conf \- config file for vsftpd
+ .SH DESCRIPTION
+ vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By
+ default, vsftpd looks for this file at the location
+-.BR /etc/vsftpd.conf .
++.BR /etc/vsftpd/vsftpd.conf .
+ However, you may override this by specifying a command line argument to
+ vsftpd. The command line argument is the pathname of the configuration file
+ for vsftpd. This behaviour is useful because you may wish to use an advanced
+@@ -138,7 +138,7 @@ chroot() jail in their home directory up
+ different if chroot_local_user is set to YES. In this case, the list becomes
+ a list of users which are NOT to be placed in a chroot() jail.
+ By default, the file containing this list is
+-/etc/vsftpd.chroot_list, but you may override this with the
++/etc/vsftpd/vsftpd.chroot_list, but you may override this with the
+ .BR chroot_list_file
+ setting.
+
+@@ -177,7 +177,7 @@ Default: NO
+ .B deny_email_enable
+ If activated, you may provide a list of anonymous password e-mail responses
+ which cause login to be denied. By default, the file containing this list is
+-/etc/vsftpd.banned_emails, but you may override this with the
++/etc/vsftpd/vsftpd.banned_emails, but you may override this with the
+ .BR banned_email_file
+ setting.
+
+@@ -433,7 +433,7 @@ anonymous logins are prevented unless th
+ file specified by the
+ .BR email_password_file
+ setting. The file format is one password per line, no extra whitespace. The
+-default filename is /etc/vsftpd.email_passwords.
++default filename is /etc/vsftpd/vsftpd.email_passwords.
+
+ Default: NO
+ .TP
+@@ -764,7 +764,7 @@ passwords which are not permitted. This
+ .BR deny_email_enable
+ is enabled.
+
+-Default: /etc/vsftpd.banned_emails
++Default: /etc/vsftpd/vsftpd.banned_emails
+ .TP
+ .B banner_file
+ This option is the name of a file containing text to display when someone
+@@ -803,7 +803,7 @@ is enabled. If the option
+ is enabled, then the list file becomes a list of users to NOT place in a
+ chroot() jail.
+
+-Default: /etc/vsftpd.chroot_list
++Default: /etc/vsftpd/vsftpd.chroot_list
+ .TP
+ .B cmds_allowed
+ This options specifies a comma separated list of allowed FTP commands (post
+@@ -864,7 +864,7 @@ This option can be used to provide an al
+ .BR secure_email_list_enable
+ setting.
+
+-Default: /etc/vsftpd.email_passwords
++Default: /etc/vsftpd/vsftpd.email_passwords
+ .TP
+ .B ftp_username
+ This is the name of the user we use for handling anonymous FTP. The home
+@@ -987,10 +987,10 @@ the manual page, on a per-user basis. Us
+ with an example. If you set
+ .BR user_config_dir
+ to be
+-.BR /etc/vsftpd_user_conf
++.BR /etc/vsftpd/vsftpd_user_conf
+ and then log on as the user "chris", then vsftpd will apply the settings in
+ the file
+-.BR /etc/vsftpd_user_conf/chris
++.BR /etc/vsftpd/vsftpd_user_conf/chris
+ for the duration of the session. The format of this file is as detailed in
+ this manual page! PLEASE NOTE that not all settings are effective on a
+ per-user basis. For example, many settings only prior to the user's session
+@@ -1026,7 +1026,7 @@ This option is the name of the file load
+ .BR userlist_enable
+ option is active.
+
+-Default: /etc/vsftpd.user_list
++Default: /etc/vsftpd/vsftpd.user_list
+ .TP
+ .B vsftpd_log_file
+ This option is the name of the file to which we write the vsftpd style
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.0-Makefile.patch b/net-ftp/vsftpd/files/vsftpd-3.0.0-Makefile.patch
new file mode 100644
index 000000000000..5df3b03f3fa9
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.0-Makefile.patch
@@ -0,0 +1,34 @@
+Index: vsftpd-3.0.0/Makefile
+===================================================================
+--- vsftpd-3.0.0.orig/Makefile
++++ vsftpd-3.0.0/Makefile
+@@ -1,16 +1,16 @@
+ # Makefile for systems with GNU tools
+-CC = gcc
++CC ?= gcc
+ INSTALL = install
+ IFLAGS = -idirafter dummyinc
+ #CFLAGS = -g
+-CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+- -Wall -W -Wshadow -Werror -Wformat-security \
++CFLAGS += -fPIE -fstack-protector --param=ssp-buffer-size=4 \
++ -Wall -W -Wshadow -Wformat-security \
+ -D_FORTIFY_SOURCE=2 \
+ #-pedantic -Wconversion
+
+ LIBS = `./vsf_findlibs.sh`
+ LINK =
+-LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now
++LDFLAGS += -fPIE -pie -Wl,-z,relro -Wl,-z,now
+
+ OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
+ tunables.o ftpdataio.o secbuf.o ls.o \
+@@ -26,7 +26,7 @@ OBJS = main.o utility.o prelogin.o ftpcm
+ $(CC) -c $*.c $(CFLAGS) $(IFLAGS)
+
+ vsftpd: $(OBJS)
+- $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
++ $(CC) -o vsftpd $(LDFLAGS) $(OBJS) $(LINK) $(LDFLAGS) $(LIBS)
+
+ install:
+ if [ -x /usr/local/sbin ]; then \
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch b/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch
new file mode 100644
index 000000000000..2445bb54467c
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.2-alpha.patch
@@ -0,0 +1,16 @@
+Author: Michael Cree <mcree@orcon.net.nz>
+Description: Fixing FTBFS on alpha (Closes: #656182).
+
+diff -Naurp vsftpd.orig/sysdeputil.c vsftpd/sysdeputil.c
+--- vsftpd.orig/sysdeputil.c 2010-03-26 04:25:33.000000000 +0100
++++ vsftpd/sysdeputil.c 2012-01-21 10:53:37.353802546 +0100
+@@ -81,6 +81,9 @@
+ #include <linux/unistd.h>
+ #include <errno.h>
+ #include <syscall.h>
++ #if defined(__alpha__)
++ #define __NR_getpid __NR_getxpid
++ #endif
+ #endif
+
+ #if defined(__linux__) && !defined(__ia64__) && !defined(__s390__)
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.2-aslim.patch b/net-ftp/vsftpd/files/vsftpd-3.0.2-aslim.patch
new file mode 100644
index 000000000000..9a8f8ea0e254
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.2-aslim.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/show_bug.cgi?id=522412
+https://bugzilla.redhat.com/show_bug.cgi?id=913519
+--- a/defs.h 2014-09-13 12:04:15.953079704 +0200
++++ b/defs.h 2014-09-13 12:04:48.677080716 +0200
+@@ -19,7 +19,7 @@
+ /* Must be at least the size of VSFTP_MAX_COMMAND_LINE, VSFTP_DIR_BUFSIZE and
+ VSFTP_DATA_BUFSIZE*2 */
+ #define VSFTP_PRIVSOCK_MAXSTR VSFTP_DATA_BUFSIZE * 2
+-#define VSFTP_AS_LIMIT 100UL * 1024 * 1024
++#define VSFTP_AS_LIMIT 400UL * 1024 * 1024
+
+ #endif /* VSF_DEFS_H */
+
diff --git a/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch b/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch
new file mode 100644
index 000000000000..2401f37c7e88
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-3.0.2-remove-legacy-cap.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/show_bug.cgi?id=450536
+Patch by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
+
+Probe the preferred version
+--- vsftpd-3.0.2/sysdeputil.c.org 2013-01-05 18:32:13.241288839 +0100
++++ vsftpd-3.0.2/sysdeputil.c 2013-01-05 19:41:53.038148078 +0100
+@@ -561,11 +561,17 @@
+ }
+
+ #ifndef VSF_SYSDEP_HAVE_LIBCAP
++static struct __user_cap_header_struct sys_cap_head;
+ static int
+ do_checkcap(void)
+ {
++ int retval;
++
++ /* Store preferred version in sys_cap_head */
++ vsf_sysutil_memclr(&sys_cap_head, sizeof(sys_cap_head));
+ /* EFAULT (EINVAL if page 0 mapped) vs. ENOSYS */
+- int retval = capset(0, 0);
++ retval = capset(&sys_cap_head, 0);
++
+ if (!vsf_sysutil_retval_is_error(retval) ||
+ vsf_sysutil_get_error() != kVSFSysUtilErrNOSYS)
+ {
+@@ -579,17 +585,13 @@
+ {
+ /* n.b. yes I know I should be using libcap!! */
+ int retval;
+- struct __user_cap_header_struct cap_head;
+- struct __user_cap_data_struct cap_data;
++ struct __user_cap_data_struct cap_data[2];
+ __u32 cap_mask = 0;
+ if (!caps)
+ {
+ bug("asked to adopt no capabilities");
+ }
+- vsf_sysutil_memclr(&cap_head, sizeof(cap_head));
+ vsf_sysutil_memclr(&cap_data, sizeof(cap_data));
+- cap_head.version = _LINUX_CAPABILITY_VERSION;
+- cap_head.pid = 0;
+ if (caps & kCapabilityCAP_CHOWN)
+ {
+ cap_mask |= (1 << CAP_CHOWN);
+@@ -598,9 +600,9 @@
+ {
+ cap_mask |= (1 << CAP_NET_BIND_SERVICE);
+ }
+- cap_data.effective = cap_data.permitted = cap_mask;
+- cap_data.inheritable = 0;
+- retval = capset(&cap_head, &cap_data);
++ cap_data[0].effective = cap_data[0].permitted = cap_mask;
++ cap_data[0].inheritable = 0;
++ retval = capset(&sys_cap_head, &cap_data[0]);
+ if (retval != 0)
+ {
+ die("capset");
diff --git a/net-ftp/vsftpd/files/vsftpd-checkconfig.sh b/net-ftp/vsftpd/files/vsftpd-checkconfig.sh
new file mode 100644
index 000000000000..e1d1e5231b67
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd-checkconfig.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+VSFTPD_CONF="${VSFTPD_CONF:-/etc/vsftpd/vsftpd.conf}"
+
+if [ ! -e ${VSFTPD_CONF} ] ; then
+ echo "Please setup ${VSFTPD_CONF} before starting vsftpd" >&2
+ echo "There are sample configurations in /usr/share/doc/vsftpd" >&2
+ exit 1
+fi
+
+if egrep -iq "^ *background *= *yes" "${VSFTPD_CONF}" ; then
+ echo "${VSFTPD_CONF} must not set background=YES" >&2
+ exit 1
+fi
+
+has_ip=false has_ipv6=false ip_error=true
+egrep -iq "^ *listen *= *yes" "${VSFTPD_CONF}" && has_ip=true
+egrep -iq "^ *listen_ipv6 *= *yes" "${VSFTPD_CONF}" && has_ipv6=true
+if ${has_ip} && ! ${has_ipv6} ; then
+ ip_error=false
+elif ! ${has_ip} && ${has_ipv6} ; then
+ ip_error=false
+fi
+if ${ip_error} ; then
+ echo "${VSFTPD_CONF} must contain listen=YES or listen_ipv6=YES" >&2
+ echo "but not both" >&2
+ exit 1
+fi
+
diff --git a/net-ftp/vsftpd/files/vsftpd.conf b/net-ftp/vsftpd/files/vsftpd.conf
new file mode 100644
index 000000000000..9405a3604e13
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.conf
@@ -0,0 +1,105 @@
+#
+# Example vsftpd config file
+#
+# See man 5 vsftpd.conf for more information.
+#
+# $Id$
+
+# Enable vsftpd to run as a standalone daemon
+# Comment these two out to run under inetd or xinetd
+background=YES
+listen=YES
+
+# Allow anonymous FTP?
+anonymous_enable=YES
+
+# Uncomment this to allow local users to log in.
+#local_enable=YES
+
+# Uncomment this to enable any form of FTP write command.
+#write_enable=YES
+
+# Default umask for local users is 077. You may wish to change this to 022,
+# if your users expect that (022 is used by most other ftpd's)
+#local_umask=022
+
+# Uncomment this to allow the anonymous FTP user to upload files. This only
+# has an effect if the above global write enable is activated. Also, you will
+# obviously need to create a directory writable by the FTP user.
+#anon_upload_enable=YES
+
+# Uncomment this if you want the anonymous FTP user to be able to create
+# new directories.
+#anon_mkdir_write_enable=YES
+
+# Activate directory messages - messages given to remote users when they
+# go into a certain directory.
+dirmessage_enable=YES
+
+# Make sure PORT transfer connections originate from port 20 (ftp-data).
+connect_from_port_20=YES
+
+# If you want, you can arrange for uploaded anonymous files to be owned by
+# a different user. Note! Using "root" for uploaded files is not
+# recommended!
+#chown_uploads=YES
+#chown_username=whoever
+
+# Activate logging of uploads/downloads.
+xferlog_enable=YES
+
+# If you want, you can have your log file in standard ftpd xferlog format
+#xferlog_std_format=YES
+
+# You may override where the log file goes if you like.
+xferlog_file=/var/log/vsftpd.log
+
+# You may change the default value for timing out an idle session.
+#idle_session_timeout=600
+
+# You may change the default value for timing out a data connection.
+#data_connection_timeout=120
+
+# It is recommended that you define on your system a unique user which the
+# ftp server can use as a totally isolated and unprivileged user.
+nopriv_user=nobody
+
+# Enable this and the server will recognise asynchronous ABOR requests. Not
+# recommended for security (the code is non-trivial). Not enabling it,
+# however, may confuse older FTP clients.
+#async_abor_enable=YES
+
+# By default the server will pretend to allow ASCII mode but in fact ignore
+# the request. Turn on the below options to have the server actually do ASCII
+# mangling on files when in ASCII mode.
+# Beware that turning on ascii_download_enable enables malicious remote parties
+# to consume your I/O resources, by issuing the command "SIZE /big/file" in
+# ASCII mode.
+# These ASCII options are split into upload and download because you may wish
+# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
+# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
+# on the client anyway..
+#ascii_upload_enable=YES
+#ascii_download_enable=YES
+
+# You may fully customise the login banner string:
+#ftpd_banner=Welcome to blah FTP service.
+
+# You may specify a file of disallowed anonymous e-mail addresses. Apparently
+# useful for combatting certain DoS attacks.
+#deny_email_enable=YES
+# (default follows)
+#banned_email_file=/etc/vsftpd/banned_emails
+
+# You may specify an explicit list of local users to chroot() to their home
+# directory. If chroot_local_user is YES, then this list becomes a list of
+# users to NOT chroot().
+#chroot_list_enable=YES
+# (default follows)
+#chroot_list_file=/etc/vsftpd/chroot_list
+
+# You may activate the "-R" option to the builtin ls. This is disabled by
+# default to avoid remote users being able to cause excessive I/O on large
+# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
+# the presence of the "-R" option, so there is a strong case for enabling it.
+#ls_recurse_enable=YES
diff --git a/net-ftp/vsftpd/files/vsftpd.init b/net-ftp/vsftpd/files/vsftpd.init
new file mode 100644
index 000000000000..bba2bb0873b0
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.init
@@ -0,0 +1,51 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Id$
+
+VSFTPD_NAME=${SVCNAME##*.}
+if [ -n "${VSFTPD_NAME}" -a "${SVCNAME}" != "vsftpd" ]; then
+ VSFTPD_PID="/var/run/vsftpd.${VSFTPD_NAME}.pid"
+ VSFTPD_CONF_DEFAULT="/etc/vsftpd/${VSFTPD_NAME}.conf"
+else
+ VSFTPD_PID="/var/run/vsftpd.pid"
+ VSFTPD_CONF_DEFAULT="/etc/vsftpd/vsftpd.conf"
+fi
+VSFTPD_CONF=${VSFTPD_CONF:-${VSFTPD_CONF_DEFAULT}}
+VSFTPD_EXEC=${VSFTPD_EXEC:-/usr/sbin/vsftpd}
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ VSFTPD_CONF="${VSFTPD_CONF}" \
+ /usr/libexec/vsftpd-checkconfig.sh || return 1
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${VSFTPD_EXEC} \
+ --background --make-pidfile --pidfile "${VSFTPD_PID}" \
+ -- "${VSFTPD_CONF}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ local retval=0
+ if [ -f ${VSFTPD_PID} ]; then
+ start-stop-daemon --stop --pidfile ${VSFTPD_PID} || retval=1
+ pkill --full ${VSFTPD_CONF}
+ else
+ ewarn "Couldn't find ${VSFTPD_PID} trying to stop using the config filename ${VSFTPD_CONF}"
+ pgrep --full ${VSFTPD_CONF} > ${VSFTPD_PID}
+ start-stop-daemon --stop --pidfile ${VSFTPD_PID} || retval=1
+ pkill --full ${VSFTPD_CONF}
+ fi
+ eend ${retval}
+}
+
+# vim: ts=4
diff --git a/net-ftp/vsftpd/files/vsftpd.logrotate b/net-ftp/vsftpd/files/vsftpd.logrotate
new file mode 100644
index 000000000000..b28a2a42628c
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.logrotate
@@ -0,0 +1,4 @@
+/var/log/vsftpd*.log {
+ missingok
+ notifempty
+}
diff --git a/net-ftp/vsftpd/files/vsftpd.service b/net-ftp/vsftpd/files/vsftpd.service
new file mode 100644
index 000000000000..1445f2769861
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Vsftpd ftp daemon
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/libexec/vsftpd-checkconfig.sh
+ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-ftp/vsftpd/files/vsftpd.socket b/net-ftp/vsftpd/files/vsftpd.socket
new file mode 100644
index 000000000000..cdc0d337efeb
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.socket
@@ -0,0 +1,9 @@
+[Unit]
+Conflicts=vsftpd.service
+
+[Socket]
+ListenStream=21
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-ftp/vsftpd/files/vsftpd.xinetd b/net-ftp/vsftpd/files/vsftpd.xinetd
new file mode 100644
index 000000000000..1027c1f68b2c
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd.xinetd
@@ -0,0 +1,15 @@
+# default: off
+# description: Vsftpd is an FTP server, designed to be secure.
+# $Id$
+
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/vsftpd
+ server_args = /etc/vsftpd/vsftpd.conf
+ log_on_success += DURATION
+ nice = 10
+ disable = yes
+}
diff --git a/net-ftp/vsftpd/files/vsftpd_at.service b/net-ftp/vsftpd/files/vsftpd_at.service
new file mode 100644
index 000000000000..5380b83ffcfe
--- /dev/null
+++ b/net-ftp/vsftpd/files/vsftpd_at.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Very Secure FTP Daemon
+
+[Service]
+Type=simple
+# Note: Do not use ExecStartPre=/usr/libexec/vsftpd-checkconfig.sh, as it
+# requires one of the listen options to be enabled.
+ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf -obackground=NO -olisten=NO -olisten_ipv6=NO
+StandardInput=socket
+SuccessExitStatus=2
diff --git a/net-ftp/vsftpd/metadata.xml b/net-ftp/vsftpd/metadata.xml
new file mode 100644
index 000000000000..53e430c2243d
--- /dev/null
+++ b/net-ftp/vsftpd/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-ftp</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer>
+ <email>wired@gentoo.org</email>
+ <name>Alex Alexander</name>
+ </maintainer>
+ <maintainer>
+ <email>bugs@bergstroem.nu</email>
+ <name>Johan Bergström</name>
+ <description>Proxy Maintainer. CC him on bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ Very Secure FTP Daemon written with speed, size and security
+ in mind
+ </longdescription>
+</pkgmetadata>
diff --git a/net-ftp/vsftpd/vsftpd-2.3.5.ebuild b/net-ftp/vsftpd/vsftpd-2.3.5.ebuild
new file mode 100644
index 000000000000..d28e930f4213
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-2.3.5.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+
+ # as-needed patch. Bug #335977
+ epatch "${FILESDIR}/${PN}-2.3.2-as-needed.patch"
+
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..9ecd93631b08
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+
+ #Bug #450536
+ epatch "${FILESDIR}"/${P}-remove-legacy-cap.patch
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2-r2.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2-r2.ebuild
new file mode 100644
index 000000000000..593b4e9db24f
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2-r2.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+
+ #Bug #450536
+ epatch "${FILESDIR}"/${P}-remove-legacy-cap.patch
+
+ epatch_user
+}
+
+src_compile() {
+ # Override LIBS variable. Bug #508192
+ LIBS=
+ use caps && LIBS+=" -lcap"
+ use pam && LIBS+=" -lpam"
+ use tcpd && LIBS+=" -lwrap"
+ use ssl && LIBS+=" -lssl -lcrypto"
+
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake LIBS="${LIBS}"
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ systemd_dounit "${FILESDIR}/${PN}.socket"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd openRC init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2-r3.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2-r3.ebuild
new file mode 100644
index 000000000000..1a1530a7d9c6
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2-r3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Increase AS_LIMIT. Bug #522412
+ epatch "${FILESDIR}/${P}-aslim.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+
+ #Bug #450536
+ epatch "${FILESDIR}"/${P}-remove-legacy-cap.patch
+
+ epatch_user
+}
+
+src_compile() {
+ # Override LIBS variable. Bug #508192
+ LIBS=
+ use caps && LIBS+=" -lcap"
+ use pam && LIBS+=" -lpam"
+ use tcpd && LIBS+=" -lwrap"
+ use ssl && LIBS+=" -lssl -lcrypto"
+
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake LIBS="${LIBS}"
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ systemd_dounit "${FILESDIR}/${PN}.socket"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd openRC init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2-r4.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2-r4.ebuild
new file mode 100644
index 000000000000..44c28846bad2
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2-r4.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Increase AS_LIMIT. Bug #522412
+ epatch "${FILESDIR}/${P}-aslim.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+
+ #Bug #450536
+ epatch "${FILESDIR}"/${P}-remove-legacy-cap.patch
+
+ epatch_user
+}
+
+src_compile() {
+ # Override LIBS variable. Bug #508192
+ LIBS=
+ use caps && LIBS+=" -lcap"
+ use pam && LIBS+=" -lpam"
+ use tcpd && LIBS+=" -lwrap"
+ use ssl && LIBS+=" -lssl -lcrypto"
+
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake LIBS="${LIBS}"
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}_at.service" "${PN}@.service"
+ systemd_dounit "${FILESDIR}/${PN}.socket"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd openRC init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/vsftpd/vsftpd-3.0.2.ebuild b/net-ftp/vsftpd/vsftpd-3.0.2.ebuild
new file mode 100644
index 000000000000..eaebab280fb4
--- /dev/null
+++ b/net-ftp/vsftpd/vsftpd-3.0.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
+HOMEPAGE="http://vsftpd.beasts.org/"
+SRC_URI="http://security.appspot.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="caps pam tcpd ssl selinux xinetd"
+
+DEPEND="caps? ( >=sys-libs/libcap-2 )
+ pam? ( virtual/pam )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ ssl? ( >=dev-libs/openssl-0.9.7d )"
+RDEPEND="${DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+ xinetd? ( sys-apps/xinetd )"
+
+src_prepare() {
+
+ # kerberos patch. bug #335980
+ epatch "${FILESDIR}/${PN}-2.3.2-kerberos.patch"
+
+ # Patch the source, config and the manpage to use /etc/vsftpd/
+ epatch "${FILESDIR}/${PN}-2.3.5-gentoo.patch"
+
+ # Fix building without the libcap
+ epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
+
+ # Fix building on alpha. Bug #405829
+ epatch "${FILESDIR}/${PN}-3.0.2-alpha.patch"
+
+ # Configure vsftpd build defaults
+ use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
+ use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
+ use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
+
+ # Ensure that we don't link against libcap unless asked
+ if ! use caps ; then
+ sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c || die
+ epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
+ fi
+
+ # Let portage control stripping
+ sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile || die
+
+ #Bug #335977
+ epatch "${FILESDIR}"/${PN}-3.0.0-Makefile.patch
+}
+
+src_compile() {
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ emake
+}
+
+src_install() {
+ into /usr
+ doman ${PN}.conf.5 ${PN}.8
+ dosbin ${PN} || die "disbin failed"
+
+ dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
+ README README.security REWARD SIZE \
+ SPEED TODO TUNING || die "dodoc failed"
+ newdoc ${PN}.conf ${PN}.conf.example
+
+ docinto security
+ dodoc SECURITY/* || die "dodoc failed"
+
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r EXAMPLE/* || die "doins faileD"
+
+ insinto /etc/${PN}
+ newins ${PN}.conf{,.example}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" ${PN}
+ fi
+
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ keepdir /usr/share/${PN}/empty
+
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/vsftpd-checkconfig.sh"
+}
+
+pkg_preinst() {
+ # If we use xinetd, then we set listen=NO
+ # so that our default config works under xinetd - fixes #78347
+ if use xinetd ; then
+ sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/${PN}/${PN}.conf.example
+ fi
+}
+
+pkg_postinst() {
+ einfo "vsftpd init script can now be multiplexed."
+ einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
+ einfo "If you symlink the init script to another one, say vsftpd.foo"
+ einfo "then that uses /etc/vsftpd/foo.conf instead."
+ einfo
+ einfo "Example:"
+ einfo " cd /etc/init.d"
+ einfo " ln -s vsftpd vsftpd.foo"
+ einfo "You can now treat vsftpd.foo like any other service"
+}
diff --git a/net-ftp/weex/Manifest b/net-ftp/weex/Manifest
new file mode 100644
index 000000000000..f231adbb5dd3
--- /dev/null
+++ b/net-ftp/weex/Manifest
@@ -0,0 +1 @@
+DIST weex-2.6.1.5.tar.gz 206972 SHA256 d4f307293ff18230641098723273ba6243e5fbeb5af85f89a8938b826e91ac38 SHA512 4a33761a22f7df4b610b86b74104a1eb4836851345092ac730758026ef5e4fd5e4df3e670b5eefe1230f0ccfce85282ffa79007a0056df774cf1ebce191a90bc WHIRLPOOL cc85576e9b65bc0553bc128a21e60c15fba765fde41788ee911c59aff281a9333ec1c48c1184fae5df4e0ea064c76c591c7aee63b5eb26effcd5ac99847f2883
diff --git a/net-ftp/weex/files/formatstring.patch b/net-ftp/weex/files/formatstring.patch
new file mode 100644
index 000000000000..06ad28b88365
--- /dev/null
+++ b/net-ftp/weex/files/formatstring.patch
@@ -0,0 +1,11 @@
+--- src/log.c.old 2005-10-02 03:49:34.495603240 +0200
++++ src/log.c 2005-10-02 03:50:18.064979688 +0200
+@@ -183,7 +183,7 @@ void log_flush(void)
+
+ fp=log_open();
+ for(i=0;i<max_log;i++){
+- fprintf(fp,log_str[i]);
++ fprintf(fp,"%s",log_str[i]);
+ free(log_str[i]);
+ }
+ free(log_str);
diff --git a/net-ftp/weex/files/weex-2.6.1.5-va_list.patch b/net-ftp/weex/files/weex-2.6.1.5-va_list.patch
new file mode 100644
index 000000000000..70b3ebcdd832
--- /dev/null
+++ b/net-ftp/weex/files/weex-2.6.1.5-va_list.patch
@@ -0,0 +1,23 @@
+--- src/strlib.c.orig 2003-08-18 11:52:38.000000000 +0200
++++ src/strlib.c 2004-07-05 20:32:48.853638760 +0200
+@@ -167,14 +167,16 @@
+ -------------------------------------------------- */
+ char *str_dup_printf(const char *format, ...)
+ {
+- va_list ap1,ap2;
++ va_list ap1;
+ char *ptr;
+
+ va_start(ap1,format);
+- G_VA_COPY(ap2,ap1);
++ //G_VA_COPY(ap2,ap1);
+ ptr=str_malloc(printf_string_upper_bound(format,ap1));
+- vsprintf(ptr,format,ap2);
+- va_end(ap2);
++ va_end(ap1);
++ va_start(ap1,format);
++ vsprintf(ptr,format,ap1);
++ va_end(ap1);
+
+ return(ptr);
+ }
diff --git a/net-ftp/weex/metadata.xml b/net-ftp/weex/metadata.xml
new file mode 100644
index 000000000000..ca1c1c5c0efb
--- /dev/null
+++ b/net-ftp/weex/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">weex</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-ftp/weex/weex-2.6.1.5-r1.ebuild b/net-ftp/weex/weex-2.6.1.5-r1.ebuild
new file mode 100644
index 000000000000..16c6fccd521e
--- /dev/null
+++ b/net-ftp/weex/weex-2.6.1.5-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Automates maintaining a web page or other FTP archive"
+HOMEPAGE="http://weex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="" #nls
+
+DEPEND="sys-libs/ncurses"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-va_list.patch"
+ epatch "${FILESDIR}/formatstring.patch"
+}
+
+src_configure() {
+ econf --disable-nls #532502
+}
+
+src_install() {
+ default
+ dodoc doc/TODO* doc/README* doc/FAQ* doc/sample* doc/ChangeLog* \
+ doc/BUG* doc/THANK*
+}
diff --git a/net-ftp/yafc/Manifest b/net-ftp/yafc/Manifest
new file mode 100644
index 000000000000..33667fd4cbfd
--- /dev/null
+++ b/net-ftp/yafc/Manifest
@@ -0,0 +1 @@
+DIST yafc-1.2.6.tar.xz 367408 SHA256 96bd46c4dbfbff5d83cb0cec0809b2d1d73c66aff6b30fdd44a291267325b617 SHA512 155339f04eb17e63383e35573497e4838a09ac6f6608c07e8639b0e163c755c40a426f0ade941efd8ba774c6b577358dac6fd18c56bbea7d1fec57b00cb05d35 WHIRLPOOL 673ebaba7e816f3901b696004dddfa0727344aec3f6a4edd86f8dd69058d1dcbe607334a942974e7b8180519292961ce44dc5b656024eb6aa73120f9cec41947
diff --git a/net-ftp/yafc/metadata.xml b/net-ftp/yafc/metadata.xml
new file mode 100644
index 000000000000..7bd2aa1c49f0
--- /dev/null
+++ b/net-ftp/yafc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>page@cubata.homelinux.net</email>
+ <name>Carles Pagès</name>
+ </maintainer>
+ <use>
+ <flag name="ssh">Build with SFTP support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-ftp/yafc/yafc-1.2.6.ebuild b/net-ftp/yafc/yafc-1.2.6.ebuild
new file mode 100644
index 000000000000..3d89d53cab6c
--- /dev/null
+++ b/net-ftp/yafc/yafc-1.2.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="Console ftp client with a lot of nifty features"
+HOMEPAGE="http://www.yafc-ftp.com/"
+SRC_URI="http://www.yafc-ftp.com/upload/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+IUSE="ipv6 readline kerberos socks5 ssh"
+
+DEPEND="dev-libs/openssl:0
+ readline? ( >=sys-libs/readline-6 )
+ kerberos? ( virtual/krb5 )
+ socks5? ( net-proxy/dante )
+ ssh? ( net-libs/libssh )"
+RDEPEND="${DEPEND}"
+
+DOCS=( BUGS NEWS README THANKS TODO )
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ export ac_cv_ipv6=$(usex ipv6)
+ econf \
+ $(use_with readline readline /usr) \
+ $(use_with socks5 socks /usr) \
+ $(use_with socks5 socks5 /usr) \
+ $(use_with kerberos krb5) \
+ $(use_with ssh) \
+ --with-bash-completion="$(get_bashcompdir)" \
+ --without-krb4
+}
+
+src_install() {
+ default
+ dodoc -r samples
+}