summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
commit51af5f0eb4cddbe6aa7953717873691d77aae9ff (patch)
tree1541525274162b033ebbc3ed38abaf335fbbd49a /sys-boot
parent7014a5a3ea0feffab9701fdd6b64cc7667a985af (diff)
gentoo resync : 11.07.2019
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/Manifest.gzbin7227 -> 7228 bytes
-rw-r--r--sys-boot/gnu-efi/Manifest2
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.9.ebuild85
-rw-r--r--sys-boot/grub/Manifest5
-rw-r--r--sys-boot/grub/grub-2.04.ebuild297
-rw-r--r--sys-boot/grub/grub-9999.ebuild31
-rw-r--r--sys-boot/raspberrypi-firmware/Manifest2
-rw-r--r--sys-boot/raspberrypi-firmware/metadata.xml8
-rw-r--r--sys-boot/refind/Manifest3
-rw-r--r--sys-boot/refind/files/makefile.patch27
-rw-r--r--sys-boot/refind/refind-0.11.4.ebuild168
-rw-r--r--sys-boot/systemrescuecd-x86-grub/Manifest3
-rw-r--r--sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default-233
-rwxr-xr-xsys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub-2146
-rw-r--r--sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.2.ebuild31
-rw-r--r--sys-boot/udk/Manifest2
-rw-r--r--sys-boot/udk/files/udk-workspace.template63
-rw-r--r--sys-boot/udk/udk-2018-r1.ebuild146
18 files changed, 1022 insertions, 30 deletions
diff --git a/sys-boot/Manifest.gz b/sys-boot/Manifest.gz
index be1dc69c82ed..d795e817a20a 100644
--- a/sys-boot/Manifest.gz
+++ b/sys-boot/Manifest.gz
Binary files differ
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index 3bccb8a22934..f27690ff14cb 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -4,9 +4,11 @@ DIST gnu-efi-3.0.2.tar.bz2 136134 BLAKE2B ccdbd1f14c938a89fcf6d43f139ce644b562fd
DIST gnu-efi-3.0.3.tar.bz2 142229 BLAKE2B 5230e99358fc2c1a85fd56840a9ddbd4d1cb42d15a8c37dd44e87037e45a1033f1014c953b5a4d2bb565c4be5aa67a3982ca64e575aaae9c1ae64ce27659b642 SHA512 0b0582e22344ea8a544aba540b56dc36364febfeb5bb655e87277e638fd4e549214a0cd2079a852d15ee376cd51c33794f65a7efb23be9a7a929e889cd616c8c
DIST gnu-efi-3.0.6.tar.bz2 152088 BLAKE2B 2cb1d72f6972a86e913fba28a86e95a1b0baf15251d8fa3d4c335a13e5fd929b61f8f421330acbddbc640efd63594713180b7fc3e623fda2397947538a25b795 SHA512 f1b17766d8ae000c0177ea2126d87883f254ab01ac020e4bfaa9ad2d3d60a66d07b6237d9842e5989c4da3fd23152b5c592ef863fdc9806901f43c43582a2258
DIST gnu-efi-3.0.8.tar.bz2 154397 BLAKE2B 19bed63132f9f9f5f75df9aaaf5f4b7161f024a7a0da83b7488ab26d075ada680844ddc915febaa19fd82fffdf9c0eafc0787a7e9298b097a973421a0a57b39a SHA512 57318fdf1fe4a2ae310c5e41b2bc466f0eebe21f12db1a87bf0a4ec636fcb353324444220597ee47f7404e446ac944634ca9d3d1aa8920b77434e9a7955938e6
+DIST gnu-efi-3.0.9.tar.bz2 154445 BLAKE2B 099af13ff8944d6d362fd4f1dfaf7eff477e7105298651295a63493eb54799459649a977b3b0600e9884b48f8119ecf1faa38d35e0b01086076de40beefbcbcc SHA512 1a775476fcbe354e57c9db258b1c6ad4346b84d1794178ab5d5195b3ffba250066ca4c42a553d5b2866fa1b4e03019d61df0197f269188c73297042990adf316
EBUILD gnu-efi-3.0.2.ebuild 1206 BLAKE2B 90f30e8c0f759f8c16b9de7aade85fa2aa013a8a248d98e29df54139c3411cc332a3538734101f349ed31055491709db23f168e0cf2472af6bfa55dbd5d15895 SHA512 56d8c2c21694eeeb36d994c9bdc5a37e4342f44d0842adc748c86a00db25dc238314126b5ae6425de0bb251a21d1a753b89632df4c326365ca44e68f05f0fa70
EBUILD gnu-efi-3.0.3.ebuild 1732 BLAKE2B 9c453d8e28059d16832adaee14ba34baf6e1b6caaa54c279a91c48798ad00cc8da6ee4b6fb2aa02f06c0773d8c8ad17ed93e65168965e637d85a3f5251fbb31c SHA512 2b4cdc3cc522ed6d9c6a716756fec4009d52af85369c2be1c81cf6afd03dc78b7e836adb351427a0cd0656de8f5e19a287e093d985a68e15726721d58c2fb6ef
EBUILD gnu-efi-3.0.6-r1.ebuild 1952 BLAKE2B 4a3d25ffb976a44fcec62c4a3aa5e80930d3abd9e486f81e74be27fbc92ad77fe27f24af4851747a80bccf586aa4353b857dba765394b7c7ca53e061b499ed54 SHA512 6e85f076b29bb3ae7a528a3d0a406ea9c26d87a481bcf9285bab0db11ffa24922d04eaec23ddaaeec577492794e7b8c01a55a4aaa406996f309809540150140f
EBUILD gnu-efi-3.0.6-r2.ebuild 1959 BLAKE2B 74364ba53da292593203a47af9d4960046a9b79291979b1d92ebbfe83a695a0821ceec67dabb0a53a823a78a34e04bd0680c7e87e44c336891a1a29f808dd38a SHA512 fa013637c4c044381f98f655232860e6eb2e0000a620b8499484fe99a94751cdace1a33182e26f7784c16f365cf21f6ee74ab1dbce7a1cb06f1ca9b8612354bc
EBUILD gnu-efi-3.0.8.ebuild 1869 BLAKE2B d4b29aff719601e1b2135b12aac2e630a06b9d02ede87cbb84611c7708a7dced61092e52eea0197a9938bad8dcbbc8b053418dd928a3852a2115dbf93ee92ffd SHA512 e00b182cdf37f15a0a90062a99b750a06eae0999559bdedc63b5ac0ca4954211ebc760ece24596e52c533621d1d9502d3999db902653bbf134babfdc0ab7b571
+EBUILD gnu-efi-3.0.9.ebuild 1826 BLAKE2B 18f6f08ada5dcc3d456af86a14feb343da66fd29edd8aa64024be7f74135ff9d3834276f00237e0d04a1c6cc00d718b6bc2a704d70dccfc782087ed0e7f08d95 SHA512 dded0d63819b84689c34472e3b9e11f2add2c5c20a72be27474893d6a68534db831a60d5d5ffe183a63c7d9846bc53fd1b892dec318dbeff7ca495224c4f2812
MISC metadata.xml 446 BLAKE2B ed77ce0b04fab42aad08921e9365b866a3d64d5192a569ad161e0415a2bbe1e9b374a48e1b2357331cf9743fc082a22c6b68081bddaa6b783e5cc78c4df394c2 SHA512 114721b7dc26234a2bce0ab65f2513f5bdd4749fd8fc5beb9619dc449bde13c82c88716d3e9b94a192d4298019255fff1aa32beaa15b643490fdbc25e75d83f8
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.9.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.9.ebuild
new file mode 100644
index 000000000000..fa23e18d91de
--- /dev/null
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.9.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2004-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Library for build EFI Applications"
+HOMEPAGE="http://gnu-efi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnu-efi/${P}.tar.bz2"
+
+# inc/, lib/ dirs (README.efilib)
+# - BSD-2
+# gnuefi dir:
+# - BSD (3-cluase): crt0-efi-ia32.S
+# - GPL-2+ : setjmp_ia32.S
+LICENSE="GPL-2+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ia64 ~x86"
+IUSE="abi_x86_32 abi_x86_64 custom-cflags"
+
+# These objects get run early boot (i.e. not inside of Linux),
+# so doing these QA checks on them doesn't make sense.
+QA_EXECSTACK="usr/*/lib*efi.a:* usr/*/crt*.o"
+RESTRICT="strip"
+
+src_prepare() {
+ sed -i -e "s/-Werror//" Make.defaults || die
+ default
+}
+
+efimake() {
+ local arch=
+ case ${CHOST} in
+ arm*) arch=arm ;;
+ aarch64*) arch=aarch64 ;;
+ ia64*) arch=ia64 ;;
+ i?86*) arch=ia32 ;;
+ x86_64*) arch=x86_64 ;;
+ *) die "Unknown CHOST" ;;
+ esac
+
+ local args=(
+ ARCH="${arch}"
+ HOSTCC="${BUILD_CC}"
+ CC="${CC}"
+ AS="${AS}"
+ LD="${LD}"
+ AR="${AR}"
+ PREFIX="${EPREFIX}/usr"
+ LIBDIR='$(PREFIX)'/$(get_libdir)
+ )
+ emake -j1 "${args[@]}" "$@"
+}
+
+src_compile() {
+ tc-export BUILD_CC AR AS CC LD
+
+ if use custom-cflags; then
+ # https://bugs.gentoo.org/607992
+ filter-mfpmath sse
+
+ # https://bugs.gentoo.org/619628
+ append-flags $(test-flags-CC -mno-avx)
+ else
+ unset CFLAGS CPPFLAGS LDFLAGS
+ fi
+
+ if [[ ${CHOST} == x86_64* ]]; then
+ use abi_x86_32 && CHOST=i686 ABI=x86 efimake
+ use abi_x86_64 && efimake
+ else
+ efimake
+ fi
+}
+
+src_install() {
+ if [[ ${CHOST} == x86_64* ]]; then
+ use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install
+ use abi_x86_64 && efimake INSTALLROOT="${D}" install
+ else
+ efimake INSTALLROOT="${D}" install
+ fi
+ einstalldocs
+}
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index be4fc3c8a2b5..68fe0f5c76bc 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -10,10 +10,13 @@ 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 grub-2.04.tar.xz 6393864 BLAKE2B 413ffb9aaeae1ee3128032914ca426a1a5adb3737895dfe563fdde5a7e0386ac2dbc2f7ddfc4e0a67b3ad90494985d6886c20054b038701feb743e67e2eed9d0 SHA512 9c15c42d0cf5d61446b752194e3b628bb04be0fe6ea0240ab62b3d753784712744846e1f7c3651d8e0968d22012e6d713c38c44936d4004ded3ca4d4007babbb
DIST grub-2.04~rc1.tar.xz 6422420 BLAKE2B cf189fea32badba00051734d4e67954009bae016a6b8a366ce41a2ac8ddf8792e2b63262c0a80f1fa5771394ebc76b090f50eac1ccd9f81d594feb8cc15ab400 SHA512 c0bee6a7aced0408d7477fdb8b6fdd3ec48f80f0ecc4e7602d76f9a37081fe08e405faa030b4e4f181f45793641b13f398fe0bed121058ad8729f9a8908703d3
DIST unifont-12.0.01.pcf.gz 1360857 BLAKE2B ab87e58aee2295e52dc49b7bb131793ad775abbf49f4b64758045a9b5158e75afd01a8425b56e6f6d0ba288a733bf426df363c1ecc78daddec516c33d461bc3b SHA512 9d34a005dd10f212e43075beb71eb39b9cc3403ae1cddec7d79af91b3a3a1beb4a3696075cc94563c8402efe2ad05de552ace77a24da09f1c0b7f95e99b056a3
+DIST unifont-12.1.02.pcf.gz 1335424 BLAKE2B 97080312468e3f3c8aa6f49cef08f5622641e8c9c035f3ede1e09d8d98de4e78d3b23c8aba2e8070eb46cbebd2d55e8568e467d7f15f35aa8fc8db792b7e5f14 SHA512 b280b2db7cf5f480b0668c331130dede2c0cc87d5e02e44566b77787113d0f6604d0105522858288f2ac6b8e77df7a2d9878725013a6c778dc5bfb183156e2f0
DIST unifont-9.0.06.pcf.gz 1360354 BLAKE2B 09b96e1711c729ef159d62e3ea7b289ca2d01dc0ea417e35a18b73dc02a23f62ce7821d9761bceee4002d9eeaabd91cfb69bbacc6fbdfdfa00445d18fe8f1d66 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774
EBUILD grub-2.02-r4.ebuild 7961 BLAKE2B 9484b4fe31527dd587d0c754e21030d7f6e6d1d712502081045e0b9c0c33df2b99540a568f0df785239636c3a1e0acfbece0212f15ac84ae6780e9ca8b31a278 SHA512 4354a12788262ec4f3daba4932b3306a5a9eac1f8f1b7209f91d65abb591bad71680d166e3b3ea81aff95561500bdb02c1a742291f7efe9b63958fc8ff6111fc
+EBUILD grub-2.04.ebuild 7503 BLAKE2B d6ff3d9ab69d7085fd206d202d1dcabf4d4a97d887384a52128bbe66fae127270833b1c82e8b208ae364e19c847735d5198e464e5930d4c175be920970444fc1 SHA512 9fb7068fe9e83e71aa3adf69233bdf23fa3a7eacb779db47f5358d8b43ae93d2f5f5eb31663e97dc16d23e6f754fc62880b3a5b31a02f384c75fdf26c7c079ff
EBUILD grub-2.04_rc1.ebuild 7700 BLAKE2B f599f7d2f7c428ce6f36434a11506b3c34655d2a90ff654b65b5cd595a063ec9ebfcac96434347803721e03219780bb4986289014f08f48364f376528c4a6cb9 SHA512 6626e04c7c95227448c91145e3dc42bfd9c3c587094b8ff923824aa4a456833842be1c29df8bddb1d76d962ccdff323c6ea2fe0419b8999e73a07097a63ca158
-EBUILD grub-9999.ebuild 7700 BLAKE2B f599f7d2f7c428ce6f36434a11506b3c34655d2a90ff654b65b5cd595a063ec9ebfcac96434347803721e03219780bb4986289014f08f48364f376528c4a6cb9 SHA512 6626e04c7c95227448c91145e3dc42bfd9c3c587094b8ff923824aa4a456833842be1c29df8bddb1d76d962ccdff323c6ea2fe0419b8999e73a07097a63ca158
+EBUILD grub-9999.ebuild 7503 BLAKE2B d6ff3d9ab69d7085fd206d202d1dcabf4d4a97d887384a52128bbe66fae127270833b1c82e8b208ae364e19c847735d5198e464e5930d4c175be920970444fc1 SHA512 9fb7068fe9e83e71aa3adf69233bdf23fa3a7eacb779db47f5358d8b43ae93d2f5f5eb31663e97dc16d23e6f754fc62880b3a5b31a02f384c75fdf26c7c079ff
MISC metadata.xml 1149 BLAKE2B c0a364b1d8139f26f7dd09ba49dd68d591c7532e2eec25dae97caea49be8bfc92c8d5c69dcc77d89f58367fa04a73526cc55768f93222effc6c6e47a52b53500 SHA512 45d0425236957395e275bd340aeabfcd03451b037c616c54cf8babdc3bdee6aa3706fa7565f595ba4391773d331353b8920a627094c01289935a1a9aedc1f7bf
diff --git a/sys-boot/grub/grub-2.04.ebuild b/sys-boot/grub/grub-2.04.ebuild
new file mode 100644
index 000000000000..07f21fac6705
--- /dev/null
+++ b/sys-boot/grub/grub-2.04.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == 9999 ]]; then
+ GRUB_AUTORECONF=1
+ GRUB_BOOTSTRAP=1
+fi
+
+if [[ -n ${GRUB_AUTOGEN} || -n ${GRUB_BOOTSTRAP} ]]; then
+ PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+ 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 ~ppc ~ppc64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/grub.git"
+fi
+
+PATCHES=(
+ "${FILESDIR}"/gfxpayload.patch
+ "${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
+)
+
+DEJAVU=dejavu-sans-ttf-2.37
+UNIFONT=unifont-12.1.02
+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="device-mapper doc efiemu +fonts mount nls 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 )
+"
+
+BDEPEND="
+ ${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
+ )
+ 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 )
+"
+DEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5:0=
+ 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:= )
+"
+RDEPEND="${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
+ nls? ( sys-devel/gettext )
+"
+
+RESTRICT="!test? ( test )"
+
+QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*"
+QA_PRESTRIPPED="usr/lib/grub/.*"
+QA_MULTILIB_PATHS="usr/lib/grub/.*"
+QA_WX_LOAD="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
+}
+
+src_prepare() {
+ default
+
+ sed -i -e /autoreconf/d autogen.sh || die
+
+ # 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} || -n ${GRUB_BOOTSTRAP} ]]; then
+ python_setup
+ fi
+
+ if [[ -n ${GRUB_BOOTSTRAP} ]]; then
+ eautopoint --force
+ AUTOPOINT=: AUTORECONF=: ./bootstrap || die
+ elif [[ -n ${GRUB_AUTOGEN} ]]; then
+ ./autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
+ 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 device-mapper)
+ $(use_enable mount grub-mount)
+ $(use_enable nls)
+ $(use_enable themes grub-themes)
+ $(use_enable truetype grub-mkfont)
+ $(use_enable libzfs)
+ $(use_enable sdl grub-emu-sdl)
+ ${platform:+--with-platform=}${platform}
+
+ # Let configure detect this where supported
+ $(usex efiemu '' '--disable-efiemu')
+ )
+
+ if use fonts; then
+ ln -rs "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
+ fi
+
+ if use themes; then
+ ln -rs "${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
+
+ 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
+
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default-3 grub
+
+ # https://bugs.gentoo.org/231935
+ dostrip -x /usr/lib/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-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 5970936ad665..07f21fac6705 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -42,7 +42,7 @@ PATCHES=(
)
DEJAVU=dejavu-sans-ttf-2.37
-UNIFONT=unifont-12.0.01
+UNIFONT=unifont-12.1.02
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="device-mapper doc efiemu +fonts mount nls static sdl test +themes truetype libzfs"
+IUSE="device-mapper doc efiemu +fonts mount nls 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_}"
@@ -92,7 +92,7 @@ BDEPEND="
)
truetype? ( virtual/pkgconfig )
"
-COMMON_DEPEND="
+DEPEND="
app-arch/xz-utils
>=sys-libs/ncurses-5.2-r5:0=
sdl? ( media-libs/libsdl )
@@ -105,18 +105,7 @@ COMMON_DEPEND="
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}
+RDEPEND="${DEPEND}
kernel_linux? (
grub_platforms_efi-32? ( sys-boot/efibootmgr )
grub_platforms_efi-64? ( sys-boot/efibootmgr )
@@ -125,11 +114,12 @@ RDEPEND="${COMMON_DEPEND}
nls? ( sys-devel/gettext )
"
-RESTRICT="strip !test? ( test )"
+RESTRICT="!test? ( test )"
-QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*"
-QA_WX_LOAD="usr/lib/grub/*"
+QA_EXECSTACK="usr/bin/grub-emu* usr/lib/grub/*"
+QA_PRESTRIPPED="usr/lib/grub/.*"
QA_MULTILIB_PATHS="usr/lib/grub/.*"
+QA_WX_LOAD="usr/lib/grub/*"
src_unpack() {
if [[ ${PV} == 9999 ]]; then
@@ -245,8 +235,6 @@ src_configure() {
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
@@ -285,6 +273,9 @@ src_install() {
insinto /etc/default
newins "${FILESDIR}"/grub.default-3 grub
+
+ # https://bugs.gentoo.org/231935
+ dostrip -x /usr/lib/grub
}
pkg_postinst() {
diff --git a/sys-boot/raspberrypi-firmware/Manifest b/sys-boot/raspberrypi-firmware/Manifest
index 15a974819ce0..48b77969938d 100644
--- a/sys-boot/raspberrypi-firmware/Manifest
+++ b/sys-boot/raspberrypi-firmware/Manifest
@@ -4,4 +4,4 @@ AUX raspberrypi-firmware-0_p20130711-envd 53 BLAKE2B 52aa8814f82f9c8a5e2f4c3b2be
DIST raspberrypi-firmware-1.20190215.tar.gz 123074917 BLAKE2B cefedb5c979db7dfd47938aad37a567d91d3ad78247c7a63f789362768ab7a39a1967ac116b4b0475e3b210ab11f6474706df042af85a622e8e7905c85ec7498 SHA512 082f26caf427222d838881e5f1e9fa0136765b3eaf74a84877fc33616fd07e49085db0889226c40c655039a9d41a10566510c7d752cfc48a67b4683616a51193
EBUILD raspberrypi-firmware-1.20190215.ebuild 1634 BLAKE2B 2b9631bc1c22117fd1896a75938713e7b3c3fa796ff291fde38d71d44b40cfefcc32cab2d2158b0a09b2b72ec5c4dc1377ada8666cbda70e3889f6686c70dbec SHA512 122bf1379238e61b1b5fa1324ec3b2e37b14ccc571e6afbc053f44a5adc1466f3d0368467d105ed8ffc7c1c47077776f3513d92246fb182cf5d654a89e1997ce
EBUILD raspberrypi-firmware-9999.ebuild 1634 BLAKE2B 2b9631bc1c22117fd1896a75938713e7b3c3fa796ff291fde38d71d44b40cfefcc32cab2d2158b0a09b2b72ec5c4dc1377ada8666cbda70e3889f6686c70dbec SHA512 122bf1379238e61b1b5fa1324ec3b2e37b14ccc571e6afbc053f44a5adc1466f3d0368467d105ed8ffc7c1c47077776f3513d92246fb182cf5d654a89e1997ce
-MISC metadata.xml 566 BLAKE2B 34fdc67dfee82a26f5e945fe7f63c2d239cc643a1aa5e4c4892facdd993c461a7ddc74fb5057e9429ab1eff4a39176398817dddcf2efa2e235a268d335c7f3db SHA512 ac35994d0f0432c9a0ee2e171b19a1e8d8a0c1f2d597b2489c37179b07ea86a0e94ac5d83e43348e65a01b64fade71022cf6e2ec83a779eb6b816b3907370daa
+MISC metadata.xml 336 BLAKE2B e941866d513604cc393b15c6fb93d6cd1c27dddabc86b149aa6e4dab729f7577288aa729e1681c76f8a5136ff11fec58eb3805ac8fc2a1453834c2d8275a208d SHA512 a1c2a9c4853e8b99b921dd4f87548efebdecac6ad42619e2fa85306205c6e2d4b98e4d91a921dc475507d171bd8503d47f119944ac8750af363137c5ca11e4ee
diff --git a/sys-boot/raspberrypi-firmware/metadata.xml b/sys-boot/raspberrypi-firmware/metadata.xml
index ce5947791ef2..faba5c3daf1e 100644
--- a/sys-boot/raspberrypi-firmware/metadata.xml
+++ b/sys-boot/raspberrypi-firmware/metadata.xml
@@ -2,14 +2,6 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>ck+gentoo@bl4ckb0x.de</email>
- <name>Conrad Kostecki</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
- <maintainer type="person">
<email>andrey_utkin@gentoo.org</email>
<name>Andrey Utkin</name>
</maintainer>
diff --git a/sys-boot/refind/Manifest b/sys-boot/refind/Manifest
index 5f1cce96be54..601f371cefaf 100644
--- a/sys-boot/refind/Manifest
+++ b/sys-boot/refind/Manifest
@@ -1,7 +1,10 @@
+AUX makefile.patch 856 BLAKE2B d4de5c95330577bf2a25b8c50aa3193c3b57ce740abe12bc3996af18eda54c1514e2129a1e28f0bca7384b1f4b78e19e8b35e07e816a23cc04a93ba2804214d0 SHA512 51c0552984791190fc44159de1797094dffc01cf6ef90a3219b069ae2417c0ff5020a19b34d26b0c3f7d1a1bc9184078948f669a4186893561833ff88afdb316
DIST refind-src-0.10.4.tar.gz 3970380 BLAKE2B 0d14c005d3e93a1f0008b6c65e34eb6391c4a4a488b4fa7842c8f0b68eb2cc5be150c8718f01a65454db7b86ffa5873a3d1a96429eaed0cb92c1d29c8d2f7dcd SHA512 a75a6210ee51427c474e69c2de8c719545b2599c19f1c7541048b77ab1996a0e4b4b5fd4840f6240cd6704e5f5338cbaff432d7dc5ec4042854e26d6df18bed5
DIST refind-src-0.11.2.tar.gz 4533034 BLAKE2B fa05781fc1d87d314677f8e670bd7282b591fd3b6f4a5863e81cb962fdb773c774faabb6c45544b0659c8d5c4ef7ce1dba8d798a4caa97364ad7aa2532a42050 SHA512 796d86f05152d93340773c2dfbae0ca50ab036373ebed60fcc80404ee269ef4bc100df4b141d555d3363b820c3e9234fc0cf637791061281c86329958dca3479
DIST refind-src-0.11.3.tar.gz 3792206 BLAKE2B 369b25dbc97d83f9143ccbe19e89b5975f0796f1e4a2decfc124e4b45c5ef1db8f3e2bb83413f596ca28e82e67b0b9c5682b557a5422e3146780cec151d2a36e SHA512 96907b79e1c9c8199c62058bb6851fa5d6f158802f3777ba19a62c6c0d7d5b49132754bcafa925510fd21c8bafe8ce393117070a628baf4c277fa5f8f536b797
+DIST refind-src-0.11.4.tar.gz 3812192 BLAKE2B 7219eeffffb63961a7ba8f7617546a12021cfe80df80a83c4dbd47cd40b0d8afbdc510abb44de3029ff15ed49372bd59e0b156f4c27eab3ef7bd6ccc3c7e02db SHA512 529962ae432edaf1895ba98deb00a23c66bd742578e1a367f70f7ed22dd7be7daf1960df8af410fba79ca775169120499a4c10119331b2b12b55a002d4354de1
EBUILD refind-0.10.4-r2.ebuild 6185 BLAKE2B 077c7e57eeed02eba132dbae17c7045acfedb62ec282e8af15c28f39bab1668a952656807a8e476230b8a6735d71c930937d4386030cd3fda5e4cd9dbf4c9f94 SHA512 bacd7b2acd10ff4ac50074626364d1a97e53a82fd545669acbb9efd7b2f1da0edb86d41138155340cc0e07f756484a88f57ef7165ab88755526c57629f889138
EBUILD refind-0.11.2.ebuild 6279 BLAKE2B 209d4d8eda0b18cf10350d2a1ef8cbda5bfa6e3e2e46534e8fcadcc370917202d38b7f7dd344315e8986cf811f5452e72dd0a11d6237eaaa5b531f3e7f5b9624 SHA512 47f9bc81cc441e94615baa06e0e6c797e5f4e7be156b51ffea20d20409dcc5e94053c48ddae1c42bb959e538e29f2bd4a0e0083ae0be584320aa3cb0ae0b5e56
EBUILD refind-0.11.3.ebuild 6277 BLAKE2B 6253ff1ac6397d2801ea1f5651c8267a391cf40fae9a651e6c4f2a6ec70d91881aaf6aea860a574b0558c1391006d3d021b55ad2cfbc0e8acdaef55b63437161 SHA512 cdf653debe9420a16a295769982931a2d913dab6dbcbd629835134273cdb29bf362c413d07e774423b8bcaffea060ae17a8ec91d0a300a14332910f7607c4284
+EBUILD refind-0.11.4.ebuild 4748 BLAKE2B ce0394ae7a3420ffa843c8952cc8419f19324c694154d1965a155a78fa3640096755731d63092277f1522cd34570681cebe3f4dea0ec5cbc605f7cef6196d5d5 SHA512 744a594cfcce1d219aa2baff784b3db4d288204a07086ce265ff577fea9102d6dfcae7168aa18430d83e1c94052e27b9bb9f40049d09cd92ad7e8ba61d351bb1
MISC metadata.xml 3821 BLAKE2B dd2985fd4728180562a6c11969c27e1d1af70e80e3c68aa4fe7ce7665b752c6aa4adb6fce27487dd97563821b13f2e97e746b6b6e0c346a212380b9c1b231de4 SHA512 e0a5ebc2757e7584afb0628b5f451458974f8ffc1c94774b0ba0eda67ba582fabe08cf8d17fce2df934bba5bded40605f665da0a236d08a53f19b422afae9336
diff --git a/sys-boot/refind/files/makefile.patch b/sys-boot/refind/files/makefile.patch
new file mode 100644
index 000000000000..5db6f75b1919
--- /dev/null
+++ b/sys-boot/refind/files/makefile.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -161,8 +161,9 @@ fs_edk2: build_edk2
+ done
+
+ build_edk2: $(EDK2BASE)/RefindPkg
+- cd $(EDK2BASE) && \
+- . ./edksetup.sh BaseTools && \
++ +cd $(EDK2BASE) && \
++ . udk-workspace && \
++ build -a $(UC_ARCH) -p MdePkg/MdePkg.dsc && \
+ build -a $(UC_ARCH) -p RefindPkg/RefindPkg.dsc
+ mkdir -p ./drivers_$(FILENAME_CODE)
+
+diff --git a/filesystems/Makefile b/filesystems/Makefile
+index 99452ed..9bc984d 100644
+--- a/filesystems/Makefile
++++ b/filesystems/Makefile
+@@ -5,6 +5,7 @@
+ # name of the driver to be built. This is done because of a dependency
+ # in the fsw_efi.c file on the filesystem type; this file must be
+ # recompiled for each new filesystem built.
++.NOTPARALLEL:
+
+ # This program is licensed under the terms of the GNU GPL, version 3,
+ # or (at your option) any later version.
diff --git a/sys-boot/refind/refind-0.11.4.ebuild b/sys-boot/refind/refind-0.11.4.ebuild
new file mode 100644
index 000000000000..a45929a31c9c
--- /dev/null
+++ b/sys-boot/refind/refind-0.11.4.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multiprocessing toolchain-funcs
+
+DESCRIPTION="The UEFI Boot Manager by Rod Smith"
+HOMEPAGE="https://www.rodsbooks.com/refind/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${PN}-src-${PV}.tar.gz"
+
+LICENSE="BSD GPL-2 GPL-3 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+FS_USE="btrfs +ext2 +ext4 hfs +iso9660 ntfs reiserfs"
+IUSE="${FS_USE} custom-cflags doc gnuefi"
+
+DEPEND="gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+ !gnuefi? ( >=sys-boot/udk-2018-r1 )"
+
+DOCS=(README.txt)
+PATCHES=("${FILESDIR}/makefile.patch")
+UDK_WORKSPACE="${T}/udk"
+
+pkg_pretend() {
+ if use custom-cflags; then
+ ewarn
+ ewarn "You have enabled building with USE=custom-cflags. Be aware that"
+ ewarn "using this can result in EFI binaries that fail to run and may"
+ ewarn "fail to build at all. This is strongly advised against by upstream."
+ ewarn
+ ewarn "See https://bugs.gentoo.org/598587#c3 for more information"
+ ewarn
+ fi
+}
+
+pkg_setup() {
+ if use x86; then
+ export EFIARCH=ia32
+ export BUILDARCH=ia32
+ elif use amd64; then
+ export EFIARCH=x64
+ export BUILDARCH=x86_64
+ fi
+}
+
+src_prepare() {
+ default
+
+ # bug 598647 - PIE not supported
+ sed -e '/^CFLAGS/s:$: -fno-PIE:' -i Make.common || die
+
+ # Prepare UDK workspace
+ if ! use gnuefi; then
+ mkdir "${UDK_WORKSPACE}" || die
+ ln -s "${EPREFIX}/usr/lib/udk/"{Mde,IntelFramework}{,Module}Pkg \
+ "${UDK_WORKSPACE}" || die "Could not link UDK files"
+ fi
+}
+
+src_configure() {
+ if ! use gnuefi; then
+ # Use the side effect of the script which will create configuration files
+ (. udk-workspace "${UDK_WORKSPACE}" || die)
+ sed -e "s:^#\?\s*\(MAX_CONCURRENT_THREAD_NUMBER\s*=\).*$:\1 $(makeopts_jobs):" \
+ -i "${UDK_WORKSPACE}/Conf/target.txt" || die "Failed to configure target file"
+ sed -e "s:\(_\(CC\|ASM\|PP\|VFRPP\|ASLCC\|ASLPP\|DLINK\)_PATH\s*=\).*$:\1 $(tc-getCC):" \
+ -e "s:\(_ASLDLINK_PATH\s*=\).*$:\1 $(tc-getLD):" \
+ -e "s:\(_OBJCOPY_PATH\s*=\).*$:\1 $(tc-getOBJCOPY):" \
+ -e "s:\(_RC_PATH\s*=\).*$:\1 $(tc-getOBJCOPY):" \
+ -e "s:\(_SLINK_PATH\s*=\).*$:\1 $(tc-getAR):" \
+ -e "s:-Werror::" \
+ -i "${UDK_WORKSPACE}/Conf/tools_def.txt" \
+ || die "Failed to prepare tools definition file"
+ fi
+}
+
+src_compile() {
+ # Update fs targets depending on uses
+ local fs fs_names=()
+ for fs in ${FS_USE}; do
+ fs=${fs#+}
+ if use "${fs}"; then
+ fs_names+=(${fs})
+ fi
+ done
+ use gnuefi && fs_names=("${fs_names[@]/%/_gnuefi}")
+
+ # Prepare flags
+ local make_flags=(
+ ARCH="${BUILDARCH}"
+ CC="$(tc-getCC)"
+ AS="$(tc-getAS)"
+ LD="$(tc-getLD)"
+ AR="$(tc-getAR)"
+ RANLIB="$(tc-getRANLIB)"
+ OBJCOPY="$(tc-getOBJCOPY)"
+ GNUEFILIB="/usr/$(get_libdir)"
+ EFILIB="/usr/$(get_libdir)"
+ EFICRT0="/usr/$(get_libdir)"
+ EDK2BASE="${UDK_WORKSPACE}"
+ EDK2_DRIVER_BASENAMES="${fs_names[@]}"
+ FILESYSTEMS="${fs_names[@]}"
+ FILESYSTEMS_GNUEFI="${fs_names[@]}"
+ )
+ if use custom-cflags; then
+ make_flags=(CFLAGS="${CFLAGS}" "${make_flags[@]}")
+ fi
+
+ emake "${make_flags[@]}" all_$(usex gnuefi gnuefi edk2)
+}
+
+src_install() {
+ exeinto "/usr/lib/${PN}"
+ doexe refind-install
+ dosym "../lib/${PN}/refind-install" "/usr/sbin/refind-install"
+
+ if use doc; then
+ doman "docs/man/"*
+ DOCS+=(NEWS.txt docs/refind docs/Styles)
+ fi
+ einstalldocs
+
+ insinto "/usr/lib/${PN}/refind"
+ doins "refind/refind_${EFIARCH}.efi"
+ doins "refind.conf-sample"
+ doins -r images icons fonts banners
+
+ if [[ -d "drivers_${EFIARCH}" ]]; then
+ doins -r "drivers_${EFIARCH}"
+ fi
+
+ insinto "/usr/lib/${PN}/refind/tools_${EFIARCH}"
+ doins "gptsync/gptsync_${EFIARCH}.efi"
+
+ insinto "/etc/refind.d"
+ doins -r "keys"
+
+ dosbin "mkrlconf"
+ dosbin "mvrefind"
+ dosbin "refind-mkdefault"
+}
+
+pkg_postinst() {
+ elog "rEFInd has been built and installed into ${EROOT}/usr/lib/${PN}"
+ elog "You will need to use the command 'refind-install' to install"
+ elog "the binaries into your EFI System Partition"
+ elog ""
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "refind-install requires additional packages to be fully functional:"
+ elog " app-crypt/sbsigntools for binary signing for use with SecureBoot"
+ elog " sys-boot/efibootmgr for writing to NVRAM"
+ elog " sys-block/parted for automatic ESP location and mount"
+ elog ""
+ elog "refind-mkdefault requires >=dev-lang/python-3"
+ elog ""
+ elog "A sample configuration can be found at"
+ elog "${EROOT}/usr/lib/${PN}/refind/refind.conf-sample"
+ else
+ if ver_test "${REPLACING_VERSIONS}" -lt "0.10.3"; then
+ elog "The new refind-mkdefault script requires >=dev-lang/python-3"
+ elog "to be installed"
+ elog ""
+ fi
+ ewarn "Note that this installation will not update any EFI binaries"
+ ewarn "on your EFI System Partition - this needs to be done manually"
+ fi
+}
diff --git a/sys-boot/systemrescuecd-x86-grub/Manifest b/sys-boot/systemrescuecd-x86-grub/Manifest
index 1bda1f14830e..18ba13ebaf1f 100644
--- a/sys-boot/systemrescuecd-x86-grub/Manifest
+++ b/sys-boot/systemrescuecd-x86-grub/Manifest
@@ -1,4 +1,7 @@
AUX systemrescuecd.default 845 BLAKE2B 85c0685cc80caa52874ebe61476beea84f06a83d5410db2b05f61dc30adc4a18a26790120a135988d6ff613672eff5e4ece89b20fc7185144317d8be325a5853 SHA512 81aebf9999cfe82696fc72f520fc88355fc8d3077a1c76858175f3367d33119db96c6cb639935b01d32ab1f1d0aaa1c41b7ea3b12e1c732e474de519cb50b2d6
+AUX systemrescuecd.default-2 1179 BLAKE2B 72d44c21da40190a6d199dd115dcc7eae89d991ca0ba0f088c8bd722ac25ad202cd8e47525fd7c47cda905b132d2803df821c5b7dc036eb338b0271ac815e782 SHA512 da7c5347a5c588184d6877f3625d8d3247a6706afd13451fb125294beb82a2249be6e6380f9c5fa6e677d7b2c672a4162275411296db34a263ed985b8f149fa8
AUX systemrescuecd.grub 1910 BLAKE2B 46a3bf8c61e47e1f6eb3223ae44a2ac2e668603cb3ab1ab1fef7ee8626b365b8ac4a5f03f37b871f4b45952c33f7c940c1d20a317b759a1a90950a77eb54e21d SHA512 955a0fb35a034e60f005cbff27fc95e77622a0481d8111b3ee9981dbf0df4a6aa01f0e65307f98acee754dfe050b5e2cf2529b74a6f22f16e4f9164de359a915
+AUX systemrescuecd.grub-2 4562 BLAKE2B ab3122022c8cdb12839b8001e50ab118743f35a37f5a6a6f4e8c863ecc54fb0198938f3acebfed73b944dc0d99a8d978412013615999dd23af99c31d0960e563 SHA512 50869b8ffb58085fac7450a9c730d36c517711a47e9a2d16c6092bd43e5eb791b06663a22b1d0e13edb9aef65fa37f0901477e444d8749a902ebd107ea87dd2a
EBUILD systemrescuecd-x86-grub-0.1-r1.ebuild 751 BLAKE2B e6d0ec0b5efc360a33a1ae9a89d4636d6d180a62deee0473ac45095f21cf9df9071c11b43dcb3e8efd895c0ea358d857438e25da04abb0fede9c774bd13ed43f SHA512 bd7e7b3aba56c64d3d624f6b1f1108452f79836a3fdcee6b782272647025108218b71fc6c980c1482613cb23234107b2674bc73d57272e200ac4b161d7091911
+EBUILD systemrescuecd-x86-grub-0.2.ebuild 754 BLAKE2B bcf0631c14f71fd8394247c760efe600533adc96dd35419682eb5c2a00dc58d2127b739e5e719fd99cc18cb5f3b87444295e67738106f45ca1f72bc908b95622 SHA512 04d222cbd7ff19d5f79bcda4fcbeea67dcff113aa4f8bd349d57039f57fd541dc4508fd0abd52fa3f4dc53b2905a43c889122a428df33ef31702955fa9e79000
MISC metadata.xml 610 BLAKE2B 2551878a7515db26498bab29653547aeef039e47292780ad7725606a618ca71384195e5b1e70e65e17085bae3651ee2602aef1e1479f47495f7efb783ac73816 SHA512 84101ca441d24894df8063a2d82ecf7f516bb6c3255d6b147b1448e27874f2ff634c5822f925a6648010fa83c6e75d60159237a44b99cd5a031e19174a17295d
diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default-2 b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default-2
new file mode 100644
index 000000000000..941622bfc3ba
--- /dev/null
+++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default-2
@@ -0,0 +1,33 @@
+# Here you can set custom bootoptions for the SystemRescueCD
+#
+# For SystemRescueCD version 6.x:
+#
+# You can add in a space separated list:
+# setkmap=xx: set keyboard layout for terminal
+# copytoram: load the ISO fully in memory
+# requires 2GB of memory to cache the system
+#
+# For SystemRescueCD version 5.x:
+#
+# You can add for example in a space separated list:
+# setkmap=xx: which defines the keymap to load (example: setkmap=de)
+# dostartx: load the X.Org graphical environment and launch Xfce
+# docache: causes the iso file to be fully loaded into memory
+# this requires 400MB of memory to cache everything
+# doload=xxx: loads needed kernel modules (example: doload=3c59x,e1000)
+# noload=xxx: prevents loading kernel modules
+# nomodeset: do not load the Kernel-Mode-Setting video driver
+#
+# Example:
+# SRCD_BOOTOPTIONS="setkmap=de docache dostartx"
+#
+# For all available bootoptions see:
+# http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM
+#
+# Note:
+# After changing this, you must update your grub configuration file, to take effect
+
+SRCD_BOOTOPTIONS=""
+
+# Copy ISO to /boot if there is enough space
+#COPY_SRCD_TO_BOOT="yes"
diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub-2 b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub-2
new file mode 100755
index 000000000000..332a7c37fce0
--- /dev/null
+++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub-2
@@ -0,0 +1,146 @@
+#!/bin/sh
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+. /usr/share/grub/grub-mkconfig_lib
+
+if [ -r /etc/default/systemrescuecd ] ; then
+ . /etc/default/systemrescuecd
+fi
+
+COPY_SRCD_TO_BOOT=${COPY_SRCD_TO_BOOT:-no}
+
+bootdir="/boot"
+installdir="/usr/share/systemrescuecd"
+
+isorex='^(/.*/)?systemrescuecd-.*[.]iso$'
+
+# Path of the link to the newest ISO, created by ebuild
+srcd="${installdir}/systemrescuecd-x86-newest.iso"
+
+# Extract ISO version
+isovsed() {
+ sed -E 's|^.*systemrescuecd(-x86)?-||;s|.iso$||'
+}
+
+# Find ISOs in a given directory
+isofind() {
+ find "${1}" -maxdepth 1 -type f -regextype egrep -regex ${isorex}
+}
+
+# Copy ISO to boot partition
+copy_srcd_iso() {
+ if [ ! -f "${bootdir}/"$(basename "${1}") ]; then
+ if [ $(df -k --output=avail "${bootdir}" | tail -1) -gt $(du -k "${1}" | cut -f 1) ]; then
+ cp "${1}" "${bootdir}/"
+ else
+ # Before complaining, check if the installed ISO is actually newer
+ if $(printf '%s\n' $(isofind "${bootdir}" | isovsed | sort -V) $(echo "${1}" | isovsed) | sort -VC); then
+ gettext_printf "Error: Not enough free disk space on ${bootdir}!\n" >&2
+ gettext_printf "Error: Failed to copy the new iso!\n" >&2
+ fi
+ fi
+ fi
+}
+
+write_srcd() {
+ cat <<EOF
+ menuentry "${longname} [${1}] (Copy to RAM${bootops}" --class rescue {
+${grub_string}
+ set gfxpayload=keep
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_loop=\${isofile} img_dev=${diskuuid} copytoram ${SRCD_BOOTOPTIONS}
+ initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
+ }
+ menuentry "${longname} [${1}] (Copy to RAM with persistence${bootops}" --class rescue {
+${grub_string}
+ set gfxpayload=keep
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_loop=\${isofile} img_dev=${diskuuid} cow_device=${diskuuid} cow_directory=/persistent_sysresccd-${1}/x86_64 copytoram ${SRCD_BOOTOPTIONS}
+ initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
+ }
+ menuentry "${longname} [${1}] (Minimal${bootops}" --class rescue {
+${grub_string}
+ set gfxpayload=keep
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_loop=\${isofile} img_dev=${diskuuid} ${SRCD_BOOTOPTIONS}
+ initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
+ }
+EOF
+}
+
+write_srcd_5() {
+ cat <<EOF
+ menuentry "${longname} [${1}] (64bit${bootops}" --class rescue {
+${grub_string}
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/isolinux/rescue64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile}
+ initrd (loop)/isolinux/initram.igz
+ }
+ menuentry "${longname} [${1}] (32bit${bootops}" --class rescue {
+${grub_string}
+ set isofile=${path}
+ loopback loop \${isofile}
+ linux (loop)/isolinux/rescue32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile}
+ initrd (loop)/isolinux/initram.igz
+ }
+EOF
+}
+
+# Get v5 ISOs
+# Use: isogrep5 [-v]
+# -v invert match
+isogrep5() {
+ ls -rv "${isopref}"/systemrescuecd-*.iso | grep ${1} -e '-x86-5'
+}
+
+write_srcd_submenu() {
+ # Start submenu
+ echo "submenu \"${longname}\" --class submenu {"
+
+ # Make sure to reverse-sort by version
+ for iso in $(isogrep5 -v; isogrep5); do
+ path=$(make_system_path_relative_to_its_root "${iso}")
+ gettext_printf " image: ${iso}\n" >&2
+ if $(printf '%s\n' "6.0.0" $(echo ${iso} | isovsed) | sort -VC); then
+ write_srcd $(echo ${iso} | isovsed)
+ else
+ write_srcd_5 $(echo ${iso} | isovsed)
+ fi
+ done
+
+ # End submenu
+ echo "}"
+}
+
+bootops=")"
+
+if [ ! -z "${SRCD_BOOTOPTIONS}" ]; then
+ bootops=" with bootoptions)"
+fi
+
+if [ "${COPY_SRCD_TO_BOOT}" = yes ]; then
+ srcd=$(realpath "${srcd}")
+ copy_srcd_iso "${srcd}"
+fi
+
+# Build menu entries
+for isopref in "${bootdir}" "${installdir}"; do
+ # Make sure there are any ISOs
+ ls "${isopref}" | grep -E -q -e "${isorex}" || continue
+
+ diskuuid=/dev/disk/by-uuid/$(${grub_probe} --target=fs_uuid "${isopref}")
+ device=$(${grub_probe} --target=device "${isopref}")
+ label=$(${grub_probe} --target=fs_label "${isopref}")
+ [ "${label}" = "(null)" ] && label=${device}
+ grub_string=$(prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab)
+ longname="SystemRescueCD on ${label}"
+
+ gettext_printf "Found %s on %s\n" "${longname}" "${device}" >&2
+
+ write_srcd_submenu
+done
diff --git a/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.2.ebuild b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.2.ebuild
new file mode 100644
index 000000000000..76daeb7ece15
--- /dev/null
+++ b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Grub menu entries for the .iso image of systemrescuecd-x86"
+HOMEPAGE="http://www.sysresccd.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}"
+
+RDEPEND="app-admin/systemrescuecd-x86
+ sys-boot/grub"
+
+src_install() {
+ exeinto /etc/grub.d
+ newexe "${FILESDIR}"/systemrescuecd.grub-2 39_systemrescuecd
+
+ insinto /etc/default
+ newins "${FILESDIR}"/systemrescuecd.default-2 systemrescuecd
+}
+
+pkg_postinst() {
+ elog "To add the menu entries for systemrescuecd to grub, you should now run"
+ elog " grub-mkconfig -o /boot/grub/grub.cfg"
+ elog "You can set custom bootoptions in /etc/default/systemrescuecd"
+}
diff --git a/sys-boot/udk/Manifest b/sys-boot/udk/Manifest
index 9cc7ba308e60..496e197e4836 100644
--- a/sys-boot/udk/Manifest
+++ b/sys-boot/udk/Manifest
@@ -1,9 +1,11 @@
AUX 2015-makefile.template 1543 BLAKE2B 6f16a0e3c726a99a30b68cc24f7a85267b1748c4822e1970c498f877d22195989022ddd1e1d2496744b5a8b1dde1d9dc2ebcb7dfe336b01c7258430938d05531 SHA512 c09aca05b07dbd5d2ac1979b98d889e0a2a44e6c12292cca5c6033e1c094acbf155ef1649a7f0b923e3062f4f2fd8f650f57523625628a29828c22ef1f95b405
AUX 2015-tools_def.template 2575 BLAKE2B 9666cb1b6d225eec6e6ca3762b6c5b10332f045035787585805485b9d7ba54a54543855adda8253ecd451674d00c4beaf153a94dd3ff4c8b5ab1fa5b72d92610 SHA512 7bf9e23434ec6e4abaf525a857719d5ddf3c355a4dd2f2f6666db62cfb9b9f981180a4886d9e98f43b82b2b4a397a862201ded196ed12726b2f813d5a61bbc86
AUX 2018-makefile.template 1059 BLAKE2B 6dda7de8a85fc2d8a55078ee298d622618da72f486a3453193dd0c0f5db1494433af6295909dbeb357aa967b58f640820d2f4790a4bec9304db0ce6e49ba2fb4 SHA512 527242cb30b23c3f2f9d6409f28d02bc41367e5cf15484819d0d8eb894b10252c0fedd4f0b11e8b5383216584846495946aad22a5ed7d25ddde511701e13b0cd
+AUX udk-workspace.template 1426 BLAKE2B b35a6e0e73c6724a29db2ad93ebceb35416d6d940b49ce6a6ec04e474e795afeaa4cf290dcb5e935f2e8e4f8dcd724619ddc3aa2b73e417e119db1cc523976d9 SHA512 6a28aa21e75ce7aecf35f469fada37591c4077749746a45153ab98bc91a09757582e5fa4813af657fba4c54ae382bf8d1ce52057b51fe10744b30b1e8a8bae6b
DIST UDK2015.Complete.MyWorkSpace.zip 121736982 BLAKE2B b37bd9ead6ce2c665128199249483ecbcb0f410077d0ca61820bdccb7ae71f6dad870a3cf2dad79f997ad9114678fab3c15a17227ae33aa1ff66f9187aa3a568 SHA512 7856a8f29296f817e8fd09d8eaf7207f4e25a13faa10936d1ceb10cb6a900be265379722c0ade0ef93b1c640fef8693667d2567962e3288b20ae77f607f03d39
DIST udk-2018-docs.zip 79352781 BLAKE2B 9d08579d4645121cabb7ac52850de6492f9990240da9236064352df0595867bfc6952c9858865a8ce1d81982ec0e2440dc19930a75595454257294462adc60d6 SHA512 6ba2d961f20267cafb94bd020e8fe71e1392f1f2cdbc5c9f0a43212253ddf137b3e12cc789299dfd1ea099bb1541703b995ae20d28f0275395f5f85ed0656954
DIST udk-2018.tar.gz 38642782 BLAKE2B a10171659451d7d3df737066ec0471db1e5055bd52556d4d0654b244e827512db8d88e2b74b4dfe0189f768e0eab7a705aa32a720e047555995cf339ea50c62f SHA512 8fd9316f08a5c30f8684b2fde73906a943bb067ec91699f41796e27679af73dbc38efaa100a57d4b835656b402d9c08896abc5c10fd0d607a7e0173b3d7a60b2
EBUILD udk-2015-r1.ebuild 6463 BLAKE2B 9d2d5d482c35424338626729380a231fc080e48a309c80c128b87b64fd7206cc594b1f7e2a20a1ca5a8015cd267916629b18454a5564c3ba5ca2636c5f21b04d SHA512 868d1c3fb22683772fea293d1dc4961438dde5f6df247b6895fc5709291283c1807fcd15f4d8c557a28ee3cb98e1501476c159574fed0bd2549e0e4ad88aae75
+EBUILD udk-2018-r1.ebuild 4057 BLAKE2B 4827f3a1ead937529d78d729f70232bbcd85c43f9eae59010542c23e5baa3ef9757885ca175b094028f978e615acf76f33c60b59a605fafefe437e663597cd28 SHA512 a38b8c3c7594be5eddee9a300991648937cf5aadea74bedae84581596d38e4bc1990c8e58db6b676a2e35d8916a1674925d740d0320dbef24b6bc45a2aadb4a3
EBUILD udk-2018.ebuild 6564 BLAKE2B 627ae99e97b02669348217286cc0345b3e0bfcc6ebab6f33d822742ff64cd704c0b87db82077d39eff3e3b978c8653665a167d7bfe5ec0d9474536c38e92f6ee SHA512 db785921a62a5cd0d4089114a3b1a9ad678c4ba6eadf099eaeed4888bae9cf1e77354458ca279ffbc15aaa9ce73490602fa18af4457dfd5594ddcd7960f6327f
MISC metadata.xml 721 BLAKE2B 863e21fdb7ac310469efdddbbbff0f1b23aa8b6cb6cdb27d6bfa1b024e795ef3b86e72d9dd7b6bca8a5326755615710bc0a59a6f4e3b53149490402d10c24d42 SHA512 20ac00286729ab06e607513002f2bcfe75866108914015d11a3139f95073b393c62046832fd3295f4e849a5cc810b996f0ca8b589cc6639e726563110e1c60fe
diff --git a/sys-boot/udk/files/udk-workspace.template b/sys-boot/udk/files/udk-workspace.template
new file mode 100644
index 000000000000..e119c3ae1a36
--- /dev/null
+++ b/sys-boot/udk/files/udk-workspace.template
@@ -0,0 +1,63 @@
+#!/bin/bash
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+SCRIPT_NAME='udk-workspace'
+[ -n "${BASH_SOURCE}" ] && SCRIPT_NAME="${BASH_SOURCE}"
+
+show_usage() {
+ if [ ! -z "${1}" ]; then
+ echo "${1}" >&2
+ echo >&2
+ fi
+ echo "Usage:"
+ echo ". ${SCRIPT_NAME} [folder]"
+ echo "where folder is the workspace folder - current directory is used if unspecified"
+}
+
+create_workspace() {
+ local workspace_dir="${PWD}"
+ if [ ! -z "${1}" ]; then
+ workspace_dir="${1}"
+ if ! mkdir -p "${1}"; then
+ show_usage "Cannot create directory ${1}"
+ return 1
+ fi
+ fi
+
+ pushd "${workspace_dir}" >/dev/null
+ if ! mkdir -p Conf; then
+ show_usage "Cannot create configuration directory"
+ return 1
+ fi
+ export WORKSPACE="${PWD}"
+ popd >/dev/null
+}
+
+if [ "${1}" = "-h" ] || [ "${1}" = "--help" ]; then
+ show_usage
+ # Script may have been sourced
+ return 0 2>/dev/null
+ exit 0
+elif [ "${SCRIPT_NAME}" = "${0}" ]; then
+ show_usage "Script must be sourced"
+ exit 1
+elif [ $# -gt 1 ]; then
+ show_usage "Too many arguments"
+ return 1
+fi
+
+if ! create_workspace "${1}"; then
+ return 1
+fi
+unset -f show_usage
+unset -f create_workspace
+shift $#
+
+export EDK_TOOLS_PATH="{EDK_BASE}/BaseTools"
+. "{EDK_BASE}/edksetup.sh"
+
+echo "Do not forget to call this script each time you open a new terminal or work on"
+echo "another workspace."
+echo "For more information, type:"
+echo "${SCRIPT_NAME} --help"
diff --git a/sys-boot/udk/udk-2018-r1.ebuild b/sys-boot/udk/udk-2018-r1.ebuild
new file mode 100644
index 000000000000..89f40f3e1a5c
--- /dev/null
+++ b/sys-boot/udk/udk-2018-r1.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit multiprocessing python-single-r1 toolchain-funcs
+
+DESCRIPTION="Tianocore UEFI Development kit"
+HOMEPAGE="https://github.com/tianocore/tianocore.github.io/wiki/EDK-II"
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/tianocore/edk2.git"
+ KEYWORDS=""
+else
+ MY_V="${PN^^}${PV}"
+ SRC_URI="https://github.com/tianocore/edk2/archive/v${MY_V}.tar.gz -> ${P}.tar.gz
+ doc? ( https://github.com/tianocore/edk2/releases/download/v${MY_V}/${MY_V}.Documents.zip -> ${P}-docs.zip )"
+ S="${WORKDIR}/edk2-v${MY_V}"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="doc"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="strip"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ >=dev-lang/nasm-2.14.02
+ >=sys-power/iasl-20160729
+ doc? ( app-arch/unzip )"
+
+DOCDIR="${WORKDIR}/Documents"
+
+# EFI pre-build libs
+QA_PREBUILT="
+ usr/lib/${P}/BeagleBoardPkg/Debugger_scripts/rvi_dummy.axf
+ usr/lib/${P}/ArmPkg/Library/GccLto/*.a
+"
+# GenBiosId is built upstream
+# VfrCompile does not use LDFLAGS but next upsteam version should change this
+QA_FLAGS_IGNORED="
+ usr/lib/udk-2018/BaseTools/Source/C/bin/VfrCompile
+ usr/lib/${P}/Vlv2TbltDevicePkg/GenBiosId
+"
+
+pkg_setup() {
+ if use x86; then
+ EFIARCH=IA32
+ elif use amd64; then
+ EFIARCH=X64
+ fi
+
+ # Select toolchain within predefined ones
+ if tc-is-gcc; then
+ TOOLCHAIN_TAG="GCC5"
+ elif tc-is-clang; then
+ TOOLCHAIN_TAG="CLANG38"
+ else
+ TOOLCHAIN_TAG="ELFGCC"
+ fi
+}
+
+src_unpack() {
+ default
+
+ local doc_name
+ local f
+ if use doc; then
+ pushd "${DOCDIR}" >/dev/null || die
+ rm -f *.chm || die
+ for f in *.zip; do
+ unpack "${DOCDIR}/${f}"
+ mv html "${f%.zip}" || die
+ done
+ rm -f *.zip || die
+ popd >/dev/null || die
+ fi
+}
+
+src_configure() {
+ sed -e "s:^\(BUILD_CFLAGS\s*=\).*$:\1 ${CFLAGS} -MD -fshort-wchar -fno-strict-aliasing -nostdlib -c -fPIC:" \
+ -e "s:^\(BUILD_LFLAGS\s*=\).*$:\1 ${LDFLAGS}:" \
+ -e "s:^\(BUILD_CXXFLAGS\s*=\).*$:\1 ${CXXFLAGS} -Wno-unused-result:" \
+ -i "BaseTools/Source/C/Makefiles/header.makefile" \
+ || die "Failed to update makefile header"
+}
+
+src_compile() {
+ local make_flags=(
+ BUILD_CC="$(tc-getBUILD_CC)"
+ BUILD_CXX="$(tc-getBUILD_CXX)"
+ BUILD_AS="$(tc-getBUILD_AS)"
+ BUILD_AR="$(tc-getBUILD_AR)"
+ BUILD_LD="$(tc-getBUILD_LD)"
+ )
+ # Base tools does not like parallel make
+ emake "${make_flags[@]}" -j1 -C BaseTools
+
+ # Update template parameter files
+ sed -e "s:^\(ACTIVE_PLATFORM\s*=\).*$:\1 MdeModulePkg/MdeModulePkg.dsc:" \
+ -e "s:^\(TARGET\s*=\).*$:\1 RELEASE:" \
+ -e "s:^\(TARGET_ARCH\s*=\).*$:\1 ${EFIARCH}:" \
+ -e "s:^\(TOOL_CHAIN_TAG\s*=\).*$:\1 ${TOOLCHAIN_TAG}:" \
+ -e "s:^\(MAX_CONCURRENT_THREAD_NUMBER\s*=\).*$:\1 $(makeopts_jobs):" \
+ -i "BaseTools/Conf/target.template" || die "Failed to configure target file"
+
+ # Clean unneeded files
+ find . -name '*.bat' -o -name '*.exe' -exec rm -f {} \; || die
+ find ./BaseTools/Source/C -mindepth 1 -maxdepth 1 \! -name 'bin' -exec rm -rf {} \; || die
+
+ # Upsteam hack (symbolic link) should only be created if needed
+ rm "${S}/EmulatorPkg/Unix/Host/X11IncludeHack" || die
+
+ # Create workspace script file
+ sed -e "s:{EDK_BASE}:${EPREFIX}/usr/lib/${P}:" \
+ "${FILESDIR}"/udk-workspace.template \
+ > "${T}/udk-workspace" || die "Failed to build udk-workspace"
+}
+
+src_install() {
+ dobin "${T}/udk-workspace"
+
+ # Use mkdir && cp here as doins does not preserve execution bits
+ mkdir -p "${ED}/usr/lib/${P}" || die
+ cp -pR "${S}"/* "${D}/usr/lib/${P}" || die
+ dosym "${P}" "/usr/lib/${PN}"
+
+ local HTML_DOCS
+ use doc && HTML_DOCS=( "${DOCDIR}"/. )
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "To create a new workspace, execute:"
+ elog " . udk-workspace [workspace_dir]"
+ elog "You can link appropriate packages to your workspace. For example,"
+ elog "in order to build MdeModulePkg and examples, you can try:"
+ elog " ln -s \"${EROOT}/usr/lib/${P}/\"Mde{Module,}Pkg ."
+ elog " build -a ${EFIARCH} all"
+}