summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2015-03-29 14:47:05 +0300
committerAlexey Shvetsov <alexxy@gentoo.org>2015-03-29 14:47:05 +0300
commit216ebef3d00325bdee29408e293cd5240dda29eb (patch)
treea24c6f2b6a998a03d1d5e021d0dee606d1198814
parentDrop unneeded hack (diff)
downloadalexxy-216ebef3d00325bdee29408e293cd5240dda29eb.zip
alexxy-216ebef3d00325bdee29408e293cd5240dda29eb.tar.gz
alexxy-216ebef3d00325bdee29408e293cd5240dda29eb.tar.bz2
Import from vaca overlay
Package-Manager: portage-2.2.17
-rw-r--r--dev-embedded/arduino/Manifest2
-rw-r--r--dev-embedded/arduino/arduino-1.5.8.ebuild112
-rw-r--r--dev-embedded/arduino/files/arduino-1.0.3-script.patch20
-rw-r--r--dev-embedded/arduino/files/arduino-1.5.8-build.xml.patch135
-rw-r--r--dev-embedded/arduino/files/arduino.desktop10
-rw-r--r--dev-embedded/arduino/metadata.xml7
6 files changed, 286 insertions, 0 deletions
diff --git a/dev-embedded/arduino/Manifest b/dev-embedded/arduino/Manifest
new file mode 100644
index 0000000..1c18a83
--- /dev/null
+++ b/dev-embedded/arduino/Manifest
@@ -0,0 +1,2 @@
+DIST 1.5.8.tar.gz 72309449 SHA256 88f820a753edfe3faac2a1a60c2cc93c5d21299dfaaefdf8050e4e14ec15fd94 SHA512 17adf314564b747d4055b83f8f28ec9f439a8ddb457264f6cb903abe68556cb68a16e413ee5d99dea66f8d4874096fd8484e59c3f0a5830ba199acb66409a17f WHIRLPOOL ad2a8ac8a5c6e10ae6128a756b32aabdddd2fc4acf884e74dba7c67ef83c76681a6e7e015d85fe59d380072b73b4afcec17153bc9968d5a17500a61a21806338
+DIST arduino-icons.tar.bz2 58775 SHA256 9086ae27a13cc19e428ed7e6434366752b33a7d066b5620bfdd371709277390e SHA512 b750e79d6117f5df619f2b765dad6e64f0ba4aa3314b0b6e00801577e3ea1f15951ba15efe7a00f5317285a19ac29ac41c78b71342f45cd164c794a42bafcdd9 WHIRLPOOL b53ab3ff2981ca9f6d45311b9f885ca831700a7a49fef4a376cdc489f7cc3a6c39fbb93994b962b6854b0833d7342b951b5c6327422aafce762f92952b7a5876
diff --git a/dev-embedded/arduino/arduino-1.5.8.ebuild b/dev-embedded/arduino/arduino-1.5.8.ebuild
new file mode 100644
index 0000000..f2d5410
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.5.8.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-embedded/arduino/arduino-1.0.5.ebuild,v 1.3 2013/08/18 13:27:34 ago Exp $
+
+EAPI=4
+JAVA_PKG_IUSE="doc examples"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="An open-source AVR electronics prototyping platform"
+HOMEPAGE="http://arduino.cc/ http://arduino.googlecode.com/"
+SRC_URI="https://github.com/${PN}/Arduino/archive/${PV}.tar.gz mirror://gentoo/arduino-icons.tar.bz2"
+LICENSE="GPL-2 GPL-2+ LGPL-2 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="strip binchecks"
+IUSE=""
+
+COMMONDEP="
+dev-java/jna
+>dev-java/rxtx-2.1
+dev-util/astyle"
+
+RDEPEND="${COMMONDEP}
+dev-embedded/avrdude
+dev-embedded/uisp
+sys-devel/crossdev
+>=virtual/jre-1.5"
+
+DEPEND="${COMMONDEP}
+>=virtual/jdk-1.5"
+
+EANT_GENTOO_CLASSPATH="jna,rxtx-2"
+EANT_EXTRA_ARGS="-Dversion=${PV}"
+EANT_BUILD_TARGET="build"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+src_unpack(){
+ unpack ${A}
+ cd ../"${S}"
+ mv Arduino-${PV} arduino-${PV}
+}
+
+java_prepare() {
+ # Remove the libraries to ensure the system
+ # libraries are used
+# rm app/lib/* || die
+ rm -rf app/src/processing/app/macosx || die
+ # Patch build/build.xml - remove local jar files
+ # for rxtx and ecj (use system wide versions)
+ epatch "${FILESDIR}"/${PN}-1.5.8-build.xml.patch
+
+ # Patch launcher script to include rxtx class/ld paths
+ epatch "${FILESDIR}"/${PN}-1.0.3-script.patch
+}
+
+src_compile() {
+ eant -f core/build.xml
+ EANT_GENTOO_CLASSPATH_EXTRA="../core/core.jar"
+ eant -f app/build.xml
+ eant "${EANT_EXTRA_ARGS}" -f build/build.xml
+}
+
+src_install() {
+ cd "${S}"/build/linux/work || die
+ java-pkg_dojar lib/*.jar
+ java-pkg_dolauncher ${PN} --pwd /usr/share/${PN} --main processing.app.Base
+
+ if use examples; then
+ java-pkg_doexamples examples
+ docompress -x /usr/share/doc/${P}/examples/
+ fi
+
+ if use doc; then
+ dodoc revisions.txt "${S}"/README.md
+ dohtml -r reference
+ java-pkg_dojavadoc "${S}"/build/javadoc/everything
+ fi
+
+ insinto "/usr/share/${PN}/"
+ doins -r hardware libraries
+ fowners -R root:uucp "/usr/share/${PN}/hardware"
+
+ insinto "/usr/share/${PN}/lib"
+ doins -r lib/*.txt lib/theme lib/*.jpg
+
+ # use system avrdude
+ # patching class files is too hard
+ dosym /usr/bin/avrdude "/usr/share/${PN}/hardware/tools/avr/bin/avrdude"
+ mkdir -p "/usr/share/${PN}/hardware/tools/avr/etc/"
+ dosym /etc/avrdude.conf "/usr/share/${PN}/hardware/tools/avr/etc/avrdude.conf"
+
+ dosym /usr/lib64/libastyle.so "/usr/share/${PN}/lib/libastylej.so"
+ mkdir -p "/usr/share/${PN}/hardware/tools/avr/bin/"
+ dosym /usr/bin/avr-g++ "/usr/share/${PN}/hardware/tools/avr/bin/avr-g++"
+ dosym /usr/bin/avr-gcc "/usr/share/${PN}/hardware/tools/avr/bin/avr-gcc"
+ dosym /usr/bin/avr-ar "/usr/share/${PN}/hardware/tools/avr/bin/avr-ar"
+ dosym /usr/bin/avr-objcopy "/usr/share/${PN}/hardware/tools/avr/bin/avr-objcopy"
+ dosym /usr/bin/avr-size "/usr/share/${PN}/hardware/tools/avr/bin/avr-size"
+
+ # install menu and icons
+ domenu "${FILESDIR}/${PN}.desktop"
+ for sz in 16 24 32 48 128 256; do
+ newicon -s $sz \
+ "${WORKDIR}/${PN}-icons/debian_icons_${sz}x${sz}_apps_${PN}.png" \
+ "${PN}.png"
+ done
+}
+
+pkg_postinst() {
+ [ ! -x /usr/bin/avr-g++ ] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+}
diff --git a/dev-embedded/arduino/files/arduino-1.0.3-script.patch b/dev-embedded/arduino/files/arduino-1.0.3-script.patch
new file mode 100644
index 0000000..b4accc8
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.0.3-script.patch
@@ -0,0 +1,20 @@
+diff --git a/build/linux/dist/arduino b/build/linux/dist/arduino
+index b5eb9db..3f3b4aa 100644
+--- a/build/linux/dist/arduino
++++ b/build/linux/dist/arduino
+@@ -10,11 +10,13 @@ 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}"
diff --git a/dev-embedded/arduino/files/arduino-1.5.8-build.xml.patch b/dev-embedded/arduino/files/arduino-1.5.8-build.xml.patch
new file mode 100644
index 0000000..d1a2341
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino-1.5.8-build.xml.patch
@@ -0,0 +1,135 @@
+--- build/build.xml 2014-11-13 19:11:11.671501891 +0100
++++ build/build.xml 2014-11-13 19:12:09.494503614 +0100
+@@ -48,7 +48,6 @@
+ <include name="app/lib/commons-exec-1.1.jar" />
+ <include name="app/lib/commons-httpclient-3.1.jar" />
+ <include name="app/lib/commons-logging-1.0.4.jar" />
+- <include name="app/lib/ecj.jar" />
+ <include name="app/lib/jmdns-3.4.1.jar" />
+ <include name="app/lib/jna.jar" />
+ <include name="app/lib/jsch-0.1.50.jar" />
+@@ -224,9 +223,6 @@
+ </copy>
+
+ <!-- Unzip AVR tools -->
+- <antcall target="unzip-avr-toolchain">
+- <param name="file_arch" value="mac32" />
+- </antcall>
+
+ <!--
+ <exec executable="unzip">
+@@ -252,11 +248,6 @@
+ <param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
+ </antcall>
+
+- <antcall target="unzip-arm-toolchain">
+- <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" />
+- <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz" />
+- <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" />
+- </antcall>
+
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/3.4.6/**/*"/>
+@@ -265,10 +256,6 @@
+ <fileset dir="macosx/work/${staging_hardware_folder}/tools" includes="**/man"/>
+ </delete>
+
+- <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="macosx" usetimestamp="true" skipexisting="true"/>
+- <unzip src="macosx/libastylej-2.03.zip" dest="macosx" overwrite="true"/>
+- <copy file="macosx/libastylej/libastylej.jnilib" todir="macosx/work/Arduino.app/Contents/Resources/Java/lib/" />
+- <chmod perm="755" file="macosx/work/Arduino.app/Contents/Resources/Java/lib/libastylej.jnilib" />
+ </target>
+
+ <target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
+@@ -480,38 +467,14 @@
+ <copy todir="linux/work" file="linux/dist/arduino" />
+ <chmod perm="755" file="linux/work/arduino" />
+
+- <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="linux" usetimestamp="true" skipexisting="true" />
+- <unzip src="linux/libastylej-2.03.zip" dest="linux" overwrite="true"/>
+- <copy file="linux/libastylej/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
+- <chmod perm="755" file="linux/work/lib/libastylej.so" />
+ </target>
+
+ <target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
+ <!-- Unzip ARM tools -->
+- <antcall target="unzip-arm-toolchain">
+- <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" />
+- <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz" />
+- <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" />
+- </antcall>
+-
+- <!-- Unzip AVR tools -->
+- <antcall target="unzip-avr-toolchain">
+- <param name="file_arch" value="linux32" />
+- </antcall>
+ </target>
+
+ <target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
+ <!-- Unzip ARM tools -->
+- <antcall target="unzip-tool">
+- <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" />
+- <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz" />
+- <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" />
+- </antcall>
+-
+- <!-- Unzip AVR tools -->
+- <antcall target="unzip-avr-toolchain">
+- <param name="file_arch" value="linux64" />
+- </antcall>
+ </target>
+
+ <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version">
+@@ -522,28 +485,6 @@
+ <exec executable="./linux/work/arduino" spawn="false"/>
+ </target>
+
+- <target name="unzip-avr-toolchain">
+- <get src="http://downloads.arduino.cc/avr-toolchain-${file_arch}-gcc-4.8.1.zip" dest="${staging_folder}" usetimestamp="true" ignoreerrors="true" verbose="true" />
+-
+- <checksum file="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
+- <condition property="checksum.matches.fail">
+- <equals arg1="${checksum.matches}" arg2="false"/>
+- </condition>
+- <fail if="checksum.matches.fail">Checksum failed.
+-
+- File avr-toolchain-${file_arch}-gcc-4.8.1.zip failed checksum.
+- Please remove "${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" and download it again.
+- </fail>
+-
+- <mkdir dir="${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
+- <exec executable="unzip">
+- <arg value="-q" />
+- <arg value="-n" />
+- <arg value="-d" />
+- <arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr" />
+- <arg value="${staging_folder}/avr-toolchain-${file_arch}-gcc-4.8.1.zip" />
+- </exec>
+- </target>
+
+
+
+@@ -741,10 +682,6 @@
+ <param name="file_arch" value="win32" />
+ </antcall>
+
+- <get src="http://downloads.arduino.cc/libastylej-2.03.zip" dest="windows" usetimestamp="true" skipexisting="true" />
+- <unzip src="windows/libastylej-2.03.zip" dest="windows" overwrite="true"/>
+- <copy file="windows/libastylej/AStylej.dll" todir="windows/work/lib" />
+-
+ <!-- Copy bossac.exe tool -->
+ <copy todir="windows/work/hardware/tools">
+ <fileset file="windows/bossac.exe" />
+@@ -781,12 +718,6 @@
+ </chmod>
+
+ <!-- Unzip ARM toolchain -->
+- <antcall target="unzip-arm-toolchain">
+- <param name="dist_file" value="gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" />
+- <param name="dist_url" value="http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz" />
+- <param name="dist_check_file" value="gcc-arm-none-eabi-4.8.3-2014q1" />
+- </antcall>
+-
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="windows/work/hardware/tools/avr/doc" />
+ </delete>
diff --git a/dev-embedded/arduino/files/arduino.desktop b/dev-embedded/arduino/files/arduino.desktop
new file mode 100644
index 0000000..b75dea5
--- /dev/null
+++ b/dev-embedded/arduino/files/arduino.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=arduino
+Comment=Open-source electronics prototyping platform
+Exec=arduino
+Icon=arduino
+Terminal=false
+Type=Application
+Categories=Development;
+StartupNotify=false
diff --git a/dev-embedded/arduino/metadata.xml b/dev-embedded/arduino/metadata.xml
new file mode 100644
index 0000000..4a415dc
--- /dev/null
+++ b/dev-embedded/arduino/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>gentoo.power@gmail.com</email>
+ </maintainer>
+</pkgmetadata>