summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelo Arrifano <miknix@gentoo.org>2012-02-10 00:09:27 +0000
committerAngelo Arrifano <miknix@gentoo.org>2012-02-10 00:09:27 +0000
commitdd9932299d6a99f2c9640882f5f8650aebe9170e (patch)
treed126b9a22ba3787945541688c21cd387866ba9eb /dev-embedded
parentAdded ~mips, bug 393181. (diff)
downloadgentoo-2-dd9932299d6a99f2c9640882f5f8650aebe9170e.tar.gz
gentoo-2-dd9932299d6a99f2c9640882f5f8650aebe9170e.tar.bz2
gentoo-2-dd9932299d6a99f2c9640882f5f8650aebe9170e.zip
Version bump. I'll need to profile mask previous versions since upstream
version has changed. (Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/arduino/ChangeLog8
-rw-r--r--dev-embedded/arduino/arduino-1.0.ebuild80
-rw-r--r--dev-embedded/arduino/files/arduino-1.0-prog_char-fix.patch13
-rw-r--r--dev-embedded/arduino/files/arduino-1.0-script.patch22
4 files changed, 122 insertions, 1 deletions
diff --git a/dev-embedded/arduino/ChangeLog b/dev-embedded/arduino/ChangeLog
index e4df73695bfc..59a763d32cb6 100644
--- a/dev-embedded/arduino/ChangeLog
+++ b/dev-embedded/arduino/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-embedded/arduino
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/ChangeLog,v 1.6 2012/02/09 22:56:21 miknix Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/ChangeLog,v 1.7 2012/02/10 00:09:27 miknix Exp $
+
+*arduino-1.0 (10 Feb 2012)
+
+ 10 Feb 2012; Angelo Arrifano <miknix@gentoo.org> +arduino-1.0.ebuild,
+ +files/arduino-1.0-prog_char-fix.patch, +files/arduino-1.0-script.patch:
+ Version bump, thanks Jess Haas for providing the ebuild, #303043
09 Feb 2012; Angelo Arrifano <miknix@gentoo.org> metadata.xml:
Add myself as maintaner, remove solar (with his permission)
diff --git a/dev-embedded/arduino/arduino-1.0.ebuild b/dev-embedded/arduino/arduino-1.0.ebuild
new file mode 100644
index 000000000000..846e660e5a32
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/arduino-1.0.ebuild,v 1.1 2012/02/10 00:09:27 miknix Exp $
+
+EAPI=3
+inherit eutils
+
+DESCRIPTION="Arduino is an open-source AVR electronics prototyping platform"
+HOMEPAGE="http://arduino.cc/"
+SRC_URI="x86? ( http://arduino.googlecode.com/files/${P}-linux.tgz )
+ amd64? ( http://arduino.googlecode.com/files/${P}-linux64.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/jna
+ >=dev-java/rxtx-2.2_pre2 )"
+
+pkg_postinst() {
+ ewarn "PLEASE NOTICE:"
+ if [ ! -x /usr/bin/avr-g++ ]; then
+ ewarn "avr-g++ is missing, if you need a toolchain please see"
+ ewarn "http://en.gentoo-wiki.com/wiki/Crossdev#AVR_Architecture"
+ ewarn ""
+ fi
+ ewarn "You will need >=cross-avr/gcc-4.4.1 if you intend to use the new"
+ ewarn "Arduino Mega 2560."
+}
+
+src_prepare() {
+ # avrdude has it's own ebuild
+ rm -rf hardware/tools/avrdude*
+
+ # fix deprecated prog_char usage in Print.cpp (#303043)
+ epatch "${FILESDIR}"/${P}-prog_char-fix.patch
+
+ # -java don't build IDE
+ 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}"/${P}-script.patch
+ fi
+}
+
+src_install() {
+ mkdir -p "${D}/usr/share/${P}/" "${D}/usr/bin"
+ cp -a "${S}" "${D}/usr/share/" || die "Copying failed"
+
+ if use java; then
+ sed -e s@__PN__@${P}@g < "${FILESDIR}"/arduino \
+ > "${D}/usr/bin/arduino" && chmod +x "${D}/usr/bin/arduino" \
+ || die "Creating run script failed"
+
+ # get rid of libraries provided by other packages
+ rm -f "${D}/usr/share/${P}/lib/RXTXcomm.jar"
+ rm -f "${D}/usr/share/${P}/lib/jna.jar"
+ rm -f "${D}/usr/share/${P}/lib/librxtxSerial.so"
+ rm -f "${D}/usr/share/${P}/lib/librxtxSerial64.so"
+ 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" \
+ || die "Couldn't symlink system avrdude files"
+ dosym /etc/avrdude.conf "/usr/share/${P}/hardware/tools/avrdude.conf" \
+ || die "Couldn't symlink system avrdude files"
+ fi
+}
diff --git a/dev-embedded/arduino/files/arduino-1.0-prog_char-fix.patch b/dev-embedded/arduino/files/arduino-1.0-prog_char-fix.patch
new file mode 100644
index 000000000000..727944719d58
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.0-prog_char-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/hardware/arduino/cores/arduino/Print.cpp b/hardware/arduino/cores/arduino/Print.cpp
+index ff9b154..e541a6c 100644
+--- a/hardware/arduino/cores/arduino/Print.cpp
++++ b/hardware/arduino/cores/arduino/Print.cpp
+@@ -41,7 +41,7 @@ size_t Print::write(const uint8_t *buffer, size_t size)
+
+ size_t Print::print(const __FlashStringHelper *ifsh)
+ {
+- const prog_char *p = (const prog_char *)ifsh;
++ const char PROGMEM *p = (const char PROGMEM *)ifsh;
+ size_t n = 0;
+ while (1) {
+ unsigned char c = pgm_read_byte(p++);
diff --git a/dev-embedded/arduino/files/arduino-1.0-script.patch b/dev-embedded/arduino/files/arduino-1.0-script.patch
new file mode 100644
index 000000000000..323d6a639b18
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.0-script.patch
@@ -0,0 +1,22 @@
+diff --git a/build/linux/dist/arduino b/build/linux/dist/arduino
+index d371e76..eec238b 100755
+--- a/build/linux/dist/arduino
++++ b/build/linux/dist/arduino
+@@ -10,13 +10,12 @@ for LIB in \
+ lib/*.jar \
+ ;
+ do
+- CLASSPATH="${CLASSPATH}:${LIB}"
++ CLASSPATH="${CLASSPATH+$CLASSPATH:}${LIB}"
+ done
++CLASSPATH="${CLASSPATH+$CLASSPATH:}:$(java-config -dp rxtx-2)"
+ export CLASSPATH
+
+-LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$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
+