ports/158832: [patch] devel/arduino: use realpath instead of readlink -f
Warren Block
wblock at wonkity.com
Tue Jul 12 14:00:23 UTC 2011
>Number: 158832
>Category: ports
>Synopsis: [patch] devel/arduino: use realpath instead of readlink -f
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 12 14:00:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Warren Block
>Release: 8-stable
>Organization:
>Environment:
FreeBSD lightning 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Jul 9 08:21:18 MDT 2011 root at lightning:/usr/obj/usr/src/sys/LIGHTNING i386
>Description:
Versions of FreeBSD's readlink from before January 2011 did not support the -f "canonicalize" option. The Arduino startup script uses readlink -f, so change this to the native realpath(1) which should work on all versions of FreeBSD.
>How-To-Repeat:
Attempt to start the Arduino IDE. FreeBSD 7.4-RELEASE and 8.2-RELEASE will fail due to the unknown -f option to readlink:
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname string [...]
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
>Fix:
Apply patch.
Patch attached with submission follows:
diff --git a/Makefile b/Makefile
index 7758dd1..4997192 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
PORTNAME= arduino
PORTVERSION= 0022
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel java lang
MASTER_SITES= GOOGLE_CODE
EXTRACT_SUFX= .tgz
@@ -25,7 +25,7 @@ SUB_LIST= PORTNAME=${PORTNAME}
DESKTOP_ENTRIES= "Arduino" "Arduino IDE" \
${PREFIX}/${PORTNAME}/reference/img/logo.png \
- "arduino" "Development;IDE;" false
+ "arduino" "Development;IDE;" "false"
.if !defined(NOPORTDOCS)
OPTIONS+= REFDOCS "Install the reference documents" on
@@ -65,8 +65,9 @@ post-extract:
@${RM} ${WRKSRC}/lib/librxtxSerial.so
@${LN} -s ${JAVA_HOME}/lib/${ARCH}/librxtxSerial.so ${WRKSRC}/lib/
- @${REINPLACE_CMD} 's|stk500|arduino|g' ${WRKSRC}/hardware/arduino/boards.txt
- @${RM} ${WRKSRC}/hardware/arduino/boards.txt.bak
+ @${REINPLACE_CMD} -i "" -e 's|stk500|arduino|g' ${WRKSRC}/hardware/arduino/boards.txt
+
+ @${REINPLACE_CMD} -i "" -e 's|readlink -f|realpath|g' ${WRKSRC}/arduino
post-patch:
@${RM} ${WRKSRC}/hardware/arduino/bootloaders/atmega8/*.orig
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list