net-ftp/tlswrap: add libressl support, bug #565394
authorBernard Cafarelli <voyageur@gentoo.org>
Wed, 11 Nov 2015 19:40:13 +0000 (20:40 +0100)
committerBernard Cafarelli <voyageur@gentoo.org>
Wed, 11 Nov 2015 19:41:17 +0000 (20:41 +0100)
Patch provided by Marek Behun
Cleaned ebuild, updated homepage

Package-Manager: portage-2.2.24

net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch [new file with mode: 0644]
net-ftp/tlswrap/tlswrap-1.04-r1.ebuild [new file with mode: 0644]

diff --git a/net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch b/net-ftp/tlswrap/files/tlswrap-1.04-libressl.patch
new file mode 100644 (file)
index 0000000..5c1f108
--- /dev/null
@@ -0,0 +1,16 @@
+diff -Naur a/tls.c b/tls.c
+--- a/tls.c    2006-11-25 19:52:08.000000000 +0100
++++ b/tls.c    2015-11-10 16:16:25.000000000 +0100
+@@ -73,10 +73,12 @@
+               printf("egd_sock is %s\n", egd_sock);
+ #ifdef HAVE_RAND_STATUS
+       if (RAND_status() != 1) {
++#ifndef OPENSSL_NO_EGD
+               if ( RAND_egd(egd_sock) == -1 ) {
+                       fprintf(stderr, "egd_sock is %s\n", egd_sock);
+                       sys_err("RAND_egd failed\n");
+               }
++#endif
+               if (RAND_status() != 1)
+                       sys_err("ssl_init: System without /dev/urandom, PRNG seeding must be done manually.\r\n");
+       }
diff --git a/net-ftp/tlswrap/tlswrap-1.04-r1.ebuild b/net-ftp/tlswrap/tlswrap-1.04-r1.ebuild
new file mode 100644 (file)
index 0000000..62f8c94
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="a TLS/SSL FTP wrapper/proxy which allows to use TLS with every FTP client"
+HOMEPAGE="http://www.tlswrap.com"
+SRC_URI="http://www.tlswrap.com/${P}.tar.gz"
+
+# GPL-2 for Gentoo init script
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl"
+
+DEPEND="!libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:= )"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+       epatch "${FILESDIR}/${P}-libressl.patch"
+}
+
+src_install() {
+       emake prefix="${D}/usr" install
+       dodoc ChangeLog README
+       newinitd "${FILESDIR}/tlswrap.init" tlswrap
+}