open-mx-1.5.4.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools eutils linux-mod multilib toolchain-funcs udev
  5. DESCRIPTION="Open-MX - Myrinet Express over Generic Ethernet Hardware"
  6. HOMEPAGE="http://open-mx.gforge.inria.fr/"
  7. SRC_URI="http://gforge.inria.fr/frs/download.php/34371/${P}.tar.gz"
  8. LICENSE="GPL-2 LGPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="debug modules static-libs"
  12. DEPEND="
  13. sys-apps/hwloc
  14. virtual/linux-sources
  15. virtual/pkgconfig"
  16. RDEPEND="
  17. sys-apps/hwloc
  18. virtual/modutils"
  19. MODULE_NAMES="open-mx(misc:${S}/driver/linux)"
  20. BUILD_TARGETS="all"
  21. BUILD_PARAMS="KDIR=${KERNEL_DIR}"
  22. pkg_setup() {
  23. einfo "You can set desired mtu by setting OPEN_MX_MTU in make.conf"
  24. linux-mod_pkg_setup
  25. }
  26. src_prepare() {
  27. # We still want to configure driver but dont want to build it at all
  28. epatch "${FILESDIR}/open-mx-1.4.0-driver.patch"
  29. # We dont want tests
  30. sed -e 's:tests/mx::g' \
  31. -e 's:tests::g' \
  32. -i Makefile.am || die "sed failed"
  33. eautoreconf
  34. }
  35. src_configure() {
  36. econf \
  37. --with-mtu=${OPEN_MX_MTU:-9000} \
  38. --with-linux="${KERNEL_DIR}" \
  39. --with-linux-release=${KV_FULL} \
  40. $(use_enable static-libs static) \
  41. $(use_enable debug)
  42. }
  43. src_compile() {
  44. default
  45. if use modules; then
  46. cd "${S}/driver/linux"
  47. linux-mod_src_compile || die "failed to build driver"
  48. fi
  49. }
  50. src_install() {
  51. default
  52. use static-libs || find "${ED}" -name '*.*a' -exec rm {} +
  53. # Drop init scripts
  54. rm -rf "${ED}/usr/sbin" || die
  55. rm "${ED}/usr/bin/omx_check"
  56. # install udev rules
  57. udev_dorules "${ED}/etc/open-mx/10-open-mx.rules"
  58. dodoc "${ED}/usr/share/open-mx/FAQ.html"
  59. # Drop misc stuff
  60. rm "${ED}/etc/open-mx/10-open-mx.rules" || die
  61. rm -rf "${ED}/usr/share/open-mx" || die
  62. newinitd "${FILESDIR}/omxoed.initd" omxoed
  63. if use modules; then
  64. cd "${S}/driver/linux"
  65. linux-mod_src_install || die "failed to install driver"
  66. fi
  67. }