summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Perlov <perlovka@gmail.com>2018-11-04 13:35:22 +0200
committerAmy Liffey <amynka@gentoo.org>2018-11-04 16:36:30 +0100
commita86d651379ae4a0e804d7c55a5350effceaac452 (patch)
treead03c8c964920657393874531829388c562c5056 /dev-embedded
parentsys-kernel/vanilla-sources: Automated version bump to {4.14.79,4.18.17,4.19.1... (diff)
downloadgentoo-a86d651379ae4a0e804d7c55a5350effceaac452.tar.gz
gentoo-a86d651379ae4a0e804d7c55a5350effceaac452.tar.bz2
gentoo-a86d651379ae4a0e804d7c55a5350effceaac452.zip
dev-embedded/arduino: version bump to 1.8.7
Closes: https://bugs.gentoo.org/666146 Closes: https://github.com/gentoo/gentoo/pull/10334 Signed-off-by: Michael Perlov <perlovka@gmail.com> Signed-off-by: Amy Liffey <amynka@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/arduino/Manifest6
-rw-r--r--dev-embedded/arduino/arduino-1.8.7.ebuild146
-rw-r--r--dev-embedded/arduino/files/arduino.desktop2
3 files changed, 153 insertions, 1 deletions
diff --git a/dev-embedded/arduino/Manifest b/dev-embedded/arduino/Manifest
index 3955a4b47f7f..d62f91bbdf1b 100644
--- a/dev-embedded/arduino/Manifest
+++ b/dev-embedded/arduino/Manifest
@@ -17,3 +17,9 @@ DIST arduino-1.8.5-Temboo-1.2.1.zip 187499 BLAKE2B 4f26317b21492697fa3bbce1fe2cd
DIST arduino-1.8.5-WiFi101-Updater-ArduinoIDE-Plugin-0.9.1.zip 703748 BLAKE2B be9a0e2ac5a890121a0ef59700ee9a001711d7357d1c9aedfac7ca8593ed6bdef32219a88003846d4a793a532a3ebb47cde28dbe4c93dbeef8567ad6fb36bf00 SHA512 f107e5ee544450cc7cabfc7eb43462d374a59446418b5ce3a9f3eb545b03fe6383f42e79eb6919fb4b6e621902cbb84f4fa7119f23b51aa770ebd020ffffdee9
DIST arduino-1.8.5-reference-1.6.6-3.zip 7004842 BLAKE2B 49d0d41fb499c15f06c8cb8d8211e5039ee9843a6629f305762b262a5bf199e4bbe7fea4716b7734403dc7e83ce35a963035b3a2c0d6a198a4218e7472b18d74 SHA512 65962322b6dcb15da6c119d47c382052d1183772c855b8e8fcdd108b54e730e2374d93741737f3b51e57288a0e8842a6a7f79dce4377ea3630293e6c3e7e8b73
DIST arduino-1.8.5.tar.gz 48219839 BLAKE2B b031ccd601c42adce0ef06b69bd6103996d7a2a29a4640ab2518bb607e17d90524e1f7dc9861c096df90b0f0a439c5ee8867912b53cb925309dd7e0f6ddf3b54 SHA512 f01b0401edc7ea5d58cb475776b816d05f289060613dd452ca71ecaf4a3a95c5e9ddb5f2cf06d3c165e9e0540c895f9eaea896a7974c88834de569944c4adbd2
+DIST arduino-1.8.7.tar.gz 38372798 BLAKE2B a59aac177bb95e17eec7ab85d88cf0a25737f21d4be88458abfd8ffa12f2215b82e2256fc2921a14583b60f51f3144f46d35d19ae83ba6dd726a2a8773839aea SHA512 6676e0a7e0383eb2addbfad05020cb54c1606f6920840c269625e58354fd950b57037f553e3f9661b462dfbb8afb40d6ba7390cbe0c4b96406871279939b5823
+DIST arduino-Edison_help_files-1.6.2.zip 3321743 BLAKE2B 5d760ba329741cac27253fb439cf98381c0c0d7327f0c22f61cffc23c48d655278280185e5a7f6c85f3d182cacad4626eb9fe6cc2aaf7d2965bb377e2f39bbaa SHA512 63d4005036b43f09347814433578e8c75a7af5caa0923516deab146ef0867af4e60aad0c9d5d47870dcec0ddb4e5396363e4312425f95a8d8da8725f77da8f3a
+DIST arduino-Galileo_help_files-1.6.2.zip 4352077 BLAKE2B 16b99a57535ed77cdd69bb60dbb17085edfb2454b81a1b55b46310aa75e797bf784e39fb4642daf281ff92d9ade6f002cf359f98b95fc5225f66e63d189305fa SHA512 411fcfad9e9877078de62c02accd66ed5e44daf2979cad38c12962c22d73412d084670db77d5b50b3a32f35977961943e90d85ac80484f926468aa994f8b107b
+DIST arduino-WiFi101-Updater-ArduinoIDE-Plugin-0.9.2.zip 945515 BLAKE2B a2ab32b400f774f006e1afb69797951382f8768ee55216591baecc8fc0665c31b31df403ffd17825ae524dcd0bcba87bfecbdc82722f9105d68cf9d5c8298415 SHA512 2fd003b638133d9ff77d76952ce4a38c3c2ea78c0c0c849580883e5104c3a5c141313f74934eeda29a446388e3d502e69e65ded088e693b0ff5810a133001ba8
+DIST arduino-avr-1.6.23.tar.bz2 5001988 BLAKE2B 8b6ddc2d66e651a3a2b6bd6992cd1311aad223a6cefa1a1a4bc1fa05de449116511137f8cf13c50ca42b83477c66cf4aa3a7984f49905eb7a295eff7f2c3623e SHA512 70ff70446bfc0f036f7a2927e8e53861e60225a0a6c1eb993557278ec79b8337f3a5ee6fd6f6d200744d80104efb1783332eb8d6d53c9f1b6ea6dc3054d78fd4
+DIST arduino-reference-1.6.6-3.zip 7004842 BLAKE2B 49d0d41fb499c15f06c8cb8d8211e5039ee9843a6629f305762b262a5bf199e4bbe7fea4716b7734403dc7e83ce35a963035b3a2c0d6a198a4218e7472b18d74 SHA512 65962322b6dcb15da6c119d47c382052d1183772c855b8e8fcdd108b54e730e2374d93741737f3b51e57288a0e8842a6a7f79dce4377ea3630293e6c3e7e8b73
diff --git a/dev-embedded/arduino/arduino-1.8.7.ebuild b/dev-embedded/arduino/arduino-1.8.7.ebuild
new file mode 100644
index 000000000000..60451878c0aa
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.8.7.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-2 java-ant-2 gnome2-utils
+
+DESCRIPTION="An open-source AVR electronics prototyping platform"
+HOMEPAGE="https://arduino.cc/ https://github.com/arduino/"
+
+ARDUINO_DOCS=(
+ "reference-1.6.6-3"
+ "Galileo_help_files-1.6.2"
+ "Edison_help_files-1.6.2"
+)
+
+for docname in "${ARDUINO_DOCS[@]}"; do
+ ARDUINO_DOCS_URI+=" https://downloads.arduino.cc/${docname}.zip -> ${PN}-${docname}.zip"
+done
+
+SRC_URI="https://github.com/arduino/Arduino/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://downloads.arduino.cc/cores/avr-1.6.23.tar.bz2 -> ${PN}-avr-1.6.23.tar.bz2
+ https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v0.9.2/WiFi101-Updater-ArduinoIDE-Plugin-0.9.2.zip -> ${PN}-WiFi101-Updater-ArduinoIDE-Plugin-0.9.2.zip
+ doc? (
+ ${ARDUINO_DOCS_URI}
+ )"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CDEPEND="dev-embedded/arduino-builder"
+
+RDEPEND="${CDEPEND}
+ >=dev-util/astyle-3.1[java]
+ dev-embedded/arduino-listserialportsc
+ >=virtual/jre-1.8"
+
+DEPEND="${CDEPEND}
+ app-arch/unzip
+ >=virtual/jdk-1.8"
+
+EANT_BUILD_TARGET="build"
+# don't run the default "javadoc" target, we don't have one.
+EANT_DOC_TARGET=""
+EANT_BUILD_XML="build/build.xml"
+EANT_EXTRA_ARGS=" -Dlight_bundle=1 -Dlocal_sources=1 -Dno_arduino_builder=1"
+
+RESTRICT="strip"
+QA_PREBUILT="usr/share/arduino/hardware/arduino/avr/firmwares/*"
+
+S="${WORKDIR}/Arduino-${PV}"
+
+PATCHES=(
+ # We need to load system astyle/listserialportsc instead of bundled ones.
+ "${FILESDIR}/${PN}-1.8.5-lib-loading.patch"
+)
+
+src_unpack() {
+ # We don't want to unpack tools, just move zip files into the work dir
+ unpack `echo ${A} | cut -d ' ' -f1`
+
+ cp "${DISTDIR}/${PN}-avr-1.6.23.tar.bz2" "${S}/build/avr-1.6.23.tar.bz2" || die
+ cp "${DISTDIR}/${PN}-WiFi101-Updater-ArduinoIDE-Plugin-0.9.2.zip" "${S}/build/shared/WiFi101-Updater-ArduinoIDE-Plugin-0.9.2.zip"|| die
+
+ if use doc; then
+ local docname
+ for docname in "${ARDUINO_DOCS[@]}"; do
+ cp "${DISTDIR}/${PN}-${docname}.zip" "${S}/build/shared/${docname}.zip" || die
+ done
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Unbundle libastyle
+ sed -i 's/\(target name="linux-libastyle-[a-zA-Z0-9]*"\)/\1 if="never"/g' "$S/build/build.xml" || die
+
+ # Unbundle avr toolchain
+ sed -i 's/target name="avr-toolchain-bundle" unless="light_bundle"/target name="avr-toolchain-bundle" if="never"/' "$S/build/build.xml" || die
+
+ # Install avr hardware
+ sed -i 's/target name="assemble-hardware" unless="light_bundle"/target name="assemble-hardware"/' "$S/build/build.xml" || die
+}
+
+src_compile() {
+ if ! use doc; then
+ EANT_EXTRA_ARGS+=" -Dno_docs=1"
+ fi
+ java-pkg-2_src_compile
+}
+
+src_install() {
+ cd "${S}"/build/linux/work || die
+
+ # We need to replace relative paths for toolchain executable by paths to system ones.
+ sed -i -e 's@^compiler.path=.*@compiler.path=/usr/bin/@' -e 's@^tools.avrdude.path=.*@tools.avrdude.path=/usr@' \
+ -e 's@^tools.avrdude.config.path=.*@tools.avrdude.config.path=/etc/avrdude.conf@' hardware/arduino/avr/platform.txt || die
+
+ java-pkg_dojar lib/*.jar
+ java-pkg_dolauncher ${PN} \
+ --pwd "/usr/share/${PN}" \
+ --main "processing.app.Base" \
+ --java_args "-DAPP_DIR=/usr/share/${PN} -Djava.library.path=${EPREFIX}/usr/$(get_libdir)"
+
+ insinto "/usr/share/${PN}"
+
+ doins -r examples hardware lib tools
+
+ # In upstream's build process, we copy these fiels below from the bundled arduino-builder.
+ # Here we do the same thing, but from the system arduino-builder.
+ dosym "${EPREFIX}/usr/share/arduino-builder/platform.txt" "/usr/share/${PN}/hardware/platform.txt"
+ dosym "${EPREFIX}/usr/share/arduino-builder/platform.keys.rewrite.txt" "/usr/share/${PN}/hardware/platform.keys.rewrite.txt"
+ dosym "${EPREFIX}/usr/bin/arduino-builder" "/usr/share/${PN}/arduino-builder"
+
+ # hardware/tools/avr needs to exist or arduino-builder will
+ # complain about missing required -tools arg
+ dodir "/usr/share/${PN}/hardware/tools/avr"
+
+ if use doc; then
+ HTML_DOCS=( reference )
+ einstalldocs
+
+ # arduino expects its doc in its "main" directory. symlink it.
+ dosym "${EPREFIX}/usr/share/doc/${PF}/html/reference" "/usr/share/${PN}/reference"
+ fi
+
+ # Install menu and icons
+ domenu "${FILESDIR}/${PN}.desktop"
+ cd lib/icons || die
+ local icondir
+ for icondir in *; do
+ # icondir name is something like "24x24" we want the "24" part
+ local iconsize=`cut -dx -f1 <<< "${icondir}"`
+ newicon -s $iconsize \
+ "${icondir}/apps/arduino.png" \
+ "${PN}.png"
+ done
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ [[ ! -x /usr/bin/avr-g++ ]] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+}
diff --git a/dev-embedded/arduino/files/arduino.desktop b/dev-embedded/arduino/files/arduino.desktop
index b75dea564b5d..e72bcfcd3c29 100644
--- a/dev-embedded/arduino/files/arduino.desktop
+++ b/dev-embedded/arduino/files/arduino.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Version=1.0
-Name=arduino
+Name=Arduino
Comment=Open-source electronics prototyping platform
Exec=arduino
Icon=arduino