hwloc-1.7.2.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 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"
  11. KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-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? ( sys-devel/libtool )
  24. numa? ( sys-process/numactl )
  25. xml? ( dev-libs/libxml2 )"
  26. DEPEND="${RDEPEND}
  27. virtual/pkgconfig"
  28. DOCS=( AUTHORS NEWS README VERSION )
  29. src_prepare() {
  30. if use cuda ; then
  31. append-cflags -I/opt/cuda/include
  32. append-cppflags -I/opt/cuda/include
  33. append-ldflags -L/opt/cuda/$(get_libdir)
  34. fi
  35. }
  36. src_configure() {
  37. export HWLOC_PKG_CONFIG=$(tc-getPKG_CONFIG) #393467
  38. econf \
  39. --docdir="${EPREFIX}"/usr/share/doc/${PF} \
  40. $(use_enable cairo) \
  41. $(use_enable cuda) \
  42. $(use_enable debug) \
  43. $(use_enable gl) \
  44. $(use_enable opencl) \
  45. $(use_enable pci) \
  46. $(use_enable pci libpci) \
  47. $(use_enable plugins) \
  48. $(use_enable numa libnuma) \
  49. $(use_enable static-libs static) \
  50. $(use_enable xml libxml2) \
  51. $(use_with X x) \
  52. --disable-silent-rules
  53. }
  54. src_install() {
  55. default
  56. if ! use static-libs; then
  57. rm "${D}"/usr/$(get_libdir)/lib${PN}.la
  58. use plugins && rm -f "${D}"/usr/$(get_libdir)/${PN}/*.la
  59. fi
  60. }