Merge remote-tracking branch 'remotes/axelgenus/man-pages-it'
[gentoo.git] / net-ftp / lftp / lftp-4.6.5.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit autotools eutils libtool
7
8 DESCRIPTION="A sophisticated ftp/sftp/http/https/torrent client and file transfer program"
9 HOMEPAGE="http://lftp.yar.ru/"
10 SRC_URI="${HOMEPAGE}ftp/${P}.tar.xz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 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"
15
16 IUSE="convert-mozilla-cookies +gnutls idn ipv6 nls openssl socks5 +ssl verify-file"
17 LFTP_LINGUAS=( cs de es fr it ja ko pl pt_BR ru uk zh_CN zh_HK zh_TW )
18 IUSE+=" ${LFTP_LINGUAS[@]/#/linguas_}"
19
20 REQUIRED_USE="
21         ssl? ( ^^ ( openssl gnutls ) )
22 "
23
24 RDEPEND="
25         >=sys-libs/ncurses-5.1:=
26         >=sys-libs/readline-5.1:=
27         dev-libs/expat
28         sys-libs/zlib
29         convert-mozilla-cookies? ( dev-perl/DBI )
30         idn? ( net-dns/libidn )
31         socks5? (
32                 >=net-proxy/dante-1.1.12
33                 virtual/pam
34         )
35         ssl? (
36                 gnutls? ( >=net-libs/gnutls-1.2.3 )
37                 openssl? ( dev-libs/openssl:0 )
38         )
39         verify-file? (
40                 dev-perl/string-crc32
41                 virtual/perl-Digest-MD5
42         )
43 "
44
45 DEPEND="
46         ${RDEPEND}
47         =sys-devel/libtool-2*
48         app-arch/xz-utils
49         nls? ( >=sys-devel/gettext-0.19 )
50         virtual/pkgconfig
51 "
52
53 DOCS=(
54         BUGS ChangeLog FAQ FEATURES MIRRORS NEWS README README.debug-levels
55         README.dnssec README.modules THANKS TODO
56 )
57
58 src_prepare() {
59         epatch \
60                 "${FILESDIR}"/${PN}-4.0.2.91-lafile.patch \
61                 "${FILESDIR}"/${PN}-4.5.5-am_config_header.patch \
62                 "${FILESDIR}"/${PN}-4.6.3a-autopoint.patch
63
64         eautoreconf
65         elibtoolize # for Darwin bundles
66
67         # bug #536036
68         printf 'set fish:auto-confirm no\nset sftp:auto-confirm no\n' >> ${PN}.conf || die
69 }
70
71 src_configure() {
72         econf \
73                 $(use_enable nls) \
74                 $(use_with gnutls) \
75                 $(use_with idn libidn) \
76                 $(use_enable ipv6) \
77                 $(use_with openssl openssl "${EPREFIX}"/usr) \
78                 $(use_with socks5 socksdante "${EPREFIX}"/usr) \
79                 --enable-packager-mode \
80                 --sysconfdir="${EPREFIX}"/etc/${PN} \
81                 --with-modules \
82                 --without-included-regex
83 }
84
85 src_install() {
86         default
87         local script
88         for script in {convert-mozilla-cookies,verify-file}; do
89                 use ${script} || { rm "${ED}"/usr/share/${PN}/${script} || die ;}
90         done
91 }