1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit multilib-minimal
7 DESCRIPTION="An library to provide useful functions commonly found on BSD systems"
8 HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
9 SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
11 LICENSE="BSD BSD-2 BSD-4 ISC"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
16 DEPEND=">=sys-kernel/linux-headers-3.17"
20 local f="${EROOT}/usr/$(get_libdir)/${PN}.a"
21 local m="You need to remove ${f} by hand or re-emerge sys-libs/glibc first."
22 if ! has_version ${CATEGORY}/${PN}; then
23 if [[ -e ${f} ]]; then
30 multilib_src_configure() {
31 # The build system will install libbsd-ctor.a despite of USE="-static-libs"
32 # which is correct, see:
33 # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
34 ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
37 multilib_src_install() {
38 emake DESTDIR="${D}" install
39 find "${ED}" -type f -name "*.la" -delete || die