Added new arduino build
This commit is contained in:
parent
aeb2c1a18b
commit
92e9b17c61
4
dev-embedded/arduino/Manifest
Normal file
4
dev-embedded/arduino/Manifest
Normal file
@ -0,0 +1,4 @@
|
||||
AUX arduino-1.6.7-script.patch 660 SHA256 f80ffc3cf2f2a333862b5a1826c747aa92efbf8e90c92cb339d31cd5b27b07b2 SHA512 bbdae2bd2adcb461962308ef9ed6c86005fb2ae214bb9fb755554b440a87063562a79da9492308c6e614b771c4d9c3721e369dbb1df63534d5238a2b151ddb00 WHIRLPOOL 31b5319dc111e50f925e9dc3bd2819317e2f7d2b02cd451f9b41fddb855655d4589c106bffbb832c9ce7fc5f0dbebd2f62aa06ba37131135fcdc2c2767e072de
|
||||
DIST arduino-1.6.7.tar.gz 77578555 SHA256 ae524c19c3b6fcd00cbf709e693321a13e694316fea5642a54b02d4170213586 SHA512 2f76aedad6f8bb9c3e17c4b02ecf816f5fe628b4856a6bd9a3d7c0fe3d9999a39df60a4794d99b1e62c3ae41695350f27d148a0925f7f59b8071359d33be2b00 WHIRLPOOL c5bdf2a67ff37fc8bc4a002ea24f003d97f6ae04632d906fc4d37d2af64c113f698e26720c73b40afc39925f03206a41a4ec0faba0d80756427714102ad47f90
|
||||
DIST arduino-icons.tar.bz2 58775 SHA256 9086ae27a13cc19e428ed7e6434366752b33a7d066b5620bfdd371709277390e SHA512 b750e79d6117f5df619f2b765dad6e64f0ba4aa3314b0b6e00801577e3ea1f15951ba15efe7a00f5317285a19ac29ac41c78b71342f45cd164c794a42bafcdd9 WHIRLPOOL b53ab3ff2981ca9f6d45311b9f885ca831700a7a49fef4a376cdc489f7cc3a6c39fbb93994b962b6854b0833d7342b951b5c6327422aafce762f92952b7a5876
|
||||
EBUILD arduino-1.6.7.ebuild 2482 SHA256 65bcf71185b0791df775e18ea33c742e73fbb2a012a7ea3817c68303413d26eb SHA512 230860accb8604ff5594c44943e09498acaa87352326e12cf3e163366aa173af27896ed9d4e34ad870c172369f6a43ccacdd07117877aecf4085115d4191ca18 WHIRLPOOL d68b3cfe8c81fd00502f08cb2e8bc74f71ba6fb5a1d54d9583ea3e80e38cffc73b3bcbb4ff3ced9fdbd99b7cca74fec9dd995f5ebfc817532bdce731bfd3dce7
|
92
dev-embedded/arduino/arduino-1.6.7.ebuild
Normal file
92
dev-embedded/arduino/arduino-1.6.7.ebuild
Normal file
@ -0,0 +1,92 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
JAVA_PKG_IUSE="doc examples"
|
||||
|
||||
inherit eutils java-pkg-2 java-ant-2
|
||||
|
||||
MY_P="Arduino"
|
||||
DESCRIPTION="An open-source AVR electronics prototyping platform"
|
||||
HOMEPAGE="http://arduino.cc/ https://arduino.googlecode.com/"
|
||||
SRC_URI="https://github.com/arduino/${MY_P}/archive/${PV}.tar.gz -> ${P}.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:0
|
||||
>dev-java/rxtx-2.1:2"
|
||||
|
||||
RDEPEND="${COMMONDEP}
|
||||
dev-embedded/avrdude
|
||||
sys-devel/crossdev
|
||||
>=virtual/jre-1.8"
|
||||
|
||||
DEPEND="${COMMONDEP}
|
||||
>=virtual/jdk-1.8"
|
||||
|
||||
S="${WORKDIR}/${MY_P}-${PV}"
|
||||
EANT_GENTOO_CLASSPATH="jna,rxtx-2"
|
||||
EANT_EXTRA_ARGS="-Dversion=${PV}"
|
||||
EANT_BUILD_TARGET="build"
|
||||
JAVA_ANT_REWRITE_CLASSPATH="yes"
|
||||
|
||||
java_prepare() {
|
||||
# Patch launcher script to include rxtx class/ld paths
|
||||
epatch "${FILESDIR}/${P}-script.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
eant -f arduino-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
|
||||
fi
|
||||
|
||||
insinto "/usr/share/${PN}/"
|
||||
doins -r hardware libraries tools tools-builder dist
|
||||
fowners -R root:uucp "/usr/share/${PN}/hardware"
|
||||
|
||||
insinto "/usr/share/${PN}/lib"
|
||||
doins -r lib/*.txt lib/theme lib/*.png lib/*.bmp lib/*.key lib/*.so lib/*.ico lib/*.conf
|
||||
|
||||
# use system avrdude
|
||||
# patching class files is too hard
|
||||
dosym /usr/bin/avrdude "/usr/share/${PN}/hardware/tools/avrdude"
|
||||
dosym /etc/avrdude.conf "/usr/share/${PN}/hardware/tools/avrdude.conf"
|
||||
|
||||
# install menu and icons
|
||||
sed -e 's/Exec=FULL_PATH\/arduino/Exec=arduino/g' -i arduino.desktop
|
||||
sed -e 's/Icon=FULL_PATH\/lib\/arduino.png/Icon=arduino/g' -i arduino.desktop
|
||||
sed -e 's/x-arduino/x-arduino;/g' -i arduino.desktop
|
||||
domenu "${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"
|
||||
}
|
19
dev-embedded/arduino/files/arduino-1.6.7-script.patch
Normal file
19
dev-embedded/arduino/files/arduino-1.6.7-script.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -Naurp a/build/linux/dist/arduino b/build/linux/dist/arduino
|
||||
--- a/build/linux/dist/arduino 2015-12-10 02:45:00.010340806 +0100
|
||||
+++ b/build/linux/dist/arduino 2015-12-10 02:48:13.155420642 +0100
|
||||
@@ -8,11 +8,12 @@ for LIB in \
|
||||
"$APPDIR"/lib/*.jar \
|
||||
;
|
||||
do
|
||||
- CLASSPATH="${CLASSPATH}:${LIB}"
|
||||
+ CLASSPATH="${CLASSPATH+$CLASSPATH:}${LIB}"
|
||||
done
|
||||
+CLASSPATH="${CLASSPATH+$CLASSPATH:}:$(java-config -dp rxtx-2)"
|
||||
export CLASSPATH
|
||||
|
||||
-LD_LIBRARY_PATH=$APPDIR/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}"
|
||||
|
Loading…
Reference in New Issue
Block a user