summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2017-02-14 17:17:17 +0300
committerAlexey Shvetsov <alexxy@gentoo.org>2017-02-14 17:17:17 +0300
commit023baea43841e9504fe470f8a899eca29e685e14 (patch)
treea7c10e374ea5b9805485599c3bae29fa3beae6ee
parentsci-chemistry/gromacs: Fix if else construct (diff)
downloadalexxy-023baea43841e9504fe470f8a899eca29e685e14.tar.gz
alexxy-023baea43841e9504fe470f8a899eca29e685e14.tar.bz2
alexxy-023baea43841e9504fe470f8a899eca29e685e14.zip
Import arduino-ide from ssnb
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
-rw-r--r--dev-embedded/arduino-ide/Manifest2
-rw-r--r--dev-embedded/arduino-ide/arduino-ide-1.8.1.ebuild93
-rw-r--r--dev-embedded/arduino-ide/files/arduino-ide-1.6.8-script.patch19
-rw-r--r--dev-embedded/arduino-ide/files/arduino-ide-1.6.9-script.patch19
-rw-r--r--dev-embedded/arduino-libs/Manifest1
-rw-r--r--dev-embedded/arduino-libs/arduino-libs-1.8.1.ebuild33
-rw-r--r--dev-embedded/arduino/arduino-1.8.1.ebuild70
-rw-r--r--profiles/arch.list44
-rw-r--r--profiles/arch/arm/use.mask10
-rw-r--r--profiles/arch/m68k/use.mask10
-rw-r--r--profiles/arch/sparc-fbsd/use.mask10
-rw-r--r--profiles/arch/sparc/use.mask10
-rw-r--r--profiles/arch/x86-fbsd/use.mask10
-rw-r--r--profiles/arch/x86/use.mask10
14 files changed, 237 insertions, 104 deletions
diff --git a/dev-embedded/arduino-ide/Manifest b/dev-embedded/arduino-ide/Manifest
new file mode 100644
index 0000000..be7314d
--- /dev/null
+++ b/dev-embedded/arduino-ide/Manifest
@@ -0,0 +1,2 @@
+DIST arduino-1.8.1.tar.gz 86826305 SHA256 cc82bbb2979fbf53dc4775668de7e5eefcb61ab65f46507aa933107ad458d268 SHA512 1ca8c306d2bdee52fbc69ba7b933ac9a3a1154cfa2e5861e75b5eb2ca1cdfa7843b36b36eae68d8d932194be5ea938fbe3c2492b87d81d88d88edd9d0aeb1541 WHIRLPOOL 0ca152bbf1600e0f15ceb11130252fb353f2b7b74c461f8d8725ca9175295bc29a1609c847a1544df4053673b8e01207267c9e9a493fd08dc75cf05614c697b7
+DIST arduino-icons.tar.bz2 58775 SHA256 9086ae27a13cc19e428ed7e6434366752b33a7d066b5620bfdd371709277390e SHA512 b750e79d6117f5df619f2b765dad6e64f0ba4aa3314b0b6e00801577e3ea1f15951ba15efe7a00f5317285a19ac29ac41c78b71342f45cd164c794a42bafcdd9 WHIRLPOOL b53ab3ff2981ca9f6d45311b9f885ca831700a7a49fef4a376cdc489f7cc3a6c39fbb93994b962b6854b0833d7342b951b5c6327422aafce762f92952b7a5876
diff --git a/dev-embedded/arduino-ide/arduino-ide-1.8.1.ebuild b/dev-embedded/arduino-ide/arduino-ide-1.8.1.ebuild
new file mode 100644
index 0000000..d84478b
--- /dev/null
+++ b/dev-embedded/arduino-ide/arduino-ide-1.8.1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+JAVA_PKG_IUSE="doc examples"
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_P="Arduino"
+PNS="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 -> arduino-${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:0
+ >dev-java/rxtx-2.1:2"
+
+RDEPEND="${COMMONDEP}
+ dev-embedded/arduino-libs
+ 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 build/linux/work || die
+ java-pkg_dojar lib/*.jar
+ java-pkg_dolauncher ${PNS} --pwd /usr/share/${PNS} --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/${PNS}/"
+ doins -r tools tools-builder dist
+
+ insinto "/usr/share/${PNS}/lib"
+ doins -r lib/*.txt lib/theme lib/*.png lib/*.bmp lib/*.key lib/*.so lib/*.ico lib/*.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 "${PNS}.desktop"
+ for sz in 16 24 32 48 128 256; do
+ newicon -s $sz \
+ "${WORKDIR}/${PNS}-icons/debian_icons_${sz}x${sz}_apps_${PNS}.png" \
+ "${PNS}.png"
+ done
+}
+
+pkg_postinst() {
+ [ ! -x /usr/bin/avr-g++ ] && ewarn "Missing avr-g++; you need to crossdev -s4 avr"
+
+ elog "I have *NOT* tested if this ebuild even works, because I don't use it myself."
+ elog "If you encounter issues with the installation, please report them to me, and"
+ elog "I will try my best to fix them."
+}
diff --git a/dev-embedded/arduino-ide/files/arduino-ide-1.6.8-script.patch b/dev-embedded/arduino-ide/files/arduino-ide-1.6.8-script.patch
new file mode 100644
index 0000000..1d7c933
--- /dev/null
+++ b/dev-embedded/arduino-ide/files/arduino-ide-1.6.8-script.patch
@@ -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}"
+
diff --git a/dev-embedded/arduino-ide/files/arduino-ide-1.6.9-script.patch b/dev-embedded/arduino-ide/files/arduino-ide-1.6.9-script.patch
new file mode 100644
index 0000000..1d7c933
--- /dev/null
+++ b/dev-embedded/arduino-ide/files/arduino-ide-1.6.9-script.patch
@@ -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}"
+
diff --git a/dev-embedded/arduino-libs/Manifest b/dev-embedded/arduino-libs/Manifest
new file mode 100644
index 0000000..f531613
--- /dev/null
+++ b/dev-embedded/arduino-libs/Manifest
@@ -0,0 +1 @@
+DIST arduino-1.8.1.tar.gz 86826305 SHA256 cc82bbb2979fbf53dc4775668de7e5eefcb61ab65f46507aa933107ad458d268 SHA512 1ca8c306d2bdee52fbc69ba7b933ac9a3a1154cfa2e5861e75b5eb2ca1cdfa7843b36b36eae68d8d932194be5ea938fbe3c2492b87d81d88d88edd9d0aeb1541 WHIRLPOOL 0ca152bbf1600e0f15ceb11130252fb353f2b7b74c461f8d8725ca9175295bc29a1609c847a1544df4053673b8e01207267c9e9a493fd08dc75cf05614c697b7
diff --git a/dev-embedded/arduino-libs/arduino-libs-1.8.1.ebuild b/dev-embedded/arduino-libs/arduino-libs-1.8.1.ebuild
new file mode 100644
index 0000000..de712f5
--- /dev/null
+++ b/dev-embedded/arduino-libs/arduino-libs-1.8.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils
+
+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 -> arduino-${PV}.tar.gz"
+LICENSE="GPL-2 GPL-2+ LGPL-2 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}/${MY_P}-${PV}"
+
+src_install() {
+ insinto "/usr/share/arduino/"
+ doins -r hardware libraries
+ fowners -R root:uucp "/usr/share/arduino/hardware"
+
+ dosym /usr/bin/avrdude "/usr/share/arduino/hardware/tools/avrdude"
+ dosym /etc/avrdude.conf "/usr/share/arduino/hardware/tools/avrdude.conf"
+
+ mkdir -p "${D}/usr/share/arduino/hardware/tools/avr/etc/"
+ dosym /etc/avrdude.conf "/usr/share/arduino/hardware/tools/avr/etc/avrdude.conf"
+}
diff --git a/dev-embedded/arduino/arduino-1.8.1.ebuild b/dev-embedded/arduino/arduino-1.8.1.ebuild
new file mode 100644
index 0000000..c2cfc21
--- /dev/null
+++ b/dev-embedded/arduino/arduino-1.8.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="An open-source AVR electronics prototyping platform"
+HOMEPAGE="http://arduino.cc/ https://arduino.googlecode.com/"
+SRC_URI=""
+LICENSE="GPL-2 GPL-2+ LGPL-2 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+minimal"
+
+CDEPEND="!minimal? ( =dev-embedded/arduino-ide-${PV} )
+ =dev-embedded/arduino-libs-${PV}"
+
+RDEPEND="${CDEPEND}"
+
+DEPEND="${CDEPEND}"
+
+src_unpack() {
+ mkdir -p "${WORKDIR}/${P}"
+}
+
+src_install() {
+ if use minimal; then
+ mkdir -p "${D}/usr/share/arduino/lib"
+ echo "${PV}" > "${D}/usr/share/arduino/lib/version.txt"
+ fi
+ true
+}
+
+pkg_postinst() {
+ elog "To compile programs for Arduino, you need a cross-compiler."
+ elog "You can install one using the 'crossdev' tool, as follows:"
+ elog "'USE=\"-sanitize\" crossdev -S -t avr'"
+ elog "^ for the AVR-based Arduino boards."
+ elog "'USE=\"-sanitize\" crossdev -S -t arm-none-eabi'"
+ elog "^ for ARM/SAM-based boards."
+
+ ewarn ""
+ ewarn "There is a bug with cross-binutils for AVR (bug #147155), which"
+ ewarn "can cause linker errors. Fortunately, there is an easy workaround:"
+ ewarn "You must create the following symlink manually on your system:"
+ ewarn "ln -s /usr/lib/binutils/avr/2.25.1/ldscripts /usr/avr/lib/ldscripts"
+ ewarn "replacing '2.25.1' with the correct version of cross-binutils"
+ ewarn "installed on your system. If you ever update or re-install the"
+ ewarn "cross-avr/binutils package on your system, you will need to"
+ ewarn "re-create the above symlink accordingly, or linker errors will occur."
+
+ ewarn ""
+ ewarn "As of 2016-03-01, AVR-gcc-5.x does not seem to work. You should"
+ ewarn "install the stable (4.9.x) version of cross-gcc using the '-S'"
+ ewarn "option when invoking the 'crossdev' command."
+
+ if use minimal; then
+ elog ""
+ elog "You have emerged this package with the 'minimal' USE flag."
+ elog "Only the libraries and hardware platform files have been installed."
+ elog "This is sufficient for building Arduino programs from the"
+ elog "commandline using tools such as 'ano' and 'ino'."
+ elog ""
+ elog "If you wish to also install the Java-based Arduino IDE,"
+ elog "disable the 'minimal' use flag."
+ elog "I have *NOT* tested if the Arduino IDE ebuild even works, because"
+ elog "I don't use it myself. If there are issues with the installation,"
+ elog "please report them to me, and I will try my best to fix the ebuild."
+ fi
+}
diff --git a/profiles/arch.list b/profiles/arch.list
deleted file mode 100644
index db7b9fa..0000000
--- a/profiles/arch.list
+++ /dev/null
@@ -1,44 +0,0 @@
-alpha
-amd64
-amd64-fbsd
-arm
-hppa
-ia64
-m68k
-mips
-ppc
-ppc64
-s390
-sh
-sparc
-sparc-fbsd
-x86
-x86-fbsd
-
-# Prefix keywords
-ppc-aix
-x86-freebsd
-x64-freebsd
-sparc64-freebsd
-hppa-hpux
-ia64-hpux
-x86-interix
-amd64-linux
-arm-linux
-ia64-linux
-ppc64-linux
-x86-linux
-ppc-macos
-x86-macos
-x64-macos
-m68k-mint
-x86-netbsd
-ppc-openbsd
-x86-openbsd
-x64-openbsd
-sparc-solaris
-sparc64-solaris
-x64-solaris
-x86-solaris
-x86-winnt
-x86-cygwin
diff --git a/profiles/arch/arm/use.mask b/profiles/arch/arm/use.mask
deleted file mode 100644
index 7424662..0000000
--- a/profiles/arch/arm/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--arm
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64
diff --git a/profiles/arch/m68k/use.mask b/profiles/arch/m68k/use.mask
deleted file mode 100644
index ad6adcd..0000000
--- a/profiles/arch/m68k/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--m68k
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64
diff --git a/profiles/arch/sparc-fbsd/use.mask b/profiles/arch/sparc-fbsd/use.mask
deleted file mode 100644
index 0eb6ec7..0000000
--- a/profiles/arch/sparc-fbsd/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--sparc-fbsd
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64
diff --git a/profiles/arch/sparc/use.mask b/profiles/arch/sparc/use.mask
deleted file mode 100644
index 69bf4d9..0000000
--- a/profiles/arch/sparc/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--sparc
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64
diff --git a/profiles/arch/x86-fbsd/use.mask b/profiles/arch/x86-fbsd/use.mask
deleted file mode 100644
index 570fd5c..0000000
--- a/profiles/arch/x86-fbsd/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--x86-fbsd
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64
diff --git a/profiles/arch/x86/use.mask b/profiles/arch/x86/use.mask
deleted file mode 100644
index 05775ff..0000000
--- a/profiles/arch/x86/use.mask
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Unmask the flag which corresponds to ARCH.
--x86
-
-# Mark Wright <gienah@gentoo.org> (26 Apr 2014)
-# mask int64 flag for 32 bits arches
-int64