summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-24 17:44:59 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-24 17:44:59 +0000
commit0706fc6986773f4e4d391deff4ad5143c464ea4e (patch)
tree9fd110f9fc996e8a4213eeda994a8c112491b86d /sys-boot
parentaa3411e241a201d53a2689766fe419f2756819f3 (diff)
Revert "gentoo resync : 24.03.2019"
This reverts commit aa3411e241a201d53a2689766fe419f2756819f3.
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/Manifest.gzbin7386 -> 7387 bytes
-rw-r--r--sys-boot/grub/Manifest7
-rw-r--r--sys-boot/grub/grub-2.02-r1.ebuild311
-rw-r--r--sys-boot/grub/grub-2.02-r2.ebuild312
-rw-r--r--sys-boot/grub/grub-2.02-r3.ebuild4
-rw-r--r--sys-boot/grub/grub-9999.ebuild102
6 files changed, 680 insertions, 56 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz
index fa837e49b3f4..c2ca0500b1c4 100644
--- a/sys-boot/Manifest.gz
+++ b/sys-boot/Manifest.gz
Binary files differ
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index bf5e8043a779..8a71fb424664 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -9,8 +9,9 @@ AUX grub-2.02_beta2-KERNEL_GLOBS.patch 2121 BLAKE2B 398195f59537d40a4f61eadf5be9
AUX grub.default-3 2532 BLAKE2B f59b8e862b7069603a975327d51507aae4568bfc80d7aa237f620008b00520a5a14b0c95e3f9c277360e1dfafc83bcc815970b47a69bf469ad7e594956f47c60 SHA512 2faf5e730331b7d04045ee64d990227ef02f1b14a1cf88b5b71a18c91a9a8cba773a601eb3f5442092f6937935efed02629a278bd6822fac60f9c72045e4b13d
DIST dejavu-sans-ttf-2.37.zip 417746 BLAKE2B c8904f3cd5a49370a7dc10e456684c88aeae998a99090bf4d0a5baa4f36cc8fb8f70586cf6d610a5ffeee97261d28c80f55bbe9dcfc3ed796d5c2d60e79adb58 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae
DIST grub-2.02.tar.xz 6113260 BLAKE2B 7c5ec61a8dc5a00e9cdc91c489f0d2ee37cd7e673eef8e8e26bbc18c5ec28829f563b9298874fb96d45a5d523ce366e936649c21ebda7462afda0cc328b970ce SHA512 cc6eb0a42b5c8df2f671cc128ff725afb3ff1f8832a196022e433cf0d3b75decfca2316d0aa5fabea75747d55e88f3d021dd93508563f8ca80fd7b9e7fe1f088
-DIST unifont-12.0.01.pcf.gz 1360857 BLAKE2B ab87e58aee2295e52dc49b7bb131793ad775abbf49f4b64758045a9b5158e75afd01a8425b56e6f6d0ba288a733bf426df363c1ecc78daddec516c33d461bc3b SHA512 9d34a005dd10f212e43075beb71eb39b9cc3403ae1cddec7d79af91b3a3a1beb4a3696075cc94563c8402efe2ad05de552ace77a24da09f1c0b7f95e99b056a3
DIST unifont-9.0.06.pcf.gz 1360354 BLAKE2B 09b96e1711c729ef159d62e3ea7b289ca2d01dc0ea417e35a18b73dc02a23f62ce7821d9761bceee4002d9eeaabd91cfb69bbacc6fbdfdfa00445d18fe8f1d66 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774
-EBUILD grub-2.02-r3.ebuild 7989 BLAKE2B e2b0f83371bb78715e19074d7e4c7761357b1475856afce13184214403df205c3b2d010c8a7fde754aa05257f3ab3624c9a9a1a76e198e8d5849f5e9443a7bdd SHA512 64d71a99cd808c4c430f110a4c3d4d4c8e400b8a018df34b61b8876afbe5f2ef9067f885cdc6e8139f427d3c4222c25ac35eef06d376f2ea36ffd897c8a2788b
-EBUILD grub-9999.ebuild 7760 BLAKE2B dae14cc051202ad4d108fa87c0a807eb6e56a37f5e8ee9d3856d2a906253fe613525f55b48687c66cb56fd95c0b2325fb3239f7c537b62cf3357ffdeecca4cc8 SHA512 6ce034bc107994049df25ebff3909da4bbf6ee5d5619836c7824ebfeda7e7e7d8d7352afacae662a270d9715e6b2ed9ae1e0b5cef37963b7bc9851cef9edf410
+EBUILD grub-2.02-r1.ebuild 7893 BLAKE2B 92ad17d49dd9269a72b8d9b6ad9820a35fd9f5655f72f6ceb54ec844c7b3643b3b839f8463a705dc30a0a2343db8b69b19aff494b5d19ac9b30f7b0aed53fc92 SHA512 1b679bda35c9dadfcf51f4d4a2e9349ee376a245dafc9e3c982dff775307b6fc659afb51a05795a812178bce9bccdf3ccde5faa7568bb036974f45c3cb9f0aa4
+EBUILD grub-2.02-r2.ebuild 7916 BLAKE2B 190da5db46c892cb23a1299fbd9d1bfd4b281433cbae0e0ac2dd5bf66965731f6a534bbf33febd72d3d233b578a423851ef0a79518a00c35f25bf93163d6aca7 SHA512 ad247ed42852e1683a15cdbb1b9bb15dac97682d88c0598e5e6cc69b2725826d49a337e70a614d8ae5fbce63cd49b96bd6725a9fa2b88c8a622c96260414cab3
+EBUILD grub-2.02-r3.ebuild 7991 BLAKE2B 6cfc137c0229fae5063f29bdb31eefa8465f8fd8e0abf929ab6fec24ac5267d335544af9deb6403ec41e18c3a20d9388dc84c84102a5c3a32117f6b594408ade SHA512 12ca8fb5f01c62891feb9a9d38cef4605e8e2971b9592a20781cfa4f5c7c5c29fa34138cca0bfd26050cb102a456bf83499533d39fe26ecfac2361306312939b
+EBUILD grub-9999.ebuild 7726 BLAKE2B c6656be3322b8f8506af69888313e5e08f1a939fd16d35efc76ab929536c74f0840059b23567b76e531aa86bc56f5ef19e955af29a2e56f78f9f542e6a6c73cf SHA512 0b5b54f12d5a3354b9bded9b9eac2e82029aff5d02d4f53fb1e38e8afc097ad15385c4e20de1b71aea301bd3bccc962448ee296986959a7bbab51a52f75f415e
MISC metadata.xml 1149 BLAKE2B c0a364b1d8139f26f7dd09ba49dd68d591c7532e2eec25dae97caea49be8bfc92c8d5c69dcc77d89f58367fa04a73526cc55768f93222effc6c6e47a52b53500 SHA512 45d0425236957395e275bd340aeabfcd03451b037c616c54cf8babdc3bdee6aa3706fa7565f595ba4391773d331353b8920a627094c01289935a1a9aedc1f7bf
diff --git a/sys-boot/grub/grub-2.02-r1.ebuild b/sys-boot/grub/grub-2.02-r1.ebuild
new file mode 100644
index 000000000000..95b66ff669f5
--- /dev/null
+++ b/sys-boot/grub/grub-2.02-r1.ebuild
@@ -0,0 +1,311 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GRUB_AUTOGEN=1
+GRUB_AUTORECONF=1
+
+if [[ -n ${GRUB_AUTOGEN} ]]; then
+ PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5,3_6} )
+ inherit python-any-r1
+fi
+
+if [[ -n ${GRUB_AUTORECONF} ]]; then
+ WANT_LIBTOOL=none
+ inherit autotools
+fi
+
+inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
+ # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
+ MY_P=${P/_/'~'}
+ SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
+ S=${WORKDIR}/${MY_P}
+ else
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+ S=${WORKDIR}/${P%_*}
+ fi
+ KEYWORDS="amd64 ~arm ~arm64 x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
+ http://git.savannah.gnu.org/r/grub.git"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+ "${FILESDIR}"/2.02-multiple-early-initrd.patch
+ "${FILESDIR}"/2.02-freetype-capitalise-variables.patch
+ "${FILESDIR}"/2.02-freetype-pkg-config.patch
+)
+
+DEJAVU=dejavu-sans-ttf-2.37
+UNIFONT=unifont-9.0.06
+SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
+ themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="https://www.gnu.org/software/grub/"
+
+# Includes licenses for dejavu and unifont
+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 xen-32 )
+IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
+
+REQUIRED_USE="
+ grub_platforms_coreboot? ( fonts )
+ grub_platforms_qemu? ( fonts )
+ grub_platforms_ieee1275? ( fonts )
+ grub_platforms_loongson? ( fonts )
+"
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+COMMON_DEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5:0=
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse:0 )
+ truetype? ( media-libs/freetype:2= )
+ ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+ ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ app-misc/pax-utils
+ sys-devel/flex
+ sys-devel/bison
+ sys-apps/help2man
+ sys-apps/texinfo
+ fonts? (
+ media-libs/freetype:2
+ virtual/pkgconfig
+ )
+ grub_platforms_xen? ( app-emulation/xen-tools:= )
+ grub_platforms_xen-32? ( app-emulation/xen-tools:= )
+ static? (
+ app-arch/xz-utils[static-libs(+)]
+ truetype? (
+ app-arch/bzip2[static-libs(+)]
+ media-libs/freetype[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ virtual/pkgconfig
+ )
+ )
+ test? (
+ app-admin/genromfs
+ app-arch/cpio
+ app-arch/lzop
+ app-emulation/qemu
+ dev-libs/libisoburn
+ sys-apps/miscfiles
+ sys-block/parted
+ sys-fs/squashfs-tools
+ )
+ themes? (
+ app-arch/unzip
+ media-libs/freetype:2
+ virtual/pkgconfig
+ )
+ truetype? ( virtual/pkgconfig )
+"
+RDEPEND="${COMMON_DEPEND}
+ kernel_linux? (
+ grub_platforms_efi-32? ( sys-boot/efibootmgr )
+ grub_platforms_efi-64? ( sys-boot/efibootmgr )
+ )
+ !multislot? ( !sys-boot/grub:0 !sys-boot/grub-static )
+ nls? ( sys-devel/gettext )
+"
+
+RESTRICT="strip !test? ( test )"
+
+QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*"
+QA_WX_LOAD="usr/lib/grub/*"
+QA_MULTILIB_PATHS="usr/lib/grub/.*"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_prepare() {
+ default
+
+ sed -i -e /autoreconf/d autogen.sh || die
+
+ if use multislot; then
+ # fix texinfo file name, bug 416035
+ sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
+ fi
+
+ # Nothing in Gentoo packages 'american-english' in the exact path
+ # wanted for the test, but all that is needed is a compressible text
+ # file, and we do have 'words' from miscfiles in the same path.
+ sed -i \
+ -e '/CFILESSRC.*=/s,american-english,words,' \
+ tests/util/grub-fs-tester.in \
+ || die
+
+ if [[ -n ${GRUB_AUTOGEN} ]]; then
+ python_setup
+ bash autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
+ autopoint() { :; }
+ eautoreconf
+ fi
+}
+
+grub_do() {
+ multibuild_foreach_variant run_in_build_dir "$@"
+}
+
+grub_do_once() {
+ multibuild_for_best_variant run_in_build_dir "$@"
+}
+
+grub_configure() {
+ local platform
+
+ case ${MULTIBUILD_VARIANT} in
+ efi*) platform=efi ;;
+ xen*) platform=xen ;;
+ guessed) ;;
+ *) platform=${MULTIBUILD_VARIANT} ;;
+ esac
+
+ case ${MULTIBUILD_VARIANT} in
+ *-32)
+ if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
+ local CTARGET=i386
+ fi ;;
+ *-64)
+ if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
+ local CTARGET=x86_64
+ local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
+ fi ;;
+ esac
+
+ local myeconfargs=(
+ --disable-werror
+ --program-prefix=
+ --libdir="${EPREFIX}"/usr/lib
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable debug mm-debug)
+ $(use_enable device-mapper)
+ $(use_enable mount grub-mount)
+ $(use_enable nls)
+ $(use_enable themes grub-themes)
+ $(use_enable truetype grub-mkfont)
+ $(use_enable libzfs)
+ $(use sdl && use_enable debug grub-emu-sdl)
+ ${platform:+--with-platform=}${platform}
+
+ # Let configure detect this where supported
+ $(usex efiemu '' '--disable-efiemu')
+ )
+
+ if use multislot; then
+ myeconfargs+=( --program-transform-name="s,grub,grub2," )
+ fi
+
+ # Set up font symlinks
+ ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ if use themes; then
+ ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
+ fi
+
+ local ECONF_SOURCE="${S}"
+ econf "${myeconfargs[@]}"
+}
+
+src_configure() {
+ # Bug 508758.
+ replace-flags -O3 -O2
+
+ # We don't want to leak flags onto boot code.
+ export HOST_CCASFLAGS=${CCASFLAGS}
+ export HOST_CFLAGS=${CFLAGS}
+ export HOST_CPPFLAGS=${CPPFLAGS}
+ export HOST_LDFLAGS=${LDFLAGS}
+ unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
+
+ use static && HOST_LDFLAGS+=" -static"
+
+ tc-ld-disable-gold #439082 #466536 #526348
+ export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
+ unset LDFLAGS
+
+ tc-export CC NM OBJCOPY RANLIB STRIP
+ tc-export BUILD_CC # Bug 485592
+
+ MULTIBUILD_VARIANTS=()
+ local p
+ for p in "${GRUB_ALL_PLATFORMS[@]}"; do
+ use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" )
+ done
+ [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed )
+ grub_do grub_configure
+}
+
+src_compile() {
+ # Sandbox bug 404013.
+ use libzfs && addpredict /etc/dfs:/dev/zfs
+
+ grub_do emake
+ use doc && grub_do_once emake -C docs html
+}
+
+src_test() {
+ # The qemu dependency is a bit complex.
+ # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
+ grub_do emake check
+}
+
+src_install() {
+ grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
+ use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
+
+ einstalldocs
+
+ if use multislot; then
+ mv "${ED%/}"/usr/share/info/grub{,2}.info || die
+ fi
+
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default-3 grub
+}
+
+pkg_postinst() {
+ elog "For information on how to configure GRUB2 please refer to the guide:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
+
+ if has_version 'sys-boot/grub:0'; then
+ elog "A migration guide for GRUB Legacy users is available:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may consider installing the following optional packages:"
+ optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
+ optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
+ optfeature "Enable RAID device detection" sys-fs/mdadm
+ fi
+}
diff --git a/sys-boot/grub/grub-2.02-r2.ebuild b/sys-boot/grub/grub-2.02-r2.ebuild
new file mode 100644
index 000000000000..0075aa08c231
--- /dev/null
+++ b/sys-boot/grub/grub-2.02-r2.ebuild
@@ -0,0 +1,312 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GRUB_AUTOGEN=1
+GRUB_AUTORECONF=1
+
+if [[ -n ${GRUB_AUTOGEN} ]]; then
+ PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5,3_6} )
+ inherit python-any-r1
+fi
+
+if [[ -n ${GRUB_AUTORECONF} ]]; then
+ WANT_LIBTOOL=none
+ inherit autotools
+fi
+
+inherit bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
+ # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
+ MY_P=${P/_/'~'}
+ SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
+ S=${WORKDIR}/${MY_P}
+ else
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+ S=${WORKDIR}/${P%_*}
+ fi
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
+ http://git.savannah.gnu.org/r/grub.git"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+ "${FILESDIR}"/2.02-multiple-early-initrd.patch
+ "${FILESDIR}"/2.02-freetype-capitalise-variables.patch
+ "${FILESDIR}"/2.02-freetype-pkg-config.patch
+ "${FILESDIR}"/2.02-xfs-sparse-inodes.patch
+)
+
+DEJAVU=dejavu-sans-ttf-2.37
+UNIFONT=unifont-9.0.06
+SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
+ themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="https://www.gnu.org/software/grub/"
+
+# Includes licenses for dejavu and unifont
+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 xen-32 )
+IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
+
+REQUIRED_USE="
+ grub_platforms_coreboot? ( fonts )
+ grub_platforms_qemu? ( fonts )
+ grub_platforms_ieee1275? ( fonts )
+ grub_platforms_loongson? ( fonts )
+"
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+COMMON_DEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5:0=
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse:0 )
+ truetype? ( media-libs/freetype:2= )
+ ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
+ ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ app-misc/pax-utils
+ sys-devel/flex
+ sys-devel/bison
+ sys-apps/help2man
+ sys-apps/texinfo
+ fonts? (
+ media-libs/freetype:2
+ virtual/pkgconfig
+ )
+ grub_platforms_xen? ( app-emulation/xen-tools:= )
+ grub_platforms_xen-32? ( app-emulation/xen-tools:= )
+ static? (
+ app-arch/xz-utils[static-libs(+)]
+ truetype? (
+ app-arch/bzip2[static-libs(+)]
+ media-libs/freetype[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ virtual/pkgconfig
+ )
+ )
+ test? (
+ app-admin/genromfs
+ app-arch/cpio
+ app-arch/lzop
+ app-emulation/qemu
+ dev-libs/libisoburn
+ sys-apps/miscfiles
+ sys-block/parted
+ sys-fs/squashfs-tools
+ )
+ themes? (
+ app-arch/unzip
+ media-libs/freetype:2
+ virtual/pkgconfig
+ )
+ truetype? ( virtual/pkgconfig )
+"
+RDEPEND="${COMMON_DEPEND}
+ kernel_linux? (
+ grub_platforms_efi-32? ( sys-boot/efibootmgr )
+ grub_platforms_efi-64? ( sys-boot/efibootmgr )
+ )
+ !multislot? ( !sys-boot/grub:0 !sys-boot/grub-static )
+ nls? ( sys-devel/gettext )
+"
+
+RESTRICT="strip !test? ( test )"
+
+QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*"
+QA_WX_LOAD="usr/lib/grub/*"
+QA_MULTILIB_PATHS="usr/lib/grub/.*"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_prepare() {
+ default
+
+ sed -i -e /autoreconf/d autogen.sh || die
+
+ if use multislot; then
+ # fix texinfo file name, bug 416035
+ sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
+ fi
+
+ # Nothing in Gentoo packages 'american-english' in the exact path
+ # wanted for the test, but all that is needed is a compressible text
+ # file, and we do have 'words' from miscfiles in the same path.
+ sed -i \
+ -e '/CFILESSRC.*=/s,american-english,words,' \
+ tests/util/grub-fs-tester.in \
+ || die
+
+ if [[ -n ${GRUB_AUTOGEN} ]]; then
+ python_setup
+ bash autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
+ autopoint() { :; }
+ eautoreconf
+ fi
+}
+
+grub_do() {
+ multibuild_foreach_variant run_in_build_dir "$@"
+}
+
+grub_do_once() {
+ multibuild_for_best_variant run_in_build_dir "$@"
+}
+
+grub_configure() {
+ local platform
+
+ case ${MULTIBUILD_VARIANT} in
+ efi*) platform=efi ;;
+ xen*) platform=xen ;;
+ guessed) ;;
+ *) platform=${MULTIBUILD_VARIANT} ;;
+ esac
+
+ case ${MULTIBUILD_VARIANT} in
+ *-32)
+ if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
+ local CTARGET=i386
+ fi ;;
+ *-64)
+ if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
+ local CTARGET=x86_64
+ local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
+ fi ;;
+ esac
+
+ local myeconfargs=(
+ --disable-werror
+ --program-prefix=
+ --libdir="${EPREFIX}"/usr/lib
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
+ $(use_enable debug mm-debug)
+ $(use_enable device-mapper)
+ $(use_enable mount grub-mount)
+ $(use_enable nls)
+ $(use_enable themes grub-themes)
+ $(use_enable truetype grub-mkfont)
+ $(use_enable libzfs)
+ $(use sdl && use_enable debug grub-emu-sdl)
+ ${platform:+--with-platform=}${platform}
+
+ # Let configure detect this where supported
+ $(usex efiemu '' '--disable-efiemu')
+ )
+
+ if use multislot; then
+ myeconfargs+=( --program-transform-name="s,grub,grub2," )
+ fi
+
+ # Set up font symlinks
+ ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ if use themes; then
+ ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
+ fi
+
+ local ECONF_SOURCE="${S}"
+ econf "${myeconfargs[@]}"
+}
+
+src_configure() {
+ # Bug 508758.
+ replace-flags -O3 -O2
+
+ # We don't want to leak flags onto boot code.
+ export HOST_CCASFLAGS=${CCASFLAGS}
+ export HOST_CFLAGS=${CFLAGS}
+ export HOST_CPPFLAGS=${CPPFLAGS}
+ export HOST_LDFLAGS=${LDFLAGS}
+ unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
+
+ use static && HOST_LDFLAGS+=" -static"
+
+ tc-ld-disable-gold #439082 #466536 #526348
+ export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
+ unset LDFLAGS
+
+ tc-export CC NM OBJCOPY RANLIB STRIP
+ tc-export BUILD_CC # Bug 485592
+
+ MULTIBUILD_VARIANTS=()
+ local p
+ for p in "${GRUB_ALL_PLATFORMS[@]}"; do
+ use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" )
+ done
+ [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed )
+ grub_do grub_configure
+}
+
+src_compile() {
+ # Sandbox bug 404013.
+ use libzfs && addpredict /etc/dfs:/dev/zfs
+
+ grub_do emake
+ use doc && grub_do_once emake -C docs html
+}
+
+src_test() {
+ # The qemu dependency is a bit complex.
+ # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
+ grub_do emake check
+}
+
+src_install() {
+ grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
+ use doc && grub_do_once emake -C docs install-html DESTDIR="${D}"
+
+ einstalldocs
+
+ if use multislot; then
+ mv "${ED%/}"/usr/share/info/grub{,2}.info || die
+ fi
+
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default-3 grub
+}
+
+pkg_postinst() {
+ elog "For information on how to configure GRUB2 please refer to the guide:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
+
+ if has_version 'sys-boot/grub:0'; then
+ elog "A migration guide for GRUB Legacy users is available:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may consider installing the following optional packages:"
+ optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
+ optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
+ optfeature "Enable RAID device detection" sys-fs/mdadm
+ fi
+}
diff --git a/sys-boot/grub/grub-2.02-r3.ebuild b/sys-boot/grub/grub-2.02-r3.ebuild
index 8067036a24cc..f40c9c795298 100644
--- a/sys-boot/grub/grub-2.02-r3.ebuild
+++ b/sys-boot/grub/grub-2.02-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -28,7 +28,7 @@ if [[ ${PV} != 9999 ]]; then
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
S=${WORKDIR}/${P%_*}
fi
- KEYWORDS="amd64 ~arm ~arm64 ppc ppc64 x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ppc ppc64 ~x86"
else
inherit git-r3
EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 1a0431125250..662c83807eeb 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=6
if [[ ${PV} == 9999 ]]; then
+ GRUB_AUTOGEN=1
GRUB_AUTORECONF=1
- GRUB_BOOTSTRAP=1
fi
-if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
+if [[ -n ${GRUB_AUTOGEN} ]]; then
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5,3_6} )
inherit python-any-r1
fi
@@ -42,7 +42,7 @@ PATCHES=(
)
DEJAVU=dejavu-sans-ttf-2.37
-UNIFONT=unifont-12.0.01
+UNIFONT=unifont-9.0.06
SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
@@ -52,7 +52,7 @@ HOMEPAGE="https://www.gnu.org/software/grub/"
# Includes licenses for dejavu and unifont
LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )"
SLOT="2/${PVR}"
-IUSE="debug device-mapper doc efiemu +fonts mount nls static sdl test +themes truetype libzfs"
+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 xen-32 )
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
@@ -64,7 +64,22 @@ REQUIRED_USE="
grub_platforms_loongson? ( fonts )
"
-BDEPEND="
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+COMMON_DEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5:0=
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse:0 )
+ truetype? ( media-libs/freetype:2= )
+ ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
+ ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
+"
+DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
app-misc/pax-utils
sys-devel/flex
@@ -75,6 +90,17 @@ BDEPEND="
media-libs/freetype:2
virtual/pkgconfig
)
+ grub_platforms_xen? ( app-emulation/xen-tools:= )
+ grub_platforms_xen-32? ( app-emulation/xen-tools:= )
+ static? (
+ app-arch/xz-utils[static-libs(+)]
+ truetype? (
+ app-arch/bzip2[static-libs(+)]
+ media-libs/freetype[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ virtual/pkgconfig
+ )
+ )
test? (
app-admin/genromfs
app-arch/cpio
@@ -92,38 +118,12 @@ BDEPEND="
)
truetype? ( virtual/pkgconfig )
"
-COMMON_DEPEND="
- app-arch/xz-utils
- >=sys-libs/ncurses-5.2-r5:0=
- debug? (
- sdl? ( media-libs/libsdl )
- )
- device-mapper? ( >=sys-fs/lvm2-2.02.45 )
- libzfs? ( sys-fs/zfs )
- mount? ( sys-fs/fuse:0 )
- truetype? ( media-libs/freetype:2= )
- ppc? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
- ppc64? ( >=sys-apps/ibm-powerpc-utils-1.3.5 )
- grub_platforms_xen? ( app-emulation/xen-tools:= )
- grub_platforms_xen-32? ( app-emulation/xen-tools:= )
-"
-DEPEND="${COMMON_DEPEND}
- static? (
- app-arch/xz-utils[static-libs(+)]
- truetype? (
- app-arch/bzip2[static-libs(+)]
- media-libs/freetype[static-libs(+)]
- sys-libs/zlib[static-libs(+)]
- virtual/pkgconfig
- )
- )
-"
RDEPEND="${COMMON_DEPEND}
kernel_linux? (
grub_platforms_efi-32? ( sys-boot/efibootmgr )
grub_platforms_efi-64? ( sys-boot/efibootmgr )
)
- !sys-boot/grub:0 !sys-boot/grub-static
+ !multislot? ( !sys-boot/grub:0 !sys-boot/grub-static )
nls? ( sys-devel/gettext )
"
@@ -136,12 +136,6 @@ QA_MULTILIB_PATHS="usr/lib/grub/.*"
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
- pushd "${P}" >/dev/null || die
- local GNULIB_URI="https://git.savannah.gnu.org/git/gnulib.git"
- local GNULIB_REVISION=$(source bootstrap.conf >/dev/null; echo "${GNULIB_REVISION}")
- git-r3_fetch "${GNULIB_URI}" "${GNULIB_REVISION}"
- git-r3_checkout "${GNULIB_URI}" gnulib
- popd >/dev/null || die
fi
default
}
@@ -151,6 +145,11 @@ src_prepare() {
sed -i -e /autoreconf/d autogen.sh || die
+ if use multislot; then
+ # fix texinfo file name, bug 416035
+ sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
+ fi
+
# Nothing in Gentoo packages 'american-english' in the exact path
# wanted for the test, but all that is needed is a compressible text
# file, and we do have 'words' from miscfiles in the same path.
@@ -159,18 +158,13 @@ src_prepare() {
tests/util/grub-fs-tester.in \
|| die
- if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
+ if [[ -n ${GRUB_AUTOGEN} ]]; then
python_setup
- fi
-
- if [[ -n ${GRUB_BOOTSTRAP} ]]; then
- eautopoint --force
- AUTOPOINT=: AUTORECONF=: ./bootstrap || die
- elif [[ -n ${GRUB_AUTOGEN} ]]; then
- ./autogen.sh || die
+ bash autogen.sh || die
fi
if [[ -n ${GRUB_AUTORECONF} ]]; then
+ autopoint() { :; }
eautoreconf
fi
}
@@ -225,12 +219,14 @@ grub_configure() {
$(usex efiemu '' '--disable-efiemu')
)
- if use fonts; then
- ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ if use multislot; then
+ myeconfargs+=( --program-transform-name="s,grub,grub2," )
fi
+ # Set up font symlinks
+ ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
if use themes; then
- ln -rs "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
+ ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
fi
local ECONF_SOURCE="${S}"
@@ -286,6 +282,10 @@ src_install() {
einstalldocs
+ if use multislot; then
+ mv "${ED%/}"/usr/share/info/grub{,2}.info || die
+ fi
+
insinto /etc/default
newins "${FILESDIR}"/grub.default-3 grub
}