1 # Copyright 2019-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/releases/download/v${PV}/${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"
56 python-single-r1_pkg_setup
62 -DCMAKE_INSTALL_SYSCONFDIR=/etc
63 -DCMAKE_INSTALL_FULL_RUNDIR=/run
64 -DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib
65 -DCMAKE_INSTALL_UDEV_RULESDIR="$(get_udevdir)"/rules.d
66 -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR="$(systemd_get_systemunitdir)"
67 -DCMAKE_DISABLE_FIND_PACKAGE_pandoc=yes
68 $(ver_test -ge 25 && echo -DCMAKE_DISABLE_FIND_PACKAGE_rst2man=yes)
69 -DCMAKE_DISABLE_FIND_PACKAGE_Systemd="$(usex systemd no yes)"
70 -DENABLE_VALGRIND="$(usex valgrind)"
71 -DENABLE_RESOLVE_NEIGH="$(usex neigh)"
72 -DENABLE_STATIC="$(usex static-libs)"
76 mycmakeargs+=( -DNO_PYVERBS=OFF )
78 mycmakeargs+=( -DNO_PYVERBS=ON )
81 cmake-utils_src_configure
85 cmake-utils_src_install
87 udev_dorules "${D}"/etc/udev/rules.d/70-persistent-ipoib.rules
88 rm -r "${D}"/etc/{udev,init.d} || die
90 newinitd "${FILESDIR}"/ibacm.init ibacm
91 newinitd "${FILESDIR}"/iwpmd.init iwpmd
92 newinitd "${FILESDIR}"/srpd.init srpd