nqc-3.1_p6.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Not Quite C - C-like compiler for Lego Mindstorms"
  6. HOMEPAGE="http://bricxcc.sourceforge.net/nqc/"
  7. SRC_URI="http://bricxcc.sourceforge.net/nqc/release/${P/_p/.r}.tgz"
  8. LICENSE="MPL-1.0"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="usb"
  12. DEPEND="usb? ( dev-libs/legousbtower )"
  13. RDEPEND="${DEPEND}"
  14. S="${WORKDIR}"
  15. pkg_setup() {
  16. tc-export CXX
  17. }
  18. src_prepare() {
  19. epatch "${FILESDIR}"/${P}-{gcc-4.7,flags}.patch
  20. }
  21. src_configure() {
  22. if use usb; then
  23. sed -i Makefile -e 's|#.*USBOBJ =|USBOBJ =|g' || die "sed usb"
  24. fi
  25. }
  26. src_install() {
  27. dobin bin/*
  28. newman nqc-man-2.1r1-0.man nqc.1
  29. dodoc history.txt readme.txt scout.txt test.nqc
  30. }
  31. pkg_postinst() {
  32. elog "To change the default serial name for nqc (/dev/ttyS0) set"
  33. elog "the environment variable RCX_PORT or use the nqc command line"
  34. elog "option -S to specify your serial port."
  35. if use usb; then
  36. echo
  37. elog "You have enabled USB support. To use usb on the"
  38. elog "command line use the -Susb command line option"
  39. else
  40. echo
  41. elog "You have not enabled usb support and will be unable"
  42. elog "to use the usb IR tower. To enable USB use the usb use flag"
  43. fi
  44. }