summaryrefslogtreecommitdiff
blob: 279aa336d826a7228f4737b788f6e451ca1d3166 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/kde-meta.eclass,v 1.82 2007/03/18 21:39:30 carlo Exp $
#
# Author Anant Narayanan <anant@gentoo.org>
#
# This is the plan9-libs eclass which supports broken-up Plan9 libraries.

DESCRIPTION="The ${PN} library in Plan9 from user space"
HOMEPAGE="http://swtch.com/plan9port/"
SRC_URI="http://wwww.kix.in/plan9/plan9port-repack-${PV}.tar.bz2"
LICENSE="PLAN9"
SLOT="0"

DEPEND="dev-plan9/mk ${DEPEND}"

# Add a blocking dep on the package we're derived from
#	DEPEND="${DEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${SLOT}*"
#	RDEPEND="${RDEPEND} !=$(get-parent-package ${CATEGORY}/${PN})-${SLOT}*"

S="${WORKDIR}/plan9"

function set_path() {
	PLAN9=`pwd` export PLAN9
	PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
	cd ${S}/src/${PN}
}

function plan9-libs_src_compile() {
	set_path
	mk all || die "Build Failed!"
}

function plan9-libs_src_install() {
	set_path
	mk install || die "Install Failed!"
	dolib.a ${S}/lib/${PN}.a

	if [[ -n "$PHEADERS" ]]; then
		insinto /usr/include/plan9
		for i in $PHEADERS; do 
			doins ${S}/include/${i}.h
		done
	fi
}

EXPORT_FUNCTIONS src_compile src_install