/[gentoo-x86]/eclass/openib.eclass
Gentoo

Diff of /eclass/openib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/openib.eclass,v 1.2 2011/08/22 04:46:32 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/openib.eclass,v 1.3 2012/04/18 16:29:47 alexxy Exp $
4 4
5# @ECLASS: openib.eclass 5# @ECLASS: openib.eclass
6# @AUTHOR: 6# @AUTHOR:
7# Original Author: Alexey Shvetsov <alexxy@gentoo.org> 7# Original Author: Alexey Shvetsov <alexxy@gentoo.org>
8# @BLURB: Simplify working with OFED packages 8# @BLURB: Simplify working with OFED packages
11 11
12EXPORT_FUNCTIONS src_unpack 12EXPORT_FUNCTIONS src_unpack
13 13
14HOMEPAGE="http://www.openfabrics.org/" 14HOMEPAGE="http://www.openfabrics.org/"
15LICENSE="|| ( GPL-2 BSD-2 )" 15LICENSE="|| ( GPL-2 BSD-2 )"
16SLOT="0"
17 16
18# @ECLASS-VARIABLE: OFED_VER 17# @ECLASS-VARIABLE: OFED_VER
19# @DESCRIPTION: 18# @DESCRIPTION:
20# Defines OFED version eg 1.4 or 1.4.0.1 19# Defines OFED version eg 1.4 or 1.4.0.1
21 20
25 24
26# @ECLASS-VARIABLE: OFED_SNAPSHOT 25# @ECLASS-VARIABLE: OFED_SNAPSHOT
27# @DESCRIPTION: 26# @DESCRIPTION:
28# Defines if src tarball is git snapshot 27# Defines if src tarball is git snapshot
29 28
29SLOT="${OFED_VER}"
30
31OFED_VERSIONS=(
32 "1.5.1"
33 "1.5.2"
34 "1.5.3"
35 "1.5.3.1"
36 "1.5.3.2"
37 "1.5.4"
38 "1.5.4.1"
39 "3.2"
40 )
41
42block_other_ofed_versions() {
43 local slot
44 RDEPEND+=" !sys-infiniband/${PN}:0"
45 for slot in ${OFED_VERSIONS[@]}; do
46 if [[ ${slot} != ${SLOT} ]]; then
47 RDEPEDN+=" !sys-infiniband/${PN}:${slot}"
48 fi
49 done
50}
51
30OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER}) 52OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER})
31 53
32SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz" 54SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz"
33 55
34case ${PN} in 56case ${PN} in
35 openib-files) 57 ofed)
36 MY_PN="ofa_kernel" 58 MY_PN="ofa_kernel"
37 ;; 59 ;;
38 *) 60 *)
39 MY_PN="${PN}" 61 MY_PN="${PN}"
40 ;; 62 ;;
56 *) 78 *)
57 EXT="tar.gz" 79 EXT="tar.gz"
58 ;; 80 ;;
59esac 81esac
60 82
83# if its snapshot then S may be different
84if [ -z ${OFED_SNAPSHOT} ]; then
61S="${WORKDIR}/${MY_PN}-${MY_PV}" 85 S="${WORKDIR}/${MY_PN}-${MY_PV}"
86else
87 S="${WORKDIR}/${MY_PN}-${MY_PV}-${OFED_SUFFIX}"
88fi
62 89
63# @FUNCTION: openib_src_unpack 90# @FUNCTION: openib_src_unpack
64# @DESCRIPTION: 91# @DESCRIPTION:
65# This function will unpack OFED packages 92# This function will unpack OFED packages
66openib_src_unpack() { 93openib_src_unpack() {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20