sys-apps/rng-tools: bump to v6.3
[gentoo.git] / sys-apps / powerpc-utils / powerpc-utils-1.1.3.18-r2.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="2"
5
6 inherit eutils versionator toolchain-funcs
7
8 BASEVER=$(get_version_component_range 1-3)
9 DEBREV=$(get_version_component_range 4)
10
11 DESCRIPTION="PowerPC utilities including nvsetenv, and additional OldWorld apps"
12 SRC_URI="http://http.us.debian.org/debian/pool/main/p/powerpc-utils/${PN}_${BASEVER}.orig.tar.gz
13         http://http.us.debian.org/debian/pool/main/p/powerpc-utils/${PN}_${BASEVER}-${DEBREV}.diff.gz
14         mirror://gentoo/${PN}-cleanup.patch.bz2"
15
16 HOMEPAGE="http://http.us.debian.org/debian/pool/main/p/powerpc-utils/"
17 KEYWORDS="-* ppc ppc64"
18 IUSE=""
19 DEPEND=""
20 RDEPEND="${DEPEND}"
21 SLOT="0"
22 LICENSE="GPL-2"
23
24 S="${WORKDIR}/pmac-utils"
25
26 src_prepare() {
27         epatch "${WORKDIR}"/${PN}_${BASEVER}-${DEBREV}.diff
28         epatch "${WORKDIR}"/${PN}-cleanup.patch
29
30         # use users CFLAGS, LDFLAGS and CC, bug 280400
31         sed -i -e "/LDFLAGS =/d" -e "/CC\t=/d" -e "s/CFLAGS\t=/CFLAGS +=/" \
32                 -e "s/-g -O2/-Wstrict-prototypes/" Makefile || die "sed failed"
33 }
34
35 src_compile() {
36         tc-export CC
37         emake || die "emake failed"
38 }
39
40 src_install() {
41         into /usr
42         dosbin autoboot backlight bootsched clock fblevel fdeject fnset \
43                 || die "dosbin failed"
44         dosbin macos mousemode nvsetenv nvsetvol nvvideo sndvolmix trackpad \
45                 || die "dosbin failed"
46         doman autoboot.8 bootsched.8 clock.8 fblevel.8 fdeject.8 macos.8 \
47                 || die "doman failed"
48         doman mousemode.8 nvsetenv.8 nvsetvol.8 nvvideo.8 sndvolmix.8 trackpad.8 \
49                 || die "doman failed"
50
51         ewarn "The lsprop utility has been moved into the ibm-powerpc-utils package."
52 }