summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnant Narayanan <anant@gentoo.org>2007-03-31 22:47:41 +0000
committerAnant Narayanan <anant@gentoo.org>2007-03-31 22:47:41 +0000
commit63ffdf3aa49d4427e4c374b0f15dd6b2aa2f17e6 (patch)
tree5d49e3e5917f1b8cb3257a28dc9b9327c648a970 /eclass
downloadplan9-63ffdf3aa49d4427e4c374b0f15dd6b2aa2f17e6.tar.gz
plan9-63ffdf3aa49d4427e4c374b0f15dd6b2aa2f17e6.tar.bz2
plan9-63ffdf3aa49d4427e4c374b0f15dd6b2aa2f17e6.zip
Initial import of overlay
svn path=/; revision=1
Diffstat (limited to 'eclass')
-rw-r--r--eclass/plan9-libs.eclass48
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
+