aboutsummaryrefslogtreecommitdiff
path: root/devel/arduino-mk
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-10-21 11:14:59 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2012-10-21 11:14:59 +0000
commit034bc76b8a5f295ef0806cd7ec70222555968ce1 (patch)
tree11d58cf250f2b0e887133f2fe5df3e60dde98322 /devel/arduino-mk
parent9ee48abecc44b8c24c091d52e5b9591a47bff64a (diff)
downloadports-034bc76b8a5f295ef0806cd7ec70222555968ce1.tar.gz
ports-034bc76b8a5f295ef0806cd7ec70222555968ce1.zip
- Update to 0.10.
- Convert to OptionsNG. PR: ports/172684 Submitted by: Craig Leres <leres@ee.lbl.gov> (maintainer) Feature safe: yes
Notes
Notes: svn path=/head/; revision=306226
Diffstat (limited to 'devel/arduino-mk')
-rw-r--r--devel/arduino-mk/Makefile44
-rw-r--r--devel/arduino-mk/distinfo4
-rw-r--r--devel/arduino-mk/files/Makefile16
-rw-r--r--devel/arduino-mk/files/blink2.pde30
-rw-r--r--devel/arduino-mk/files/patch-arduino-mk-Arduino.mk (renamed from devel/arduino-mk/files/patch-Arduino.mk)23
-rw-r--r--devel/arduino-mk/pkg-plist38
6 files changed, 75 insertions, 80 deletions
diff --git a/devel/arduino-mk/Makefile b/devel/arduino-mk/Makefile
index 4a99b0ee4b7a..09367b5d1555 100644
--- a/devel/arduino-mk/Makefile
+++ b/devel/arduino-mk/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= arduino-mk
-PORTVERSION= 0.8
+PORTVERSION= 0.10
CATEGORIES= devel
MASTER_SITES= http://mjo.tc/atelier/2009/02/acli/
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -26,35 +26,47 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
NO_BUILD= yes
-PLIST_FILES= arduino/lib/Arduino.mk \
- arduino/tools/ard-parse-boards
+OPTIONS_DEFINE+= DOCS EXAMPLES
-.if !defined(NOPORTEXAMPLES)
-PLIST_FILES+= ${EXAMPLESDIR_REL}/Makefile \
- ${EXAMPLESDIR_REL}/blink2.pde
-PLIST_DIRS+= ${EXAMPLESDIR_REL}
+.include <bsd.port.options.mk>
+
+.if empty(PORT_OPTIONS:MDOCS)
+PLIST_SUB+= REFDOCS="@comment "
+.else
+PLIST_SUB+= REFDOCS=""
.endif
-.include <bsd.port.pre.mk>
+.if empty(PORT_OPTIONS:MEXAMPLES)
+PLIST_SUB+= EXAMPLES="@comment "
+.else
+PLIST_SUB+= EXAMPLES=""
+.endif
ARDUINO_CMD= ${FILESDIR}/version.sh ${PREFIX}/arduino/lib/version.txt
OLD_BOARDS_TXT= /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt
NEW_BOARDS_TXT= ${PREFIX}/arduino/hardware/arduino/boards.txt
+INSLIST= AnalogInOutSerial Blink BlinkWithoutDelay Fade HelloWorld \
+ WebServer master_reader toneMelody
post-patch:
@ARDUINO="`$(ARDUINO_CMD)`" && \
${REINPLACE_CMD} -e "s|%%ARDUINO%%|$${ARDUINO}|g" \
- ${WRKSRC}/Arduino.mk
+ ${WRKSRC}/arduino-mk/Arduino.mk
@${REINPLACE_CMD} -e "s|'${OLD_BOARDS_TXT}'|'${NEW_BOARDS_TXT}'|g" \
- ${WRKSRC}/ard-parse-boards
+ ${WRKSRC}/bin/ard-parse-boards
do-install:
- ${INSTALL_DATA} ${WRKSRC}/Arduino.mk ${PREFIX}/arduino/lib
- ${INSTALL_SCRIPT} ${WRKSRC}/ard-parse-boards ${PREFIX}/arduino/tools
-.if !defined(NOPORTEXAMPLES)
+ ${MKDIR} ${PREFIX}/${PORTNAME}/bin
+ ${INSTALL_DATA} ${WRKSRC}/arduino-mk/Arduino.mk ${PREFIX}/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/ard-parse-boards ${PREFIX}/${PORTNAME}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/bin/ard-reset-arduino ${PREFIX}/${PORTNAME}/bin
+.if ${PORT_OPTIONS:MEXAMPLES}
${MKDIR} ${EXAMPLESDIR}
- ${INSTALL_DATA} ${FILESDIR}/Makefile ${EXAMPLESDIR}
- ${INSTALL_DATA} ${FILESDIR}/blink2.pde ${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} "${INSLIST}" ${EXAMPLESDIR})
+.endif
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/arduino-mk/distinfo b/devel/arduino-mk/distinfo
index 400533055b8e..79b22bd43731 100644
--- a/devel/arduino-mk/distinfo
+++ b/devel/arduino-mk/distinfo
@@ -1,2 +1,2 @@
-SHA256 (arduino-mk_0.8.tar.gz) = 9510a8cceb8c3a2e093ec8162b0694e6c7a466e75ded8d1ab3592ae0825f1e0c
-SIZE (arduino-mk_0.8.tar.gz) = 16432
+SHA256 (arduino-mk_0.10.tar.gz) = 95a6c15667d4577a22270b4fc046678e974a4babb7ae1ce4673ecaed02ee9a5d
+SIZE (arduino-mk_0.10.tar.gz) = 25394
diff --git a/devel/arduino-mk/files/Makefile b/devel/arduino-mk/files/Makefile
deleted file mode 100644
index 73431f39377c..000000000000
--- a/devel/arduino-mk/files/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# @(#) $Id: Makefile 13 2011-12-31 00:07:36Z leres $ (XSE)
-# $FreeBSD$
-
-TARGET= blink2
-
-BOARD_TAG= atmega328
-
-ARDUINO_DIR= /usr/local/arduino
-
-AVRDUDE_ARD_PROGRAMMER= arduino
-AVRDUDE_ARD_BAUDRATE= 57600
-ARDUINO_PORT= /dev/arduino
-
-include $(ARDUINO_DIR)/lib/Arduino.mk
-
-CPPFLAGS+= -Werror
diff --git a/devel/arduino-mk/files/blink2.pde b/devel/arduino-mk/files/blink2.pde
deleted file mode 100644
index 9add9ab871ff..000000000000
--- a/devel/arduino-mk/files/blink2.pde
+++ /dev/null
@@ -1,30 +0,0 @@
-/* @(#) $Id: blink2.pde 18 2012-02-05 20:38:31Z leres $ (XSE) */
-
-/*
- * This is a example sketch that blinks the LED like a heartbeat
- */
-
-/* SCK is usually connected to the LED */
-#define PIN_LED_OUT SCK
-
-void
-setup()
-{
- pinMode(PIN_LED_OUT, OUTPUT);
-}
-
-void
-loop()
-{
- digitalWrite(PIN_LED_OUT, HIGH);
- delay(25);
-
- digitalWrite(PIN_LED_OUT, LOW);
- delay(50);
-
- digitalWrite(PIN_LED_OUT, HIGH);
- delay(25);
-
- digitalWrite(PIN_LED_OUT, LOW);
- delay(900);
-}
diff --git a/devel/arduino-mk/files/patch-Arduino.mk b/devel/arduino-mk/files/patch-arduino-mk-Arduino.mk
index 03c8cada92cb..c695d37cf8aa 100644
--- a/devel/arduino-mk/files/patch-Arduino.mk
+++ b/devel/arduino-mk/files/patch-arduino-mk-Arduino.mk
@@ -1,6 +1,6 @@
---- Arduino.mk.orig 2012-02-12 09:19:53.000000000 -0800
-+++ Arduino.mk 2012-08-04 23:47:14.000000000 -0700
-@@ -92,7 +92,7 @@
+--- arduino-mk/Arduino.mk.orig 2012-09-17 10:41:19.000000000 -0700
++++ arduino-mk/Arduino.mk 2012-09-17 19:21:52.000000000 -0700
+@@ -160,7 +160,7 @@
#
# ARDUINO_LIBS - A list of any libraries used by the sketch (we
# assume these are in
@@ -9,7 +9,7 @@
#
# ARDUINO_PORT - The port where the Arduino can be found (only needed
# when uploading
-@@ -176,7 +176,7 @@
+@@ -287,7 +287,7 @@
#
# Arduino version number
ifndef ARDUINO_VERSION
@@ -17,17 +17,8 @@
+ARDUINO_VERSION = %%ARDUINO%%
endif
- #
-@@ -215,7 +215,7 @@
- endif
-
- ifndef PARSE_BOARD
--PARSE_BOARD = ard-parse-boards --boards_txt=$(BOARDS_TXT)
-+PARSE_BOARD = $(ARDUINO_DIR)/tools/ard-parse-boards --boards_txt=$(BOARDS_TXT)
- endif
-
- # Which variant ? This affects the include path
-@@ -268,12 +268,12 @@
+ ########################################################################
+@@ -448,12 +448,12 @@
########################################################################
# Local sources
#
@@ -46,7 +37,7 @@
LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.o) $(LOCAL_CPP_SRCS:.cpp=.o) \
$(LOCAL_CC_SRCS:.cc=.o) $(LOCAL_PDE_SRCS:.pde=.o) \
$(LOCAL_INO_SRCS:.ino=.o) $(LOCAL_AS_SRCS:.S=.o)
-@@ -392,7 +392,11 @@
+@@ -593,7 +593,11 @@
# the pde -> cpp -> o file
$(OBJDIR)/%.cpp: %.pde
diff --git a/devel/arduino-mk/pkg-plist b/devel/arduino-mk/pkg-plist
new file mode 100644
index 000000000000..3c37270a54df
--- /dev/null
+++ b/devel/arduino-mk/pkg-plist
@@ -0,0 +1,38 @@
+arduino-mk/Arduino.mk
+arduino-mk/bin/ard-parse-boards
+arduino-mk/bin/ard-reset-arduino
+@dirrm arduino-mk/bin
+@dirrm arduino-mk
+%%EXAMPLES%%%%EXAMPLESDIR%%/AnalogInOutSerial/AnalogInOutSerial.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/AnalogInOutSerial/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/Blink/Blink.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/Blink/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/BlinkWithoutDelay/._.DS_Store
+%%EXAMPLES%%%%EXAMPLESDIR%%/BlinkWithoutDelay/.DS_Store
+%%EXAMPLES%%%%EXAMPLESDIR%%/BlinkWithoutDelay/BlinkWithoutDelay.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/BlinkWithoutDelay/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/Fade/Fade.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/Fade/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/HelloWorld/HelloWorld.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/HelloWorld/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/master_reader/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/master_reader/master_reader.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/toneMelody/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/toneMelody/pitches.h
+%%EXAMPLES%%%%EXAMPLESDIR%%/toneMelody/toneMelody.ino
+%%EXAMPLES%%%%EXAMPLESDIR%%/WebServer/Makefile
+%%EXAMPLES%%%%EXAMPLESDIR%%/WebServer/WebServer.ino
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/toneMelody
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/master_reader
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/WebServer
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/HelloWorld
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/Fade
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/BlinkWithoutDelay/build-cli/libs/Ethernet
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/BlinkWithoutDelay/build-cli/libs
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/BlinkWithoutDelay/build-cli
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/BlinkWithoutDelay
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/Blink
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%/AnalogInOutSerial
+%%EXAMPLES%%@dirrm %%EXAMPLESDIR%%
+%%REFDOCS%%%%DOCSDIR%%/README.md
+%%REFDOCS%%@dirrm %%DOCSDIR%%