1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic cuda autotools-multilib multilib versionator
8 MY_PV=v$(get_version_component_range 1-2)
10 DESCRIPTION="displays the hardware topology in convenient formats"
11 HOMEPAGE="http://www.open-mpi.org/projects/hwloc/"
12 SRC_URI="http://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
16 KEYWORDS="~alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
17 IUSE="cairo cuda debug gl +numa +pci plugins svg static-libs xml X"
19 # opencl support dropped with x11-drivers/ati-drivers being removed (#582406).
20 # Anyone with hardware is welcome to step up and help test to get it re-added.
22 # dev-util/nvidia-cuda-toolkit is always multilib
24 RDEPEND=">=sys-libs/ncurses-5.9-r3:0[${MULTILIB_USEDEP}]
25 cairo? ( >=x11-libs/cairo-1.12.14-r4[X?,svg?,${MULTILIB_USEDEP}] )
26 cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1 )
27 gl? ( x11-drivers/nvidia-drivers[static-libs,tools] )
29 >=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
30 >=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
32 plugins? ( dev-libs/libltdl:0[${MULTILIB_USEDEP}] )
33 numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )
34 xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
36 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
38 DOCS=( AUTHORS NEWS README VERSION )
41 "${FILESDIR}/${PN}-1.8.1-gl.patch"
43 AUTOTOOLS_AUTORECONF=1
47 append-cflags -I/opt/cuda/include
48 append-cppflags -I/opt/cuda/include
50 autotools-utils_src_prepare
53 multilib_src_configure() {
54 export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
55 use cuda && local LDFLAGS="${LDFLAGS} -L/opt/cuda/$(get_libdir)"
57 --disable-silent-rules
58 --docdir="${EPREFIX}"/usr/share/doc/${PF}
62 $(multilib_native_use_enable gl)
65 $(use_enable numa libnuma)
66 $(use_enable xml libxml2)
69 autotools-utils_src_configure