sys-libs/efivar: Sync with Gentoo

It's from Gentoo commit f19ef2f7dee67f10f752038bf9b65a169ba9f6be.
This commit is contained in:
Flatcar Buildbot 2024-08-12 07:20:51 +00:00 committed by Krzesimir Nowak
parent de9fc3ab4b
commit 9ce590368b
3 changed files with 72 additions and 1 deletions

View File

@ -1 +1,2 @@
DIST efivar-38.tar.bz2 320221 BLAKE2B 0b96f3d71ddc2246e6a11a5cd32af3d007823c4a283186a428c3f145cd74425a31bd22c4671ad1ab252a3c572991bb1698381cb8bdf51efcbebd62befdc6c070 SHA512 c2f17297c863ece134a9dd758d237fd2df8c8d072f87af1d0bf2bcf9acfc7a53c25597f03fd4fb8cc664b205743d4ffa0ef1b068d0f73c58fa573d40993f3155
DIST efivar-39.tar.gz 463349 BLAKE2B 73ea4b3293cd708923bcd4332a8c7a5a8bbf539d81300c502a764a2ac205ba7cdf1e30b3432c42a101f56c0b6e31af2907a6a38ada69ace3b0d60e90515094cd SHA512 04493c30efbfc2773abac9a3dd93aa13403c05e29e3bfc72877d2054930811fae99119aadcb1729b6ca85abf5a24db786ea0c27c16d5458ef1b19e74696f5ff7

View File

@ -0,0 +1,70 @@
# Copyright 2014-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="Tools and library to manipulate EFI variables"
HOMEPAGE="https://github.com/rhboot/efivar"
SRC_URI="https://github.com/rhboot/efivar/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0/1"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc64 ~riscv ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="
app-text/mandoc
test? ( sys-boot/grub:2 )
"
RDEPEND="
dev-libs/popt
"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-3.18
virtual/pkgconfig
"
src_prepare() {
local PATCHES=(
# Rejected upstream, keep this for ia64 support
"${FILESDIR}"/efivar-38-ia64-relro.patch
)
default
}
src_configure() {
unset CROSS_COMPILE
export COMPILER=$(tc-getCC)
export HOSTCC=$(tc-getBUILD_CC)
tc-ld-disable-gold
export libdir="/usr/$(get_libdir)"
# https://bugs.gentoo.org/562004
unset LIBS
# Avoid -Werror
export ERRORS=
if [[ -n ${GCC_SPECS} ]]; then
# The environment overrides the command line.
GCC_SPECS+=":${S}/src/include/gcc.specs"
fi
# Used by tests/Makefile
export GRUB_PREFIX=grub
}
src_compile() {
# HOST_MARCH: https://bugs.gentoo.org/831334
emake HOST_MARCH=
}
src_test() {
# https://bugs.gentoo.org/924370
emake -j1 test
}

View File

@ -6,6 +6,6 @@
<name>Mike Gilbert</name>
</maintainer>
<upstream>
<remote-id type="github">rhinstaller/efivar</remote-id>
<remote-id type="github">rhboot/efivar</remote-id>
</upstream>
</pkgmetadata>