summaryrefslogtreecommitdiff
blob: d043694c7aab98730b6251115ba1517b35a6f0ac (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/flashrom/flashrom-0.9.0.ebuild,v 1.2 2009/05/08 23:17:46 leio Exp $

EAPI=2

inherit eutils toolchain-funcs

DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips."
HOMEPAGE="http://www.coreboot.org/Flashrom"
SRC_URI="http://qa.coreboot.org/releases/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="sys-apps/pciutils"
DEPEND="${RDEPEND}
	sys-apps/sed"

src_prepare()
{
	sed -i -e '/STRIP/d' \
		-e "s:-Os -Wall -Werror:-Wall ${CFLAGS}:" \
		-e "s:LDFLAGS = :LDFLAGS = ${LDFLAGS}:" "${S}/Makefile" || die "sed failed"
}

src_compile()
{
	emake -j1 CC="$(tc-getCC)" || die "emake failed"
}

src_install() {
	dosbin flashrom
	doman flashrom.8
	dodoc README
}