summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Sapp <nixphoeni@gentoo.org>2009-10-17 18:15:11 +0000
committerJoe Sapp <nixphoeni@gentoo.org>2009-10-17 18:15:11 +0000
commitc0dae44255b725fcc787ee2125dc8d7c69c74d7a (patch)
treeaf864d976d6d822f04ac1cc5d6a29cf50ebcb123 /dev-embedded/arduino
parentDepend on libvformat (#264584) (diff)
downloadgentoo-2-c0dae44255b725fcc787ee2125dc8d7c69c74d7a.tar.gz
gentoo-2-c0dae44255b725fcc787ee2125dc8d7c69c74d7a.tar.bz2
gentoo-2-c0dae44255b725fcc787ee2125dc8d7c69c74d7a.zip
Version bump
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-embedded/arduino')
-rw-r--r--dev-embedded/arduino/ChangeLog8
-rw-r--r--dev-embedded/arduino/arduino-0017.ebuild66
-rw-r--r--dev-embedded/arduino/files/Makefile-0017.patch38
-rw-r--r--dev-embedded/arduino/files/arduino-script-0017.patch20
4 files changed, 131 insertions, 1 deletions
diff --git a/dev-embedded/arduino/ChangeLog b/dev-embedded/arduino/ChangeLog
index c4d3f042206b..d234a700bcf6 100644
--- a/dev-embedded/arduino/ChangeLog
+++ b/dev-embedded/arduino/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-embedded/arduino
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/ChangeLog,v 1.4 2009/04/24 22:55:42 nixphoeni Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/ChangeLog,v 1.5 2009/10/17 18:15:07 nixphoeni Exp $
+
+*arduino-0017 (17 Oct 2009)
+
+ 17 Oct 2009; Joe Sapp <nixphoeni@gentoo.org> +arduino-0017.ebuild,
+ +files/Makefile-0017.patch, +files/arduino-script-0017.patch:
+ Version bump (bug #289205)
24 Apr 2009; Joe Sapp <nixphoeni@gentoo.org> metadata.xml,
arduino-0015-r1:
diff --git a/dev-embedded/arduino/arduino-0017.ebuild b/dev-embedded/arduino/arduino-0017.ebuild
new file mode 100644
index 000000000000..ea736b390c1d
--- /dev/null
+++ b/dev-embedded/arduino/arduino-0017.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/arduino-0017.ebuild,v 1.1 2009/10/17 18:15:07 nixphoeni Exp $
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Arduino is an open-source AVR electronics prototyping platform"
+HOMEPAGE="http://arduino.cc/"
+SRC_URI="http://www.arduino.cc/files/${P}.tgz"
+LICENSE="GPL-2 LGPL-2 CCPL-Attribution-ShareAlike-3.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+RESTRICT="strip binchecks"
+IUSE="java"
+RDEPEND="dev-embedded/avrdude sys-devel/crossdev"
+DEPEND="${RDEPEND} java? ( virtual/jre dev-embedded/uisp dev-java/jikes dev-java/rxtx dev-java/antlr )"
+
+pkg_setup() {
+ [ ! -x /usr/bin/avr-g++ ] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+}
+
+pkg_postinst() {
+ pkg_setup
+ einfo "Copy /usr/share/${P}/hardware/cores/arduino/Makefile and edit it to suit the project"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/Makefile-${PV}.patch
+ rm -rf hardware/tools/avrdude*
+ if ! use java; then
+ rm -rf lib
+ rm -f arduino
+ else
+ # fix the provided arduino script to call out the right
+ # libraries, remove resetting of $PATH, and fix its
+ # reference to LD_LIBRARY_PATH (see bug #189249)
+ epatch "${FILESDIR}"/arduino-script-${PV}.patch
+ fi
+}
+
+src_install() {
+ mkdir -p "${D}/usr/share/${P}/" "${D}/usr/bin"
+ cp -a "${S}" "${D}/usr/share/"
+ fowners -R root:uucp "/usr/share/${P}/hardware"
+ if use java; then
+ sed -e s@__PN__@${P}@g < "${FILESDIR}"/arduino > "${D}/usr/bin/arduino"
+ chmod +x "${D}/usr/bin/arduino"
+
+ # get rid of libraries provided by other packages
+ rm -f "${D}/usr/share/${P}/lib/RXTXcomm.jar"
+ rm -f "${D}/usr/share/${P}/lib/librxtxSerial.so"
+ rm -f "${D}/usr/share/${P}/lib/antlr.jar"
+ rm -f "${D}/usr/share/${P}/lib/ecj.jar"
+
+ # use system avrdude
+ # patching class files is too hard
+ dosym /usr/bin/avrdude "/usr/share/${P}/hardware/tools/avrdude"
+ dosym /etc/avrdude.conf "/usr/share/${P}/hardware/tools/avrdude.conf"
+
+ # IDE tries to compile these libs at first start up
+ fperms -R g+w "/usr/share/${P}/hardware/libraries"
+ fi
+
+ dodoc readme.txt
+}
diff --git a/dev-embedded/arduino/files/Makefile-0017.patch b/dev-embedded/arduino/files/Makefile-0017.patch
new file mode 100644
index 000000000000..cee474142192
--- /dev/null
+++ b/dev-embedded/arduino/files/Makefile-0017.patch
@@ -0,0 +1,38 @@
+--- hardware/cores/arduino/Makefile 2009-10-16 23:18:21.000000000 -0400
++++ hardware/cores/arduino/Makefile 2009-10-16 23:20:02.000000000 -0400
+@@ -35,8 +35,8 @@
+ # $Id: Makefile-0017.patch,v 1.1 2009/10/17 18:15:11 nixphoeni Exp $
+
+ TARGET = $(notdir $(CURDIR))
+-INSTALL_DIR = ../../..
+-PORT = /dev/tty.usb*
++INSTALL_DIR = /usr/share/arduino-0017
++PORT = /dev/ttyUSB1
+ UPLOAD_RATE = 19200
+ AVRDUDE_PROGRAMMER = stk500v1
+ MCU = atmega168
+@@ -46,7 +46,7 @@
+ # Below here nothing should be changed...
+
+ ARDUINO = $(INSTALL_DIR)/hardware/cores/arduino
+-AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
++AVR_TOOLS_PATH = /usr/bin
+ SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \
+ $(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \
+ $(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_serial.c \
+@@ -88,13 +88,13 @@
+ CFLAGS = $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA)
+ CXXFLAGS = $(CDEFS) $(CINCS) -O$(OPT)
+ #ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
+-LDFLAGS = -lm
++LDFLAGS = -L/usr/avr/lib -lm
+
+
+ # Programming support using avrdude. Settings and variables.
+ AVRDUDE_PORT = $(PORT)
+ AVRDUDE_WRITE_FLASH = -U flash:w:applet/$(TARGET).hex
+-AVRDUDE_FLAGS = -V -F -C $(INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf \
++AVRDUDE_FLAGS = -V -F -C /etc/avrdude.conf \
+ -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
+ -b $(UPLOAD_RATE)
+
diff --git a/dev-embedded/arduino/files/arduino-script-0017.patch b/dev-embedded/arduino/files/arduino-script-0017.patch
new file mode 100644
index 000000000000..aaad17e8ec73
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-script-0017.patch
@@ -0,0 +1,20 @@
+--- arduino 2009-08-11 19:00:04.000000000 -0400
++++ arduino 2009-10-17 13:39:14.000000000 -0400
+@@ -8,14 +8,14 @@
+ lib/*.jar \
+ ;
+ do
+- CLASSPATH="${CLASSPATH}:${APPDIR}/${LIB}"
++ CLASSPATH="${CLASSPATH+$CLASSPATH:}${APPDIR}/${LIB}"
+ done
++CLASSPATH="${CLASSPATH+$CLASSPATH:}$(java-config -dp antlr)"
++CLASSPATH="${CLASSPATH+$CLASSPATH:}$(java-config -dp rxtx-2)"
+ export CLASSPATH
+
+-LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}
++LD_LIBRARY_PATH="$(java-config -di rxtx-2)${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH
+
+-export PATH="${APPDIR}/java/bin:${PATH}"
+-
+ java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base