summaryrefslogtreecommitdiff
blob: 3bf0b58f91f860d4d480a9b6884c1b8c4adfc9ca (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="4"

inherit eutils multilib toolchain-funcs

DESCRIPTION="Cisco-style (telnet) command-line interface library"

HOMEPAGE="http://sites.dparrish.com/libcli"
SRC_URI="https://libcli.googlecode.com/files/${P}.tar.gz"
LICENSE="LGPL-2.1"

SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux"
IUSE=""

DEPEND=""
RDEPEND=""

src_prepare() {
	# Support /lib{32,64}
	sed -i 's:$(PREFIX)/lib:$(libdir):g' Makefile || die
	sed -i 's:PREFIX = /usr/local:&\nlibdir = $(PREFIX)/lib:' Makefile || die

	# Make this respect LDFLAGS, bug #334913
	epatch "${FILESDIR}/${PN}-1.9.4-ldflags.patch"
}

src_compile() {
	emake OPTIM="" DEBUG="" CC="$(tc-getCC)"
}

src_install() {
	emake DESTDIR="${ED}" \
		PREFIX="/usr" \
		OPTIM="" \
		DEBUG="" \
		libdir="/usr/$(get_libdir)" \
		install

	dobin clitest
	dodoc README
}