Line 0
Link Here
|
0 |
- |
1 |
# Copyright 1999-2016 Gentoo Foundation |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Id$ |
4 |
|
5 |
EAPI=5 |
6 |
inherit eutils multilib-minimal |
7 |
|
8 |
DESCRIPTION="An library to provide useful functions commonly found on BSD systems" |
9 |
HOMEPAGE="http://libbsd.freedesktop.org/wiki/" |
10 |
SRC_URI="http://${PN}.freedesktop.org/releases/${P}.tar.xz" |
11 |
|
12 |
LICENSE="BSD BSD-2 BSD-4 ISC" |
13 |
SLOT="0" |
14 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
15 |
IUSE="static-libs" |
16 |
|
17 |
DEPEND=">=sys-kernel/linux-headers-3.17" |
18 |
|
19 |
pkg_setup() { |
20 |
local f="${ROOT}/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 |
24 |
eerror "${m}" |
25 |
die "${m}" |
26 |
fi |
27 |
fi |
28 |
} |
29 |
|
30 |
multilib_src_configure() { |
31 |
# The build system will install libbsd-ctor.a despite of USE="-static-libs" |
32 |
# which is correct, see: |
33 |
# http://cgit.freedesktop.org/libbsd/commit/?id=c5b959028734ca2281250c85773d9b5e1d259bc8 |
34 |
ECONF_SOURCE="${S}" econf $(use_enable static-libs static) |
35 |
} |
36 |
|
37 |
multilib_src_install() { |
38 |
emake DESTDIR="${D}" install |
39 |
prune_libtool_files |
40 |
} |