summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-boot/grub/ChangeLog8
-rw-r--r--sys-boot/grub/Manifest11
-rw-r--r--sys-boot/grub/files/grub-2.00-freebsd.patch382
-rw-r--r--sys-boot/grub/grub-2.00-r1.ebuild5
4 files changed, 397 insertions, 9 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index 67f4c7c9295d..0150b1e823f2 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-boot/grub
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.242 2012/10/22 08:43:55 jer Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.243 2013/01/07 03:21:41 floppym Exp $
+
+ 07 Jan 2013; Mike Gilbert <floppym@gentoo.org> +files/grub-2.00-freebsd.patch,
+ grub-2.00-r1.ebuild:
+ Fixes for FreeBSD, bug 442050 by Yuta SATOH.
22 Oct 2012; Jeroen Roovers <jer@gentoo.org> metadata.xml:
Fix maintainer Assignee/CC preferences.
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index 1400c63b57b6..68af4a89494b 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -8,6 +8,7 @@ AUX 1.99-stat_root_device_properly-p1.patch 698 SHA256 1facf84e5195eb98b390e43e0
AUX 1.99-stat_root_device_properly-p2.patch 621 SHA256 431876459562c0aae6e854a97eeaf0cacdad8ceb5477788a4d691e4e6fa613eb SHA512 6953a5a7c48cd38ab41f60d3c4ef8fbeb413408fc749feca7cfffa0413e370c298f3fe3b6a01e457ec376524c9d40536258f7c0fde1e76991774291571117f76 WHIRLPOOL b94e253e2169e8b3a958cb49db81a86aa7d35de29b3fdfc9c58121f18496dcf440b4abe7b07c6d952f3f2172155958100b60795d96485108f874fa163d8c1883
AUX grub-0.97-gpt.patch 10682 SHA256 5e38046cfb727420e5b4b19d71c7fb4ddff22cbcc356c9f888763b0c1963d389 SHA512 2fe10c839c4c575750f7eeb29953c00f232771a3143687aac21e3b90585ec59d6f7c0346db80c0aa3c18d27799d301711d6f995f6781ce8a148c7ce59004e1aa WHIRLPOOL 22b3d12124115ec78fff2b3699c44d3b2c0bb84bec673e36d66e73c9da89137d237b1c7681b671ce89b06b2f4d78f9999eca98f43aa284d2b610713fc4161226
AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
+AUX grub-2.00-freebsd.patch 16465 SHA256 5464dda43bed28634e406a3b182db1d76e70059e0a3b3c276ee91ff27ca78cbd SHA512 d0fecaf83796971ef6f2cd43cab4c89faf1496d4241e249467d7839b366c616e15a8c6961d9224ed0e139d018d5d9f354cf59ddf2ef5e915a4b03e11dbdf568e WHIRLPOOL 963c61923503a57894634f0b3431e8e701a83f6514e5829f0ed91fc3c9011fa39870c319e1cbfee62341f1d37dfd0fdadcd4a028b725bb65d2f06fbedfd31166
AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba
AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b
AUX grub-2.00-parallel-make.patch 996 SHA256 351abb76af8469d4ecc35d55917821a2ab2e5bddc0634e6a5df85eeec34800ce SHA512 a97a5cf654c1b17918043fc6fa347f1473d5ce24280b9aedefb078abc1f43a4daacd5fc8889cf1dac46d9cf1bf755736e91745a15ac71ed01069ae76e083bd6a WHIRLPOOL 448aa705f15752071be6319314a733be120b95daeb10eaeefb2f52802f9ead3442c7b0598225c7f2d970db72b9dcfbbeb559bb00d8260dacc12363343b53e297
@@ -55,15 +56,15 @@ EBUILD grub-0.97-r8.ebuild 8948 SHA256 3eb9b11beeae64c986c9d27233f79525f271d0362
EBUILD grub-0.97-r9.ebuild 9053 SHA256 b6411eb5c379cc6b9120f1f727733d9724c4257405c3a7a1935b2aa573085726 SHA512 ddcf78c3d72f1bd854ed44753f4870fc9efd0cf69a28efb24423863c6ad740657affa74eff403484b4f30046e338d4a506a71e5d6b1818022377a1a77880b004 WHIRLPOOL 13d3adafd3814259081dd783067c077fbaebfa2974214d5b0249c818aa3cc004cb2bd526b18f1c1a46dfc0641325a92b87c8f73608972061c52c7ded99e95fe0
EBUILD grub-0.97.ebuild 4238 SHA256 d93dd5dca80c822e0659007b827966fb69c7f702b13ba672b4c3f486af54cee1 SHA512 46d72cfaa5735d0b3d2d89a8e6ce83745e4645370cdbbfcffc37d1413ffeb2b1caafac8c7cc712925ffc09411870b06467eb50bc475997508e7beea8fa5172d7 WHIRLPOOL 4b6fe9a7300baf6364555858a49ae2775ea0da27291d5d48fa634097531ae3b6da445ee2f959ef584bf4c913aad5e689b77e7326af257549ef107704dc0d202e
EBUILD grub-1.99-r2.ebuild 8413 SHA256 13a1281843b801804a5f2dc491cd21d6ac4d068c59e739015dc949a51011f585 SHA512 520bd623cfaf70451b4331f2dc464982f4de1b0c070ee8c0b336c9d16589aaa96924ea923f4c47ccb07d3c8f6da987a89ed285f1f4fa8f922465ab912e8940bd WHIRLPOOL 5abb91bf54a5024b225e7c3891b884827b31e6e8e380db9aa37fd520c55cd2e94ce1e7545271d52a58baab63446906cb69440177a4678000ac519088b9ae6966
-EBUILD grub-2.00-r1.ebuild 8607 SHA256 10f2c1982212c11ab279924387710e20093c0ce8c71c8126d8cb587fb7dd3f9f SHA512 9d02c3786b4b8d5a97b0b2164e5b456d1d4ddeeb8fceb5472914ffde45b22fbec0509f3f3a040ba90fee8ee15f9400f93e736116288c6c1f6a6a9db3069d28e1 WHIRLPOOL f2601985198648a4b179e24bf6c99e80cb064a93ab1a10afa57c4d96da6b12181ff21931200bf70afbc384673f4034bc3931c89e0b3e09f266e7dd3e044f8300
+EBUILD grub-2.00-r1.ebuild 8657 SHA256 fa6b7bbd3fee3aeffc523fbc2809c41ab3eca30d82b56a154dfd7f8d575e45e7 SHA512 29c162d9b3b10172905583d0a859c9647c707420c89a13f543ae6c10735ee9abb277f5f3e6580e4e4175567e340476d47f829e2699e8c5e9bbeb96c6fe67d539 WHIRLPOOL 057ad3f784f92a63d9d68f009926542ed9634da726481382d952f6693d032c3e1496855d11da4e38bc6c8e1ad203b1bca2eb3c974388ebb342459a6502a0b4b4
EBUILD grub-2.00_beta6.ebuild 7140 SHA256 8026d9d32d21863e5427cac5b641fbc5f799662437bd9a40daa3f9a377a0de68 SHA512 35b5a7aa5224ba1f0d3dabaeb03d915b86a3c16419f6ef012c8092b198e8bbc054f22e4658930f704402066622b98c67c869f0c9cf5d74637c34ae786b0861fa WHIRLPOOL 54839cae4be956d12f8c62524923e9087f76c5e2c3c7db7cca074084deba71cd870238e514227a73a1131748fac501566afe29866231b68e4bbddbf2b465a71b
EBUILD grub-9999.ebuild 8605 SHA256 506e79cb8de178641162809a15b2656d771af197cb8bc4dbe83754ac99234cdb SHA512 3dcda4d909ab6f37e9e9db5951d4bad076b42e6a38a5e28431b7e5cd801c2c3e569966a5a16ce6031acec03a05005ac8dee1c5a12305fac88e38c3554afa68b8 WHIRLPOOL da73ca55e91e5e303e5f0254197722a0ff05ef223d5fc70305d6d215ef36879232350734b7c92851608989ae97d4e3c71bedb6e64557f2b93b98ac47655483f2
-MISC ChangeLog 47154 SHA256 6c44d7a0bfb0dface0114746286e9a315f7b79ca29862aecae12de78b380d23d SHA512 eb0fa868bd4e880e842d5ede3a06baac11e40b15bfafc1d48529172a38e70c153670c5c4258175635f2cb24493432fcec80aa5af41413158ac360d0a7329ea95 WHIRLPOOL 20b3dcb523f9083d9172c9ba623f5c1c571aa7cda477ec4ff38474d4cbae3138132f344f4d2d19cbcc0ee96947a4e928a9511669beead9ae685e9a0458616100
+MISC ChangeLog 47310 SHA256 44d70684a880738eb2bac675dbefa400f4ee9ce2793cc33afbe64ea262ecb1dc SHA512 5c8d1f7e47ad70ae2ccc0ee64163355a9045e7bfb48f46f5382cf371ddbef8d540bdf58c419d4a3feb127cd38e27df48fcc33e2fba2d4bb9bd9ddc42475b237b WHIRLPOOL 135a37cfd7636d57c3e7740a64be974e4a44336a0ff8c788689eb9063acb5f5b6a33d1e7094da4f976f41a5b2572badcfb4f84056f11469c469595aa6aec9b37
MISC metadata.xml 673 SHA256 e14e5e46b726a3645b85217a2afbd5b04adb54990c7db837e01a50a8322d81b9 SHA512 9df3d519f0aa3e53304c956638acb927224f3ca83ba1959f089852ee7c822ca3cae99d3da0efcbfeedd99dbe630aa0b39d6f9b61d0cad8e72c155f7253c7d8cc WHIRLPOOL ed7bc1f5c8f84ef6fb18143163f239d9f47e8fd88c3fd521f625b2191349d7520bf4c6a7e6c7e3eef73a0af43faa6814e591c983cc29298bf88e7c42df3c69d2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlCFB0wACgkQVWmRsqeSphPcIgCbBOVdYfisDD558A53ICsn8Ym2
-fRQAn2cnBAof/4hUymyoZanVgbB0nN9i
-=oWFs
+iF4EAREIAAYFAlDqP0oACgkQC77qH+pIQ6SvxwEAihByjIQGAF1hNRasmW0RiPY4
+zw9uuFb5aToN9KZQSgsA/349gLN7E++S1HJWPuKcBhiWKuiQ2uJpO9GQqhq2Rlhz
+=yUgz
-----END PGP SIGNATURE-----
diff --git a/sys-boot/grub/files/grub-2.00-freebsd.patch b/sys-boot/grub/files/grub-2.00-freebsd.patch
new file mode 100644
index 000000000000..bcfbf2633ccd
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-freebsd.patch
@@ -0,0 +1,382 @@
+Taken from
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4556
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4584
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4624
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4625
+
+diff -Nur grub-2.00.orig/grub-core/loader/i386/bsd.c grub-2.00/grub-core/loader/i386/bsd.c
+--- grub-2.00.orig/grub-core/loader/i386/bsd.c 2012-06-07 22:06:00.000000000 +0900
++++ grub-2.00/grub-core/loader/i386/bsd.c 2013-01-04 19:50:55.000000000 +0900
+@@ -1309,7 +1309,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xFFFFFF;
++ paddr = phdr->p_paddr & 0xFFFFFFF;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1333,7 +1333,7 @@
+ }
+
+ *do_load = 1;
+- phdr->p_paddr &= 0xFFFFFF;
++ phdr->p_paddr &= 0xFFFFFFF;
+ paddr = phdr->p_paddr;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+@@ -1351,7 +1351,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1375,7 +1375,7 @@
+ }
+
+ *do_load = 1;
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+
+@@ -1394,7 +1394,7 @@
+ {
+ grub_relocator_chunk_t ch;
+
+- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
++ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
+ err = grub_elf32_phdr_iterate (elf, filename,
+ grub_bsd_elf32_size_hook, NULL);
+ if (err)
+diff -Nur grub-2.00.orig/util/grub-mkconfig_lib.in grub-2.00/util/grub-mkconfig_lib.in
+--- grub-2.00.orig/util/grub-mkconfig_lib.in 2012-06-28 00:27:53.000000000 +0900
++++ grub-2.00/util/grub-mkconfig_lib.in 2013-01-04 19:50:55.000000000 +0900
+@@ -349,3 +349,10 @@
+ cat
+ fi
+ }
++
++grub_tab=" "
++
++grub_add_tab () {
++ sed -e "s/^/$grub_tab/"
++}
++
+diff -Nur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
+--- grub-2.00.orig/util/grub.d/10_hurd.in 2012-03-05 05:10:04.000000000 +0900
++++ grub-2.00/util/grub.d/10_hurd.in 2013-01-04 19:50:55.000000000 +0900
+@@ -108,7 +108,7 @@
+ EOF
+ fi
+
+- prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
++ prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/"
+ message="$(gettext_printf "Loading GNU Mach ...")"
+
+ if [ x$type = xrecovery ] ; then
+@@ -122,9 +122,9 @@
+ EOF
+
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/"
+ fi
+- prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
++ prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/"
+ message="$(gettext_printf "Loading the Hurd ...")"
+ if [ x$type = xrecovery ] ; then
+ opts=
+@@ -158,7 +158,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ hurd_entry "$kernel" simple
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ # TRANSLATORS: %s is replaced with an OS name
+ echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
+diff -Nur grub-2.00.orig/util/grub.d/10_illumos.in grub-2.00/util/grub.d/10_illumos.in
+--- grub-2.00.orig/util/grub.d/10_illumos.in 2012-03-05 04:03:38.000000000 +0900
++++ grub-2.00/util/grub.d/10_illumos.in 2013-01-04 19:50:55.000000000 +0900
+@@ -35,8 +35,8 @@
+ esac
+
+ echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
+-save_default_entry | sed -e "s/^/\t/"
+-prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"
++save_default_entry | grub_add_tab
++prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab
+ message="$(gettext_printf "Loading kernel of Illumos ...")"
+ cat << EOF
+ insmod gzio
+diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
+--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
++++ grub-2.00/util/grub.d/10_kfreebsd.in 2013-01-04 19:50:55.000000000 +0900
+@@ -54,7 +54,7 @@
+ fi
+
+ if [ -z "${prepare_module_dir_cache}" ]; then
+- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | grub_add_tab)"
+ fi
+
+ printf '%s\n' "${prepare_module_dir_cache}"
+@@ -91,10 +91,10 @@
+ echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
+ fi
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+@@ -112,7 +112,7 @@
+
+ load_kfreebsd_module acpi true
+
+- for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
++ for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do
+ case $abstraction in
+ lvm) load_kfreebsd_module geom_linux_lvm false ;;
+ esac
+@@ -122,10 +122,10 @@
+ zfs)
+ load_kfreebsd_module opensolaris false
+
+- ls "${dirname}/zfs/zpool.cache" > /dev/null
++ ls "/boot/zfs/zpool.cache" > /dev/null
+ printf '%s\n' "${prepare_boot_cache}"
+ sed "s/^/$submenu_indentation/" << EOF
+- kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
++ kfreebsd_module $(make_system_path_relative_to_its_root /boot)/zfs/zpool.cache type=/boot/zfs/zpool.cache
+ EOF
+ ;;
+ esac
+@@ -179,7 +179,7 @@
+ case ${GRUB_FS} in
+ zfs)
+ # zpool name
+- kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
++ kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE})
+ # filesystem name (empty string for the main filesystem)
+ kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
+ ;;
+@@ -213,7 +213,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ kfreebsd_entry "${OS}" "${version}" simple
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
+--- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-19 06:24:38.000000000 +0900
++++ grub-2.00/util/grub.d/10_linux.in 2013-01-04 19:50:55.000000000 +0900
+@@ -101,7 +101,7 @@
+ echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
+ fi
+
+ # Use ELILO's generic "efifb" when it's known to be available.
+@@ -123,12 +123,12 @@
+
+ if [ x$dirname = x/ ]; then
+ if [ -z "${prepare_root_cache}" ]; then
+- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
++ prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
+ else
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ fi
+@@ -230,7 +230,7 @@
+ linux_entry "${OS}" "${version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_netbsd.in grub-2.00/util/grub.d/10_netbsd.in
+--- grub-2.00.orig/util/grub.d/10_netbsd.in 2012-03-05 04:47:35.000000000 +0900
++++ grub-2.00/util/grub.d/10_netbsd.in 2013-01-04 19:50:55.000000000 +0900
+@@ -77,10 +77,10 @@
+ prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,'
+ case "${loader}" in
+ knetbsd)
+- printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}"
++ printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
+ ;;
+ multiboot)
+- printf "\tmodule %s\n" "${kmodule_rel}"
++ printf "$grub_tabmodule %s\n" "${kmodule_rel}"
+ ;;
+ esac
+ }
+@@ -121,11 +121,11 @@
+ printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ case "${loader}" in
+ knetbsd)
+- printf "\tknetbsd %s -r %s %s\n" \
++ printf "$grub_tabknetbsd %s -r %s %s\n" \
+ "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
+ ;;
+ multiboot)
+- printf "\tmultiboot %s %s root=%s %s\n" \
++ printf "$grub_tabmultiboot %s %s root=%s %s\n" \
+ "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
+ ;;
+ esac
+@@ -159,7 +159,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_windows.in
+--- grub-2.00.orig/util/grub.d/10_windows.in 2012-03-05 06:11:43.000000000 +0900
++++ grub-2.00/util/grub.d/10_windows.in 2013-01-04 19:50:55.000000000 +0900
+@@ -45,7 +45,7 @@
+ sort | uniq | wc -l`" = 1 || return 1
+
+ # Search 'default=PARTITION'
+- get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'`
++ get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'`
+ test -n "$get_os_name_from_boot_ini_part" || return 1
+
+ # Search 'PARTITION="NAME" ...'
+@@ -87,8 +87,8 @@
+ menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
+ EOF
+
+- save_default_entry | sed -e 's,^,\t,'
+- prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
++ save_default_entry | sed -e 's,^,$grub_tab,'
++ prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,'
+ test -z "$needmap" || cat <<EOF
+ drivemap -s (hd0) \$root
+ EOF
+diff -Nur grub-2.00.orig/util/grub.d/10_xnu.in grub-2.00/util/grub.d/10_xnu.in
+--- grub-2.00.orig/util/grub.d/10_xnu.in 2012-05-29 19:31:03.000000000 +0900
++++ grub-2.00/util/grub.d/10_xnu.in 2013-01-04 19:50:55.000000000 +0900
+@@ -39,8 +39,8 @@
+ cat << EOF
+ menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/ /"
+- prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/ /"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
+ cat << EOF
+ load_video
+ set do_resume=0
+diff -Nur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_linux_xen.in
+--- grub-2.00.orig/util/grub.d/20_linux_xen.in 2012-06-04 04:57:42.000000000 +0900
++++ grub-2.00/util/grub.d/20_linux_xen.in 2013-01-04 19:50:55.000000000 +0900
+@@ -110,11 +110,11 @@
+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
+ fi
+
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
+@@ -236,7 +236,7 @@
+ linux_entry "${OS}" "${version}" "${xen_version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+- submenu_indentation="\t\t"
++ submenu_indentation="$grub_tab$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/30_os-prober.in grub-2.00/util/grub.d/30_os-prober.in
+--- grub-2.00.orig/util/grub.d/30_os-prober.in 2012-03-05 05:52:03.000000000 +0900
++++ grub-2.00/util/grub.d/30_os-prober.in 2013-01-04 19:50:55.000000000 +0900
+@@ -54,8 +54,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+ cat << EOF
+ load_video
+ set do_resume=0
+@@ -126,8 +126,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+
+ case ${LONGNAME} in
+ Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
+@@ -181,14 +181,14 @@
+ used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
+
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
+ fi
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ cat << EOF
+ menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
+ printf '%s\n' "${prepare_boot_cache}"
+ cat << EOF
+ linux ${LKERNEL} ${LPARAMS}
+@@ -208,8 +208,8 @@
+ cat << EOF
+ menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
+ EOF
+- save_default_entry | sed -e "s/^/\t\t/"
+- printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
++ save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
++ printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
+ cat << EOF
+ linux ${LKERNEL} ${LPARAMS}
+ EOF
+@@ -243,8 +243,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+ grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
+ mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
+ grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild
index 15eee11c8010..b7eb5f04084b 100644
--- a/sys-boot/grub/grub-2.00-r1.ebuild
+++ b/sys-boot/grub/grub-2.00-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.3 2012/10/20 21:46:34 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.4 2013/01/07 03:21:41 floppym Exp $
EAPI=4
@@ -234,6 +234,7 @@ src_prepare() {
epatch "${FILESDIR}/${P}-config-quoting.patch" #426364
epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612
epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137
+ epatch "${FILESDIR}/${P}-freebsd.patch" #442050
fi
# fix texinfo file name, bug 416035