eapi-bump librsvg
[sgilles-overlay.git] / www-client / elinks / elinks-9999.ebuild
blob0316d7b975a78a74a631e511ceff77393da72563
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
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/"
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS=""
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"
22 RDEPEND="
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 )
33         ssl? (
34                 !gnutls? (
35                         !libressl? ( dev-libs/openssl:0= )
36                         libressl? ( dev-libs/libressl:0= )
37                 )
38                 gnutls? ( net-libs/gnutls:= )
39         )
40         tre? ( dev-libs/tre )
41         X? ( x11-libs/libX11 x11-libs/libXt )
42         xml? ( >=dev-libs/expat-1.95.4 )
43         zlib? ( >=sys-libs/zlib-1.1.4 )"
44 DEPEND="${RDEPEND}
45         ${PYTHON_DEPS}"
47 PATCHES=(
48         "${FILESDIR}"/${P}-parallel-make.patch
51 src_unpack() {
52         default
53         git-r3_src_unpack
56 src_prepare() {
57         default
59         sed -i -e 's/-Werror//' configure* || die
61         eautoreconf
64 src_configure() {
65         local myconf=(
66                 --sysconfdir="${EPREFIX}"/etc/elinks
67                 --enable-leds
68                 --enable-88-colors
69                 --enable-256-colors
70                 --enable-true-color
71                 --enable-html-highlight
72                 $(use_with gpm)
73                 $(use_with brotli)
74                 $(use_with bzip2 bzlib)
75                 $(use_with guile)
76                 $(use_with idn)
77                 $(use_with javascript spidermonkey)
78                 --with-luapkg=$(usev lua)
79                 $(use_with perl)
80                 $(use_with ruby)
81                 $(use_with tre)
82                 $(use_with X x)
83                 $(use_with zlib)
84                 $(use_enable bittorrent)
85                 $(use_enable finger)
86                 $(use_enable ftp)
87                 $(use_enable gopher)
88                 $(use_enable ipv6)
89                 $(use_enable mouse)
90                 $(use_enable nls)
91                 $(use_enable nntp)
92                 $(use_enable samba smb)
93                 $(use_enable xml xbel)
94         )
96         if use debug ; then
97                 myconf+=( --enable-debug )
98         else
99                 myconf+=( --enable-fastmem )
100         fi
102         if use ssl ; then
103                 if use gnutls ; then
104                         myconf+=( --with-gnutls )
105                 else
106                         myconf+=( --with-openssl="${EPREFIX}"/usr )
107                 fi
108         else
109                 myconf+=( --without-openssl --without-gnutls )
110         fi
112         econf "${myconf[@]}"
115 src_compile() {
116         emake V=1
119 src_install() {
120         emake V=1 DESTDIR="${D}" install
122         insinto /etc/elinks
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
137 pkg_postinst() {
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"
141         elog
142         elog "Please have a look at /etc/elinks/keybind-full.sample and"
143         elog "/etc/elinks/keybind.conf.sample for some bindings examples."
144         elog
145         elog "You will have to set your TERM variable to 'xterm-256color'"
146         elog "to be able to use 256 colors in elinks."