forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-boot/gnu-efi: bump up to 3.0.6, bug #616802
gnu-efi-3.0.5 had a 'typedef' bug in efipxebc.h. It was fixed by https://sourceforge.net/p/gnu-efi/code/ci/bf07e8141777e5a2d67ec8447084215224bdad4b/ Reported-by: Wes Bug: https://bugs.gentoo.org/616802 Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
Sergei Trofimovich
committed
Jul 2, 2017
1 parent
c0e3d86
commit 8da175b
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 1999-2017 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" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
# IA64 build is broken in setjmp code: | ||
# https://sourceforge.net/p/gnu-efi/bugs/9/ | ||
KEYWORDS="-* ~amd64 ~arm ~arm64 -ia64 ~x86" | ||
IUSE="abi_x86_32 abi_x86_64" | ||
|
||
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 | ||
|
||
# https://bugs.gentoo.org/607992 | ||
filter-mfpmath sse | ||
|
||
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 | ||
} |