app-text/atril: Version bump (v1.22.0)
[gentoo.git] / app-text / multitail / multitail-6.4.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils flag-o-matic toolchain-funcs
6
7 DESCRIPTION="Tail with multiple windows"
8 HOMEPAGE="http://www.vanheusden.com/multitail/"
9 SRC_URI="http://www.vanheusden.com/multitail/${P}.tgz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="amd64 hppa ia64 ppc sparc x86 ~amd64-linux ~x86-linux"
14 IUSE="debug examples unicode"
15
16 RDEPEND="
17         sys-libs/ncurses:0=[unicode?]
18 "
19 DEPEND="
20         ${RDEPEND}
21         virtual/pkgconfig
22 "
23 RESTRICT="test" # bug #492270
24
25 src_prepare() {
26         epatch \
27                 "${FILESDIR}"/${PN}-6.4.1-gentoo.patch
28
29         sed \
30                 -e "/^DESTDIR/s:=.*$:=${EROOT}:g" \
31                 -i Makefile || die
32
33         sed \
34                 -e "s:/usr/bin/xclip:${EPREFIX}/usr/bin/xclip:g" \
35                 -i xclip.c ${PN}.conf || die
36
37         tc-export CC PKG_CONFIG
38
39         use debug && append-flags "-D_DEBUG"
40 }
41
42 src_compile() {
43         emake UTF8_SUPPORT=$(usex unicode)
44 }
45
46 src_install () {
47         dobin multitail
48
49         insinto /etc
50         doins multitail.conf
51
52         DOCS=( readme.txt thanks.txt )
53         HTML_DOCS=( manual.html )
54         einstalldocs
55
56         doman multitail.1
57
58         if use examples; then
59                 docinto examples
60                 dodoc conversion-scripts/colors-example.{pl,sh} conversion-scripts/convert-{geoip,simple}.pl
61         fi
62 }
63
64 pkg_postinst() {
65         optfeature "send a buffer to the X clipboard" x11-misc/xclip
66 }