summaryrefslogtreecommitdiff
path: root/sys-libs/error-standalone/error-standalone-2.0-r1.ebuild
blob: 24f1689a8344dc12b1cdcf50bce03f02a024bcc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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 '')
}