sys-apps/groff: stable 1.22.4 for ppc64, bug #704420
[gentoo.git] / sys-apps / hwloc / hwloc-2.0.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools cuda flag-o-matic eapi7-ver multilib-minimal toolchain-funcs
7
8 MY_PV=v$(ver_cut 1-2)
9
10 DESCRIPTION="displays the hardware topology in convenient formats"
11 HOMEPAGE="https://www.open-mpi.org/projects/hwloc/"
12 SRC_URI="https://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
13
14 LICENSE="BSD"
15 SLOT="0/15"
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
17 IUSE="cairo cuda debug gl +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 RDEPEND=">=sys-libs/ncurses-5.9-r3:0[${MULTILIB_USEDEP}]
23         cairo? ( >=x11-libs/cairo-1.12.14-r4[X?,svg?,${MULTILIB_USEDEP}] )
24         cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1:= )
25         gl? ( x11-drivers/nvidia-drivers[static-libs,tools] )
26         pci? (
27                 >=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
28                 >=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
29         )
30         plugins? ( dev-libs/libltdl:0[${MULTILIB_USEDEP}] )
31         xml? ( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
32 DEPEND="${RDEPEND}
33         >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
34
35 PATCHES=( "${FILESDIR}/${PN}-1.8.1-gl.patch" )
36 DOCS=( AUTHORS NEWS README VERSION )
37
38 src_prepare() {
39         default
40         eautoreconf
41
42         if use cuda ; then
43                 append-cflags -I"${EPREFIX}"/opt/cuda/include
44                 append-cppflags -I"${EPREFIX}"/opt/cuda/include
45         fi
46 }
47
48 multilib_src_configure() {
49         export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
50
51         if use cuda ; then
52                 local -x LDFLAGS="${LDFLAGS}"
53                 append-ldflags -L"${EPREFIX}"/opt/cuda/$(get_libdir)
54         fi
55
56         ECONF_SOURCE=${S} econf \
57                 --disable-opencl \
58                 $(use_enable static-libs static) \
59                 $(use_enable cairo) \
60                 $(multilib_native_use_enable cuda) \
61                 $(use_enable debug) \
62                 $(multilib_native_use_enable gl) \
63                 $(use_enable pci) \
64                 $(use_enable plugins) \
65                 $(use_enable xml libxml2) \
66                 $(use_with X x)
67 }