Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Aug 2012 10:44:25 +0000 (UTC)
From:      Michael Scheidell <scheidell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r302159 - in head/devel/arduino-mk: . files
Message-ID:  <201208061044.q76AiPsX026722@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scheidell
Date: Mon Aug  6 10:44:25 2012
New Revision: 302159
URL: http://svn.freebsd.org/changeset/ports/302159

Log:
  - Fix version.sh script for arduino 1.0.1
  
  PR:		ports/170268
  Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)

Modified:
  head/devel/arduino-mk/Makefile
  head/devel/arduino-mk/distinfo
  head/devel/arduino-mk/files/patch-Arduino.mk
  head/devel/arduino-mk/files/version.sh

Modified: head/devel/arduino-mk/Makefile
==============================================================================
--- head/devel/arduino-mk/Makefile	Mon Aug  6 10:33:28 2012	(r302158)
+++ head/devel/arduino-mk/Makefile	Mon Aug  6 10:44:25 2012	(r302159)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	arduino-mk
-PORTVERSION=	0.6
+PORTVERSION=	0.8
 CATEGORIES=	devel
 MASTER_SITES=	http://mjo.tc/atelier/2009/02/acli/
 DISTNAME=	${PORTNAME}_${PORTVERSION}

Modified: head/devel/arduino-mk/distinfo
==============================================================================
--- head/devel/arduino-mk/distinfo	Mon Aug  6 10:33:28 2012	(r302158)
+++ head/devel/arduino-mk/distinfo	Mon Aug  6 10:44:25 2012	(r302159)
@@ -1,2 +1,2 @@
-SHA256 (arduino-mk_0.6.tar.gz) = f691d8157bd3be978c832d37a452cb7e371d0f3b96a5bf70abd870f8afcb7cab
-SIZE (arduino-mk_0.6.tar.gz) = 15756
+SHA256 (arduino-mk_0.8.tar.gz) = 9510a8cceb8c3a2e093ec8162b0694e6c7a466e75ded8d1ab3592ae0825f1e0c
+SIZE (arduino-mk_0.8.tar.gz) = 16432

Modified: head/devel/arduino-mk/files/patch-Arduino.mk
==============================================================================
--- head/devel/arduino-mk/files/patch-Arduino.mk	Mon Aug  6 10:33:28 2012	(r302158)
+++ head/devel/arduino-mk/files/patch-Arduino.mk	Mon Aug  6 10:44:25 2012	(r302159)
@@ -1,23 +1,24 @@
---- Arduino.mk.orig	2011-06-23 06:32:03.000000000 -0700
-+++ Arduino.mk	2011-12-28 17:19:57.000000000 -0800
-@@ -67,7 +67,7 @@
- #                   this would match the .pde file, but it's not needed
- #                   here: you could always set it to xx if you wanted!
- #    ARDUINO_LIBS - A list of any libraries used by the sketch (we assume
--#                   these are in $(ARDUINO_DIR)/hardware/libraries
-+#                   these are in $(ARDUINO_DIR)/libraries
+--- 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_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
- #    BOARD_TAG    - The ard-parse-boards tag for the board e.g. uno or mega
-@@ -155,6 +155,7 @@
- 
- ARDUINO_LIB_PATH  = $(ARDUINO_DIR)/libraries
- ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/arduino/cores/arduino
-+ARDUINO_VARIANT_PATH = $(ARDUINO_DIR)/hardware/arduino/variants/$(VARIANT)
- 
+@@ -176,7 +176,7 @@
+ #
+ # Arduino version number
+ ifndef ARDUINO_VERSION
+-ARDUINO_VERSION = 100
++ARDUINO_VERSION = %%ARDUINO%%
  endif
  
-@@ -170,7 +171,7 @@
+ #
+@@ -215,7 +215,7 @@
  endif
  
  ifndef PARSE_BOARD
@@ -25,19 +26,8 @@
 +PARSE_BOARD = $(ARDUINO_DIR)/tools/ard-parse-boards --boards_txt=$(BOARDS_TXT)
  endif
  
- # processor stuff
-@@ -182,6 +183,10 @@
- F_CPU = $(shell $(PARSE_BOARD) $(BOARD_TAG) build.f_cpu)
- endif
- 
-+ifndef VARIANT
-+VARIANT = $(shell $(PARSE_BOARD) $(BOARD_TAG) build.variant)
-+endif
-+
- # normal programming info
- ifndef AVRDUDE_ARD_PROGRAMMER
- AVRDUDE_ARD_PROGRAMMER = $(shell $(PARSE_BOARD) $(BOARD_TAG) upload.protocol)
-@@ -221,11 +226,11 @@
+ # Which variant ? This affects the include path
+@@ -268,12 +268,12 @@
  ########################################################################
  # Local sources
  #
