Date: Wed, 15 Mar 2017 09:04:18 +0000 (UTC) From: "Carlos J. Puga Medina" <cpm@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r436204 - in head/devel/arduino: . files Message-ID: <201703150904.v2F94Icf042997@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cpm Date: Wed Mar 15 09:04:18 2017 New Revision: 436204 URL: https://svnweb.freebsd.org/changeset/ports/436204 Log: - Add LICENSE - Remove reference to Linux base (Linux Compatibility not required) - Limit to architectures know to be able to enumerate serial ports on using RXTX port - Fix desktop entry - Links correct RXTX so library files depending on ARCH - Remove CHMOD usage in Makefile, and moved to pkg-plist - Fix Arduino wrapper to allow loading of sketches from the command line - Update RXTX enumeration to prevent scanning of LPT ports to increase startup speeds of Arduino IDE - Fix format of patch files - Remove bundled Linux libraries from the port prior to installation - Add support for Uarduno drivers - Fix links for java and lib files installed by port [comms/RXTX] - Update pkg-plist - Bump PORTREVISION PR: 200177 Submitted by: James Elstone, Craig Leres, swills Reported by: James Elstone Approved by: Craig Leres <leres@ee.lbl.gov> (maintainer) Added: head/devel/arduino/files/patch-arduino (contents, props changed) Modified: head/devel/arduino/Makefile head/devel/arduino/distinfo head/devel/arduino/files/arduino.in head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp head/devel/arduino/pkg-plist Modified: head/devel/arduino/Makefile ============================================================================== --- head/devel/arduino/Makefile Wed Mar 15 09:01:55 2017 (r436203) +++ head/devel/arduino/Makefile Wed Mar 15 09:04:18 2017 (r436204) @@ -3,6 +3,7 @@ PORTNAME= arduino PORTVERSION= 1.0.6 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= devel java lang MASTER_SITES= http://arduino.cc/download.php?f=/ @@ -11,12 +12,15 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-lin MAINTAINER= leres@ee.lbl.gov COMMENT= Open-source electronics prototyping platform +LICENSE= GPLv2 LGPL21 +LICENSE_COMB= multi + RUN_DEPENDS= ${JAVA_HOME}/jre/lib/ext/RXTXcomm.jar:comms/rxtx \ ${LOCALBASE}/bin/avrdude:devel/avrdude \ ${LOCALBASE}/avr/include/avr/io.h:devel/avr-libc WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -USES= dos2unix tar:tgz +USES= dos2unix tar:tgz kmod DOS2UNIX_REGEX= .*\(\.\(c|cpp|h|hex|html|ino|lst|txt\)|Makefile\) USE_JAVA= yes @@ -27,21 +31,30 @@ JAVA_RUN= yes NO_BUILD= yes USE_LDCONFIG= ${PREFIX}/arduino/lib +PLIST_SUB= ARCH=${ARCH:S|i386||:S|amd64|64|} + SUB_FILES= arduino pkg-message -SUB_LIST= PORTNAME=${PORTNAME} LINUXBASE=${LINUXBASE} +SUB_LIST= PORTNAME=${PORTNAME} LINUXBASE=${PREFIX} + +# Confirmed for ARCHS below. Arm, PowerPC and Sparc untested. (Feedback welcome) +ONLY_FOR_ARCHS= i386 amd64 REINPLACE_ARGS= -i "" DESKTOP_ENTRIES= "Arduino" "Arduino IDE" \ ${PREFIX}/${PORTNAME}/logo.png \ - "arduino" "Development;IDE;" "false" + "arduino" "Development;IDE;" false -OPTIONS_DEFINE= ATMEGA644P DOCS EXAMPLES +OPTIONS_DEFINE= ATMEGA644P DOCS EXAMPLES UARDUNO ATMEGA644P_DESC= ATmega644p patches DOCS_DESC= Install the reference documents +UARDUNO_DESC= Kernel module for Arduino Uno USB interface INSLIST= arduino hardware lib libraries logo.png revisions.txt tools +# Add serial drivers for those who are new to this. +UARDUNO_RUN_DEPENDS+= ${KMODDIR}/uarduno.ko:comms/uarduno + .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MATMEGA644P} @@ -87,16 +100,31 @@ post-patch: @${LN} -s ${PREFIX}/bin ${WRKSRC}/hardware/tools/avr/bin @${LN} -s ${PREFIX}/etc ${WRKSRC}/hardware/tools/avr/etc + # Remove broken jar, and Linux C6 based libraries. @${RM} ${WRKSRC}/lib/RXTXcomm.jar + + # This port relys on comms/RXTX working without Linux C6 compatibility. + @${RM} ${WRKSRC}/lib/librxtxSerial.so + @${RM} ${WRKSRC}/lib/librxtxSerial64.so + + # Map the RXTX port for our use @${LN} -s ${JAVA_HOME}/jre/lib/ext/RXTXcomm.jar ${WRKSRC}/lib/RXTXcomm.jar +# Add in links to the libraries compiled in RXTX for the above jar to use based on architecture. +.if ${ARCH} == i386 + @${LN} -s ${JAVA_HOME}/jre/lib/i386/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial.so +.endif + +.if ${ARCH} == amd64 + @${LN} -s ${JAVA_HOME}/jre/lib/amd64/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial64.so +.endif + @${MV} ${WRKSRC}/reference/img/logo.png ${WRKSRC}/ @${RM} -r ${WRKSRC}/reference/img/ do-install: ${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> Modified: head/devel/arduino/distinfo ============================================================================== --- head/devel/arduino/distinfo Wed Mar 15 09:01:55 2017 (r436203) +++ head/devel/arduino/distinfo Wed Mar 15 09:04:18 2017 (r436204) @@ -1,2 +1,3 @@ +TIMESTAMP = 1486141688 SHA256 (arduino-1.0.6-linux32.tgz) = f059a572231abafb92099a3a404c0a41502c3413668610676c40029384edc658 SIZE (arduino-1.0.6-linux32.tgz) = 21162427 Modified: head/devel/arduino/files/arduino.in ============================================================================== --- head/devel/arduino/files/arduino.in Wed Mar 15 09:01:55 2017 (r436203) +++ head/devel/arduino/files/arduino.in Wed Mar 15 09:04:18 2017 (r436204) @@ -5,4 +5,4 @@ PATH="%%LINUXBASE%%/usr/bin:${PATH}" export PATH -exec %%PREFIX%%/%%PORTNAME%%/arduino %%PREFIX%%/%%PORTNAME%% +exec '%%PREFIX%%/%%PORTNAME%%/arduino' $@ Added: head/devel/arduino/files/patch-arduino ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/arduino/files/patch-arduino Wed Mar 15 09:04:18 2017 (r436204) @@ -0,0 +1,13 @@ +--- arduino.orig 2017-03-06 20:47:44 UTC ++++ arduino +@@ -15,8 +15,9 @@ done + export CLASSPATH + + LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ++ + export LD_LIBRARY_PATH + + export PATH="${APPDIR}/java/bin:${PATH}" + +-java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "$@" ++java -Dgnu.io.rxtx.CheckLPT=false -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "$@" Modified: head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp ============================================================================== --- head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp Wed Mar 15 09:01:55 2017 (r436203) +++ head/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp Wed Mar 15 09:04:18 2017 (r436204) @@ -1,6 +1,6 @@ ---- 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 @@ +--- hardware/arduino/cores/arduino/HardwareSerial.cpp.orig 2014-09-16 13:45:33 UTC ++++ hardware/arduino/cores/arduino/HardwareSerial.cpp +@@ -89,7 +89,7 @@ struct ring_buffer inline void store_char(unsigned char c, ring_buffer *buffer) { @@ -9,7 +9,7 @@ // 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 @@ +@@ -124,14 +124,14 @@ inline void store_char(unsigned char c, unsigned char c = UDR0; store_char(c, &rx_buffer); } else { @@ -26,7 +26,7 @@ }; #else #error UDR not defined -@@ -150,7 +150,7 @@ +@@ -150,7 +150,7 @@ inline void store_char(unsigned char c, unsigned char c = UDR1; store_char(c, &rx_buffer1); } else { @@ -35,7 +35,7 @@ }; } #endif -@@ -165,7 +165,7 @@ +@@ -165,7 +165,7 @@ inline void store_char(unsigned char c, unsigned char c = UDR2; store_char(c, &rx_buffer2); } else { @@ -44,7 +44,7 @@ }; } #endif -@@ -180,7 +180,7 @@ +@@ -180,7 +180,7 @@ inline void store_char(unsigned char c, unsigned char c = UDR3; store_char(c, &rx_buffer3); } else { @@ -53,7 +53,7 @@ }; } #endif -@@ -365,7 +365,6 @@ +@@ -365,7 +365,6 @@ try_again: void HardwareSerial::begin(unsigned long baud, byte config) { uint16_t baud_setting; @@ -61,7 +61,7 @@ bool use_u2x = true; #if F_CPU == 16000000UL -@@ -459,7 +458,7 @@ +@@ -459,7 +458,7 @@ void HardwareSerial::flush() size_t HardwareSerial::write(uint8_t c) { Modified: head/devel/arduino/pkg-plist ============================================================================== --- head/devel/arduino/pkg-plist Wed Mar 15 09:01:55 2017 (r436203) +++ head/devel/arduino/pkg-plist Wed Mar 15 09:04:18 2017 (r436204) @@ -1,4 +1,7 @@ +@mode 755 arduino/arduino +bin/arduino +@mode %%EXAMPLES%%arduino/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino %%EXAMPLES%%arduino/examples/01.Basics/BareMinimum/BareMinimum.ino %%EXAMPLES%%arduino/examples/01.Basics/Blink/Blink.ino @@ -565,8 +568,7 @@ arduino/lib/core.jar arduino/lib/ecj.jar arduino/lib/jna.jar arduino/lib/keywords.txt -arduino/lib/librxtxSerial.so -arduino/lib/librxtxSerial64.so +arduino/lib/librxtxSerial%%ARCH%%.so arduino/lib/pde.jar arduino/lib/preferences.txt arduino/lib/theme/buttons.gif @@ -1265,4 +1267,3 @@ arduino/revisions.txt arduino/tools/Mangler/make.sh arduino/tools/Mangler/src/Mangler.java arduino/tools/howto.txt -bin/arduino
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703150904.v2F94Icf042997>