Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added grub ebuild with EFI useflag.

  • Loading branch information...
commit a9d4454a0a3fd128f82c4a3ef5205f683c5c918f 1 parent 97bd7fc
Jon Eyolfson authored
2  profiles/categories
View
@@ -9,6 +9,8 @@ dev-scheme
gnome-base
gnome-extra
net-misc
+sys-boot
+sys-power
x11-libs
x11-misc
x11-themes
3  sys-boot/grub/Manifest
View
@@ -0,0 +1,3 @@
+AUX grub-1.99-genkernel.patch 745 RMD160 02675a7c654b46b9047a432004cfd8d6d1b74649 SHA1 3d0e32b99e716e85a17d28db8d29679c30af8a11 SHA256 19e266d18b2e7ec41a39be06a12f4a2a647155590a30ed4c79e5caf6a60a4343
+DIST grub-1.99~rc1.tar.gz 4256752 RMD160 e99ac336db296cd2aaaf9529a230833383b2fdbf SHA1 866b6979974ad7209d236cb4e1819039f0bd1c6d SHA256 f0333efa6c5e3198f658b8124eebcf613b916b7873d647abb009169d1ff39d52
+EBUILD grub-1.99_rc1.ebuild 3251 RMD160 687baf058db18c35ce34c9fd751ef71cbff662ca SHA1 abeaba8ce1bdd0858fd1b976df6cf973e8ef6530 SHA256 f76322801592f0396f543b410327819435b50c8676b838bf1610747ec2539dd0
19 sys-boot/grub/files/grub-1.99-genkernel.patch
View
@@ -0,0 +1,19 @@
+--- util/grub.d/10_linux.in
++++ util/grub.d/10_linux.in
+@@ -109,7 +109,7 @@
+ EOF
+ }
+
+-list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
++list=`for i in /boot/kernel-* /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ done`
+ prepare_boot_cache=
+@@ -127,6 +127,7 @@
+ initrd=
+ for i in "initrd.img-${version}" "initrd-${version}.img" \
+ "initrd-${version}" "initramfs-${version}.img" \
++ "initramfs-genkernel-${version}" "initramfs-genkernel-${alt_version}" \
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
+ if test -e "${dirname}/${i}" ; then
118 sys-boot/grub/grub-1.99_rc1.ebuild
View
@@ -0,0 +1,118 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.99_rc1.ebuild,v 1.2 2011/03/15 19:40:05 vapier Exp $
+
+# XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
+
+inherit mount-boot eutils flag-o-matic toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+ EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
+ inherit autotools bzr
+ SRC_URI=""
+else
+ MY_P=${P/_/\~}
+ SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+fi
+
+DESCRIPTION="GNU GRUB 2 boot loader"
+HOMEPAGE="http://www.gnu.org/software/grub/"
+
+LICENSE="GPL-3"
+use multislot && SLOT="2" || SLOT="0"
+KEYWORDS=""
+IUSE="custom-cflags debug efi truetype multislot static"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r5
+ dev-libs/lzo
+ truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
+DEPEND="${RDEPEND}
+ >=sys-devel/autogen-5.10
+ >=dev-lang/python-2.5.2"
+[[ ${PV} == "9999" ]] && DEPEND+=" sys-apps/help2man"
+PROVIDE="virtual/bootloader"
+
+export STRIP_MASK="*/grub/*/*.mod"
+QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ bzr_src_unpack
+ else
+ unpack ${A}
+ fi
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.99-genkernel.patch #256335
+ epatch_user
+
+ # autogen.sh does more than just run autotools
+ # need to eautomake due to weirdness #296013
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
+ (. ./autogen.sh) || die
+ fi
+}
+
+src_compile() {
+ use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
+ use static && append-ldflags -static
+
+ econf \
+ --disable-werror \
+ --sbindir=/sbin \
+ --bindir=/bin \
+ --libdir=/$(get_libdir) \
+ --disable-efiemu \
+ $(use_with efi platform efi) \
+ $(use_enable truetype grub-mkfont) \
+ $(use_enable debug mm-debug) \
+ $(use_enable debug grub-emu) \
+ $(use_enable debug grub-emu-usb) \
+ $(use_enable debug grub-fstest)
+ emake -j1 || die "making regular stuff"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
+ GRUB_DISTRIBUTOR="Gentoo"
+ EOF
+ if use multislot ; then
+ sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
+ mv "${D}"/sbin/grub{,2}-install || die
+ mv "${D}"/sbin/grub{,2}-set-default || die
+ mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
+ mv "${D}"/usr/share/info/grub{,2}.info || die
+ fi
+}
+
+setup_boot_dir() {
+ local boot_dir=$1
+ local dir=${boot_dir}/grub
+
+ if [[ ! -e ${dir}/grub.cfg ]] ; then
+ einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
+ grub-mkconfig -o "${dir}/grub.cfg"
+ fi
+
+ #local install=grub-install
+ #use multislot && install="grub2-install --grub-setup=/bin/true"
+ #einfo "Running: ${install} "
+ #${install}
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ if use multislot ; then
+ elog "You have installed grub2 with USE=multislot, so to coexist"
+ elog "with grub1, the grub2 install binary is named grub2-install."
+ fi
+ setup_boot_dir "${ROOT}"boot
+
+ # needs to be after we call setup_boot_dir
+ mount-boot_pkg_postinst
+}
Please sign in to comment.
Something went wrong with that request. Please try again.