@@ -45,67 +35,27 @@
 -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_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_AS_SRCS:.S=.o)
-@@ -278,10 +283,14 @@
- SYS_INCLUDES  = $(patsubst %,-I%,$(SYS_LIBS))
- SYS_OBJS      = $(wildcard $(patsubst %,%/*.o,$(SYS_LIBS)))
- LIB_SRC       = $(wildcard $(patsubst %,%/*.cpp,$(SYS_LIBS)))
--LIB_OBJS      = $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_SRC))
--
--CPPFLAGS      = -mmcu=$(MCU) -DF_CPU=$(F_CPU) \
--			-I. -I$(ARDUINO_CORE_PATH) \
-+LIB_SRC2      = $(wildcard $(patsubst %,%/*.c,$(SYS_LIBS)))
-+LIB_OBJS      = $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_SRC)) \
-+		$(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_SRC2))
-+
-+ARDUINO = %%ARDUINO%%
-+CPPFLAGS      = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO) \
-+			-D__DELAY_BACKWARD_COMPATIBLE__ \
-+			-I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VARIANT_PATH) \
- 			$(SYS_INCLUDES) -g -Os -w -Wall \
- 			-ffunction-sections -fdata-sections
- CFLAGS        = -std=gnu99
-@@ -289,8 +298,9 @@
- ASFLAGS       = -mmcu=$(MCU) -I. -x assembler-with-cpp
- LDFLAGS       = -mmcu=$(MCU) -lm -Wl,--gc-sections -Os
- 
--# Rules for making a CPP file from the main sketch (.cpe)
--PDEHEADER     = \\\#include \"WProgram.h\"
-+# Rules for making a CPP file from the main sketch (.pde)
-+NEWPDEHEADER     = \\\#include \"Arduino.h\"
-+OLDPDEHEADER     = \\\#include \"WProgram.h\"
- 
- # Expand and pick the first port
- ARD_PORT      = $(firstword $(wildcard $(ARDUINO_PORT)))
-@@ -308,6 +318,10 @@
- 	mkdir -p $(dir $@)
- 	$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
- 
-+$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.c
-+	mkdir -p $(dir $@)
-+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
-+
- # normal local sources
- # .o rules are for objects, .d for dependency tracking
- # there seems to be an awful lot of duplication here!!!
-@@ -343,7 +357,11 @@
++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)
+@@ -392,7 +392,11 @@
  
  # the pde -> cpp -> o file
  $(OBJDIR)/%.cpp: %.pde
--	$(ECHO) $(PDEHEADER) > $@
-+	$(ECHO) \#if $(ARDUINO) \>= 100 > $@
-+	$(ECHO) $(NEWPDEHEADER) >> $@
-+	$(ECHO) \#else >> $@
-+	$(ECHO) $(OLDPDEHEADER) >> $@
-+	$(ECHO) \#endif >> $@
+-	$(ECHO) '#include "WProgram.h"' > $@
++	$(ECHO) '#if ARDUINO >= 100' > $@
++	$(ECHO) '#include "Arduino.h"' >> $@
++	$(ECHO) '#else' >> $@
++	$(ECHO) '#include "WProgram.h"' >> $@
++	$(ECHO) '#endif' >> $@
  	$(CAT)  $< >> $@
  
- $(OBJDIR)/%.o: $(OBJDIR)/%.cpp
+ # the ino -> cpp -> o file

Modified: head/devel/arduino-mk/files/version.sh
==============================================================================
--- head/devel/arduino-mk/files/version.sh	Mon Aug  6 10:33:28 2012	(r302158)
+++ head/devel/arduino-mk/files/version.sh	Mon Aug  6 10:44:25 2012	(r302159)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# @(#) $Id: version.sh 5 2011-12-28 18:41:41Z leres $ (XSE)
+# @(#) $Id: version.sh 22 2012-08-05 06:24:24Z leres $ (XSE)
 
 # The ARDUINO version should (a) be in an include file and
 # (b) should (at a minimum) be cpp friendly
@@ -17,7 +17,15 @@ case "${version}" in
 	echo "${version}"
 	;;
 
-*)
+*.*.*)
+	echo "${version}" | /usr/bin/sed -e 's/\.//g'
+	;;
+
+*.*)
 	echo "${version}" | /usr/bin/awk '{ print 100 * $0 }'
 	;;
+
+*)
+	echo "${version}"
+	;;
 esac



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