dev-qt/qtopengl: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-libs / libbsd / libbsd-0.10.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit multilib-minimal
6
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"
10
11 LICENSE="BSD BSD-2 BSD-4 ISC"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
14 IUSE="static-libs"
15
16 DEPEND=">=sys-kernel/linux-headers-3.17"
17 RDEPEND=""
18
19 pkg_setup() {
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
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         # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
34         ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
35 }
36
37 multilib_src_install() {
38         emake DESTDIR="${D}" install
39         find "${ED}" -type f -name "*.la" -delete || die
40 }