summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-06-05 12:47:53 +0200
committerTomas Chvatal <scarabeus@gentoo.org>2011-06-05 12:47:53 +0200
commitaa02b29a158efc7366ee4704dc8028adb29336b8 (patch)
tree89bdedf5ee9ba0c7a1fea0fe8ca6516e6c6456c6
parent[net-dns/opendnssec] Move to main tree. (diff)
downloadscarabeus-aa02b29a158efc7366ee4704dc8028adb29336b8.tar.gz
scarabeus-aa02b29a158efc7366ee4704dc8028adb29336b8.tar.bz2
scarabeus-aa02b29a158efc7366ee4704dc8028adb29336b8.zip
[sys-boot/grub] Describe what platforms belong where. Try to build both EFI archs. For now fails.
-rw-r--r--sys-boot/grub/Manifest4
-rw-r--r--sys-boot/grub/grub-1.99.ebuild45
-rw-r--r--sys-boot/grub/grub-9999.ebuild45
3 files changed, 78 insertions, 16 deletions
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index 31425b7..09fea16 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 5608 RMD160 7d5fc5f793e025bc271077c02d5942f19a2f2a61 SHA1 7a6087fd1c58d6566b5eab0faecf4b192b1502dd SHA256 b68ca2209a986c683177e8abb2f5c98d25820a919388880e52eeb82b5f339c9e
-EBUILD grub-9999.ebuild 5608 RMD160 7d5fc5f793e025bc271077c02d5942f19a2f2a61 SHA1 7a6087fd1c58d6566b5eab0faecf4b192b1502dd SHA256 b68ca2209a986c683177e8abb2f5c98d25820a919388880e52eeb82b5f339c9e
+EBUILD grub-1.99.ebuild 6530 RMD160 b4d2b1242b1bd1cd6b52f40c52212d9428ecfa27 SHA1 b3e9333c0c1384dada73ddd12a858a0af010a116 SHA256 85c7e1959f4753ecc0b5c8fcffe4c11842269cfd98e64858efb03b540ae0dd0d
+EBUILD grub-9999.ebuild 6530 RMD160 b4d2b1242b1bd1cd6b52f40c52212d9428ecfa27 SHA1 b3e9333c0c1384dada73ddd12a858a0af010a116 SHA256 85c7e1959f4753ecc0b5c8fcffe4c11842269cfd98e64858efb03b540ae0dd0d
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 2d41728..b12330b 100644
--- a/sys-boot/grub/grub-1.99.ebuild
+++ b/sys-boot/grub/grub-1.99.ebuild
@@ -23,10 +23,19 @@ HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
SLOT="0"
-[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~x86"
+[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~x86 ~mips ~ppc ~ppc64"
IUSE="custom-cflags debug device-mapper nls static sdl truetype"
-GRUB_PLATFORMS="coreboot efi emu ieee1275 pc qemu yeeloong"
+GRUB_PLATFORMS="coreboot efi emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
+# everywhere:
+# emu
+# mips only:
+# qemu-mips, yeelong
+# 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.
for i in ${GRUB_PLATFORMS}; do
IUSE+=" grub_platform_${i}"
done
@@ -85,9 +94,22 @@ grub_src_configure() {
[[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined"
- [[ ${platform} == "guessed" ]] \
- && platform="" \
- || platform="--with-platform=${platform}"
+ # if we have no platform then --with-platform=guessed does not work
+ [[ ${platform} == "guessed" ]] && platform=""
+
+ # check if we have to specify the target (EFI)
+ # or just append correct --with-platform
+ if [[ -n ${platform} ]]; then
+ if [[ ${platform/-*} == ${platform} ]]; then
+ platform=" --with-platform=${platform}"
+ else
+ # EFI platform hack
+ platform="
+ --with-platform=${platform/-*}
+ --target=${platform/*-}
+ "
+ fi
+ fi
ECONF_SOURCE="${WORKDIR}/${P}/" \
econf \
@@ -114,7 +136,7 @@ grub_src_install() {
}
src_prepare() {
- local i
+ local i j archs
epatch_user
@@ -128,8 +150,17 @@ src_prepare() {
# get enabled platforms
GRUB_ENABLED_PLATFORMS=""
for i in ${GRUB_PLATFORMS}; do
- use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
+ # 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
done
+ einfo "Will build following platforms: ${GRUB_ENABLED_PLATFORMS}"
}
src_configure() {
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 2d41728..b12330b 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -23,10 +23,19 @@ HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
SLOT="0"
-[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~x86"
+[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~x86 ~mips ~ppc ~ppc64"
IUSE="custom-cflags debug device-mapper nls static sdl truetype"
-GRUB_PLATFORMS="coreboot efi emu ieee1275 pc qemu yeeloong"
+GRUB_PLATFORMS="coreboot efi emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
+# everywhere:
+# emu
+# mips only:
+# qemu-mips, yeelong
+# 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.
for i in ${GRUB_PLATFORMS}; do
IUSE+=" grub_platform_${i}"
done
@@ -85,9 +94,22 @@ grub_src_configure() {
[[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined"
- [[ ${platform} == "guessed" ]] \
- && platform="" \
- || platform="--with-platform=${platform}"
+ # if we have no platform then --with-platform=guessed does not work
+ [[ ${platform} == "guessed" ]] && platform=""
+
+ # check if we have to specify the target (EFI)
+ # or just append correct --with-platform
+ if [[ -n ${platform} ]]; then
+ if [[ ${platform/-*} == ${platform} ]]; then
+ platform=" --with-platform=${platform}"
+ else
+ # EFI platform hack
+ platform="
+ --with-platform=${platform/-*}
+ --target=${platform/*-}
+ "
+ fi
+ fi
ECONF_SOURCE="${WORKDIR}/${P}/" \
econf \
@@ -114,7 +136,7 @@ grub_src_install() {
}
src_prepare() {
- local i
+ local i j archs
epatch_user
@@ -128,8 +150,17 @@ src_prepare() {
# get enabled platforms
GRUB_ENABLED_PLATFORMS=""
for i in ${GRUB_PLATFORMS}; do
- use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
+ # 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
done
+ einfo "Will build following platforms: ${GRUB_ENABLED_PLATFORMS}"
}
src_configure() {