1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
8 inherit cmake-utils python-single-r1 udev systemd
10 DESCRIPTION="Userspace components for the Linux Kernel's drivers/infiniband subsystem"
11 HOMEPAGE="https://github.com/linux-rdma/rdma-core"
13 if [[ ${PV} == "9999" ]]; then
15 EGIT_REPO_URI="https://github.com/linux-rdma/rdma-core"
17 SRC_URI="https://github.com/linux-rdma/rdma-core/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18 KEYWORDS="~amd64 ~x86"
21 LICENSE="|| ( GPL-2 ( CC0-1.0 MIT BSD BSD-with-attribution ) )"
23 IUSE="neigh python static-libs systemd valgrind"
24 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
28 neigh? ( dev-libs/libnl:3 )
29 systemd? ( sys-apps/systemd:= )
30 valgrind? ( dev-util/valgrind )
31 python? ( ${PYTHON_DEPS} )"
33 DEPEND="${COMMON_DEPEND}
34 python? ( dev-python/cython[${PYTHON_USEDEP}] )"
36 RDEPEND="${COMMON_DEPEND}
37 !sys-fabric/infiniband-diags
38 !sys-fabric/libibverbs
44 !sys-fabric/infinipath-psm
53 BDEPEND="virtual/pkgconfig"
55 PATCHES=( "${FILESDIR}"/optional_pandoc.patch )
58 python-single-r1_pkg_setup
64 -DCMAKE_INSTALL_SYSCONFDIR=/etc
65 -DCMAKE_INSTALL_FULL_RUNDIR=/run
66 -DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib
67 -DCMAKE_INSTALL_UDEV_RULESDIR="$(get_udevdir)"/rules.d
68 -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR="$(systemd_get_systemunitdir)"
69 -DCMAKE_DISABLE_FIND_PACKAGE_pandoc=yes
70 $(ver_test -ge 25 && echo -DCMAKE_DISABLE_FIND_PACKAGE_rst2man=yes)
71 -DCMAKE_DISABLE_FIND_PACKAGE_Systemd="$(usex systemd no yes)"
72 -DENABLE_VALGRIND="$(usex valgrind)"
73 -DENABLE_RESOLVE_NEIGH="$(usex neigh)"
74 -DENABLE_STATIC="$(usex static-libs)"
78 mycmakeargs+=( -DNO_PYVERBS=OFF )
80 mycmakeargs+=( -DNO_PYVERBS=ON )
83 cmake-utils_src_configure
87 cmake-utils_src_install
89 udev_dorules "${D}"/etc/udev/rules.d/70-persistent-ipoib.rules
90 rm -r "${D}"/etc/{udev,init.d} || die
92 newinitd "${FILESDIR}"/ibacm.init ibacm
93 newinitd "${FILESDIR}"/iwpmd.init iwpmd
94 newinitd "${FILESDIR}"/srpd.init srpd