diff options
Diffstat (limited to 'eclass/plan9-libs.eclass')
-rw-r--r-- | eclass/plan9-libs.eclass | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/eclass/plan9-libs.eclass b/eclass/plan9-libs.eclass new file mode 100644 index 0000000..279aa33 --- /dev/null +++ b/eclass/plan9-libs.eclass @@ -0,0 +1,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 + |