mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
101 lines
2.7 KiB
Bash
101 lines
2.7 KiB
Bash
SUMMARY="IDE for the Arduino embedded hardware family"
|
|
DESCRIPTION="The open-source Arduino Software (IDE) makes it easy to write code \
|
|
and upload it to the board. It runs on Windows, Mac OS X, and Linux. \
|
|
The environment is written in Java and based on Processing and other \
|
|
open-source software."
|
|
HOMEPAGE="http://arduino.cc"
|
|
COPYRIGHT="Arduino team"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="2"
|
|
SOURCE_URI="http://downloads.arduino.cc/arduino-1.0.6-linux32.tgz"
|
|
CHECKSUM_SHA256="f059a572231abafb92099a3a404c0a41502c3413668610676c40029384edc658"
|
|
SOURCE_DIR="arduino-1.0.6"
|
|
PATCHES="arduino_x86-1.0.6.patchset"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
arduino$secondaryArchSuffix = $portVersion
|
|
app:Arduino$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
openjdk$secondaryArchSuffix
|
|
rxtx$secondaryArchSuffix
|
|
cmd:avrdude$secondaryArchSuffix
|
|
avr_libc$secondaryArchSuffix
|
|
avr_gcc$secondaryArchSuffix
|
|
avr_binutils$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cd haiku
|
|
make
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
arduinoDir=$appsDir/Arduino
|
|
mkdir -p $arduinoDir
|
|
|
|
cp -r examples $arduinoDir
|
|
cp -r libraries $arduinoDir
|
|
cp -r reference $arduinoDir
|
|
cp -r lib $arduinoDir
|
|
cp -r tools $arduinoDir
|
|
rm $arduinoDir/lib/RXTXcomm.jar
|
|
rm $arduinoDir/lib/librxtxSerial.so
|
|
rm $arduinoDir/lib/librxtxSerial64.so
|
|
|
|
mkdir -p $arduinoDir/hardware
|
|
cp -r hardware/arduino $arduinoDir/hardware
|
|
|
|
mkdir -p $arduinoDir/hardware/tools
|
|
cp hardware/tools/avrdude.conf $arduinoDir/hardware/tools
|
|
ln -s /bin/x86/avrdude $arduinoDir/hardware/tools/avrdude
|
|
|
|
mkdir -p $arduinoDir/hardware/tools/avr
|
|
ln -s /bin/x86 $arduinoDir/hardware/tools/avr/bin
|
|
mkdir -p $arduinoDir/hardware/tools/avr/bin.gcc
|
|
ln -s /bin/x86/avr-cpp $arduinoDir/hardware/tools/avr/bin.gcc/avr-cpp
|
|
ln -s /bin/x86/avr-g++ $arduinoDir/hardware/tools/avr/bin.gcc/avr-g++
|
|
ln -s /bin/x86/avr-gcc $arduinoDir/hardware/tools/avr/bin.gcc/avr-gcc
|
|
mkdir -p $arduinoDir/hardware/tools/avr/etc
|
|
ln -s /system/settings/avrdude.conf $arduinoDir/hardware/tools/avr/etc/avrdude.conf
|
|
|
|
echo '#!/bin/sh
|
|
APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
|
|
cd "$APPDIR"
|
|
for LIB in \
|
|
java/lib/rt.jar \
|
|
java/lib/tools.jar \
|
|
lib/*.jar \
|
|
;
|
|
do
|
|
CLASSPATH="${CLASSPATH}:${LIB}"
|
|
done
|
|
export CLASSPATH
|
|
LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
export LD_LIBRARY_PATH
|
|
export PATH="${APPDIR}/java/bin:${PATH}"
|
|
java processing.app.Base "$@"
|
|
' > $arduinoDir/arduino.sh
|
|
|
|
chmod +x $arduinoDir/arduino.sh
|
|
|
|
cp "haiku/Arduino IDE" $arduinoDir
|
|
cp revisions.txt $arduinoDir
|
|
|
|
addAppDeskbarSymlink "$arduinoDir/Arduino IDE"
|
|
}
|