summaryrefslogtreecommitdiff
blob: 004ff3042f0cc1a49902ebc3c6a91210fa82130d (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdebian-installer/libdebian-installer-0.78.ebuild,v 1.5 2011/11/27 23:02:24 jer Exp $

EAPI=2

inherit eutils multilib

DESCRIPTION="Library of common debian-installer functions"
HOMEPAGE="http://packages.qa.debian.org/libd/libdebian-installer.html"
SRC_URI="mirror://debian/pool/main/libd/${PN}/${PN}_${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="doc static-libs"

DEPEND=" doc? ( app-doc/doxygen )"
RDEPEND=""

S="${WORKDIR}/${PN}"

src_prepare() {
	epatch "${FILESDIR}/${PN}-0.74-fix-warnings.patch" \
		"${FILESDIR}/${PN}-0.74-dont-install-docs.patch"
	sed -i src/parser_rfc822.c -e '/^#define READSIZE/s|16384|32768|' || die
}

src_configure() {
	econf $(use_enable static-libs static)
}

src_compile() {
	emake || die "emake failed"

	if use doc; then
		emake -C doc doc || die "emake for docs failed"
	fi
	rm -f "${D}"/usr/$(get_libdir)/*la || die
}

src_install() {
	emake install DESTDIR="${D}" || die "emake install failed"

	if use doc; then
		dohtml -r doc/html/*
	fi

	dodoc HACKING debian/changelog

	if ! use static-libs; then
		rm -f "${D}"/usr/lib*/lib*.la
	fi
}