commit:     d61119fb4ea2112ed2f08be53566d75b4b325e97
Author:     Douglas Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Wed Jun 29 01:43:11 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 01:52:15 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d61119fb

sys-boot/grub: add xen-32 platform

This builds 32-bit Xen on amd64.

Bug: https://bugs.gentoo.org/586996

 profiles/arch/amd64/package.use.mask    | 4 ++++
 profiles/base/package.use.mask          | 4 ++++
 profiles/desc/grub_platforms.desc       | 1 +
 sys-boot/grub/grub-2.02_beta3-r1.ebuild | 8 +++++++-
 sys-boot/grub/grub-9999-r1.ebuild       | 8 +++++++-
 5 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/profiles/arch/amd64/package.use.mask 
b/profiles/arch/amd64/package.use.mask
index 178c46c..3640f08 100644
--- a/profiles/arch/amd64/package.use.mask
+++ b/profiles/arch/amd64/package.use.mask
@@ -18,6 +18,10 @@
 
 #--- END OF EXAMPLES ---
 
+# Mike Gilbert <flop...@gentoo.org> (23 Jun 2016)
+# This flag only has meaning on amd64
+sys-boot/grub:2 -grub_platforms_xen-32
+
 # Nathan Phillip Brink <bi...@gentoo.org> (26 Sep 2015)
 # git useflag requires dev-libs/libgit2 which few arches support
 dev-util/geany-plugins -git

diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 6030b44..22e3fd8 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -5,6 +5,10 @@
 # This file requires >=portage-2.1.1
 # New entries go on top.
 
+# Mike Gilbert <flop...@gentoo.org> (23 Jun 2016)
+# This flag only has meaning on amd64
+sys-boot/grub:2 grub_platforms_xen-32
+
 # Brian Evans <grkni...@gentoo.org> (14 Jun 2016)
 # Igbinary is not ready for php 7
 >=dev-php/pecl-redis-3.0 igbinary

diff --git a/profiles/desc/grub_platforms.desc 
b/profiles/desc/grub_platforms.desc
index dcb57b2..2ba24c6 100644
--- a/profiles/desc/grub_platforms.desc
+++ b/profiles/desc/grub_platforms.desc
@@ -18,3 +18,4 @@ qemu - QEMU platform support
 qemu-mips - QEMU MIPS platform support
 uboot - U-Boot platform support
 xen - XEN (pvgrub2) platform support
+xen-32 - Build 32-bit XEN (pvgrub2) platform support on amd64

diff --git a/sys-boot/grub/grub-2.02_beta3-r1.ebuild 
b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
index 7fd67ee..fd6f5f2 100644
--- a/sys-boot/grub/grub-2.02_beta3-r1.ebuild
+++ b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
@@ -51,7 +51,7 @@ LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( 
BitstreamVera )"
 SLOT="2/${PVR}"
 IUSE="debug device-mapper doc efiemu +fonts mount +multislot nls static sdl 
test +themes truetype libzfs"
 
-GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot 
qemu qemu-mips pc uboot xen )
+GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot 
qemu qemu-mips pc uboot xen xen-32 )
 IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
 
 REQUIRED_USE="
@@ -85,6 +85,7 @@ DEPEND="${RDEPEND}
        sys-apps/texinfo
        fonts? ( media-libs/freetype:2 )
        grub_platforms_xen? ( app-emulation/xen-tools:= )
+       grub_platforms_xen-32? ( app-emulation/xen-tools:= )
        static? (
                app-arch/xz-utils[static-libs(+)]
                truetype? (
@@ -180,6 +181,11 @@ grub_configure() {
                                local TARGET_CPPFLAGS="-march=x86-64 
${TARGET_CPPFLAGS}"
                                export TARGET_CFLAGS TARGET_CPPFLAGS
                        fi ;;
+               xen-32)
+                       platform=xen
+                       if [[ ${CHOST} == x86_64* ]]; then
+                               local CTARGET=i386
+                       fi ;;
                guessed) ;;
                *)      platform=${MULTIBUILD_VARIANT} ;;
        esac

diff --git a/sys-boot/grub/grub-9999-r1.ebuild 
b/sys-boot/grub/grub-9999-r1.ebuild
index c880d12..b0c7084 100644
--- a/sys-boot/grub/grub-9999-r1.ebuild
+++ b/sys-boot/grub/grub-9999-r1.ebuild
@@ -48,7 +48,7 @@ LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( 
BitstreamVera )"
 SLOT="2/${PVR}"
 IUSE="debug device-mapper doc efiemu +fonts mount +multislot nls static sdl 
test +themes truetype libzfs"
 
-GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot 
qemu qemu-mips pc uboot xen )
+GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot 
qemu qemu-mips pc uboot xen xen-32 )
 IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
 
 REQUIRED_USE="
@@ -82,6 +82,7 @@ DEPEND="${RDEPEND}
        sys-apps/texinfo
        fonts? ( media-libs/freetype:2 )
        grub_platforms_xen? ( app-emulation/xen-tools:= )
+       grub_platforms_xen-32? ( app-emulation/xen-tools:= )
        static? (
                app-arch/xz-utils[static-libs(+)]
                truetype? (
@@ -181,6 +182,11 @@ grub_configure() {
                                local TARGET_CPPFLAGS="-march=x86-64 
${TARGET_CPPFLAGS}"
                                export TARGET_CFLAGS TARGET_CPPFLAGS
                        fi ;;
+               xen-32)
+                       platform=xen
+                       if [[ ${CHOST} == x86_64* ]]; then
+                               local CTARGET=i386
+                       fi ;;
                guessed) ;;
                *)      platform=${MULTIBUILD_VARIANT} ;;
        esac

Reply via email to