/[gentoo-x86]/sys-apps/flashrom/flashrom-0.9.4.ebuild
Gentoo

Contents of /sys-apps/flashrom/flashrom-0.9.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Sep 20 16:03:21 2011 UTC (3 years, 1 month ago) by nativemad
Branch: MAIN
Changes since 1.4: +2 -2 lines
x86 stable, see bug 383401

(Portage version: 2.1.10.11/cvs/Linux i686)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/flashrom/flashrom-0.9.4.ebuild,v 1.4 2011/09/19 15:29:05 idl0r Exp $
4
5 EAPI="3"
6
7 inherit toolchain-funcs
8
9 DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips"
10 HOMEPAGE="http://flashrom.org/"
11 SRC_URI="http://download.flashrom.org/releases/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="+atahpt +bitbang_spi +buspirate_spi dediprog +drkaiser
17 +dummy ft2232_spi +gfxnvidia +internal +nic3com +nicintel +nicintel_spi
18 +nicnatsemi +nicrealtek +ogp_spi +rayer_spi
19 +satasii +satamv +serprog +wiki"
20
21 COMMON_DEPEND="atahpt? ( sys-apps/pciutils )
22 dediprog? ( virtual/libusb:0 )
23 drkaiser? ( sys-apps/pciutils )
24 ft2232_spi? ( dev-embedded/libftdi )
25 gfxnvidia? ( sys-apps/pciutils )
26 internal? ( sys-apps/pciutils )
27 nic3com? ( sys-apps/pciutils )
28 nicintel? ( sys-apps/pciutils )
29 nicintel_spi? ( sys-apps/pciutils )
30 nicnatsemi? ( sys-apps/pciutils )
31 nicrealtek? ( sys-apps/pciutils )
32 rayer_spi? ( sys-apps/pciutils )
33 satasii? ( sys-apps/pciutils )
34 satamv? ( sys-apps/pciutils )
35 ogp_spi? ( sys-apps/pciutils )"
36 RDEPEND="${COMMON_DEPEND}
37 internal? ( sys-apps/dmidecode )"
38 DEPEND="${COMMON_DEPEND}
39 sys-apps/diffutils"
40
41 _flashrom_enable() {
42 local c="CONFIG_${2:-$(echo $1 | tr [:lower:] [:upper:])}"
43 args+=" $c=`use $1 && echo yes || echo no`"
44 }
45 flashrom_enable() {
46 local u
47 for u in "$@" ; do _flashrom_enable $u ; done
48 }
49
50 src_compile() {
51 local progs=0
52 local args=""
53
54 # Programmer
55 flashrom_enable \
56 atahpt bitbang_spi buspirate_spi dediprog drkaiser \
57 ft2232_spi gfxnvidia nic3com nicintel nicintel_spi nicnatsemi nicrealtek \
58 ogp_spi rayer_spi \
59 satasii satamv serprog \
60 internal dummy
61 _flashrom_enable wiki PRINT_WIKI
62
63 # You have to specify at least one programmer, and if you specify more than
64 # one programmer you have to include either dummy or internal in the list.
65 for prog in ${IUSE//[+-]} ; do
66 case ${prog} in
67 internal|dummy|wiki) continue ;;
68 esac
69
70 use ${prog} && : $(( progs++ ))
71 done
72 if [ $progs -ne 1 ] ; then
73 if ! use internal && ! use dummy ; then
74 ewarn "You have to specify at least one programmer, and if you specify"
75 ewarn "more than one programmer, you have to enable either dummy or"
76 ewarn "internal as well. 'internal' will be the default now."
77 args+=" CONFIG_INTERNAL=yes"
78 fi
79 fi
80
81 # WARNERROR=no, bug 347879
82 emake CC="$(tc-getCC)" WARNERROR=no ${args} || die
83 }
84
85 src_install() {
86 dosbin flashrom || die
87 doman flashrom.8
88 dodoc ChangeLog README
89 }

  ViewVC Help
Powered by ViewVC 1.1.20