summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/gnu-efi/Manifest1
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.8.ebuild88
2 files changed, 89 insertions, 0 deletions
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index b7ab12b5e199..b796f267c2ff 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -1,3 +1,4 @@
DIST gnu-efi-3.0.2.tar.bz2 136134 BLAKE2B ccdbd1f14c938a89fcf6d43f139ce644b562fd882a6f3ce2ce7ce703fd95c02870016da252a3f75c7117838c23a8ac8527d4ca919c125b639f86734a0ee2c8f6 SHA512 960dc0374dd63dea5eb25e2bf6670d3f7474ebeca2090514c2895b28ff6e058a852958d028eadbe156df4645bd04d1a93ffaae1153861fce6e7da72f8f9dbeec
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
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.8.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.8.ebuild
new file mode 100644
index 000000000000..bd81702fee38
--- /dev/null
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.8.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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"
+
+DEPEND="sys-apps/pciutils"
+RDEPEND=""
+
+# 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
+}