1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{7,8,9} )
8 inherit autotools git-r3 python-any-r1
10 EGIT_REPO_URI="https://github.com/rkd77/felinks"
12 DESCRIPTION="Advanced and well-established text-mode web browser"
13 HOMEPAGE="http://elinks.or.cz/"
18 IUSE="bittorrent brotli bzip2 debug finger ftp gopher gpm gnutls guile idn ipv6
19 javascript libressl lua +mouse nls nntp perl ruby samba ssl tre unicode X xml zlib"
21 BDEPEND="virtual/pkgconfig"
23 brotli? ( app-arch/brotli:= )
24 bzip2? ( >=app-arch/bzip2-1.0.2 )
25 gpm? ( >=sys-libs/ncurses-5.2:0= >=sys-libs/gpm-1.20.0-r5 )
26 guile? ( >=dev-scheme/guile-1.6.4-r1[deprecated] )
27 idn? ( net-dns/libidn:= )
28 javascript? ( dev-lang/spidermonkey:17= )
29 lua? ( >=dev-lang/lua-5:0= )
30 perl? ( dev-lang/perl:= )
31 ruby? ( dev-lang/ruby:* dev-ruby/rubygems:* )
32 samba? ( net-fs/samba )
35 !libressl? ( dev-libs/openssl:0= )
36 libressl? ( dev-libs/libressl:0= )
38 gnutls? ( net-libs/gnutls:= )
41 X? ( x11-libs/libX11 x11-libs/libXt )
42 xml? ( >=dev-libs/expat-1.95.4 )
43 zlib? ( >=sys-libs/zlib-1.1.4 )"
48 "${FILESDIR}"/${P}-parallel-make.patch
59 sed -i -e 's/-Werror//' configure* || die
66 --sysconfdir="${EPREFIX}"/etc/elinks
71 --enable-html-highlight
74 $(use_with bzip2 bzlib)
77 $(use_with javascript spidermonkey)
78 --with-luapkg=$(usev lua)
84 $(use_enable bittorrent)
92 $(use_enable samba smb)
93 $(use_enable xml xbel)
97 myconf+=( --enable-debug )
99 myconf+=( --enable-fastmem )
104 myconf+=( --with-gnutls )
106 myconf+=( --with-openssl="${EPREFIX}"/usr )
109 myconf+=( --without-openssl --without-gnutls )
120 emake V=1 DESTDIR="${D}" install
123 newins contrib/keybind-full.conf keybind-full.sample
124 newins contrib/keybind.conf keybind.conf.sample
126 dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README SITES THANKS TODO doc/*.*
127 docinto contrib ; dodoc contrib/{README,colws.diff,elinks[-.]vim*}
128 docinto contrib/lua ; dodoc contrib/lua/{*.lua,elinks-remote}
129 docinto contrib/conv ; dodoc contrib/conv/*.*
130 docinto contrib/guile ; dodoc contrib/guile/*.scm
132 # elinks uses an internal copy of gettext which ships files that may
133 # collide with the system's gettext (https://bugs.gentoo.org/635090)
134 rm -f "${ED}"/usr/{share/locale/locale,lib/charset}.alias || die
138 elog "You may want to convert your html.cfg and links.cfg of"
139 elog "Links or older ELinks versions to the new ELinks elinks.conf"
140 elog "using /usr/share/doc/${PF}/contrib/conv/conf-links2elinks.pl"
142 elog "Please have a look at /etc/elinks/keybind-full.sample and"
143 elog "/etc/elinks/keybind.conf.sample for some bindings examples."
145 elog "You will have to set your TERM variable to 'xterm-256color'"
146 elog "to be able to use 256 colors in elinks."