Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2012 11:14:59 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306226 - in head/devel/arduino-mk: . files
Message-ID:  <201210211114.q9LBExE7059042@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sun Oct 21 11:14:59 2012
New Revision: 306226
URL: http://svn.freebsd.org/changeset/ports/306226

Log:
  - Update to 0.10.
  - Convert to OptionsNG.
  
  PR:		ports/172684
  Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)
  Feature safe:	yes

Added:
  head/devel/arduino-mk/files/patch-arduino-mk-Arduino.mk   (contents, props changed)
  head/devel/arduino-mk/pkg-plist   (contents, props changed)
Deleted:
  head/devel/arduino-mk/files/Makefile
  head/devel/arduino-mk/files/blink2.pde
  head/devel/arduino-mk/files/patch-Arduino.mk
Modified:
  head/devel/arduino-mk/Makefile
  head/devel/arduino-mk/distinfo

Modified: head/devel/arduino-mk/Makefile
==============================================================================
--- head/devel/arduino-mk/Makefile	Sun Oct 21 09:00:22 2012	(r306225)
+++ head/devel/arduino-mk/Makefile	Sun Oct 21 11:14:59 2012	(r306226)
@@ -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}-${PORTVER
 
 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>

Modified: head/devel/arduino-mk/distinfo
==============================================================================
--- head/devel/arduino-mk/distinfo	Sun Oct 21 09:00:22 2012	(r306225)
+++ head/devel/arduino-mk/distinfo	Sun Oct 21 11:14:59 2012	(r306226)
@@ -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

Added: head/devel/arduino-mk/files/patch-arduino-mk-Arduino.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arduino-mk/files/patch-arduino-mk-Arduino.mk	Sun Oct 21 11:14:59 2012	(r306226)
@@ -0,0 +1,52 @@
+--- 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
+-#                   $(ARDUINO_DIR)/hardware/libraries 
++#                   $(ARDUINO_DIR)/libraries 
+ #
+ #    ARDUINO_PORT - The port where the Arduino can be found (only needed
+ #                   when uploading
+@@ -287,7 +287,7 @@
+ #
+ # Arduino version number
+ ifndef ARDUINO_VERSION
+-ARDUINO_VERSION = 100
++ARDUINO_VERSION = %%ARDUINO%%
+ endif
+ 
+ ########################################################################
+@@ -448,12 +448,12 @@
+ ########################################################################
+ # Local sources
+ #
+-LOCAL_C_SRCS    = $(wildcard *.c)
+-LOCAL_CPP_SRCS  = $(wildcard *.cpp)
+-LOCAL_CC_SRCS   = $(wildcard *.cc)
+-LOCAL_PDE_SRCS  = $(wildcard *.pde)
+-LOCAL_INO_SRCS  = $(wildcard *.ino)
+-LOCAL_AS_SRCS   = $(wildcard *.S)
++LOCAL_C_SRCS    ?= $(wildcard *.c)
++LOCAL_CPP_SRCS  ?= $(wildcard *.cpp)
++LOCAL_CC_SRCS   ?= $(wildcard *.cc)
++LOCAL_PDE_SRCS  ?= $(wildcard *.pde)
++LOCAL_INO_SRCS  ?= $(wildcard *.ino)
++LOCAL_AS_SRCS   ?= $(wildcard *.S)
+ 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)
+@@ -593,7 +593,11 @@
+ 
+ # the pde -> cpp -> o file
+ $(OBJDIR)/%.cpp: %.pde
+-	$(ECHO) '#include "WProgram.h"' > $@
++	$(ECHO) '#if ARDUINO >= 100' > $@
++	$(ECHO) '#include "Arduino.h"' >> $@
++	$(ECHO) '#else' >> $@
++	$(ECHO) '#include "WProgram.h"' >> $@
++	$(ECHO) '#endif' >> $@
+ 	$(CAT)  $< >> $@
+ 
+ # the ino -> cpp -> o file

Added: head/devel/arduino-mk/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arduino-mk/pkg-plist	Sun Oct 21 11:14:59 2012	(r306226)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210211114.q9LBExE7059042>