diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-08-26 12:00:09 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-08-26 12:00:09 +0100 |
commit | f300354de9fe5d997850456a9e1f400193e6544f (patch) | |
tree | 402fd6a7727db790bf57f683894052e8791d389e /sys-boot/gnu-efi | |
parent | 5c42677148c717eb9f4673237db807f74740b4e9 (diff) |
gentoo auto-resync : 26:08:2024 - 12:00:09
Diffstat (limited to 'sys-boot/gnu-efi')
-rw-r--r-- | sys-boot/gnu-efi/Manifest | 1 | ||||
-rw-r--r-- | sys-boot/gnu-efi/gnu-efi-3.0.18-r4.ebuild | 128 |
2 files changed, 129 insertions, 0 deletions
diff --git a/sys-boot/gnu-efi/Manifest b/sys-boot/gnu-efi/Manifest index 121364a2282c..d6c7c2f18cfb 100644 --- a/sys-boot/gnu-efi/Manifest +++ b/sys-boot/gnu-efi/Manifest @@ -8,4 +8,5 @@ EBUILD gnu-efi-3.0.15.ebuild 1923 BLAKE2B 754b9d84be37fa39d42a752c8ea63754d7acc1 EBUILD gnu-efi-3.0.17.ebuild 1954 BLAKE2B 03313137ea41a1a8ad4880076296e7dbc38e1276ff3a46187c8c5fe0db7b833c437e21fb86e15a992ec45824a23798bdd53d16770b0bb1117c9a1afec578ed3d SHA512 c113cdd429bdb6c86641b8e76c859f4e28d377d7f2d441857d077cca0b7b6bc1e54071f4354cef2fc5d17ae2cf7e4312b0a76b622f6428a51ce4a02413c2bc41 EBUILD gnu-efi-3.0.18-r2.ebuild 1938 BLAKE2B 18a2d294be0f855a8302806af7c893c6febbe598bd993e8036ef763ed9e5cac353a7ed87f5c572d3d6e9db8f8ab28eace207e14059493e656364c7c1b8248ca1 SHA512 7344022247b0cc0107f695893e20da5b62519e7f36dbd5b98d2195ade76f32e83e0e756cff8b877f14a9860743cc148380168de780c58b36eaf22a1c415e0bce EBUILD gnu-efi-3.0.18-r3.ebuild 2472 BLAKE2B a2f6d030c89b88d0afbf895678e8b13105e873616ac73cfb468f9d57000207475d54fd63144befff3255d13b1e0e226cdb236f8aa13cfa87cb82198db8aa47cb SHA512 d9b73839447277aea53e2bf57b52b188bc314324c4a1006871bd34159aceb642f223def6d6dc2a84b03b693774de997cc8c21ffafcdf814a7eb8c3e79b3301fb +EBUILD gnu-efi-3.0.18-r4.ebuild 3067 BLAKE2B 219d6c41e24a8ef05aa76d62d1d0c85dc5b2650aae4651bf21e46b21db5c2d62d36bec1c6fe792b85023e1b4b6bd08c157bc3d34cf3cf8982a15314adc4f1782 SHA512 2684340abf956a3da3f4db98cb59004cd4aed01c18b697517a09823421e2c21e7cf10ad8d010836bf4f358f4bb731ab13f52d51c9fa22cdaf41b810f6140eebc MISC metadata.xml 381 BLAKE2B a3cbadc2ae97d29ac87c04f3209cd7f4879ef70903907f319b425f038f07fd6bbc357a0291e70909a3b0b2097de6b63daf0f568d0fd7097c7bd2d9c9c7f3a963 SHA512 abbdda69a47f94442977af7491596e40873767256f5e75c3c06b614a369ec8cb7103a132e77a95c99ba24e4b205e5c3fc267039c920c1268a19b17e4ac779b79 diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.18-r4.ebuild b/sys-boot/gnu-efi/gnu-efi-3.0.18-r4.ebuild new file mode 100644 index 000000000000..b34d3a74c7db --- /dev/null +++ b/sys-boot/gnu-efi/gnu-efi-3.0.18-r4.ebuild @@ -0,0 +1,128 @@ +# Copyright 2004-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Library for build EFI Applications" +HOMEPAGE="https://sourceforge.net/projects/gnu-efi/" +SRC_URI="https://downloads.sourceforge.net/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 ~riscv ~x86" +IUSE="abi_x86_32 abi_x86_64 custom-cflags" +REQUIRED_USE=" + amd64? ( || ( abi_x86_32 abi_x86_64 ) ) + x86? ( || ( abi_x86_32 abi_x86_64 ) ) +" + +# for ld.bfd and objcopy +BDEPEND="sys-devel/binutils" + +# 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}"/${P}-clang.patch + "${FILESDIR}"/${PN}-3.0.18-remove-linux-headers.patch +) + +check_and_set_objcopy() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + # bug #931792 + # llvm-objcopy does not support EFI target, try to use binutils objcopy or fail + tc-export OBJCOPY + OBJCOPY="${OBJCOPY/llvm-/}" + LANG=C LC_ALL=C "${OBJCOPY}" --help | grep -q '\<pei-' || die "${OBJCOPY} (objcopy) does not support EFI target" + fi +} + +check_comppiler() { + if [[ ${MERGE_TYPE} != "binary" ]]; then + tc-is-gcc || tc-is-clang || die "Unsupported compiler" + fi +} + +pkg_pretend() { + check_comppiler + check_and_set_objcopy +} + +pkg_setup() { + check_and_set_objcopy +} + +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 ;; + riscv64*) arch=riscv64;; + x86_64*) arch=x86_64 ;; + *) die "Unknown CHOST" ;; + esac + + local args=( + ARCH="${arch}" + HOSTCC="${BUILD_CC}" + CC="${CC}" + AS="${AS}" + LD="${LD}" + AR="${AR}" + OBJCOPY="${OBJCOPY}" + PREFIX="${EPREFIX}/usr" + LIBDIR='$(PREFIX)'/$(get_libdir) + ) + emake -j1 "${args[@]}" "$@" +} + +src_compile() { + tc-export BUILD_CC AR AS CC LD OBJCOPY + + if ! use custom-cflags; then + unset CFLAGS CPPFLAGS LDFLAGS + fi + + # work around musl: include first the compiler include dir, then the system one + # bug #933080, #938012 + local CPPINCLUDEDIR + if tc-is-gcc; then + CPPINCLUDEDIR=$(LANG=C ${CC} -print-search-dirs 2> /dev/null | grep ^install: | cut -f2 -d' ')/include + elif tc-is-clang; then + CPPINCLUDEDIR=$(LANG=C ${CC} -print-resource-dir 2> /dev/null)/include + fi + append-cflags "-nostdinc -isystem ${CPPINCLUDEDIR} -isystem ${ESYSROOT}/usr/include" + + if use amd64 || use x86; then + use abi_x86_32 && CHOST=i686 ABI=x86 efimake + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake + else + efimake + fi +} + +src_install() { + if use amd64 || use x86; then + use abi_x86_32 && CHOST=i686 ABI=x86 efimake INSTALLROOT="${D}" install + use abi_x86_64 && CHOST=x86_64 ABI=amd64 efimake INSTALLROOT="${D}" install + else + efimake INSTALLROOT="${D}" install + fi + einstalldocs +} |