gentoo-ebuilds/sys-libs/error-standalone/error-standalone-2.0-r1.ebuild
David Timber 5d2c178009
sys-libs/error-standalone: fix cross-compilation by exporting CC, AR
Closes: https://bugs.gentoo.org/960519
Signed-off-by: David Timber <dxdt@dev.snart.me>
Part-of: https://github.com/gentoo/gentoo/pull/43099
Closes: https://github.com/gentoo/gentoo/pull/43099
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-25 07:42:26 +01:00

34 lines
743 B
Bash

# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic toolchain-funcs
DESCRIPTION="standalone <error.h> implementation intended for musl"
HOMEPAGE="https://hacktivis.me/git/error-standalone/"
SRC_URI="https://hacktivis.me/releases/error-standalone/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 ~riscv x86"
RDEPEND="!sys-libs/glibc"
IUSE="static-libs"
src_compile() {
append-flags -fPIC
emake CC="$(tc-getCC)" AR="$(tc-getAR)" liberror.so $(usex static-libs liberror.a '')
}
src_install() {
einstalldocs
emake \
PREFIX="${EPREFIX}/usr" \
DESTDIR="${D}" \
install-shared \
$(usex static-libs install-static '')
}