/[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.18 - (hide annotations) (download)
Sun Jan 10 06:13:21 2010 UTC (4 years, 11 months ago) by vapier
Branch: MAIN
Changes since 1.17: +4 -3 lines
Only build grub-mkfont when USE=truetype #275654 by Cameron Tacklind.
(Portage version: 2.2_rc61/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.17 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.16 2009/11/22 17:34:52 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     truetype? ( media-libs/freetype )"
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.17 if [[ ${PV} == "9999" ]] ; then
46     sed -i -e '/^\(auto\|ac\)/s:^:e:' autogen.sh
47     (. ./autogen.sh) || die
48     fi
49 vapier 1.6 }
50    
51 vapier 1.1 src_compile() {
52     use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
53     use static && append-ldflags -static
54    
55     econf \
56 vapier 1.12 --disable-werror \
57 vapier 1.3 --sbindir=/sbin \
58     --bindir=/bin \
59     --libdir=/$(get_libdir) \
60 vapier 1.11 --disable-efiemu \
61 vapier 1.18 $(use_enable truetype grub-mkfont) \
62 vapier 1.10 $(use_enable debug mm-debug) \
63     $(use_enable debug grub-emu) \
64     $(use_enable debug grub-emu-usb) \
65     $(use_enable debug grub-fstest)
66 vapier 1.1 emake -j1 || die "making regular stuff"
67     }
68    
69     src_install() {
70     emake DESTDIR="${D}" install || die
71     dodoc AUTHORS ChangeLog NEWS README THANKS TODO
72 vapier 1.6 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
73     GRUB_DISTRIBUTOR="Gentoo"
74     EOF
75 vapier 1.3 if use multislot ; then
76 vapier 1.14 sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
77 vapier 1.3 mv "${D}"/sbin/grub{,2}-install || die
78 vapier 1.13 mv "${D}"/usr/share/info/grub{,2}.info || die
79 vapier 1.3 fi
80     }
81    
82     setup_boot_dir() {
83     local boot_dir=$1
84     local dir=${boot_dir}/grub
85    
86     if [[ ! -e ${dir}/grub.cfg ]] ; then
87     einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
88     grub-mkconfig -o "${dir}/grub.cfg"
89     fi
90    
91     #local install=grub-install
92     #use multislot && install="grub2-install --grub-setup=/bin/true"
93     #einfo "Running: ${install} "
94     #${install}
95 vapier 1.1 }
96    
97     pkg_postinst() {
98 vapier 1.3 if use multislot ; then
99     elog "You have installed grub2 with USE=multislot, so to coexist"
100     elog "with grub1, the grub2 install binary is named grub2-install."
101     fi
102     setup_boot_dir "${ROOT}"boot
103 vapier 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20