diff options
author | Mike Gilbert <floppym@gentoo.org> | 2021-08-28 09:44:56 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-08-28 09:47:12 -0400 |
commit | 9548e78ee3ffb1532f9ff9f534e798b2e431d6bc (patch) | |
tree | 45d8d1e79f2d5d8671976193f78094eed4ee1caa /sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild | |
parent | lxde-base/lxdm: Update dependencies (diff) | |
download | gentoo-9548e78ee3ffb1532f9ff9f534e798b2e431d6bc.tar.gz gentoo-9548e78ee3ffb1532f9ff9f534e798b2e431d6bc.tar.bz2 gentoo-9548e78ee3ffb1532f9ff9f534e798b2e431d6bc.zip |
sys-boot/gnu-efi: add 3.0.14
Closes: https://bugs.gentoo.org/810724
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild')
-rw-r--r-- | sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild new file mode 100644 index 000000000000..44b683ddf6bf --- /dev/null +++ b/sys-boot/gnu-efi/gnu-efi-3.0.14.ebuild @@ -0,0 +1,81 @@ +# Copyright 2004-2021 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="https://sourceforge.net/projects/gnu-efi/" +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 + 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 +} |