summaryrefslogtreecommitdiff
blob: 878b8f31ffabb1cd791ecf99557224e80a132019 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/skalibs/skalibs-1.4.1-r1.ebuild,v 1.1 2013/10/02 20:38:09 williamh Exp $

EAPI=4

inherit multilib toolchain-funcs

DESCRIPTION="development files used for building software at skarnet.org: essentially general-purpose libraries"
HOMEPAGE="http://www.skarnet.org/software/skalibs/index.html"
SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc static-libs"

DEPEND=""
RDEPEND=""

S=${WORKDIR}/prog/${P}

src_configure() {
	echo $(tc-getCC) ${CFLAGS} > conf-compile/conf-cc
	echo /usr/bin:/bin > conf-compile/conf-defaultpath
	echo $(tc-getCC) ${LDFLAGS} > conf-compile/conf-dynld
	echo /usr/$(get_libdir)/${PN} > conf-compile/conf-install-library
	echo /$(get_libdir)/${PN} > conf-compile/conf-install-library.so
	echo $(tc-getCC) ${LDFLAGS} > conf-compile/conf-ld
	rm conf-compile/flag-slashpackage
	echo > conf-compile/stripbins
	echo > conf-compile/striplibs
}

src_compile() {
	emake -j1
}

src_install() {
	insinto /etc
	doins etc/leapsecs.dat

	insinto /usr/include/${PN}
	doins include/*

	insopts -m0755
	insinto /$(get_libdir)/${PN}
	doins library.so/*
	insopts -m0644
	if use static-libs ; then
	insinto /usr/$(get_libdir)/${PN}
		doins library/*
	fi

	dodir /etc/ld.so.conf.d/
	echo "/$(get_libdir)/${PN}" > ${ED}/etc/ld.so.conf.d/10${PN}.conf || die

	insinto /usr/lib/${PN}
doins -r sysdeps

	dodoc $(find doc -type f ! -name "*.html" ! -name "COPYING")
	use doc && dohtml -r doc/*
}