/[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.30 - (hide annotations) (download)
Sun Apr 3 17:43:44 2011 UTC (3 years, 3 months ago) by vapier
Branch: MAIN
Changes since 1.29: +1 -2 lines
Drop genkernel patch now that upstream has integrated it.

(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)

1 vapier 1.27 # Copyright 1999-2011 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.30 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.29 2011/03/15 19:40:05 vapier Exp $
4 vapier 1.21
5     # XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
6 vapier 1.1
7 vapier 1.17 inherit mount-boot eutils flag-o-matic toolchain-funcs
8 vapier 1.1
9     if [[ ${PV} == "9999" ]] ; then
10 vapier 1.29 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
11 vapier 1.17 inherit autotools bzr
12 vapier 1.2 SRC_URI=""
13     else
14     SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
15     mirror://gentoo/${P}.tar.gz"
16 vapier 1.1 fi
17    
18     DESCRIPTION="GNU GRUB 2 boot loader"
19     HOMEPAGE="http://www.gnu.org/software/grub/"
20    
21 vapier 1.4 LICENSE="GPL-3"
22 vapier 1.3 use multislot && SLOT="2" || SLOT="0"
23 vapier 1.1 KEYWORDS=""
24 vapier 1.18 IUSE="custom-cflags debug truetype multislot static"
25 vapier 1.1
26 vapier 1.9 RDEPEND=">=sys-libs/ncurses-5.2-r5
27 vapier 1.18 dev-libs/lzo
28 vapier 1.24 truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
29 vapier 1.9 DEPEND="${RDEPEND}
30 vapier 1.25 >=sys-devel/autogen-5.10
31     >=dev-lang/python-2.5.2"
32 vapier 1.26 [[ ${PV} == "9999" ]] && DEPEND+=" sys-apps/help2man"
33 vapier 1.1 PROVIDE="virtual/bootloader"
34    
35 vapier 1.5 export STRIP_MASK="*/grub/*/*.mod"
36 vapier 1.23 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
37 vapier 1.1
38 vapier 1.6 src_unpack() {
39     if [[ ${PV} == "9999" ]] ; then
40 vapier 1.16 bzr_src_unpack
41 vapier 1.6 else
42     unpack ${A}
43     fi
44     cd "${S}"
45 vapier 1.15 epatch_user
46 vapier 1.7
47     # autogen.sh does more than just run autotools
48 vapier 1.19 # need to eautomake due to weirdness #296013
49 vapier 1.17 if [[ ${PV} == "9999" ]] ; then
50 vapier 1.25 sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
51 vapier 1.17 (. ./autogen.sh) || die
52     fi
53 vapier 1.6 }
54    
55 vapier 1.1 src_compile() {
56     use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
57     use static && append-ldflags -static
58    
59     econf \
60 vapier 1.12 --disable-werror \
61 vapier 1.3 --sbindir=/sbin \
62     --bindir=/bin \
63     --libdir=/$(get_libdir) \
64 vapier 1.11 --disable-efiemu \
65 vapier 1.18 $(use_enable truetype grub-mkfont) \
66 vapier 1.10 $(use_enable debug mm-debug) \
67     $(use_enable debug grub-emu) \
68     $(use_enable debug grub-emu-usb) \
69     $(use_enable debug grub-fstest)
70 vapier 1.1 emake -j1 || die "making regular stuff"
71     }
72    
73     src_install() {
74     emake DESTDIR="${D}" install || die
75     dodoc AUTHORS ChangeLog NEWS README THANKS TODO
76 vapier 1.6 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
77     GRUB_DISTRIBUTOR="Gentoo"
78     EOF
79 vapier 1.3 if use multislot ; then
80 vapier 1.14 sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
81 vapier 1.3 mv "${D}"/sbin/grub{,2}-install || die
82 vapier 1.22 mv "${D}"/sbin/grub{,2}-set-default || die
83     mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
84 vapier 1.13 mv "${D}"/usr/share/info/grub{,2}.info || die
85 vapier 1.3 fi
86     }
87    
88     setup_boot_dir() {
89     local boot_dir=$1
90     local dir=${boot_dir}/grub
91    
92     if [[ ! -e ${dir}/grub.cfg ]] ; then
93     einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
94     grub-mkconfig -o "${dir}/grub.cfg"
95     fi
96    
97     #local install=grub-install
98     #use multislot && install="grub2-install --grub-setup=/bin/true"
99     #einfo "Running: ${install} "
100     #${install}
101 vapier 1.1 }
102    
103     pkg_postinst() {
104 vapier 1.28 mount-boot_mount_boot_partition
105 vapier 1.27
106 vapier 1.3 if use multislot ; then
107     elog "You have installed grub2 with USE=multislot, so to coexist"
108     elog "with grub1, the grub2 install binary is named grub2-install."
109     fi
110     setup_boot_dir "${ROOT}"boot
111 vapier 1.28
112     # needs to be after we call setup_boot_dir
113     mount-boot_pkg_postinst
114 vapier 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20