/[gentoo-x86]/sys-boot/grub/grub-9999.ebuild
Gentoo

Contents of /sys-boot/grub/grub-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri May 1 21:36:27 2009 UTC (5 years, 7 months ago) by chainsaw
Branch: MAIN
Changes since 1.7: +3 -2 lines
Add dev-lang/ruby as a build-time DEPEND, as autogen.sh (line 9 in SVN rev 2154) calls genmk.rb and fails without.
(Portage version: 2.1.6.11/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.7 2009/04/27 05:23:28 vapier Exp $
4
5 inherit autotools mount-boot eutils flag-o-matic toolchain-funcs
6
7 if [[ ${PV} == "9999" ]] ; then
8 ESVN_REPO_URI="svn://svn.sv.gnu.org/grub/trunk/grub2"
9 inherit subversion
10 SRC_URI=""
11 else
12 SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
13 mirror://gentoo/${P}.tar.gz"
14 fi
15
16 DESCRIPTION="GNU GRUB 2 boot loader"
17 HOMEPAGE="http://www.gnu.org/software/grub/"
18
19 LICENSE="GPL-3"
20 use multislot && SLOT="2" || SLOT="0"
21 KEYWORDS=""
22 IUSE="custom-cflags multislot static"
23
24 DEPEND=">=sys-libs/ncurses-5.2-r5
25 dev-libs/lzo
26 dev-lang/ruby"
27 PROVIDE="virtual/bootloader"
28
29 export STRIP_MASK="*/grub/*/*.mod"
30 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
31
32 src_unpack() {
33 if [[ ${PV} == "9999" ]] ; then
34 subversion_src_unpack
35 else
36 unpack ${A}
37 fi
38 cd "${S}"
39 epatch "${FILESDIR}"/${PN}-1.96-genkernel.patch #256335
40
41 # autogen.sh does more than just run autotools
42 sed -i -e 's:^auto:eauto:' autogen.sh
43 (. ./autogen.sh) || die
44 }
45
46 src_compile() {
47 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
48 use static && append-ldflags -static
49
50 econf \
51 --sbindir=/sbin \
52 --bindir=/bin \
53 --libdir=/$(get_libdir) \
54 || die "econf failed"
55 emake -j1 || die "making regular stuff"
56 }
57
58 src_install() {
59 emake DESTDIR="${D}" install || die
60 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
61 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
62 GRUB_DISTRIBUTOR="Gentoo"
63 EOF
64 if use multislot ; then
65 sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
66 mv "${D}"/sbin/grub{,2}-install || die
67 mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
68 fi
69 }
70
71 setup_boot_dir() {
72 local boot_dir=$1
73 local dir=${boot_dir}/grub
74
75 if [[ ! -e ${dir}/grub.cfg ]] ; then
76 einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
77 grub-mkconfig -o "${dir}/grub.cfg"
78 fi
79
80 #local install=grub-install
81 #use multislot && install="grub2-install --grub-setup=/bin/true"
82 #einfo "Running: ${install} "
83 #${install}
84 }
85
86 pkg_postinst() {
87 if use multislot ; then
88 elog "You have installed grub2 with USE=multislot, so to coexist"
89 elog "with grub1, the grub2 install binary is named grub2-install."
90 fi
91 setup_boot_dir "${ROOT}"boot
92 }

  ViewVC Help
Powered by ViewVC 1.1.20