lynx-2.8.9_pre11.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # VERSIONING SCHEME TRANSLATION
  5. # Upstream : Gentoo
  6. # rel. : _p
  7. # pre. : _rc
  8. # dev. : _pre
  9. case ${PV} in
  10. *_pre*) MY_P="${PN}${PV/_pre/dev.}" ;;
  11. *_rc*) MY_P="${PN}${PV/_rc/pre.}" ;;
  12. *_p*|*) MY_P="${PN}${PV/_p/rel.}" ;;
  13. esac
  14. DESCRIPTION="An excellent console-based web browser with ssl support"
  15. HOMEPAGE="http://lynx.isc.org/"
  16. SRC_URI="http://invisible-mirror.net/archives/lynx/tarballs/${MY_P}.tar.bz2"
  17. LICENSE="GPL-2"
  18. SLOT="0"
  19. 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 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  20. IUSE="bzip2 cjk gnutls idn ipv6 nls ssl unicode libressl"
  21. RDEPEND="
  22. sys-libs/ncurses:0=[unicode?]
  23. sys-libs/zlib
  24. nls? ( virtual/libintl )
  25. ssl? (
  26. !gnutls? (
  27. !libressl? ( dev-libs/openssl:0= )
  28. libressl? ( dev-libs/libressl:= )
  29. )
  30. gnutls? (
  31. dev-libs/libgcrypt:0=
  32. >=net-libs/gnutls-2.6.4:=
  33. )
  34. )
  35. bzip2? ( app-arch/bzip2 )
  36. idn? ( net-dns/libidn )
  37. "
  38. DEPEND="${RDEPEND}
  39. nls? ( sys-devel/gettext )
  40. virtual/pkgconfig"
  41. S=${WORKDIR}/${MY_P}
  42. PATCHES=(
  43. "${FILESDIR}"/${PN}-2.8.6-mint.patch
  44. "${FILESDIR}"/${PN}-2.8.8_p1-parallel.patch
  45. )
  46. pkg_setup() {
  47. ! use ssl && elog "SSL support disabled; you will not be able to access secure websites."
  48. }
  49. src_configure() {
  50. local myconf=(
  51. --enable-nested-tables
  52. --enable-cgi-links
  53. --enable-persistent-cookies
  54. --enable-prettysrc
  55. --enable-nsl-fork
  56. --enable-file-upload
  57. --enable-read-eta
  58. --enable-color-style
  59. --enable-scrollbar
  60. --enable-included-msgs
  61. --enable-externs
  62. --with-zlib
  63. $(use_enable nls)
  64. $(use_enable idn idna)
  65. $(use_enable ipv6)
  66. $(use_enable cjk)
  67. $(use_enable unicode japanese-utf8)
  68. $(use_with bzip2 bzlib)
  69. $(usex ssl "--with-$(usex gnutls gnutls ssl)=${EPREFIX}/usr" "")
  70. --with-screen=$(usex unicode "ncursesw" "ncurses")
  71. )
  72. econf "${myconf[@]}"
  73. }
  74. src_install() {
  75. emake install DESTDIR="${D}"
  76. sed -i "s|^HELPFILE.*$|HELPFILE:file://localhost/usr/share/doc/${PF}/lynx_help/lynx_help_main.html|" \
  77. "${ED}"/etc/lynx.cfg || die "lynx.cfg not found"
  78. if use unicode ; then
  79. sed -i '/^#CHARACTER_SET:/ c\CHARACTER_SET:utf-8' \
  80. "${ED}"/etc/lynx.cfg || die "lynx.cfg not found"
  81. fi
  82. dodoc CHANGES COPYHEADER PROBLEMS README
  83. dodoc -r docs lynx_help
  84. }