mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
114 lines
4.2 KiB
Tcl
114 lines
4.2 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup github 1.0
|
|
|
|
github.setup aria2 aria2 1.37.0 release-
|
|
# Change github.tarball_from to 'releases' or 'archive' next update
|
|
github.tarball_from tarball
|
|
revision 7
|
|
|
|
categories net
|
|
maintainers {mps @Schamschula}
|
|
license {GPL-2+ OpenSSLException}
|
|
description download utility with resuming and segmented downloading
|
|
long_description aria2 is a download utility with resuming and segmented \
|
|
downloading. Supported protocols are HTTP/HTTPS/FTP/BitTorrent.
|
|
|
|
checksums rmd160 942de85a653d890bfa1198dc82069cff8267991b \
|
|
sha256 7e7541966bc0f1d7b121ea9f4189c65b5782e78771ec4f49f40b6cf53d7a12df \
|
|
size 4186060
|
|
|
|
depends_build-append port:pkgconfig \
|
|
port:gettext
|
|
|
|
depends_lib-append path:lib/pkgconfig/gnutls.pc:gnutls \
|
|
port:gettext-runtime \
|
|
port:libiconv \
|
|
port:libuv \
|
|
port:libxml2 \
|
|
port:zlib
|
|
|
|
# use_* must be defined after depends_*, otherwise the automatic dependencies
|
|
# will be overwritten.
|
|
# Alternatively, depends_*-append could be used.
|
|
use_autoreconf yes
|
|
|
|
configure.cxxflags-append \
|
|
-I${prefix}/include/libxml2
|
|
configure.ldflags-append \
|
|
-lintl
|
|
configure.args --with-gnutls \
|
|
--with-libgnutls-prefix=${prefix} \
|
|
--with-libiconv-prefix=${prefix} \
|
|
--with-libintl-prefix=${prefix} \
|
|
--with-libuv \
|
|
--with-xml-prefix=${prefix} \
|
|
--without-appletls \
|
|
--without-libcares \
|
|
--without-openssl \
|
|
--without-sqlite3 \
|
|
--disable-silent-rules
|
|
|
|
# https://github.com/aria2/aria2/issues/2145
|
|
patchfiles-append patch-src-SimpleRandomizer.cc.diff
|
|
|
|
# See https://trac.macports.org/ticket/68951
|
|
# and https://github.com/aria2/aria2/issues/2083
|
|
if {${os.platform} eq "darwin" && ${os.major} == 23} {
|
|
configure.ldflags-append -framework CoreServices
|
|
}
|
|
|
|
post-destroot {
|
|
xinstall -d -m 0755 "${destroot}${prefix}/share/bash-completion/completions"
|
|
xinstall -m 0644 "${destroot}${prefix}/share/doc/aria2/bash_completion/aria2c" \
|
|
"${destroot}${prefix}/share/bash-completion/completions/aria2c"
|
|
file delete -force "${destroot}${prefix}/share/doc/aria2/bash_completion"
|
|
}
|
|
|
|
# needed for build with gnutls
|
|
configure.cxxflags-append -std=c++14
|
|
compiler.blacklist-append {clang < 800.0.38}
|
|
compiler.cxx_standard 2014
|
|
|
|
# See: https://trac.macports.org/ticket/69563
|
|
if {![variant_isset docs]} {
|
|
patchfiles-append patch-doc-Makefile.am.diff
|
|
}
|
|
|
|
variant cares description {Add c-ares support} {
|
|
configure.args-replace --without-libcares --with-libcares
|
|
depends_lib-append port:c-ares
|
|
}
|
|
|
|
variant docs description {Build documentation using sphinx} {
|
|
set python.version 314
|
|
variable python.branch \
|
|
[string index ${python.version} 0].[string range ${python.version} 1 end]
|
|
|
|
# Don't build pt and ru man pages
|
|
patchfiles-append patch-doc-manual-src-Makefile.am.diff
|
|
|
|
# Use MacPorts binary name for sphinx-build
|
|
patchfiles-append patch-configure.ac.diff
|
|
patchfiles-append patch-doc-manual-src-en-Makefile.am.diff
|
|
post-patch {
|
|
reinplace "s|%BRANCH%|${python.branch}|g" ${worksrcpath}/configure.ac
|
|
reinplace "s|%SPHINXBUILD%|${prefix}/bin/sphinx-build-${python.branch}|g" \
|
|
${worksrcpath}/doc/manual-src/en/Makefile.am
|
|
}
|
|
|
|
depends_build-append \
|
|
port:py${python.version}-sphinx
|
|
|
|
post-destroot {
|
|
xinstall -m 0644 "${worksrcpath}/doc/manual-src/en/_build/man/aria2c.1" \
|
|
"${destroot}${prefix}/share/man/man1/"
|
|
}
|
|
}
|
|
|
|
variant sqlite3 description {Add sqlite3 support} {
|
|
configure.args-replace --without-sqlite3 --with-sqlite3
|
|
depends_lib-append port:sqlite3
|
|
}
|