summaryrefslogtreecommitdiff
blob: 9c7d6a3a1373f9d033fbf271d375c2015808fb05 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

DESCRIPTION="Library to read the content of dBASE III, IV, and 5.0 files"
HOMEPAGE="http://developer.berlios.de/projects/dbf/"
SRC_URI="mirror://berlios/dbf/${P}.src.zip"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

RDEPEND=""
DEPEND="${RDEPEND}
	app-arch/unzip
	dev-perl/XML-Parser
	doc? ( app-text/docbook-sgml-utils )
	virtual/pkgconfig"

S=${WORKDIR}/${PN}

src_prepare() {
	# Avoid collisions with /usr/include/endian.h
	# installed by e.g. sys-libs/glibc-2.12.1-r1
	cd src || die "src dir missing"
	mv endian.h dbf_endian.h || die "endian.h couldn't be renamed"
	sed -i 's/endian\.h/dbf_endian.h/g' Makefile.in *.c *.h \
		|| die "error executing sed"
}

src_configure() {
	chmod u+x configure
	if use doc; then
		export DOC_TO_MAN=docbook2man
	fi
	econf
}

src_install() {
	chmod u+x install-sh
	emake DESTDIR="${D}" install || die "make install failed"
}