summaryrefslogtreecommitdiff
blob: f370745a1ef88253a465fc2ec38d621e93746dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="Manage LDAP entries with a text editor"
HOMEPAGE="http://www.lichteblau.com/ldapvi/"
SRC_URI="mirror://gentoo/${P}.tar.bz2"
S="${WORKDIR}"/${P}/${PN}

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
IUSE="gnutls sasl"

RDEPEND="
	dev-libs/popt
	dev-libs/glib:2
	sys-libs/readline:=
	sys-libs/ncurses:=
	virtual/libcrypt:=
	gnutls? (
		net-libs/gnutls:=
		net-nds/openldap[gnutls]
	)
	!gnutls? (
		dev-libs/openssl:=
		net-nds/openldap[ssl]
	)
	sasl? ( dev-libs/cyrus-sasl:2[ssl] )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}/${PN}-1.7-fix-implicit-function-declarations.patch"
	"${FILESDIR}/${PN}-1.7-fix-missing-on_exit-musl.patch"
	"${FILESDIR}/${PN}-1.7-posix-unlocked.patch"
)

src_prepare() {
	default

	# bug #459478
	sed -i \
		-e '/^AC_SEARCH_LIBS/s:curses ncurses:curses ncurses tinfo:' \
		configure.in || die

	eautoreconf
}

src_configure() {
	econf \
		--with-libcrypto=$(usex gnutls gnutls openssl)
}

src_install() {
	dobin ldapvi
	doman ldapvi.1
	dodoc NEWS manual/{bg.png,html.xsl,manual.{css,xml}}
}