summaryrefslogtreecommitdiff
blob: c621c7540b3f4477da38e2aa1a3e836dbd85e5c6 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/nqc/nqc-3.1_p4.ebuild,v 1.1 2006/06/18 14:06:51 pylon Exp $

inherit eutils

DESCRIPTION="Not Quite C - C-like compiler for Lego Mindstorms"
SRC_URI="http://bricxcc.sourceforge.net/nqc/release/${P/_p/.r}.tgz"
HOMEPAGE="http://bricxcc.sourceforge.net/nqc/"

S=${WORKDIR}/${P/_p/.r}

SLOT="0"
LICENSE="MPL-1.0"
KEYWORDS="~x86 ~amd64"
IUSE="usb"

DEPEND="virtual/libc
	usb? ( dev-libs/legousbtower )"

src_compile()
{
	if use usb; then
		epatch ${FILESDIR}/${P}-usb.patch
	fi
	if use amd64; then
		epatch ${FILESDIR}/${P}-amd64.patch
	fi
	sed -i -e 's/PREFIX?\=\/usr\/local/PREFIX?\=\/usr/' Makefile
	emake || die
}

src_install() {
	dobin bin/*
	mv nqc-man-2.1r1-0.man nqc.1
	doman nqc.1
	dodoc history.txt readme.txt scout.txt test.nqc
}

pkg_postinst() {
	einfo "To change the default serial name for nqc (/dev/ttyS0) set"
	einfo "the environment variable RCX_PORT or use the nqc command line"
	einfo "option -S to specify your serial port."
	if use usb; then
		einfo
		einfo "You have enabled USB support. To use usb on the"
		einfo "command line use the -Susb command line option"
	else
		einfo
		einfo "You have not enabled usb support and will be unable"
		einfo "to use the usb IR tower. To enable USB use the usb use flag"
	fi
}