Diff hwloc-1.11.13-r1 with a hwloc-2.6.0-r1

/usr/portage/sys-apps/hwloc/hwloc-2.6.0-r1.ebuild 2023-10-09 14:52:35.376368499 +0300
1 1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI="7"
5 5

  
6
inherit autotools cuda flag-o-matic multilib-minimal toolchain-funcs
6
inherit autotools bash-completion-r1 cuda flag-o-matic systemd toolchain-funcs multilib-minimal
7 7

  
8
MY_PV=v$(ver_cut 1-2)
8
MY_PV="v$(ver_cut 1-2)"
9 9

  
10 10
DESCRIPTION="Displays the hardware topology in convenient formats"
11 11
HOMEPAGE="https://www.open-mpi.org/projects/hwloc/"
12 12
SRC_URI="https://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
13 13

  
14 14
LICENSE="BSD"
15
SLOT="0/5"
16
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
17
IUSE="cairo cuda debug gl +numa +pci plugins svg static-libs xml X"
15
SLOT="0/15"
16
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
17
IUSE="cairo +cpuid cuda debug gl nvml +pci static-libs svg udev xml X"
18 18

  
19
# opencl support dropped with x11-drivers/ati-drivers being removed (#582406).
19
# opencl support dropped with x11-drivers/ati-drivers being removed (bug #582406).
20 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 21
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}] )"
22

  
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
	nvml?		( x11-drivers/nvidia-drivers[${MULTILIB_USEDEP}] )
27
	pci?		(
28
				>=sys-apps/pciutils-3.3.0-r2[${MULTILIB_USEDEP}]
29
				>=x11-libs/libpciaccess-0.13.1-r1[${MULTILIB_USEDEP}]
30
			)
31
	udev?	( virtual/libudev )
32
	xml?		( >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] )"
35 33
DEPEND="${RDEPEND}"
36
BDEPEND="virtual/pkgconfig"
34
# 2.69-r5 for --runstatedir
35
BDEPEND="
36
	>=sys-devel/autoconf-2.69-r5
37
	virtual/pkgconfig
38
"
37 39

  
38 40
PATCHES=( "${FILESDIR}/${PN}-1.8.1-gl.patch" )
41

  
39 42
DOCS=( AUTHORS NEWS README VERSION )
40 43

  
41 44
src_prepare() {
42 45
	default
46

  
43 47
	eautoreconf
44 48

  
45 49
	if use cuda ; then
46
		append-cflags -I"${ESYSROOT}"/opt/cuda/include
47
		append-cppflags -I"${ESYSROOT}"/opt/cuda/include
50
		append-cflags "-I${ESYSROOT}/opt/cuda/include"
51
		append-cppflags "-I${ESYSROOT}/opt/cuda/include"
48 52
	fi
49 53
}
50 54

  
51 55
multilib_src_configure() {
52
	export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
56
	# bug #393467
57
	export HWLOC_PKG_CONFIG="$(tc-getPKG_CONFIG)"
53 58

  
54 59
	if use cuda ; then
55 60
		local -x LDFLAGS="${LDFLAGS}"
56
		append-ldflags -L"${ESYSROOT}"/opt/cuda/$(get_libdir)
61
		append-ldflags "-L${ESYSROOT}/opt/cuda/$(get_libdir)"
57 62
	fi
58 63

  
59
	ECONF_SOURCE=${S} econf \
60
		--disable-opencl \
61
		$(use_enable static-libs static) \
62
		$(use_enable cairo) \
63
		$(multilib_native_use_enable cuda) \
64
		$(use_enable debug) \
65
		$(multilib_native_use_enable gl) \
66
		$(use_enable pci) \
67
		$(use_enable plugins) \
68
		$(use_enable numa libnuma) \
69
		$(use_enable xml libxml2) \
64
	local myconf=(
65
		--disable-opencl
66
		# netloc is deprecated upstream, about to be removed
67
		# bug #796797
68
		--disable-netloc
69
		--disable-plugin-ltdl
70
		--enable-plugins
71
		--enable-shared
72
		--runstatedir="${EPREFIX}/run"
73
		$(multilib_native_use_enable cuda)
74
		$(multilib_native_use_enable gl)
75
		$(use_enable cairo)
76
		$(use_enable cpuid)
77
		$(use_enable debug)
78
		$(use_enable udev libudev)
79
		$(use_enable nvml)
80
		$(use_enable pci)
81
		$(use_enable static-libs static)
82
		$(use_enable xml libxml2)
70 83
		$(use_with X x)
84
	)
85

  
86
	ECONF_SOURCE="${S}" econf "${myconf[@]}"
87
}
88

  
89
multilib_src_install_all() {
90
	default
91

  
92
	case ${ARCH} in
93
		# hwloc-dump-hwdata binary only built on those arches, so don't install non-working unit.
94
		amd64|x86)
95
			systemd_dounit "${ED}/usr/share/hwloc/hwloc-dump-hwdata.service" ;;
96
	esac
97

  
98
	mv "${ED}"/usr/share/bash-completion/completions/hwloc{,-annotate} || die
99
	bashcomp_alias hwloc-annotate \
100
		hwloc-{diff,ps,compress-dir,gather-cpuid,distrib,info,bind,patch,calc,ls,gather-topology}
101
	bashcomp_alias hwloc-annotate lstopo{,-no-graphics}
102

  
103
	find "${ED}" -name '*.la' -delete || die
71 104
}
Thank you!