blob: 9cd9b0bf37de76fc343a3704a9de1ffa6496fe42 (
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
35
36
37
38
|
# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic toolchain-funcs
DESCRIPTION="Unicode string library"
HOMEPAGE="https://libs.suckless.org/libgrapheme/"
SRC_URI="https://dl.suckless.org/libgrapheme/${P}.tar.gz"
LICENSE="ISC"
SLOT="0/$(ver_cut 1-2)"
KEYWORDS="~amd64 ~x86"
# upstream suggests keeping the static option, others have requested it too
IUSE="static-libs"
src_prepare() {
default
append-cflags ${CPPFLAGS}
tc-export CC AR RANLIB
tc-export_build_env BUILD_CC
sed -Ei '/^(BUILD_|)(CC|AR|RANLIB|CFLAGS|LDFLAGS|LDCONFIG).*=/d' config.mk || die
}
src_install() {
local emakeargs=(
DESTDIR="${D}"
PREFIX="${EPREFIX}"/usr
LIBPREFIX="${EPREFIX}"/usr/$(get_libdir)
)
emake "${emakeargs[@]}" install
einstalldocs
use static-libs || rm "${ED}"/usr/$(get_libdir)/${PN}.a || die
}
|