summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lermytte <gentoo@lermytte.be>2020-06-22 11:46:41 +0200
committerMike Gilbert <floppym@gentoo.org>2020-06-23 20:05:26 -0400
commit505a2f267b9296fcbaec8b74a2b61edfb48294ab (patch)
tree654c59e22d92df3d44f346febd19452e7fbff491 /sys-boot
parentsys-kernel/zen-sources: Version bump 5.7.5 (diff)
downloadgentoo-505a2f267b9296fcbaec8b74a2b61edfb48294ab.tar.gz
gentoo-505a2f267b9296fcbaec8b74a2b61edfb48294ab.tar.bz2
gentoo-505a2f267b9296fcbaec8b74a2b61edfb48294ab.zip
sys-boot/gnu-efi: bump to 3.0.12
Closes: https://bugs.gentoo.org/701152 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Christophe Lermytte <gentoo@lermytte.be> Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/16369
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/gnu-efi/Manifest1
-rw-r--r--sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild87
2 files changed, 88 insertions, 0 deletions
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest
index 0e4ed33baf64..8a3d7d40cb86 100644
--- a/sys-boot/gnu-efi/Manifest
+++ b/sys-boot/gnu-efi/Manifest
@@ -1 +1,2 @@
DIST gnu-efi-3.0.11.tar.bz2 154456 BLAKE2B dd8d5100ee65e2f94d6b67f0d2236674c7c2b6f553ac0b2d8fdc83e49c69bec0dce1e2e8730705f70b3b7b0a61e4f065773667945ffc92a6f40eba381fcf6723 SHA512 1a6b06b69eb95e03c00fb1c476bf346ab2cb0ecca9a44e163f52f2aa4b9837d3dd2d3ed8b4ce77aaf32a66e49f826ea5b43a97c8c7c56aaa030bc20b3415122a
+DIST gnu-efi-3.0.12.tar.bz2 154575 BLAKE2B 264e04351cf1ef74956e65d209c00514c0f56c18427a87a894132e5a5b0b09b3ca992475a2f95aac42c8a26ff4977ec837ff473d76c1c766049e903f03bd9fff SHA512 cbec6f6e37271c22c71e3ce44d3579e48e7f3b797ec3946f56eb843ed3e472722763c566fc3b749f0c692ab6cb26e8909bb258cd164771a5b1eeff5c7cd51368
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild
new file mode 100644
index 000000000000..27742adc9b20
--- /dev/null
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.12.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2004-2020 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"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.0.9-fix-clang-build.patch )
+
+src_prepare() {
+ default
+ sed -i -e "s/-Werror//" Make.defaults || die
+}
+
+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
+}