From 363e9b282b6bd3908c2a2b56c894d785cf2fb94d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 30 Dec 2022 14:17:35 +0000 Subject: gentoo auto-resync : 30:12:2022 - 14:17:35 --- .../coreboot-utils/coreboot-utils-4.18-r2.ebuild | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 app-admin/coreboot-utils/coreboot-utils-4.18-r2.ebuild (limited to 'app-admin/coreboot-utils/coreboot-utils-4.18-r2.ebuild') diff --git a/app-admin/coreboot-utils/coreboot-utils-4.18-r2.ebuild b/app-admin/coreboot-utils/coreboot-utils-4.18-r2.ebuild new file mode 100644 index 000000000000..0f0e5b47fd02 --- /dev/null +++ b/app-admin/coreboot-utils/coreboot-utils-4.18-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A selection from coreboot/utils useful in general" +HOMEPAGE="https://www.coreboot.org/" +SRC_URI="https://coreboot.org/releases/coreboot-${PV}.tar.xz" + +LICENSE="GPL-2+ GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="sys-apps/pciutils + sys-libs/zlib" +RDEPEND="${DEPEND}" +BDEPEND="" + +S="${WORKDIR}/coreboot-${PV}" +PATCHES=( + "${FILESDIR}"/${PN}-4.18-musl.patch + "${FILESDIR}"/${PN}-4.18-flags.patch +) + +# selection from README.md that seem useful outside coreboot +coreboot_utils=( + #cbfstool has textrels and is not really necessary outside coreboot + cbmem + ifdtool + intelmetool + inteltool + me_cleaner + nvramtool + pmh7tool + superiotool +) + +src_prepare() { + default + # drop some CFLAGS that hurt compilation on modern toolchains or + # force optimisation + # can't do this in one sed, because it all happens back-to-back + for e in '-O[01234567s]' '-g' '-Werror' '-ansi' '-pendantic' ; do + sed -i -e 's/\( \|=\)'"${e}"'\( \|$\)/\1/g' util/*/Makefile{.inc,} \ + || die + done +} + +src_compile() { + tc-export CC + export HOSTCFLAGS="${CFLAGS}" + for tool in ${coreboot_utils[*]} ; do + [[ -f util/${tool}/Makefile ]] || continue + emake -C util/${tool} V=1 + done +} + +src_install() { + exeinto /usr/sbin + for tool in ${coreboot_utils[*]} ; do + [[ -e util/${tool}/${tool} ]] && doexe util/${tool}/${tool} + [[ -e util/${tool}/${tool}.py ]] && doexe util/${tool}/${tool}.py + [[ -e util/${tool}/${tool}.8 ]] && doman util/${tool}/${tool}.8 + [[ -d util/${tool}/man ]] && doman util/${tool}/man/*.[12345678] + done +} -- cgit v1.2.3