wget-1.19.1.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. PYTHON_COMPAT=( python3_{4,5} )
  5. inherit flag-o-matic python-any-r1 toolchain-funcs eutils
  6. DESCRIPTION="Network utility to retrieve files from the WWW"
  7. HOMEPAGE="https://www.gnu.org/software/wget/"
  8. SRC_URI="mirror://gnu/wget/${P}.tar.xz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  12. IUSE="debug gnutls idn ipv6 libressl nls ntlm pcre +ssl static test uuid zlib"
  13. REQUIRED_USE=" ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
  14. LIB_DEPEND="idn? ( net-dns/libidn2[static-libs(+)] )
  15. pcre? ( dev-libs/libpcre[static-libs(+)] )
  16. ssl? (
  17. gnutls? ( net-libs/gnutls:0=[static-libs(+)] )
  18. !gnutls? (
  19. !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
  20. libressl? ( dev-libs/libressl[static-libs(+)] )
  21. )
  22. )
  23. uuid? ( sys-apps/util-linux[static-libs(+)] )
  24. zlib? ( sys-libs/zlib[static-libs(+)] )"
  25. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
  26. DEPEND="${RDEPEND}
  27. app-arch/xz-utils
  28. virtual/pkgconfig
  29. static? ( ${LIB_DEPEND} )
  30. test? (
  31. ${PYTHON_DEPS}
  32. dev-lang/perl
  33. dev-perl/HTTP-Daemon
  34. dev-perl/HTTP-Message
  35. dev-perl/IO-Socket-SSL
  36. )
  37. nls? ( sys-devel/gettext )"
  38. DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
  39. pkg_setup() {
  40. use test && python-any-r1_pkg_setup
  41. }
  42. src_prepare() {
  43. # revert some hack that breaks linking, bug #585924
  44. if [[ ${CHOST} == *-darwin* ]] || [[ ${CHOST} == *-solaris* ]] || [[ ${CHOST} == *-uclibc* ]]; then
  45. sed -i \
  46. -e 's/^ LIBICONV=$/:/' \
  47. configure || die
  48. fi
  49. }
  50. src_configure() {
  51. # fix compilation on Solaris, we need filio.h for FIONBIO as used in
  52. # the included gnutls -- force ioctl.h to include this header
  53. [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
  54. if use static ; then
  55. append-ldflags -static
  56. tc-export PKG_CONFIG
  57. PKG_CONFIG+=" --static"
  58. fi
  59. econf \
  60. --disable-assert \
  61. --disable-rpath \
  62. $(use_enable debug) \
  63. $(use_enable idn iri) \
  64. $(use_enable ipv6) \
  65. $(use_enable nls) \
  66. $(use_enable ntlm) \
  67. $(use_enable pcre) \
  68. $(use_enable ssl digest) \
  69. $(use_enable ssl opie) \
  70. $(use_with idn libidn) \
  71. $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
  72. $(use_with uuid libuuid) \
  73. $(use_with zlib)
  74. }
  75. src_test() {
  76. emake check
  77. }
  78. src_install() {
  79. default
  80. sed -i \
  81. -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
  82. "${ED}"/etc/wgetrc \
  83. "${ED}"/usr/share/man/man1/wget.1 \
  84. "${ED}"/usr/share/info/wget.info
  85. }