# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads"
-inherit autotools eutils git-r3 flag-o-matic python-any-r1
+inherit autotools git-r3 python-any-r1
EGIT_REPO_URI="git://repo.or.cz/elinks.git"
javascript? ( >=dev-lang/spidermonkey-1.8.5:0= )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${P}-parallel-make.patch
+ )
+
src_unpack() {
default
git-r3_src_unpack
}
src_prepare() {
- mv "${WORKDIR}/${PN}-0.10.4.conf" "${WORKDIR}/${PN}.conf"
+ default
+
+ cd "${WORKDIR}" || die
+ eapply "${FILESDIR}"/${PN}-0.10.4.conf-syscharset.diff
+ mv ${PN}-0.10.4.conf ${PN}.conf || die
if ! use ftp ; then
- sed -i -e 's/\(.*protocol.ftp.*\)/# \1/' "${WORKDIR}"/${PN}.conf
+ sed -i -e 's/\(.*protocol.ftp.*\)/# \1/' ${PN}.conf || die
fi
- sed -i -e 's/\(.*set protocol.ftp.use_epsv.*\)/# \1/' "${WORKDIR}"/${PN}.conf
- epatch "${FILESDIR}"/${P}-parallel-make.patch
-
- epatch_user
+ sed -i -e 's/\(.*set protocol.ftp.use_epsv.*\)/# \1/' ${PN}.conf || die
+ cd "${S}" || die
# Regenerate acinclude.m4 - based on autogen.sh.
- cat > acinclude.m4 <<- _EOF
+ cat > acinclude.m4 <<- _EOF || die
dnl Automatically generated from config/m4/ files.
dnl Do not modify!
_EOF
- cat config/m4/*.m4 >> acinclude.m4
- sed -i -e 's/-Werror//' configure*
+ cat config/m4/*.m4 >> acinclude.m4 || die
+ sed -i -e 's/-Werror//' configure* || die
eautoreconf
}
src_configure() {
- # NOTE about GNUTSL SSL support (from the README -- 25/12/2002)
- # As GNUTLS is not yet 100% stable and its support in ELinks is not so well
- # tested yet, it's recommended for users to give a strong preference to OpenSSL whenever possible.
local myconf=""
if use debug ; then
myconf="--enable-fastmem"
fi
+ # NOTE about GNUTSL SSL support (from the README -- 25/12/2002)
+ # As GNUTLS is not yet 100% stable and its support in ELinks is not so well
+ # tested yet, it's recommended for users to give a strong preference to OpenSSL whenever possible.
if use ssl ; then
myconf="${myconf} --with-openssl=${EPREFIX}/usr"
else
src_install() {
emake V=1 DESTDIR="${D}" install
- insopts -m 644 ; insinto /etc/elinks
+ insinto /etc/elinks
doins "${WORKDIR}"/elinks.conf
newins contrib/keybind-full.conf keybind-full.sample
newins contrib/keybind.conf keybind.conf.sample
dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README SITES THANKS TODO doc/*.*
docinto contrib ; dodoc contrib/{README,colws.diff,elinks[-.]vim*}
- insinto /usr/share/doc/${PF}/contrib/lua ; doins contrib/lua/{*.lua,elinks-remote}
- insinto /usr/share/doc/${PF}/contrib/conv ; doins contrib/conv/*.*
- insinto /usr/share/doc/${PF}/contrib/guile ; doins contrib/guile/*.scm
-
- # Remove some conflicting files on OSX. The files provided by OSX 10.4
- # are more or less the same. -- Fabian Groffen (2005-06-30)
- rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias || die
+ docinto contrib/lua ; dodoc contrib/lua/{*.lua,elinks-remote}
+ docinto contrib/conv ; dodoc contrib/conv/*.*
+ docinto contrib/guile ; dodoc contrib/guile/*.scm
}
pkg_postinst() {
einfo
einfo "You will have to set your TERM variable to 'xterm-256color'"
einfo "to be able to use 256 colors in elinks."
- echo
}