From 0faa0ee1778e403d04cba22067e3edaac9c540bd Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Mon, 8 Aug 2016 11:34:19 -0400 Subject: app-emulation/grub-xen-host: add support for sys-boot/grub[-multislot] Package-Manager: portage-2.3.0_p16 --- .../grub-xen-host/grub-xen-host-1.0.ebuild | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'app-emulation/grub-xen-host') diff --git a/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild b/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild index 292c3380101d..6ada0a84dc42 100644 --- a/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild +++ b/app-emulation/grub-xen-host/grub-xen-host-1.0.ebuild @@ -60,12 +60,22 @@ src_compile() { tar cf memdisk.tar grub.cfg || die "failed to tar" - grub2-mkimage -O x86_64-xen \ - -c grub-bootstrap.cfg \ - -m memdisk.tar \ - -o grub-x86_64-xen.bin \ - /usr/lib/grub/x86_64-xen/*.mod \ - || die "failed to grub-mkimage" + local grub_mkimage=grub-mkimage + if type grub2-mkimage &> /dev/null; then + grub_mkimage=grub2-mkimage + fi + + local args=( + "${grub_mkimage}" + -O x86_64-xen + -c grub-bootstrap.cfg + -m memdisk.tar + -o grub-x86_64-xen.bin + /usr/lib/grub/x86_64-xen/*.mod + ) + + echo "${args[@]}" + "${args[@]}" || die "failed to grub-mkimage" } src_install() { -- cgit v1.2.3-65-gdbad