diff options
author | Matěj Laitl <matej@laitl.cz> | 2011-06-05 20:20:54 +0200 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2011-06-05 21:30:20 +0200 |
commit | c85237b14793d783cfaed3bbd30e27b60cc29f13 (patch) | |
tree | 96b3c8e66e33130fb3a6fd22d761cfc7d55a3cd9 | |
parent | [sys-boot/grub] Make efi work properly again. Thanks to Matěj Laitl for the ... (diff) | |
download | scarabeus-c85237b14793d783cfaed3bbd30e27b60cc29f13.tar.gz scarabeus-c85237b14793d783cfaed3bbd30e27b60cc29f13.tar.bz2 scarabeus-c85237b14793d783cfaed3bbd30e27b60cc29f13.zip |
Split efi GRUB_PLATFORM into efi-32 and efi-64 and remove a bit of ugliness
-rw-r--r-- | sys-boot/grub/Manifest | 4 | ||||
-rw-r--r-- | sys-boot/grub/grub-1.99.ebuild | 22 | ||||
-rw-r--r-- | sys-boot/grub/grub-9999.ebuild | 22 |
3 files changed, 20 insertions, 28 deletions
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index d3eaf60..4518489 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,5 +1,5 @@ AUX grub.default 1127 RMD160 a884e842cb203687cac4cac6551b0feed58d3b7a SHA1 5878147845b5d4b4aac34ce046ead60b93c3170c SHA256 32664f2e0bdd05cf9579f8e098aa0add76ef7bf7b37eb103c6d0f625204f44d3 DIST grub-1.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa147747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b -EBUILD grub-1.99.ebuild 6677 RMD160 2380373297e74a52716cd88994cf2a1addfe4c54 SHA1 9ea5f1c5dcfcbe1a8ebddee32c263bc8151cc5a1 SHA256 35442997ce40d6ca00046709480a14f7c4813e5965cf74950a05a36a0ef9b21c -EBUILD grub-9999.ebuild 6677 RMD160 2380373297e74a52716cd88994cf2a1addfe4c54 SHA1 9ea5f1c5dcfcbe1a8ebddee32c263bc8151cc5a1 SHA256 35442997ce40d6ca00046709480a14f7c4813e5965cf74950a05a36a0ef9b21c +EBUILD grub-1.99.ebuild 6511 RMD160 51ba31d051b9334403884a992173c92e395775ff SHA1 4fd26fd18cb6c205e934bab5fc9fe5bad77ae556 SHA256 9832c165a787a3acb0058ec068553e17c8b31eaa4a3b877086e12ae56f0db96c +EBUILD grub-9999.ebuild 6511 RMD160 51ba31d051b9334403884a992173c92e395775ff SHA1 4fd26fd18cb6c205e934bab5fc9fe5bad77ae556 SHA256 9832c165a787a3acb0058ec068553e17c8b31eaa4a3b877086e12ae56f0db96c MISC metadata.xml 264 RMD160 3cb995676f964b9637fbfc0027a81b9409802608 SHA1 c4d35e3a71c545cdf1aae525de803126bf54f596 SHA256 9bd1ce830cf1b821978ab90c81b2e369177a8d7c1bfe2dd2868419872c097f64 diff --git a/sys-boot/grub/grub-1.99.ebuild b/sys-boot/grub/grub-1.99.ebuild index 4127a46..7ed83f9 100644 --- a/sys-boot/grub/grub-1.99.ebuild +++ b/sys-boot/grub/grub-1.99.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}" } 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}" } |