summaryrefslogtreecommitdiff
blob: 44f47af753c0dfeba293a6fb3a7232565f6e0d51 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/superiotool/superiotool-9999.ebuild,v 1.3 2011/01/09 22:19:08 idl0r Exp $

EAPI=3

inherit toolchain-funcs subversion

DESCRIPTION="user-space utility to detect Super I/O chips and functionality to
get more information about it"
HOMEPAGE="http://coreboot.org"
SRC_URI=""
ESVN_REPO_URI="svn://coreboot.org/coreboot/trunk/util/${PN}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="pci"

DEPEND="pci? ( sys-apps/pciutils )"
RDEPEND="${DEPEND}"

src_prepare() {
	sed -i -e 's:-Werror ::' \
		-e 's:-O2 ::' \
		-e 's:\s\+\?-lz\s\+\?::' \
		Makefile || die
}

src_compile() {
	local config_pci

	if use pci; then
		config_pci="yes"
	else
		config_pci="no"
	fi

	emake CC=$(tc-getCC) CONFIG_PCI=${config_pci} \
		SVNDEF="-D'SUPERIOTOOL_VERSION=\"${ESVN_WC_REVISION}\"'" || die
}

src_install() {
	dosbin superiotool || die
	doman superiotool.8
	dodoc README
}