1 |
commit: f950d9e39396c836028e5794fd7905ef619612ae |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 22 07:13:36 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 22 08:01:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f950d9e3 |
7 |
|
8 |
net-misc/aria2: Bump to 1.36.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
net-misc/aria2/Manifest | 1 + |
13 |
net-misc/aria2/aria2-1.36.0.ebuild | 183 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 184 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/aria2/Manifest b/net-misc/aria2/Manifest |
17 |
index 5ab609cb29b..1875fe6ca07 100644 |
18 |
--- a/net-misc/aria2/Manifest |
19 |
+++ b/net-misc/aria2/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST aria2-1.35.0.tar.xz 1534460 BLAKE2B fc207ad0054e211b79ee1c6302c6bf83d0638fd5659d19dbd63d7cfb31101feb7d1a661b989ec42552c9a5c072dd660d2f7203063c3c1e14f53d5ce4c5a3c317 SHA512 82b49cecd61064ae33b4a422a2320d533f54afea8fab0f014072a46afdc05972d2e9c603e843960c097410adf87290df65849f4ee05e047403618ae50db151ef |
22 |
+DIST aria2-1.36.0.tar.xz 1619036 BLAKE2B 7894ec705f6fefdbc6c4844efa8a645b3e7674e36d04535ac96b9daf5098a453d047109bad0db16e6fd656f63a3ec0bab5746e8ba7d549149e2364395a94399f SHA512 8203dbb75274455a78c50dd4f894e631de6931ac889f26896dceed78ec38c98cdbcf07e164744f308f2bfffeae1016beec1bfdbe8cad7f3280d11376aa0c2542 |
23 |
|
24 |
diff --git a/net-misc/aria2/aria2-1.36.0.ebuild b/net-misc/aria2/aria2-1.36.0.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..288141a977b |
27 |
--- /dev/null |
28 |
+++ b/net-misc/aria2/aria2-1.36.0.ebuild |
29 |
@@ -0,0 +1,183 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
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+-with-openssl-exception" |
42 |
+KEYWORDS="~amd64 ~arm ~arm64 ~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 |
+# xmlrpc has no explicit switch, it's turned out by any XML library |
46 |
+# so metalink implicitly forces it on |
47 |
+REQUIRED_USE="?? ( jemalloc tcmalloc ) |
48 |
+ metalink? ( xmlrpc )" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+# Crazy GnuTLS/OpenSSL/etc. logic below: |
52 |
+# 1. Those libraries are used for two purposes: TLS & MD. |
53 |
+# 2. Upstream preferences are: |
54 |
+# 1) gnutls [tls] |
55 |
+# 2) !gnutls? -> openssl [tls+md] |
56 |
+# 3) !openssl? -> nettle [md] |
57 |
+# 4) !openssl? !nettle? -> gcrypt [md] |
58 |
+# 5) !*? -> bundled md routines (we don't use them) |
59 |
+# 3. There's also gmp usage for bittorrent with nettle. |
60 |
+# 4. You can't really control features, just dependencies. |
61 |
+# (we are skipping native Apple/Windows TLS support) |
62 |
+# |
63 |
+# We map this into: |
64 |
+# ssl? -> openssl || (gnutls + (nettle || libgcrypt )) |
65 |
+# !ssl? -> nettle || libgcrypt |
66 |
+RDEPEND="sys-libs/zlib:0= |
67 |
+ adns? ( >=net-dns/c-ares-1.5.0:0= ) |
68 |
+ jemalloc? ( dev-libs/jemalloc ) |
69 |
+ libuv? ( >=dev-libs/libuv-1.13:0= ) |
70 |
+ metalink? ( |
71 |
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= ) |
72 |
+ !libxml2? ( dev-libs/expat:0= ) ) |
73 |
+ sqlite? ( dev-db/sqlite:3= ) |
74 |
+ ssh? ( net-libs/libssh2:= ) |
75 |
+ ssl? ( |
76 |
+ app-misc/ca-certificates |
77 |
+ gnutls? ( |
78 |
+ >=net-libs/gnutls-1.2.9:0= |
79 |
+ nettle? ( |
80 |
+ >=dev-libs/nettle-2.4:0= |
81 |
+ bittorrent? ( |
82 |
+ >=dev-libs/nettle-2.4:0=[gmp] |
83 |
+ >=dev-libs/gmp-6:0= |
84 |
+ ) |
85 |
+ ) |
86 |
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) |
87 |
+ ) |
88 |
+ !gnutls? ( |
89 |
+ dev-libs/openssl:0= |
90 |
+ ) |
91 |
+ ) |
92 |
+ !ssl? ( |
93 |
+ nettle? ( |
94 |
+ >=dev-libs/nettle-2.4:0= |
95 |
+ bittorrent? ( |
96 |
+ >=dev-libs/nettle-2.4:0=[gmp] |
97 |
+ >=dev-libs/gmp-6:0= |
98 |
+ ) |
99 |
+ ) |
100 |
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) |
101 |
+ ) |
102 |
+ tcmalloc? ( dev-util/google-perftools ) |
103 |
+ xmlrpc? ( |
104 |
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= ) |
105 |
+ !libxml2? ( dev-libs/expat:0= ) )" |
106 |
+ |
107 |
+DEPEND="${RDEPEND} |
108 |
+ test? ( >=dev-util/cppunit-1.12.0:0 )" |
109 |
+RDEPEND+=" |
110 |
+ nls? ( virtual/libiconv virtual/libintl ) |
111 |
+ scripts? ( dev-lang/ruby )" |
112 |
+BDEPEND="app-arch/xz-utils |
113 |
+ virtual/pkgconfig |
114 |
+ nls? ( sys-devel/gettext )" |
115 |
+ |
116 |
+pkg_setup() { |
117 |
+ if use scripts && ! use xmlrpc; then |
118 |
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc" |
119 |
+ ewarn "and aria2mon scripts against the local aria2." |
120 |
+ fi |
121 |
+} |
122 |
+ |
123 |
+src_prepare() { |
124 |
+ default |
125 |
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed" |
126 |
+ # Fails with USE=bittorrent && FEATURES=network-sandbox |
127 |
+ sed -i -E \ |
128 |
+ -e '/^@ENABLE_BITTORRENT_TRUE@ LpdMessageDispatcherTest/d' \ |
129 |
+ -e '/^@ENABLE_BITTORRENT_TRUE@ LpdMessageReceiverTest/d' \ |
130 |
+ test/Makefile.in || die |
131 |
+} |
132 |
+ |
133 |
+src_configure() { |
134 |
+ local myconf=( |
135 |
+ # threads, epoll: check for best portability |
136 |
+ |
137 |
+ # do not try to compile and run a test LIBXML program |
138 |
+ --disable-xmltest |
139 |
+ # enable the shared library |
140 |
+ --enable-libaria2 |
141 |
+ # zlib should always be available anyway |
142 |
+ --with-libz |
143 |
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt" |
144 |
+ |
145 |
+ # optional features |
146 |
+ $(use_enable bittorrent) |
147 |
+ $(use_enable metalink) |
148 |
+ $(use_enable nls) |
149 |
+ $(use_with adns libcares) |
150 |
+ $(use_with jemalloc) |
151 |
+ $(use_with libuv) |
152 |
+ $(use_with sqlite sqlite3) |
153 |
+ $(use_with ssh libssh2) |
154 |
+ $(use_with tcmalloc) |
155 |
+ ) |
156 |
+ |
157 |
+ # See TLS/MD logic described above deps. |
158 |
+ if use ssl && ! use gnutls; then |
159 |
+ # 1. if ssl & !gnutls, use openssl and disable gnutls |
160 |
+ myconf+=( --without-gnutls --with-openssl ) |
161 |
+ else |
162 |
+ myconf+=( |
163 |
+ # 2. otherwise, disable openssl |
164 |
+ --without-openssl |
165 |
+ # 3. if ssl & gnutls, use gnutls |
166 |
+ $(use_with ssl gnutls) |
167 |
+ |
168 |
+ # 4. switch between nettle & libgcrypt |
169 |
+ $(use_with nettle libnettle) |
170 |
+ $(use_with !nettle libgcrypt) |
171 |
+ ) |
172 |
+ |
173 |
+ # 5. if bittorrent is used along with nettle, use libgmp |
174 |
+ if use bittorrent && use nettle; then |
175 |
+ myconf+=( --with-libgmp ) |
176 |
+ else |
177 |
+ myconf+=( --without-libgmp ) |
178 |
+ fi |
179 |
+ fi |
180 |
+ |
181 |
+ # metalink+xmlrpc := libxml2 / expat |
182 |
+ # USE=(metalink || xmlrpc) |
183 |
+ # + USE=libxml2 -> libxml2 |
184 |
+ # + USE=-libxml2 -> expat |
185 |
+ |
186 |
+ if use metalink || use xmlrpc; then |
187 |
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) ) |
188 |
+ else |
189 |
+ myconf+=( --without-libexpat --without-libxml2 ) |
190 |
+ fi |
191 |
+ |
192 |
+ # Note: |
193 |
+ # - always enable gzip/http compression since zlib should always be available anyway |
194 |
+ # - always enable epoll since we can assume kernel 2.6.x |
195 |
+ # - other options for threads: solaris, pth, win32 |
196 |
+ econf "${myconf[@]}" |
197 |
+} |
198 |
+ |
199 |
+src_install() { |
200 |
+ default |
201 |
+ rm -r "${ED}"/usr/share/doc/${PF}/README{,.html} || die |
202 |
+ |
203 |
+ dobashcomp doc/bash_completion/aria2c |
204 |
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc} |
205 |
+} |
206 |
+ |
207 |
+pkg_postinst() { |
208 |
+ if use xmlrpc; then |
209 |
+ elog "If you would like to use the additional aria2mon and aria2rpc tools," |
210 |
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed." |
211 |
+ fi |
212 |
+} |