blob: 2ed3b92d48302e254a188d5fae9a2b4fcc21736d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# $FreeBSD$
PORTNAME= arduino
PORTVERSION= 1.8.2
PORTREVISION= 1
CATEGORIES= devel java
PKGNAMESUFFIX= 18
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= bsdports@kyle-evans.net
COMMENT= Open-source electronics prototyping platform
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/../license.txt
LIB_DEPENDS= liblistSerialsj.so:devel/listserialc \
libastyle-arduinoj.so:devel/libastylej-arduino
RUN_DEPENDS= arduino-builder:devel/arduino-builder \
arduino-tools>=1.6.12:devel/arduino-tools \
bash:shells/bash \
${JAVA_HOME}/jre/lib/ext/jssc-2.8.0.jar:comms/java-simple-serial-connector
CONFLICTS= arduino-[0-9]*
BUNDLE_GH_ACCOUNT= arduino-libraries
BUNDLE_LIBRARIES= Firmata:2.5.5:firmata \
Bridge:1.6.3:bridge \
Robot_Control:1.0.2:robotcontrol \
Robot_Motor:1.0.2:robotmotor \
RobotIRremote:1.0.2:robotir \
SpacebrewYun:1.0.1:spacebrew \
Temboo:1.1.8:temboo \
Esplora:1.0.4:esplora \
Mouse:1.0.1:mouse \
Keyboard:1.0.1:keyboard \
SD:1.1.1:sd \
Servo:1.1.2:servo
GH_TUPLE+= ${BUNDLE_GH_ACCOUNT}:WiFi101-FirmwareUpdater-Plugin:v0.9.0:wifi10/linux/work/tools/WiFi101
USE_GITHUB= yes
GH_ACCOUNT= arduino
GH_PROJECT= Arduino
.for blib in ${BUNDLE_LIBRARIES}
GH_TUPLE+= ${BUNDLE_GH_ACCOUNT}:${blib}/linux/work/libraries/${blib:C/\:.*//}
.endfor
USES= desktop-file-utils
LIB_DIRS+= ${LOCALBASE}/lib ${LOCALBASE}/lib/jni
WRKSRC_SUBDIR= build
PATCH_WRKSRC= ${WRKSRC}/../
MAKE_ARGS+= -Dlight_bundle=true -Dlocal_sources=true -Dno_arduino_builder=true
USE_JAVA= yes
JAVA_VERSION= 1.8+
USE_ANT= yes
OS_DIR= ${WRKSRC}/linux
BUILD_DIR= ${OS_DIR}/work
INSLIST= lib libraries revisions.txt tools
STRIP= # No Elfs here, only symlinks
OPTIONS_DEFINE= DOCS EXAMPLES
OPTIONS_SUB= yes
DOCS_MAKE_ARGS= -Dno_docs=false
DOCS_MAKE_ARGS_OFF= -Dno_docs=true
DOCS_MASTER_SITES= http://downloads.arduino.cc/:ref,galileo,edison \
https://files.kyle-evans.net/arduino/:ref,galileo,edison
DOCS_DISTFILES= reference-1.6.6-3.zip:ref \
Galileo_help_files-1.6.2.zip:galileo \
Edison_help_files-1.6.2.zip:edison
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
INSLIST+= reference
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
INSLIST+= examples
.endif
post-extract:
${MKDIR} ${BUILD_DIR}/reference
${MV} ${WRKDIR}/code.jquery.com ${BUILD_DIR}/reference
${MV} ${WRKDIR}/www.arduino.cc ${BUILD_DIR}/reference
${MV} ${WRKDIR}/Galileo_help_files ${BUILD_DIR}/reference
${MV} ${WRKDIR}/Edison_help_files ${BUILD_DIR}/reference
post-patch:
${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${PATCH_WRKSRC}/arduino-core/src/processing/app/BaseNoGui.java
${REINPLACE_CMD} -e 's:<BINARY_LOCATION>:arduino:' -e 's:<ICON_NAME>:arduino:' \
${PATCH_WRKSRC}/build/linux/dist/desktop.template
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
(cd ${BUILD_DIR}/ && ${COPYTREE_SHARE} "${INSLIST}" ${STAGEDIR}${PREFIX}/${PORTNAME} ${FIND_EXPR})
(cd ${WRKSRC}/../ && ${COPYTREE_SHARE} "libraries" ${STAGEDIR}${PREFIX}/${PORTNAME} ${FIND_EXPR})
${RM} ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/libastylej.so
${RM} ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/liblistSerialsj.so
${RM} ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/jssc-2.8.0.jar
${LN} -s ../../lib/jni/libastyle-arduinoj.so ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/libastylej.so
${LN} -s ../../lib/jni/liblistSerialsj.so ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/liblistSerialsj.so
${INSTALL_SCRIPT} ${BUILD_DIR}/arduino ${STAGEDIR}${PREFIX}/${PORTNAME}
${LN} -s ../${PORTNAME}/arduino ${STAGEDIR}${PREFIX}/bin/arduino
${LN} -s ../bin/arduino-builder ${STAGEDIR}${PREFIX}/arduino/arduino-builder
${CP} ${WRKSRC}/shared/icons/arduino.xpm ${STAGEDIR}/${PREFIX}/share/pixmaps
${CP} ${PATCH_WRKSRC}/build/linux/dist/desktop.template ${STAGEDIR}/${PREFIX}/share/applications/arduino.desktop
${REINPLACE_CMD} -e 's|$${version}|${PORTVERSION}|' ${STAGEDIR}${PREFIX}/${PORTNAME}/lib/version.txt
.include <bsd.port.mk>
|