/[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.19 - (show annotations) (download)
Sun Jan 17 01:25:28 2010 UTC (4 years, 10 months ago) by vapier
Branch: MAIN
Changes since 1.18: +6 -2 lines
Workaround eautomake weirdness #296013.
(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.18 2010/01/10 06:13:21 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 # need to eautomake due to weirdness #296013
46 if [[ ${PV} == "9999" ]] ; then
47 sed -i \
48 -e '/^\(auto\|ac\)/s:^:e:' \
49 -e "s:^eautomake:`which automake`:" \
50 autogen.sh
51 (. ./autogen.sh) || die
52 fi
53 }
54
55 src_compile() {
56 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
57 use static && append-ldflags -static
58
59 econf \
60 --disable-werror \
61 --sbindir=/sbin \
62 --bindir=/bin \
63 --libdir=/$(get_libdir) \
64 --disable-efiemu \
65 $(use_enable truetype grub-mkfont) \
66 $(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 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 cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
77 GRUB_DISTRIBUTOR="Gentoo"
78 EOF
79 if use multislot ; then
80 sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
81 mv "${D}"/sbin/grub{,2}-install || die
82 mv "${D}"/usr/share/info/grub{,2}.info || die
83 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 }
100
101 pkg_postinst() {
102 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 }

  ViewVC Help
Powered by ViewVC 1.1.20