/[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 - (show annotations) (download)
Sun Jan 10 06:13:21 2010 UTC (4 years, 9 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 # Copyright 1999-2010 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.16 2009/11/22 17:34:52 vapier Exp $
4
5 inherit mount-boot eutils flag-o-matic toolchain-funcs
6
7 if [[ ${PV} == "9999" ]] ; then
8 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub"
9 inherit autotools bzr
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 debug truetype multislot static"
23
24 RDEPEND=">=sys-libs/ncurses-5.2-r5
25 dev-libs/lzo
26 truetype? ( media-libs/freetype )"
27 DEPEND="${RDEPEND}
28 dev-lang/ruby"
29 PROVIDE="virtual/bootloader"
30
31 export STRIP_MASK="*/grub/*/*.mod"
32 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap"
33
34 src_unpack() {
35 if [[ ${PV} == "9999" ]] ; then
36 bzr_src_unpack
37 else
38 unpack ${A}
39 fi
40 cd "${S}"
41 epatch "${FILESDIR}"/${PN}-1.96-genkernel.patch #256335
42 epatch_user
43
44 # autogen.sh does more than just run autotools
45 if [[ ${PV} == "9999" ]] ; then
46 sed -i -e '/^\(auto\|ac\)/s:^:e:' autogen.sh
47 (. ./autogen.sh) || die
48 fi
49 }
50
51 src_compile() {
52 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
53 use static && append-ldflags -static
54
55 econf \
56 --disable-werror \
57 --sbindir=/sbin \
58 --bindir=/bin \
59 --libdir=/$(get_libdir) \
60 --disable-efiemu \
61 $(use_enable truetype grub-mkfont) \
62 $(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 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 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
73 GRUB_DISTRIBUTOR="Gentoo"
74 EOF
75 if use multislot ; then
76 sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
77 mv "${D}"/sbin/grub{,2}-install || die
78 mv "${D}"/usr/share/info/grub{,2}.info || die
79 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 }
96
97 pkg_postinst() {
98 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 }

  ViewVC Help
Powered by ViewVC 1.1.20