hwloc-1.10.0-r2.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit flag-o-matic cuda autotools-utils multilib versionator
  5. MY_PV=v$(get_version_component_range 1-2)
  6. DESCRIPTION="displays the hardware topology in convenient formats"
  7. HOMEPAGE="http://www.open-mpi.org/projects/hwloc/"
  8. SRC_URI="http://www.open-mpi.org/software/${PN}/${MY_PV}/downloads/${P}.tar.bz2"
  9. LICENSE="BSD"
  10. SLOT="0/5"
  11. KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
  12. IUSE="cairo cuda debug gl +numa opencl +pci plugins svg static-libs xml X"
  13. # TODO opencl only works with AMD so no virtual
  14. RDEPEND="sys-libs/ncurses
  15. cairo? ( x11-libs/cairo[X?,svg?] )
  16. cuda? ( dev-util/nvidia-cuda-toolkit )
  17. gl? ( || ( x11-drivers/nvidia-drivers[static-libs,tools] media-video/nvidia-settings ) )
  18. opencl? ( x11-drivers/ati-drivers )
  19. pci? (
  20. sys-apps/pciutils
  21. x11-libs/libpciaccess
  22. )
  23. plugins? ( dev-libs/libltdl:0 )
  24. numa? ( sys-process/numactl )
  25. xml? ( dev-libs/libxml2 )"
  26. DEPEND="${RDEPEND}
  27. virtual/pkgconfig"
  28. DOCS=( AUTHORS NEWS README VERSION )
  29. PATCHES=( "${FILESDIR}/${PN}-1.8.1-gl.patch" )
  30. AUTOTOOLS_AUTORECONF=1
  31. src_prepare() {
  32. if use cuda ; then
  33. append-cflags -I/opt/cuda/include
  34. append-cppflags -I/opt/cuda/include
  35. append-ldflags -L/opt/cuda/$(get_libdir)
  36. fi
  37. autotools-utils_src_prepare
  38. }
  39. src_configure() {
  40. export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
  41. local myeconfargs=(
  42. --disable-silent-rules
  43. --docdir="${EPREFIX}"/usr/share/doc/${PF}
  44. $(use_enable cairo)
  45. $(use_enable cuda)
  46. $(use_enable debug)
  47. $(use_enable gl)
  48. $(use_enable opencl)
  49. $(use_enable pci)
  50. $(use_enable plugins)
  51. $(use_enable numa libnuma)
  52. $(use_enable xml libxml2)
  53. $(use_with X x)
  54. )
  55. autotools-utils_src_configure
  56. }
  57. src_install() {
  58. autotools-utils_src_install
  59. # Fixed by upstream, but it seems overkill to require an autoregen for what
  60. # is just a sed fix.
  61. # https://github.com/open-mpi/hwloc/commit/6d42748f8604f3c1d0ca6cf122e8776b3c153ac4?diff=unified
  62. sed -i 's|bindir/lstopo/|bindir/|' "${ED}"/usr/bin/hwloc-gather-topology || die
  63. }