Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/aria2/
Date: Tue, 17 Oct 2017 15:12:41
Message-Id: 1508253149.4a38945cf51cba53fbb7c12800b533cfb4bb1b46.mgorny@gentoo
1 commit: 4a38945cf51cba53fbb7c12800b533cfb4bb1b46
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 17 14:57:26 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 17 15:12:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a38945c
7
8 net-misc/aria2: Bump to 1.33.0
9
10 net-misc/aria2/Manifest | 1 +
11 net-misc/aria2/aria2-1.33.0.ebuild | 152 +++++++++++++++++++++++++++++++++++++
12 2 files changed, 153 insertions(+)
13
14 diff --git a/net-misc/aria2/Manifest b/net-misc/aria2/Manifest
15 index 9bf92af126d..7ebc69433be 100644
16 --- a/net-misc/aria2/Manifest
17 +++ b/net-misc/aria2/Manifest
18 @@ -1,3 +1,4 @@
19 DIST aria2-1.30.0.tar.xz 1497124 SHA256 bf6c5366d11d2a6038c8e19f01f9b874041793aaf317e0206120e3e8c9c431f6 SHA512 8c3deb4b58b9db9e8de52f48f6e863e07743ae4af14e2b2d64ddcac94b6aec16ff8d4f27e7d6076426d597af9e6e0988289f3a1c156796c9d79ee7f60f5edc38 WHIRLPOOL c3613212226c1fe6db20b45dce021441fceaf26970e8773064ef254e3a1272550c9c8e69d2fa677d249a70c853d6ba65c91fa1a42c33009127177b496fcbda0a
20 DIST aria2-1.31.0.tar.xz 1501388 SHA256 7b85619048b23406f241e38a5b1b8b0bc2cae9e80fd117810c2a71ecca813f8c SHA512 a0a1312522324dc0bc24cf1a5cceaef49d40445668ed0bd98dc3cdd5e2edb428552e97504c8c072f5d1180d6bbd252de01d290ef5c94d1803b8ade330bc2710f WHIRLPOOL 0b5af6d2f9f7e62a2620003a0aa44e842517cb33be00a7e1b0f7ac2720823c5d32deafd91ae096d8ef028f89885c08f459a03955ee349fd6d21dade190895596
21 DIST aria2-1.32.0.tar.xz 1502192 SHA256 546e9194a9135d665fce572cb93c88f30fb5601d113bfa19951107ced682dc50 SHA512 7c14c395fab3024191145b5c965c6c89211cd36ce405cafeef350aa6df9850bee9de65e756eab7d0bdeccb9409b829ea21552b9aac0166f50dcc17501b3dca8b WHIRLPOOL 763188033573b5928c7935229505cd82f39009952aa78b7871c1c1579dde54b46185a0d378e3d7241230d0611ba1b7d96c04ed4c09049d38d89b6b550391a0aa
22 +DIST aria2-1.33.0.tar.xz 1526936 SHA256 996e3fc2fd07ce2dd517e20a1f79b8b3dbaa5c7e27953b5fc19dae38f3874b8c SHA512 6b28282b5688444c99c3219d185c5c87f1760300f47fb9a87f9ee5eb62dd366d55a7706bb6edb16957f0a6926b354b0c6cbbe9887c94980c3027775d06589fea WHIRLPOOL 16bf3179f15830cfbfbe8f44781aa1a2fb0a500f650dd342aff114b13a6b3280045036cf5acc937bc22a0eeef95c83165e4cb9c3dd05032b7bed511e8d7b3bcd
23
24 diff --git a/net-misc/aria2/aria2-1.33.0.ebuild b/net-misc/aria2/aria2-1.33.0.ebuild
25 new file mode 100644
26 index 00000000000..de956e8d169
27 --- /dev/null
28 +++ b/net-misc/aria2/aria2-1.33.0.ebuild
29 @@ -0,0 +1,152 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI="6"
34 +
35 +inherit bash-completion-r1
36 +
37 +DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
38 +HOMEPAGE="https://aria2.github.io/"
39 +SRC_URI="https://github.com/aria2/${PN}/releases/download/release-${PV}/${P}.tar.xz"
40 +
41 +LICENSE="GPL-2"
42 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
43 +SLOT="0"
44 +IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssh ssl tcmalloc test xmlrpc"
45 +
46 +CDEPEND="sys-libs/zlib:0=
47 + ssl? (
48 + app-misc/ca-certificates
49 + gnutls? ( >=net-libs/gnutls-1.2.9:0= )
50 + !gnutls? ( dev-libs/openssl:0= ) )
51 + adns? ( >=net-dns/c-ares-1.5.0:0= )
52 + bittorrent? (
53 + ssl? (
54 + gnutls? (
55 + nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-6:0= )
56 + !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
57 + !ssl? (
58 + nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-6:0= )
59 + !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
60 + jemalloc? ( dev-libs/jemalloc )
61 + libuv? ( dev-libs/libuv:0= )
62 + metalink? (
63 + libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
64 + !libxml2? ( dev-libs/expat:0= ) )
65 + sqlite? ( dev-db/sqlite:3= )
66 + ssh? ( net-libs/libssh2:= )
67 + tcmalloc? ( dev-util/google-perftools )
68 + xmlrpc? (
69 + libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
70 + !libxml2? ( dev-libs/expat:0= ) )"
71 +
72 +DEPEND="${CDEPEND}
73 + app-arch/xz-utils
74 + virtual/pkgconfig
75 + nls? ( sys-devel/gettext )
76 + test? ( >=dev-util/cppunit-1.12.0:0 )"
77 +RDEPEND="${CDEPEND}
78 + nls? ( virtual/libiconv virtual/libintl )
79 + scripts? ( dev-lang/ruby )"
80 +
81 +# xmlrpc has no explicit switch, it's turned out by any XML library
82 +# so metalink implicitly forces it on
83 +REQUIRED_USE="?? ( jemalloc tcmalloc )
84 + metalink? ( xmlrpc )"
85 +RESTRICT="!test? ( test )"
86 +
87 +pkg_setup() {
88 + if use scripts && ! use xmlrpc; then
89 + ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
90 + ewarn "and aria2mon scripts against the local aria2."
91 + fi
92 +}
93 +
94 +src_prepare() {
95 + default
96 + sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
97 +}
98 +
99 +src_configure() {
100 + local myconf=(
101 + # threads, epoll: check for best portability
102 +
103 + # do not try to compile and run a test LIBXML program
104 + --disable-xmltest
105 + # enable the shared library
106 + --enable-libaria2
107 + # zlib should always be available anyway
108 + --with-libz
109 + --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
110 +
111 + # optional features
112 + $(use_enable bittorrent)
113 + $(use_enable metalink)
114 + $(use_enable nls)
115 + $(use_with adns libcares)
116 + $(use_with jemalloc)
117 + $(use_with libuv)
118 + $(use_with sqlite sqlite3)
119 + $(use_with ssh libssh2)
120 + $(use_with tcmalloc)
121 + )
122 +
123 + # SSL := gnutls / openssl
124 + # USE=ssl
125 + # + USE=gnutls -> gnutls
126 + # + USE=-gnutls -> openssl
127 +
128 + if use ssl; then
129 + myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
130 + else
131 + myconf+=( --without-gnutls --without-openssl )
132 + fi
133 +
134 + # message-digest := nettle / gcrypt / openssl
135 + # bignum := nettle+gmp / gcrypt / openssl
136 + # bittorrent := message-digest + bignum
137 + # USE=bittorrent
138 + # + USE=(ssl -gnutls) -> openssl
139 + # + USE=nettle -> nettle+gmp
140 + # + USE=-nettle -> gcrypt
141 +
142 + if use !bittorrent || use ssl && use !gnutls; then
143 + myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
144 + else
145 + myconf+=( $(use_with !nettle libgcrypt)
146 + $(use_with nettle libnettle) $(use_with nettle libgmp) )
147 + fi
148 +
149 + # metalink+xmlrpc := libxml2 / expat
150 + # USE=(metalink || xmlrpc)
151 + # + USE=libxml2 -> libxml2
152 + # + USE=-libxml2 -> expat
153 +
154 + if use metalink || use xmlrpc; then
155 + myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
156 + else
157 + myconf+=( --without-libexpat --without-libxml2 )
158 + fi
159 +
160 + # Note:
161 + # - always enable gzip/http compression since zlib should always be available anyway
162 + # - always enable epoll since we can assume kernel 2.6.x
163 + # - other options for threads: solaris, pth, win32
164 + econf "${myconf[@]}"
165 +}
166 +
167 +src_install() {
168 + default
169 + rm -rf "${D}"/usr/share/doc/aria2 \
170 + "${D}"/usr/share/doc/${PF}/README{,.html}
171 +
172 + dobashcomp doc/bash_completion/aria2c
173 + use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
174 +}
175 +
176 +pkg_postinst() {
177 + if use xmlrpc; then
178 + elog "If you would like to use the additional aria2mon and aria2rpc tools,"
179 + elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
180 + fi
181 +}