dev-libs/roct-thunk-interface: 3.5.0 version bump
[gentoo.git] / dev-libs / redland-bindings / redland-bindings-1.0.14.1-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit multilib python-single-r1
9
10 DESCRIPTION="Language bindings for Redland"
11 HOMEPAGE="http://librdf.org/bindings/"
12 SRC_URI="http://download.librdf.org/source/${P}.tar.gz"
13
14 LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-linux ~ppc-macos"
17 IUSE="lua perl python php ruby"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
19
20 RDEPEND=">=dev-libs/redland-1.0.14
21         lua? ( >=dev-lang/lua-5.1:0 )
22         perl? ( dev-lang/perl:= )
23         php? ( dev-lang/php:* )
24         python? ( ${PYTHON_DEPS} )
25         ruby? ( dev-lang/ruby:* dev-ruby/log4r )"
26 DEPEND="${RDEPEND}
27         virtual/pkgconfig
28         >=dev-lang/swig-2
29         sys-apps/sed"
30
31 pkg_setup() {
32         use python && python-single-r1_pkg_setup
33 }
34
35 src_configure() {
36         econf \
37                 $(use_with lua) \
38                 $(use_with perl) \
39                 $(use_with python) \
40                 $(use_with php) \
41                 $(use_with ruby)
42 }
43
44 src_install() {
45         emake DESTDIR="${D}" INSTALLDIRS=vendor luadir=/usr/$(get_libdir)/lua/5.1 install
46
47         if use perl; then
48                 find "${ED}" -type f -name perllocal.pod -delete
49                 find "${ED}" -depth -mindepth 1 -type d -empty -delete
50         fi
51         use python && python_optimize
52
53         dodoc AUTHORS ChangeLog NEWS README TODO
54         dohtml {NEWS,README,RELEASE,TODO}.html
55 }