/[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.20 - (hide annotations) (download)
Sat May 8 17:21:09 2010 UTC (4 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.19: +2 -2 lines
Pull in unifont for mkfont tools #318747 by Alexis Ballier.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 vapier 1.17 # Copyright 1999-2010 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.20 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.19 2010/01/17 01:25:28 vapier Exp $
4 vapier 1.1
5 vapier 1.17 inherit mount-boot eutils flag-o-matic toolchain-funcs
6 vapier 1.1
7     if [[ ${PV} == "9999" ]] ; then
8 vapier 1.16 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub"
9 vapier 1.17 inherit autotools bzr
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.18 IUSE="custom-cflags debug truetype multislot static"
23 vapier 1.1
24 vapier 1.9 RDEPEND=">=sys-libs/ncurses-5.2-r5
25 vapier 1.18 dev-libs/lzo
26 vapier 1.20 truetype? ( media-libs/freetype media-fonts/unifont )"
27 vapier 1.9 DEPEND="${RDEPEND}
28 chainsaw 1.8 dev-lang/ruby"
29 vapier 1.1 PROVIDE="virtual/bootloader"
30    
31 vapier 1.5 export STRIP_MASK="*/grub/*/*.mod"
32 vapier 1.14 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap"
33 vapier 1.1
34 vapier 1.6 src_unpack() {
35     if [[ ${PV} == "9999" ]] ; then
36 vapier 1.16 bzr_src_unpack
37 vapier 1.6 else
38     unpack ${A}
39     fi
40     cd "${S}"
41     epatch "${FILESDIR}"/${PN}-1.96-genkernel.patch #256335
42 vapier 1.15 epatch_user
43 vapier 1.7
44     # autogen.sh does more than just run autotools
45 vapier 1.19 # need to eautomake due to weirdness #296013
46 vapier 1.17 if [[ ${PV} == "9999" ]] ; then
47 vapier 1.19 sed -i \
48     -e '/^\(auto\|ac\)/s:^:e:' \
49     -e "s:^eautomake:`which automake`:" \
50     autogen.sh
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.13 mv "${D}"/usr/share/info/grub{,2}.info || die
83 vapier 1.3 fi
84     }
85    
86     setup_boot_dir() {
87     local boot_dir=$1
88     local dir=${boot_dir}/grub
89    
90     if [[ ! -e ${dir}/grub.cfg ]] ; then
91     einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
92     grub-mkconfig -o "${dir}/grub.cfg"
93     fi
94    
95     #local install=grub-install
96     #use multislot && install="grub2-install --grub-setup=/bin/true"
97     #einfo "Running: ${install} "
98     #${install}
99 vapier 1.1 }
100    
101     pkg_postinst() {
102 vapier 1.3 if use multislot ; then
103     elog "You have installed grub2 with USE=multislot, so to coexist"
104     elog "with grub1, the grub2 install binary is named grub2-install."
105     fi
106     setup_boot_dir "${ROOT}"boot
107 vapier 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20