blob: 95faf61443500b541a1c7bb743d25dfce20d1df5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit rpm
SHORT_PV=${PV%\.[^.]}
MY_P="OFED-${PV}"
OSM="${S}/src/userspace/management/osm"
DESCRIPTION="OpenFabrics userspace libraries and utilities"
HOMEPAGE="http://www.openfabrics.org/"
SRC_URI="http://www.openfabrics.org/builds/ofed-${SHORT_PV}/release/OFED-${PV}.tgz"
SLOT="0"
LICENSE="|| ( GPL-2 BSD-2 )"
KEYWORDS="~x86 ~amd64"
IUSE="cxgb3 dapl ehca ipath mstflint opensm qlvnictools srptools tvflash"
DEPEND=""
PDEPEND="=sys-infiniband/openib-files-${PV}"
RDEPEND="${DEPEND}
!sys-infiniband/libibverbs
!sys-infiniband/libmthca
!sys-infiniband/libipathverbs
!sys-infiniband/librdmacm
!sys-infiniband/libsdp
!sys-infiniband/dapl
!sys-infiniband/libehca
!sys-infiniband/libibcm
!sys-infiniband/libibcommon
!sys-infiniband/libibmad
!sys-infiniband/libibumad
!sys-infiniband/openib-diags
!sys-infiniband/openib-osm
!sys-infiniband/openib-perf
!sys-infiniband/openib-srptools
!sys-infiniband/openib"
S="${WORKDIR}/ofa_user-${PV}"
src_unpack() {
unpack ${A} || die "unpack failed"
rpm_unpack ${MY_P}/SRPMS/ofa_user-${PV}-0.src.rpm
tar xzf ofa_user-${PV}.tgz
}
src_compile() {
use ipath && myconf="$myconf --with-libipathverbs"
use ehca && myconf="$myconf --with-libehca"
use cxgb3 && myconf="$myconf --with-libcxgb3"
use opensm && myconf="$myconf --with-management-libs"
myconf="--with-libibverbs --with-libmthca"
myconf="$myconf --with-libibcm"
myconf="$myconf --with-libsdp"
myconf="$myconf --with-librdmacm"
myconf="$myconf $(use_with dapl)"
myconf="$myconf $(use_with opensm)"
myconf="$myconf --with-openib-diags"
myconf="$myconf --with-perftest"
myconf="$myconf $(use_with srptools)"
myconf="$myconf --with-ipoibtools"
myconf="$myconf $(use_with qlvnictools)"
myconf="$myconf $(use_with tvflash)"
myconf="$myconf $(use_with mstflint)"
myconf="$myconf --with-sdpnetstat"
#econf ${myconf} || die "configure failed"
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc \
${myconf} ${EXTRA_ECONF} || die "configure failed"
emake -j1 || die
}
src_install() {
make DESTDIR="${D}" install || die "install failed"
dodoc "${WORKDIR}/${MY_P}/README.txt"
dodoc "${WORKDIR}/${MY_P}/docs/*"
if use opensm ; then
newconfd "${OSM}/scripts/opensm.sysconfig" opensm
newinitd "${FILESDIR}/opensm.init.d" opensm
insinto /etc
doins "${S}/ofed_scripts/opensm.conf"
dobin "${S}/ofed_scripts/sldd.sh"
fi
}
pkg_postinst() {
einfo "To automatically configure the infiniband subnet manager on boot,"
einfo "edit /etc/opensm.conf and add opensm to your start-up scripts:"
einfo "\`rc-update add opensm default\`"
}
|