e049877450ac8476ccaee2d2ec35d1962bd523d1
[gentoo.git] / net-misc / telnet-bsd / telnet-bsd-1.2-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils autotools toolchain-funcs
6
7 DESCRIPTION="Telnet and telnetd ported from OpenBSD with IPv6 support"
8 HOMEPAGE="ftp://ftp.suse.com/pub/people/kukuk/ipv6/"
9 SRC_URI="https://dev.gentoo.org/~mschiff/distfiles/${P}.tar.bz2"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 m68k ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
14 IUSE="nls xinetd"
15
16 RDEPEND="sys-libs/ncurses:="
17 DEPEND="${RDEPEND}
18         !net-misc/netkit-telnetd
19         xinetd? ( sys-apps/xinetd )
20         virtual/pkgconfig"
21
22 src_prepare() {
23         epatch "${FILESDIR}"/${P}-fbsd.patch
24         epatch "${FILESDIR}"/${PN}-1.2-format-security.patch
25         eaclocal
26         eautoreconf
27 }
28
29 src_configure() {
30         # FreeBSD doesn't seem to support PIE neither does hppa
31         if use kernel_FreeBSD; then
32                 export libc_cv_fpie="no"
33         fi
34
35         econf
36         emake LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
37 }
38
39 src_install() {
40         emake DESTDIR="${D}" install
41
42         if use xinetd ; then
43                 insinto /etc/xinetd.d
44                 newins "${FILESDIR}"/telnetd.xinetd telnetd
45         fi
46
47         dodoc README THANKS NEWS AUTHORS ChangeLog INSTALL
48 }