1 |
commit: e1374135af76bf31a01ff4ecb6696d8bbe041f31 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 17:53:01 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 17:53:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1374135 |
7 |
|
8 |
sys-boot/grub: populate MULTIBUILD_VARIANTS in a more PMS-defined way |
9 |
|
10 |
Package-Manager: portage-2.2.28_p79 |
11 |
|
12 |
sys-boot/grub/grub-2.02_beta3-r1.ebuild | 15 ++++++++++++++- |
13 |
sys-boot/grub/grub-9999-r1.ebuild | 15 ++++++++++++++- |
14 |
2 files changed, 28 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/sys-boot/grub/grub-2.02_beta3-r1.ebuild b/sys-boot/grub/grub-2.02_beta3-r1.ebuild |
17 |
index 99531f1..ab05794 100644 |
18 |
--- a/sys-boot/grub/grub-2.02_beta3-r1.ebuild |
19 |
+++ b/sys-boot/grub/grub-2.02_beta3-r1.ebuild |
20 |
@@ -215,6 +215,19 @@ grub_configure() { |
21 |
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
22 |
} |
23 |
|
24 |
+grub_get_platforms() { |
25 |
+ MULTIBUILD_VARIANTS=() |
26 |
+ local platform |
27 |
+ for platform in "${GRUB_ALL_PLATFORMS[@]}"; do |
28 |
+ if use "grub_platforms_${platform}"; then |
29 |
+ MULTIBUILD_VARIANTS+=( "${platform}" ) |
30 |
+ fi |
31 |
+ done |
32 |
+ if (( ${#MULTIBUILD_VARIANTS[@]} == 0 )); then |
33 |
+ MULTIBUILD_VARIANTS=( guessed ) |
34 |
+ fi |
35 |
+} |
36 |
+ |
37 |
src_configure() { |
38 |
# Bug 508758. |
39 |
replace-flags -O3 -O2 |
40 |
@@ -236,7 +249,7 @@ src_configure() { |
41 |
tc-export BUILD_CC # Bug 485592 |
42 |
|
43 |
# Portage will take care of cleaning up GRUB_PLATFORMS |
44 |
- MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} ) |
45 |
+ grub_get_platforms |
46 |
grub_do grub_configure |
47 |
} |
48 |
|
49 |
|
50 |
diff --git a/sys-boot/grub/grub-9999-r1.ebuild b/sys-boot/grub/grub-9999-r1.ebuild |
51 |
index 350857b..c880d12 100644 |
52 |
--- a/sys-boot/grub/grub-9999-r1.ebuild |
53 |
+++ b/sys-boot/grub/grub-9999-r1.ebuild |
54 |
@@ -217,6 +217,19 @@ grub_configure() { |
55 |
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
56 |
} |
57 |
|
58 |
+grub_get_platforms() { |
59 |
+ MULTIBUILD_VARIANTS=() |
60 |
+ local platform |
61 |
+ for platform in "${GRUB_ALL_PLATFORMS[@]}"; do |
62 |
+ if use "grub_platforms_${platform}"; then |
63 |
+ MULTIBUILD_VARIANTS+=( "${platform}" ) |
64 |
+ fi |
65 |
+ done |
66 |
+ if (( ${#MULTIBUILD_VARIANTS[@]} == 0 )); then |
67 |
+ MULTIBUILD_VARIANTS=( guessed ) |
68 |
+ fi |
69 |
+} |
70 |
+ |
71 |
src_configure() { |
72 |
# Bug 508758. |
73 |
replace-flags -O3 -O2 |
74 |
@@ -238,7 +251,7 @@ src_configure() { |
75 |
tc-export BUILD_CC # Bug 485592 |
76 |
|
77 |
# Portage will take care of cleaning up GRUB_PLATFORMS |
78 |
- MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} ) |
79 |
+ grub_get_platforms |
80 |
grub_do grub_configure |
81 |
} |