1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
8 inherit cmake-utils python-single-r1 user
10 DESCRIPTION="Extended ROOT remote file server"
11 HOMEPAGE="http://xrootd.org/"
12 SRC_URI="http://xrootd.org/download/v${PV}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="doc examples fuse http kerberos python readline ssl test"
18 RESTRICT="!test? ( test )"
22 fuse? ( sys-fs/fuse:= )
23 kerberos? ( virtual/krb5 )
24 python? ( ${PYTHON_DEPS} )
25 readline? ( sys-libs/readline:0= )
26 ssl? ( dev-libs/openssl:0= )
31 python? ( dev-python/sphinx )
33 test? ( dev-util/cppunit )
39 http? ( kerberos ssl )
40 python? ( ${PYTHON_REQUIRED_USE} )
43 PATCHES=( "${FILESDIR}"/xrootd-4.8.3-crc32.patch )
45 # xrootd plugins are not intended to be linked with,
46 # they are to be loaded at runtime by xrootd,
47 # see https://github.com/xrootd/xrootd/issues/447
48 QA_SONAME="/usr/lib.*/libXrd*-4.so"
52 enewuser xrootd -1 -1 "${EPREFIX}"/var/spool/xrootd xrootd
53 use python && python_setup
58 -DENABLE_CRYPTO=$(usex ssl)
59 -DENABLE_FUSE=$(usex fuse)
60 -DENABLE_HTTP=$(usex http)
61 -DENABLE_KRB5=$(usex kerberos)
62 -DENABLE_PYTHON=$(usex python)
63 -DENABLE_READLINE=$(usex readline)
64 -DENABLE_TESTS=$(usex test)
66 cmake-utils_src_configure
70 cmake-utils_src_compile
72 doxygen Doxyfile || die
74 emake -C bindings/python/docs html
80 use doc && HTML_DOCS=( doxydoc/html/. )
81 dodoc docs/ReleaseNotes.txt
82 cmake-utils_src_install
83 find "${D}" \( -iname '*.md5' -o -iname '*.map' \) -delete || die
87 doins packaging/common/*.cfg
89 fowners root:xrootd /etc/xrootd
90 keepdir /var/log/xrootd
91 fowners xrootd:xrootd /var/log/xrootd
94 for i in cmsd frm_purged frm_xfrd xrootd; do
95 newinitd "${FILESDIR}"/${i}.initd ${i}
97 # all daemons MUST use single master config file
98 newconfd "${FILESDIR}"/xrootd.confd xrootd
101 python_optimize "${D}/$(python_get_sitedir)"
105 docompress -x "/usr/share/doc/${PF}/python/html"
106 dodoc -r bindings/python/docs/build/html
108 if use examples; then
110 dodoc -r bindings/python/examples