app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / mosh / mosh-1.3.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools bash-completion-r1 eutils vcs-snapshot
7
8 DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
9 HOMEPAGE="http://mosh.org"
10 SRC_URI="http://mosh.org/${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
15 IUSE="+client examples +mosh-hardening +server ufw +utempter"
16
17 REQUIRED_USE="
18         || ( client server )
19         examples? ( client )"
20
21 RDEPEND="
22         dev-libs/protobuf:0=
23         sys-libs/ncurses:0=
24         virtual/ssh
25         client? (
26                 dev-lang/perl
27                 dev-perl/IO-Tty
28         )
29         utempter? (
30                 sys-libs/libutempter
31         )"
32
33 DEPEND="${RDEPEND}
34         virtual/pkgconfig"
35
36 # [0] - avoid sandbox-violation calling git describe in Makefile.
37 PATCHES=(
38         "${FILESDIR}"/${PN}-1.2.5-git-version.patch
39 )
40
41 src_prepare() {
42         MAKEOPTS+=" V=1"
43         default
44
45         eautoreconf
46 }
47
48 src_configure() {
49         econf \
50                 --disable-completion \
51                 $(use_enable client) \
52                 $(use_enable server) \
53                 $(use_enable examples) \
54                 $(use_enable ufw) \
55                 $(use_enable mosh-hardening hardening) \
56                 $(use_with utempter)
57 }
58
59 src_install() {
60         default
61
62         for myprog in $(find src/examples -type f -perm /0111) ; do
63                 newbin ${myprog} ${PN}-$(basename ${myprog})
64                 elog "${myprog} installed as ${PN}-$(basename ${myprog})"
65         done
66
67         # bug 477384
68         dobashcomp conf/bash-completion/completions/mosh
69 }