Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/xrootd/
Date: Sun, 25 Dec 2016 22:03:21
Message-Id: 1482703392.1c2a2775c14e6f82d1eb4e7b0bda8f068723a34a.bircoph@gentoo
1 commit: 1c2a2775c14e6f82d1eb4e7b0bda8f068723a34a
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 25 22:02:45 2016 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 25 22:03:12 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c2a2775
7
8 net-libs/xrootd: add python support
9
10 - Add support for python bindings, upstream support only
11 python-2.{4..7}.
12 - Optionally install python docs and examples.
13 - Add perl dep for provided utils.
14
15 Package-Manager: portage-2.3.3
16 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
17
18 net-libs/xrootd/xrootd-4.5.0.ebuild | 51 +++++++++++++++++++++++++++++--------
19 1 file changed, 41 insertions(+), 10 deletions(-)
20
21 diff --git a/net-libs/xrootd/xrootd-4.5.0.ebuild b/net-libs/xrootd/xrootd-4.5.0.ebuild
22 index c7f7625..c48d44f 100644
23 --- a/net-libs/xrootd/xrootd-4.5.0.ebuild
24 +++ b/net-libs/xrootd/xrootd-4.5.0.ebuild
25 @@ -4,7 +4,9 @@
26
27 EAPI=6
28
29 -inherit cmake-utils user
30 +PYTHON_COMPAT=( python2_7 )
31 +
32 +inherit cmake-utils python-single-r1 user
33
34 DESCRIPTION="Extended ROOT remote file server"
35 HOMEPAGE="http://xrootd.org/"
36 @@ -13,26 +15,38 @@ SRC_URI="http://xrootd.org/download/v${PV}/${P}.tar.gz"
37 LICENSE="LGPL-3"
38 SLOT="0"
39 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
40 -IUSE="doc fuse http kerberos readline rbd ssl test"
41 +IUSE="doc examples fuse http kerberos python readline rbd ssl test"
42
43 -RDEPEND="
44 +CDEPEND="
45 !<sci-physics/root-5.32[xrootd]
46 sys-libs/zlib
47 fuse? ( sys-fs/fuse )
48 kerberos? ( virtual/krb5 )
49 + python? ( ${PYTHON_DEPS} )
50 rbd? ( sys-cluster/ceph )
51 readline? ( sys-libs/readline:0= )
52 - ssl? ( dev-libs/openssl:0= )"
53 -DEPEND="${RDEPEND}
54 - doc? ( app-doc/doxygen[dot] )
55 - test? ( dev-util/cppunit )"
56 -
57 -REQUIRED_USE="http? ( kerberos ssl )"
58 + ssl? ( dev-libs/openssl:0= )
59 +"
60 +DEPEND="${CDEPEND}
61 + doc? (
62 + app-doc/doxygen[dot]
63 + python? ( dev-python/sphinx )
64 + )
65 + test? ( dev-util/cppunit )
66 +"
67 +RDEPEND="${CDEPEND}
68 + dev-lang/perl
69 +"
70 +REQUIRED_USE="
71 + http? ( kerberos ssl )
72 + python? ( ${PYTHON_REQUIRED_USE} )
73 +"
74 PATCHES=( "${FILESDIR}"/${PN}-no-werror.patch )
75
76 pkg_setup() {
77 enewgroup xrootd
78 enewuser xrootd -1 -1 "${EPREFIX}"/var/spool/xrootd xrootd
79 + use python && python_setup
80 }
81
82 src_configure() {
83 @@ -42,7 +56,7 @@ src_configure() {
84 -DENABLE_FUSE=$(usex fuse)
85 -DENABLE_HTTP=$(usex http)
86 -DENABLE_KRB5=$(usex kerberos)
87 - -DENABLE_PYTHON=OFF # TODO: install python bindings properly
88 + -DENABLE_PYTHON=$(usex python)
89 -DENABLE_READLINE=$(usex readline)
90 -DENABLE_TESTS=$(usex test)
91 )
92 @@ -53,6 +67,9 @@ src_compile() {
93 cmake-utils_src_compile
94 if use doc; then
95 doxygen Doxyfile || die
96 + if use python; then
97 + emake -C bindings/python/docs html
98 + fi
99 fi
100 }
101
102 @@ -76,4 +93,18 @@ src_install() {
103 done
104 # all daemons MUST use single master config file
105 newconfd "${FILESDIR}"/xrootd.confd xrootd
106 +
107 + if use python; then
108 + python_optimize "${D}/$(python_get_sitedir)"
109 +
110 + if use doc; then
111 + docinto python
112 + docompress -x "/usr/share/doc/${PF}/python/html"
113 + dodoc -r bindings/python/docs/build/html
114 + fi
115 + if use examples; then
116 + docinto python
117 + dodoc -r bindings/python/examples
118 + fi
119 + fi
120 }