summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot/grub/grub-9999.ebuild')
-rw-r--r--sys-boot/grub/grub-9999.ebuild22
1 files changed, 9 insertions, 13 deletions
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 4127a46..7ed83f9 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -26,7 +26,7 @@ SLOT="0"
[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~x86 ~mips ~ppc ~ppc64"
IUSE="custom-cflags debug device-mapper nls static sdl truetype"
-GRUB_PLATFORMS="coreboot efi emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
+GRUB_PLATFORMS="coreboot efi-32 efi-64 emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
# everywhere:
# emu
# mips only:
@@ -34,8 +34,9 @@ GRUB_PLATFORMS="coreboot efi emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
# amd64, x86, ppc, ppc64
# ieee1275
# amd64, x86
-# coreboot, multiboot, efi, pc, qemu
-# NOTE: efi must be built twice, for i386 and x86_64, rest is just i386.
+# coreboot, multiboot, efi-32, pc, qemu
+# amd64
+# efi-64
for i in ${GRUB_PLATFORMS}; do
IUSE+=" grub_platform_${i}"
done
@@ -91,6 +92,7 @@ grub_run_phase() {
grub_src_configure() {
local platform=$1
+ local target
[[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined"
@@ -104,11 +106,13 @@ grub_src_configure() {
platform=" --with-platform=${platform}"
else
# EFI platform hack
+ [[ ${platform/*-} == 32 ]] && target=i386
+ [[ ${platform/*-} == 64 ]] && target=x86_64
# program-prefix is required empty because otherwise it is equal to
# target variable, which we do not want at all
platform="
--with-platform=${platform/-*}
- --target=${platform/*-}
+ --target=${target}
--program-prefix=
"
fi
@@ -153,15 +157,7 @@ src_prepare() {
# get enabled platforms
GRUB_ENABLED_PLATFORMS=""
for i in ${GRUB_PLATFORMS}; do
- # efi needs to be built twice if on amd64
- if [[ ${i} == "efi" ]] && use amd64; then
- archs="x86_64 i386"
- for j in ${archs}; do
- use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}-${j}"
- done
- else
- use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
- fi
+ use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
done
einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
}