Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/betagarden:master commit in: dev-python/pyexiv2/
Date: Thu, 17 Dec 2015 22:26:58
Message-Id: 1450391183.0a930cd135228c199806c8b140878eb360b8d0b1.sping@gentoo
1 commit: 0a930cd135228c199806c8b140878eb360b8d0b1
2 Author: Sebastian Pipping <sebastian <AT> pipping <DOT> org>
3 AuthorDate: Thu Dec 17 22:26:23 2015 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 17 22:26:23 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/betagarden.git/commit/?id=0a930cd1
7
8 dev-python/pyexiv2: Fix compilation against libboost_python-X.Y.so
9
10 dev-python/pyexiv2/pyexiv2-0.3.0-r2.ebuild | 59 ++++++++++++++++++++++++++++++
11 1 file changed, 59 insertions(+)
12
13 diff --git a/dev-python/pyexiv2/pyexiv2-0.3.0-r2.ebuild b/dev-python/pyexiv2/pyexiv2-0.3.0-r2.ebuild
14 new file mode 100644
15 index 0000000..1a3adcd
16 --- /dev/null
17 +++ b/dev-python/pyexiv2/pyexiv2-0.3.0-r2.ebuild
18 @@ -0,0 +1,59 @@
19 +# Copyright 1999-2014 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +EAPI=5
24 +
25 +PYTHON_COMPAT=( python2_7 )
26 +
27 +inherit eutils versionator scons-utils python-single-r1
28 +
29 +MY_PV=$(get_version_component_range 1-2)
30 +DESCRIPTION="Python binding to exiv2"
31 +HOMEPAGE="http://tilloy.net/dev/pyexiv2/"
32 +SRC_URI="http://launchpad.net/${PN}/${MY_PV}.x/${MY_PV}/+download/${P}.tar.bz2"
33 +
34 +LICENSE="GPL-2"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86"
37 +IUSE="doc examples"
38 +
39 +DEPEND="
40 + >=media-gfx/exiv2-0.20
41 + dev-python/sphinx[${PYTHON_USEDEP}]
42 + >=dev-libs/boost-1.57[python,${PYTHON_USEDEP}]"
43 +RDEPEND="${DEPEND}"
44 +
45 +_get_boostlib() {
46 + python -c 'import sys; print ("boost_python-%d.%d" % sys.version_info[0:2])'
47 +}
48 +
49 +src_prepare() {
50 + epatch "${FILESDIR}"/${P}-docs.patch
51 +}
52 +
53 +src_compile() {
54 + escons BOOSTLIB="$(_get_boostlib)" lib
55 + if use doc; then
56 + escons doc
57 +
58 + # To enable doins -r in src_install
59 + rm -R doc/_build/.doctrees || die
60 + fi
61 +}
62 +
63 +src_install() {
64 + escons DESTDIR="${D}" BOOSTLIB="$(_get_boostlib)" install
65 + dodoc NEWS README todo
66 +
67 + if use examples; then
68 + insinto /usr/share/${PN}/examples
69 + doins src/*example*.py
70 + fi
71 +
72 + if use doc; then
73 + docinto html
74 + dodoc -r doc/html/*
75 + fi
76 + python_optimize
77 +}