/[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.13 - (show annotations) (download)
Wed Oct 14 00:06:34 2009 UTC (4 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.12: +2 -1 lines
Fix by pyon for USE=multislot and info collisions #288877.
(Portage version: 2.2_rc42/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.12 2009/09/30 02:58:10 vapier Exp $
4
5 inherit autotools mount-boot eutils flag-o-matic toolchain-funcs
6
7 if [[ ${PV} == "9999" ]] ; then
8 ESVN_REPO_URI="svn://svn.sv.gnu.org/grub/trunk/grub2"
9 inherit subversion
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 multislot static"
23
24 RDEPEND=">=sys-libs/ncurses-5.2-r5
25 dev-libs/lzo"
26 DEPEND="${RDEPEND}
27 dev-lang/ruby"
28 PROVIDE="virtual/bootloader"
29
30 export STRIP_MASK="*/grub/*/*.mod"
31 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
32
33 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
42 # autogen.sh does more than just run autotools
43 sed -i -e 's:^auto:eauto:' autogen.sh
44 (. ./autogen.sh) || die
45 }
46
47 src_compile() {
48 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
49 use static && append-ldflags -static
50
51 econf \
52 --disable-werror \
53 --sbindir=/sbin \
54 --bindir=/bin \
55 --libdir=/$(get_libdir) \
56 --disable-efiemu \
57 --disable-grub-pe2elf \
58 --enable-grub-mkfont \
59 $(use_enable debug mm-debug) \
60 $(use_enable debug grub-emu) \
61 $(use_enable debug grub-emu-usb) \
62 $(use_enable debug grub-fstest)
63 emake -j1 || die "making regular stuff"
64 }
65
66 src_install() {
67 emake DESTDIR="${D}" install || die
68 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
69 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
70 GRUB_DISTRIBUTOR="Gentoo"
71 EOF
72 if use multislot ; then
73 sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
74 mv "${D}"/sbin/grub{,2}-install || die
75 mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
76 mv "${D}"/usr/share/info/grub{,2}.info || die
77 fi
78 }
79
80 setup_boot_dir() {
81 local boot_dir=$1
82 local dir=${boot_dir}/grub
83
84 if [[ ! -e ${dir}/grub.cfg ]] ; then
85 einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
86 grub-mkconfig -o "${dir}/grub.cfg"
87 fi
88
89 #local install=grub-install
90 #use multislot && install="grub2-install --grub-setup=/bin/true"
91 #einfo "Running: ${install} "
92 #${install}
93 }
94
95 pkg_postinst() {
96 if use multislot ; then
97 elog "You have installed grub2 with USE=multislot, so to coexist"
98 elog "with grub1, the grub2 install binary is named grub2-install."
99 fi
100 setup_boot_dir "${ROOT}"boot
101 }

  ViewVC Help
Powered by ViewVC 1.1.20