Bug 187460

Summary: [PATCH] devel/arduino: Support staging
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Pawel Pekala <pawel>
Status: Closed FIXED    
Severity: Affects Only Me CC: leres
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch.txt none

Description Craig Leres freebsd_committer freebsd_triage 2014-03-11 23:10:00 UTC
	- Add stage support

	- Add initial arlcd config to boards.txt

	- Clean up some gcc warnings

Fix: Please see the attached patch.
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2014-03-13 22:26:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-13 22:53:34 UTC
Author: pawel
Date: Thu Mar 13 22:53:25 2014
New Revision: 348137
URL: http://svnweb.freebsd.org/changeset/ports/348137
QAT: https://qat.redports.org/buildarchive/r348137/

Log:
  - Add stage support
  - Add initial arlcd config to boards.txt
  - Clean up some gcc warnings
  
  PR:		ports/187460
  Submitted by:	maintainer

Added:
  head/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd   (contents, props changed)
  head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp   (contents, props changed)
Modified:
  head/devel/arduino/Makefile

Modified: head/devel/arduino/Makefile
==============================================================================
--- head/devel/arduino/Makefile	Thu Mar 13 22:36:21 2014	(r348136)
+++ head/devel/arduino/Makefile	Thu Mar 13 22:53:25 2014	(r348137)
@@ -3,7 +3,7 @@
 
 PORTNAME=	arduino
 PORTVERSION=	1.0.5
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	devel java lang
 MASTER_SITES=	GOOGLE_CODE
@@ -18,7 +18,7 @@ RUN_DEPENDS=	${JAVA_HOME}/jre/lib/ext/RX
 		${LOCALBASE}/avr/include/avr/io.h:${PORTSDIR}/devel/avr-libc
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USE_DOS2UNIX=	yes
+USES=		dos2unix
 DOS2UNIX_REGEX=	.*\(\.\(c|cpp|h|hex|html|ino|lst|txt\)|Makefile\)
 
 USE_JAVA=	1.6+
@@ -40,7 +40,6 @@ DOCS_DESC=		Install the reference docume
 
 INSLIST=	arduino hardware lib libraries logo.png revisions.txt tools
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MATMEGA644P}
@@ -93,12 +92,9 @@ post-patch:
 	@${RM} -rf ${WRKSRC}/reference/img/
 
 do-install:
-	${MKDIR} ${PREFIX}/${PORTNAME}
-	(cd ${WRKSRC}/ && ${COPYTREE_SHARE} "${INSLIST}" ${PREFIX}/${PORTNAME} ${FIND_EXPR})
-	${CHMOD} +x ${PREFIX}/${PORTNAME}/arduino
-	${INSTALL_SCRIPT} ${WRKDIR}/arduino ${PREFIX}/bin/
-
-post-install:
-	@${CAT} ${PKGMESSAGE}
+	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
+	(cd ${WRKSRC}/ && ${COPYTREE_SHARE} "${INSLIST}" ${STAGEDIR}${PREFIX}/${PORTNAME} ${FIND_EXPR})
+	${CHMOD} +x ${STAGEDIR}${PREFIX}/${PORTNAME}/arduino
+	${INSTALL_SCRIPT} ${WRKDIR}/arduino ${STAGEDIR}${PREFIX}/bin/
 
 .include <bsd.port.mk>

Added: head/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd	Thu Mar 13 22:53:25 2014	(r348137)
@@ -0,0 +1,23 @@
+--- hardware/arduino/boards.txt.orig	2013-07-14 10:31:43.000000000 -0700
++++ hardware/arduino/boards.txt	2013-07-21 12:43:56.000000000 -0700
+@@ -601,3 +601,20 @@
+ robotMotor.build.core=robot
+ robotMotor.build.variant=robot_motor
+ 
++##############################################################
++
++arlcd.name=EarthLCD arLCD
++arlcd.upload.protocol=arduino
++arlcd.upload.maximum_size=32256
++arlcd.upload.speed=115200
++arlcd.bootloader.low_fuses=0xff
++arlcd.bootloader.high_fuses=0xde
++arlcd.bootloader.extended_fuses=0x05
++arlcd.bootloader.path=optiboot
++arlcd.bootloader.file=optiboot_atmega328.hex
++arlcd.bootloader.unlock_bits=0x3F
++arlcd.bootloader.lock_bits=0x0F
++arlcd.build.mcu=atmega328
++arlcd.build.f_cpu=16000000L
++arlcd.build.core=arduino
++arlcd.build.variant=standard

Added: head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp	Thu Mar 13 22:53:25 2014	(r348137)
@@ -0,0 +1,72 @@
+--- hardware/arduino/cores/arduino/HardwareSerial.cpp.orig	2013-05-17 12:48:38.000000000 -0700
++++ hardware/arduino/cores/arduino/HardwareSerial.cpp	2013-06-30 12:21:21.000000000 -0700
+@@ -89,7 +89,7 @@
+ 
+ inline void store_char(unsigned char c, ring_buffer *buffer)
+ {
+-  int i = (unsigned int)(buffer->head + 1) % SERIAL_BUFFER_SIZE;
++  unsigned int i = (unsigned int)(buffer->head + 1) % SERIAL_BUFFER_SIZE;
+ 
+   // if we should be storing the received character into the location
+   // just before the tail (meaning that the head would advance to the
+@@ -124,14 +124,14 @@
+       unsigned char c = UDR0;
+       store_char(c, &rx_buffer);
+     } else {
+-      unsigned char c = UDR0;
++      unsigned char c __attribute__((unused)) = UDR0;
+     };
+   #elif defined(UDR)
+     if (bit_is_clear(UCSRA, PE)) {
+       unsigned char c = UDR;
+       store_char(c, &rx_buffer);
+     } else {
+-      unsigned char c = UDR;
++      unsigned char c __attribute__((unused)) = UDR;
+     };
+   #else
+     #error UDR not defined
+@@ -150,7 +150,7 @@
+       unsigned char c = UDR1;
+       store_char(c, &rx_buffer1);
+     } else {
+-      unsigned char c = UDR1;
++      unsigned char c __attribute__((unused)) = UDR1;
+     };
+   }
+ #endif
+@@ -165,7 +165,7 @@
+       unsigned char c = UDR2;
+       store_char(c, &rx_buffer2);
+     } else {
+-      unsigned char c = UDR2;
++      unsigned char c __attribute__((unused)) = UDR2;
+     };
+   }
+ #endif
+@@ -180,7 +180,7 @@
+       unsigned char c = UDR3;
+       store_char(c, &rx_buffer3);
+     } else {
+-      unsigned char c = UDR3;
++      unsigned char c __attribute__((unused)) = UDR3;
+     };
+   }
+ #endif
+@@ -365,7 +365,6 @@
+ void HardwareSerial::begin(unsigned long baud, byte config)
+ {
+   uint16_t baud_setting;
+-  uint8_t current_config;
+   bool use_u2x = true;
+ 
+ #if F_CPU == 16000000UL
+@@ -459,7 +458,7 @@
+ 
+ size_t HardwareSerial::write(uint8_t c)
+ {
+-  int i = (_tx_buffer->head + 1) % SERIAL_BUFFER_SIZE;
++  unsigned int i = (_tx_buffer->head + 1) % SERIAL_BUFFER_SIZE;
+ 	
+   // If the output buffer is full, there's nothing for it other than to 
+   // wait for the interrupt handler to empty it a bit
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2014-03-13 22:53:53 UTC
State Changed
From-To: open->closed

Committed. Thanks!