axel-2.4-r3.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic toolchain-funcs
  5. DOWNLOAD_ID=3016
  6. DESCRIPTION="Light Unix download accelerator"
  7. HOMEPAGE="http://axel.alioth.debian.org/"
  8. SRC_URI="http://alioth.debian.org/frs/download.php/${DOWNLOAD_ID}/${P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris"
  12. IUSE="debug nls"
  13. DEPEND="nls? ( sys-devel/gettext )"
  14. RDEPEND="nls? ( virtual/libintl )"
  15. DOCS=( API CHANGES CREDITS README axelrc.example )
  16. src_prepare() {
  17. append-lfs-flags
  18. epatch \
  19. "${FILESDIR}"/${P}-buildsystem.patch \
  20. "${FILESDIR}"/${P}-bffr-overflow.patch \
  21. "${FILESDIR}"/${P}-max-redir.patch
  22. tc-export CC
  23. }
  24. src_configure() {
  25. local myconf=()
  26. use debug && myconf+=( --debug=1 )
  27. myconf+=( --i18n=$(usex nls 1 0) )
  28. econf \
  29. --strip=0 \
  30. ${myconf[@]}
  31. }
  32. pkg_postinst() {
  33. einfo 'To use axel with portage, try these settings in your make.conf'
  34. einfo
  35. einfo ' FETCHCOMMAND='\''axel -a -o "\${DISTDIR}/\${FILE}.axel" "\${URI}" && mv "\${DISTDIR}/\${FILE}.axel" "\${DISTDIR}/\${FILE}"'\'
  36. einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
  37. }