/[gentoo-x86]/net-misc/aria2/aria2-1.18.5.ebuild
Gentoo

Contents of /net-misc/aria2/aria2-1.18.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 29 02:09:35 2014 UTC (5 years, 3 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Keyword ~ppc ~ppc64, bug #488294

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --ignore-arches, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/aria2/aria2-1.18.5.ebuild,v 1.3 2014/08/21 14:19:37 armin76 Exp $
4
5 EAPI="5"
6
7 inherit bash-completion-r1 eutils
8
9 DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
10 HOMEPAGE="http://aria2.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
15 SLOT="0"
16 IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssl tcmalloc test xmlrpc"
17
18 CDEPEND="sys-libs/zlib:0=
19 ssl? (
20 app-misc/ca-certificates
21 gnutls? ( >=net-libs/gnutls-1.2.9:0= )
22 !gnutls? ( dev-libs/openssl:0= ) )
23 adns? ( >=net-dns/c-ares-1.5.0:0= )
24 bittorrent? (
25 ssl? (
26 gnutls? (
27 nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
28 !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
29 !ssl? (
30 nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
31 !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
32 jemalloc? ( dev-libs/jemalloc )
33 libuv? ( dev-libs/libuv:0= )
34 metalink? (
35 libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
36 !libxml2? ( dev-libs/expat:0= ) )
37 sqlite? ( dev-db/sqlite:3= )
38 tcmalloc? ( dev-util/google-perftools )
39 xmlrpc? (
40 libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
41 !libxml2? ( dev-libs/expat:0= ) )"
42
43 DEPEND="${CDEPEND}
44 virtual/pkgconfig
45 nls? ( sys-devel/gettext )
46 test? ( >=dev-util/cppunit-1.12.0:0 )"
47 RDEPEND="${CDEPEND}
48 nls? ( virtual/libiconv virtual/libintl )
49 scripts? ( dev-lang/ruby )"
50
51 REQUIRED_USE="jemalloc? ( !tcmalloc )
52 tcmalloc? ( !jemalloc )"
53
54 pkg_setup() {
55 if use scripts && use !xmlrpc && use !metalink; then
56 ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
57 ewarn "and aria2mon scripts against the local aria2."
58 fi
59 }
60
61 src_prepare() {
62 epatch "${FILESDIR}/${P}-fix-gnutls-2.x-compatibility.patch"
63 epatch_user
64 sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
65 }
66
67 src_configure() {
68 local myconf=(
69 # threads, epoll: check for best portability
70
71 # do not try to compile and run a test LIBXML program
72 --disable-xmltest
73 # enable the shared library
74 --enable-libaria2
75 # zlib should always be available anyway
76 --with-libz
77 --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
78
79 # optional features
80 $(use_enable bittorrent)
81 $(use_enable metalink)
82 $(use_enable nls)
83 $(use_with sqlite sqlite3)
84 $(use_with adns libcares)
85 $(use_with libuv)
86 $(use_with jemalloc)
87 $(use_with tcmalloc)
88 )
89
90 # SSL := gnutls / openssl
91 # USE=ssl
92 # + USE=gnutls -> gnutls
93 # + USE=-gnutls -> openssl
94
95 if use ssl; then
96 myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
97 else
98 myconf+=( --without-gnutls --without-openssl )
99 fi
100
101 # message-digest := nettle / gcrypt / openssl
102 # bignum := nettle+gmp / gcrypt / openssl
103 # bittorrent := message-digest + bignum
104 # USE=bittorrent
105 # + USE=(ssl -gnutls) -> openssl
106 # + USE=nettle -> nettle+gmp
107 # + USE=-nettle -> gcrypt
108
109 if use !bittorrent || use ssl && use !gnutls; then
110 myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
111 else
112 myconf+=( $(use_with !nettle libgcrypt)
113 $(use_with nettle libnettle) $(use_with nettle libgmp) )
114 fi
115
116 # metalink+xmlrpc := libxml2 / expat
117 # USE=(metalink || xmlrpc)
118 # + USE=libxml2 -> libxml2
119 # + USE=-libxml2 -> expat
120
121 if use metalink || use xmlrpc; then
122 myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
123 else
124 myconf+=( --without-libexpat --without-libxml2 )
125 fi
126
127 # Note:
128 # - always enable gzip/http compression since zlib should always be available anyway
129 # - always enable epoll since we can assume kernel 2.6.x
130 # - other options for threads: solaris, pth, win32
131 econf "${myconf[@]}"
132 }
133
134 src_install() {
135 default
136 rm -rf "${D}"/usr/share/doc/aria2 \
137 "${D}"/usr/share/doc/${PF}/README{,.html}
138
139 dobashcomp doc/bash_completion/aria2c
140 use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
141 }
142
143 pkg_postinst() {
144 if use xmlrpc || use metalink; then
145 elog "If you would like to use the additional aria2mon and aria2rpc tools,"
146 elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
147 fi
148 }

  ViewVC Help
Powered by ViewVC 1.1.20