summaryrefslogtreecommitdiff
path: root/dev-embedded/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'dev-embedded/arduino')
-rw-r--r--dev-embedded/arduino/Manifest3
-rw-r--r--dev-embedded/arduino/arduino-1.8.19-r1.ebuild121
-rw-r--r--dev-embedded/arduino/arduino-1.8.19.ebuild6
3 files changed, 126 insertions, 4 deletions
diff --git a/dev-embedded/arduino/Manifest b/dev-embedded/arduino/Manifest
index 22b67cf5da20..bd62302c9fd5 100644
--- a/dev-embedded/arduino/Manifest
+++ b/dev-embedded/arduino/Manifest
@@ -4,5 +4,6 @@ DIST arduino-1.8.19.tar.gz 34715155 BLAKE2B d0bb23548db5b5c402e418f85339c1ace9a2
DIST arduino-WiFi101-Updater-ArduinoIDE-Plugin-0.12.0.zip 21873817 BLAKE2B ef2ee6291c452b58b990594a1cbae0daf86e1b6078b51225a7253d782554648610d39c2761ed67914e54a757d1345c7de4c8a63fbe12483f0134c21eac5dc303 SHA512 17e2d07fbdca491a8d80abb6f2ceb000c68af59b755da7db70dce2d5f781204340f43365c40e641acf0b084b2073b3b056f63d68990f405adefb76887f4c5b72
DIST arduino-avr-1.8.3.tar.bz2 4941548 BLAKE2B 48d84a30f3ccf1074df6ec006ccc58d702a572dee51cff1753121055d660ad6cea4176e74488af93227a9eeea4d3a9c0c0856711ebded26ee14a755fb519dd6f SHA512 c8a63ad79f16c380def83b1215762f5cbddfc51480d658853370c3210724bb04627272f3affc0ad01af4463a68980665a4e1c37cc8fabcec16e97c4550d1bb03
DIST arduino-examples-1.9.1.zip 4810227 BLAKE2B 0781ecb330adc444e660f6db89533dfb01995ec87dec7b5f55e28e65bfaf7f505aa79362f5815193ea6500cb1d6a16a86d5f300acf70fc4eaff0265c2891d371 SHA512 c0e21dd374b2751a1e5f2b790202d4883879da2e26e9a23ccbaec478647e2b8160cbc085e76888deafc05b9b14b1aff4ce2a9b834a7b83e8226c3bc41801015c
-EBUILD arduino-1.8.19.ebuild 4272 BLAKE2B f0534a5a08c55879f1c20acee8d70d19bc493466e47774f8eb75e41425e0835661e30e4c34802ec8fddf6295a69582b78ff2f0ad9cd4c307adbffc29234bae76 SHA512 2e786a8f36c0602b2f5704b332c2309c660864cec27e2b2aa35b291391300f07f2e4288d7b65df3344064201f43df0cd52dd74e5e4ee83c6a1445c2f2e5d595e
+EBUILD arduino-1.8.19-r1.ebuild 4330 BLAKE2B 6d72a7d814868d06cfd51e59ad85d17c471583178d1a064c023473ff840aed961a57c1881160262ed3786f4ccaa9b157f819ac1e048fb9e429ac0b005921f948 SHA512 b94aa905b172ee03f01ab4c7e63c53e55bba1bb3fbc37d03c7ad12d379339e10581d57f5c6ea45eb92d8b7ee30a7eba62603766ffe73c52a9d5314b10926ccdc
+EBUILD arduino-1.8.19.ebuild 4266 BLAKE2B 6af8ff54ceabf53225cb3dc5624be7a8e9ea7ea5e883290acd3340158dd68e8ee3661263c63d9df5c6af0c319050d340a4863aa7036818176d9fc94c4c444ca5 SHA512 1cce98090b29e1033f851cae757a5b3d96e2ef06c465ee1cc54678d4663d848805dd6e5f60c462c8f50acc249a6d8733cfbaaaeb63142250b49458aa4110f29c
MISC metadata.xml 332 BLAKE2B 384c8751a6538aaca49c8fd242c5493d8321e957a1d186c9c6cf8db579ab74fe9bd25c96dda56a19afa063ade2833fe4b6d307163be7a7681421c65620fe40b7 SHA512 1d58a915f882ee70c55b5541e66cd33a1367e2f686949e1a13d7dcad62d1f1ec180d433898e5ba41f52ba9630a116b92c52cb5ad3be02127c144c1d37cfa35a0
diff --git a/dev-embedded/arduino/arduino-1.8.19-r1.ebuild b/dev-embedded/arduino/arduino-1.8.19-r1.ebuild
new file mode 100644
index 000000000000..458ce8fcbd07
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.8.19-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-2 desktop xdg
+
+DESCRIPTION="An open-source AVR electronics prototyping platform"
+HOMEPAGE="https://www.arduino.cc/ https://github.com/arduino/"
+
+AVR_VERSION="1.8.3"
+EXAMPLES_VERSION="1.9.1"
+PLUGIN_VERSION="0.12.0"
+
+SRC_URI="https://github.com/arduino/Arduino/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://downloads.arduino.cc/cores/avr-${AVR_VERSION}.tar.bz2 -> ${PN}-avr-${AVR_VERSION}.tar.bz2
+ https://github.com/arduino/arduino-examples/archive/refs/tags/${EXAMPLES_VERSION}.zip -> ${PN}-examples-${EXAMPLES_VERSION}.zip
+ https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/download/v${PLUGIN_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip -> ${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip
+ "
+S="${WORKDIR}/Arduino-${PV}"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND=">=dev-java/ant-1.10.14-r3:0"
+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=""
+
+RESTRICT="strip"
+QA_PREBUILT="usr/share/arduino/hardware/arduino/avr/firmwares/*"
+
+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
+ local a=( ${A} )
+ unpack "${a[0]}"
+
+ cp "${DISTDIR}/${PN}-avr-${AVR_VERSION}.tar.bz2" "${S}/build/avr-${AVR_VERSION}.tar.bz2" || die
+ cp "${DISTDIR}/${PN}-examples-${EXAMPLES_VERSION}.zip" "${S}/build/" || die
+ cp "${DISTDIR}/${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip" "${S}/build/shared/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip" || die
+}
+
+src_prepare() {
+ default
+# java-pkg_clean # pretty much stuff to get unbundled
+
+ # 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() {
+ eant -f build/build.xml -Dlight_bundle=1 -Dlocal_sources=1 -Dno_arduino_builder=1 -Dversion=1.8.19
+}
+
+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 "../../arduino-builder/platform.txt" "/usr/share/${PN}/hardware/platform.txt"
+ dosym "../../arduino-builder/platform.keys.rewrite.txt" "/usr/share/${PN}/hardware/platform.keys.rewrite.txt"
+ dosym "../../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"
+
+ # 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() {
+ xdg_pkg_postinst
+ [[ ! -x /usr/bin/avr-g++ ]] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+}
diff --git a/dev-embedded/arduino/arduino-1.8.19.ebuild b/dev-embedded/arduino/arduino-1.8.19.ebuild
index 00bad17d94bd..4dd3c76f3613 100644
--- a/dev-embedded/arduino/arduino-1.8.19.ebuild
+++ b/dev-embedded/arduino/arduino-1.8.19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,7 @@ EAPI=8
inherit java-pkg-2 java-ant-2 desktop xdg-utils
DESCRIPTION="An open-source AVR electronics prototyping platform"
-HOMEPAGE="https://arduino.cc/ https://github.com/arduino/"
+HOMEPAGE="https://www.arduino.cc/ https://github.com/arduino/"
AVR_VERSION="1.8.3"
EXAMPLES_VERSION="1.9.1"
@@ -15,7 +15,7 @@ PLUGIN_VERSION="0.12.0"
SRC_URI="https://github.com/arduino/Arduino/archive/${PV}.tar.gz -> ${P}.tar.gz
https://downloads.arduino.cc/cores/avr-${AVR_VERSION}.tar.bz2 -> ${PN}-avr-${AVR_VERSION}.tar.bz2
https://github.com/arduino/arduino-examples/archive/refs/tags/${EXAMPLES_VERSION}.zip -> ${PN}-examples-${EXAMPLES_VERSION}.zip
- https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v${PLUGIN_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip -> ${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip
+ https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/download/v${PLUGIN_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip -> ${PN}-WiFi101-Updater-ArduinoIDE-Plugin-${PLUGIN_VERSION}.zip
"
LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"