/[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.9 - (hide annotations) (download)
Fri May 15 03:42:21 2009 UTC (4 years, 11 months ago) by vapier
Branch: MAIN
Changes since 1.8: +5 -3 lines
Do not put ruby into RDEPEND and do not build with -Werror #269887 by James Erickson.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20