summaryrefslogtreecommitdiff
blob: 7b39b46da9e2a0688515886c0712337a5b758b03 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/redland-bindings/redland-bindings-1.0.10.1-r1.ebuild,v 1.1 2010/01/08 19:04:52 ssuominen Exp $

EAPI=2
inherit multilib

DESCRIPTION="Language bindings for Redland"
HOMEPAGE="http://librdf.org/bindings/"
SRC_URI="http://download.librdf.org/source/${P}.tar.gz"

LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="perl python php ruby"

RDEPEND=">=dev-libs/redland-1.0.10-r1
	perl? ( dev-lang/perl )
	python? ( dev-lang/python )
	php? ( virtual/php )
	ruby? ( dev-lang/ruby dev-ruby/log4r )"
DEPEND="${RDEPEND}
	dev-lang/swig
	sys-apps/sed
	perl? ( sys-apps/findutils )"

src_prepare() {
	sed -i \
		-e "s:lib/python:$(get_libdir)/python:" \
		configure || die
}

src_configure() {
	# --with-python-ldflags line can be dropped from next release
	# as it's been fixed in trunk
	econf \
		--disable-dependency-tracking \
		$(use_with perl) \
		$(use_with python) \
		--with-python-ldflags="-shared -lrdf" \
		$(use_with php) \
		$(use_with ruby) \
		--with-redland=system
}

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

	if use perl; then
		find "${D}" -type f -name perllocal.pod -delete
		find "${D}" -depth -mindepth 1 -type d -empty -delete
	fi

	dodoc AUTHORS ChangeLog NEWS README TODO
	dohtml {NEWS,README,RELEASE,TODO}.html
}