Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2012 12:04:00 -0700 (PDT)
From:      Craig Leres <leres@ee.lbl.gov>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        leres@ee.lbl.gov
Subject:   ports/166183: [PATCH] devel/arduino update to work with avr-libc 1.8.0
Message-ID:  <201203161904.q2GJ40vZ079690@ice.ee.lbl.gov>
Resent-Message-ID: <201203161910.q2GJA1i4066826@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166183
>Category:       ports
>Synopsis:       [PATCH] devel/arduino update to work with avr-libc 1.8.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 16 19:10:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Craig Leres
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
System: FreeBSD ice.ee.lbl.gov 8.2-RELEASE FreeBSD 8.2-RELEASE #9 r33: Wed Sep 21 19:41:19 PDT 2011 leres@hot.ee.lbl.gov:/usr/src/8.2-RELEASE/sys/amd64/compile/LBLIPV6 amd64

>Description:
	avr-libc 1.8.0 changed the way prog_char/PROGMEM works and
	this breaks hardware/arduino/cores/arduino/Print.cpp

>How-To-Repeat:
	/usr/local/arduino/hardware/arduino/cores/arduino/Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
	/usr/local/arduino/hardware/arduino/cores/arduino/Print.cpp:44:9: error: 'prog_char' does not name a type
	/usr/local/arduino/hardware/arduino/cores/arduino/Print.cpp:47:23: error: 'p' was not declared in this scope
	gmake: *** [build-cli/Print.o] Error 1

>Fix:
	Two patches are attached; patch-Makefile bumps PORTREVISION
	and patch-hardware-arduino-cores-arduino-Print.cpp should
	be placed in the files directory.

--- patch-Makefile begins here ---
--- Makefile.orig	2012-03-16 11:28:36.000000000 -0700
+++ Makefile	2012-03-16 11:22:48.000000000 -0700
@@ -5,7 +5,7 @@
 
 PORTNAME=	arduino
 PORTVERSION=	1.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	devel java lang
 MASTER_SITES=	GOOGLE_CODE
--- patch-Makefile ends here ---

--- patch-hardware-arduino-cores-arduino-Print.cpp begins here ---
--- hardware/arduino/cores/arduino/Print.cpp.orig	2012-03-16 11:16:23.000000000 -0700
+++ hardware/arduino/cores/arduino/Print.cpp	2012-03-16 11:17:17.000000000 -0700
@@ -41,7 +41,7 @@
 
 size_t Print::print(const __FlashStringHelper *ifsh)
 {
-  const prog_char *p = (const prog_char *)ifsh;
+  const char PROGMEM *p = (const char PROGMEM *)ifsh;
   size_t n = 0;
   while (1) {
     unsigned char c = pgm_read_byte(p++);
--- patch-hardware-arduino-cores-arduino-Print.cpp ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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