# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ #This allow you to do: ECVS_SERVER="offline" emerge nescc if [ -z "${ECVS_SERVER}" ] then ECVS_SERVER="cvs.sourceforge.net:/cvsroot/nescc" fi ECVS_MODULE="nesc" ECVS_BRANCH="v1_2_alpha10" ECVS_USER="anonymous" ECVS_CVS_COMMAND="cvs -z9 -q -f" ECVS_CVS_OPTIONS="-dP" #People at nescc have strange ideas on which files are needed in a branch. #We want files retrieved even when there is no match for the tag or date. #The most recent revision of the file will be used. ECVS_UP_OPTS="-dP -f -C" inherit cvs eutils DESCRIPTION="An extension to gcc that knows how to compile nesC applications" HOMEPAGE="http://nescc.sourceforge.net/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="doc avr" RDEPEND=">=dev-embedded/tos-1.1.0 \ avr? ( >=cross-avr/binutils-2.14 \ >=cross-avr/gcc-3.3-r1 \ >=cross-avr/avr-libc-1.0.2-r1 )" DEPEND=">=dev-lang/perl-5.8.5-r2 \ >=sys-devel/autoconf-2.53 >=sys-devel/automake-1.5 sys-devel/flex sys-devel/bison dev-util/gperf virtual/emacs ${RDEPEND}" S=${WORKDIR}/${PN} pkg_setup() { if [ -z "${TOSDIR}" ] || [ ! -d "${TOSDIR}" ] then eerror "In order to compile nesc you have to set the" eerror "\$TOSDIR environment properly." eerror "" eerror "You can achieve this by emerging >=dev-embedded/tinyos-1.1.13" eerror "or by exporting TOSDIR=\"path to your tinyos dir\"" die "Couldn't find a valid TinyOS home" fi if use !avr then ewarn "You are trying to build nesc without as-avr support." ewarn "Note that if you have gcc-avr, the support will be enabled by" ewarn "the configure script." fi einfo "If you have already downloaded this package from the cvs" einfo "You can save a lot of time using the following command:" einfo "ECVS_SERVER=\"offline\" emerge nesc" einfo "" einfo "Building nesC for ${TOSDIR}" } src_compile() { einfo "Bootstrapping source" ./Bootstrap einfo "Configuring" econf --disable-dependency-tracking || die "econf failed" einfo "Building" # language setting needed, otherwise gcc version # will sometimes not be detected right LANGUAGE=C emake || die "emake failed" } src_install() { LANGUAGE=C einstall || die "einstall failed" if use doc then dohtml -r -a html,jpg,pdf,txt doc/* fi dodoc COPYING COPYRIGHT INSTALL README }