*/*: Bump copyright on files touched this year
[gentoo.git] / sys-apps / hwloc / hwloc-1.11.2-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit flag-o-matic cuda autotools-multilib multilib versionator
7
8 MY_PV=v$(get_version_component_range 1-2)
9
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"
13
14 LICENSE="BSD"
15 SLOT="0/5"
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"
18
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.
21
22 # dev-util/nvidia-cuda-toolkit is always multilib
23
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] )
28         pci? (
29                 >=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
30                 >=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
31         )
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}] )"
35 DEPEND="${RDEPEND}
36         >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
37
38 DOCS=( AUTHORS NEWS README VERSION )
39
40 PATCHES=(
41         "${FILESDIR}/${PN}-1.8.1-gl.patch"
42 )
43 AUTOTOOLS_AUTORECONF=1
44
45 src_prepare() {
46         if use cuda ; then
47                 append-cflags -I/opt/cuda/include
48                 append-cppflags -I/opt/cuda/include
49         fi
50         autotools-utils_src_prepare
51 }
52
53 multilib_src_configure() {
54         export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
55         use cuda && local LDFLAGS="${LDFLAGS} -L/opt/cuda/$(get_libdir)"
56         local myeconfargs=(
57                 --disable-silent-rules
58                 --docdir="${EPREFIX}"/usr/share/doc/${PF}
59                 $(use_enable cairo)
60                 $(use_enable cuda)
61                 $(use_enable debug)
62                 $(multilib_native_use_enable gl)
63                 $(use_enable pci)
64                 $(use_enable plugins)
65                 $(use_enable numa libnuma)
66                 $(use_enable xml libxml2)
67                 $(use_with X x)
68         )
69         autotools-utils_src_configure
70 }