summaryrefslogtreecommitdiff
blob: b8f3852f0f8ed349b99e2966c6273392b3a547f7 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/nqc/nqc-2.5.1.ebuild,v 1.3 2003/09/29 21:10:43 mholzer Exp $

My_PV="`echo $PV|cut -d. -f1,2`.r`echo $PV|cut -d. -f3`"
My_P="${PN}-${My_PV}"
S=${WORKDIR}/${My_P}
DESCRIPTION="Not Quite C - C-like compiler for Lego Mindstorms"
SRC_URI="http://www.baumfamily.org/nqc/release/${My_P}.tgz"
HOMEPAGE="http://www.baumfamily.org/nqc/"

SLOT="0"
LICENSE="MPL-1.0"
KEYWORDS="x86"
IUSE=""

DEPEND="virtual/glibc"

src_compile() {
	${#NQC_SERIAL} && NQC_SERIAL="/dev/ttyS0"
	sed -e "s:/usr/local/bin:${D}/usr/bin:" -e "s:/usr/local/man:${D}/usr/share/man:" -e "s:-O6:${CFLAGS}:" < Makefile >makefile
	# emake doesn't work
	DEFAULT_SERIAL_NAME=\"${NQC_SERIAL}\" make || die
}

src_install() {
	make DESTDIR=${D} install
	dodoc history.txt readme.txt scout.txt test.nqc
}

pkg_postinst() {
	einfo "***************************************************************"
	einfo "* To change the default serial name for nqc (/dev/ttyS0)set   *"
	einfo "* the environment variable NQC_SERIAL and reemerge nqc, e.g.: *"
	einfo "*  NQC_SERIAL='/dev/ttyS1' emerge nqc                         *"
	einfo "***************************************************************"
}