# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: NBC/NXC LEGO Mindstorms NXT programing envirement $ inherit eutils DESCRIPTION="NBC/NXC LEGO Mindstorms NXT programing envirement" HOMEPAGE="http://bricxcc.sourceforge.net/nbc/" SRC_URI="http://downloads.sourceforge.net/bricxcc/nbc-1.0.1.b34.src.tgz" LICENSE="MPL-1.0/MPL-1.1 (Mozilla Public Licence)" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="mirror" DEPEND="dev-lang/fpc" S="${WORKDIR}/nxt" DH="/usr/include/nbc" src_unpack() { unpack ${A} || die "Unpacking ${A} failed!" cd ${S} mv ${S}/nbclinux.mak ${S}/Makefile epatch "${FILESDIR}"/Makefile.patch } src_compile() { emake mkdata || die "Error: make failed!" emake NBCCommonData.pas || die "Error: make failed!" emake NXTDefsData.pas || die "Error: make failed!" emake NXCDefsData.pas || die "Error: make failed!" emake nbc || die "Error: make failed!" } src_install() { dobin nbc || die "Error: install failed!" dodir "${DH}" || die "Error: headers directory" insinto "${DH}" || die "Error: instal in headers directory" doins *.h || die "Error: install headers failed!" dodoc readme.txt history.txt echo " Usage: " > usage.txt echo " nbc program_name.nxc -O=program_name.rxe " >> usage.txt echo " '.rxe file extension' is obligatory!!! " >> usage.txt echo " Without it program will not be shown on the NXT brick." >> usage.txt echo " Overwriting program files on the NXT brick not work!!! " >> usage.txt echo " Delete program old version on the NXT brick and then load new. " >> usage.txt dodoc usage.txt } pkg_postinst() { elog " Usage: " elog " nbc program_name.nxc -O=program_name.rxe " elog " '.rxe file extension' is obligatory!!! " elog " Without it program will not be shown on the NXT brick." elog " Overwriting program files on the NXT brick not work!!! " elog " Delete program old version on the NXT brick and then load new. " }