From owner-svn-ports-all@freebsd.org Mon Oct 24 22:59:23 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 710EEC1FF93; Mon, 24 Oct 2016 22:59:23 +0000 (UTC) (envelope-from bsam@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48C11F8F; Mon, 24 Oct 2016 22:59:23 +0000 (UTC) (envelope-from bsam@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9OMxMaL056179; Mon, 24 Oct 2016 22:59:22 GMT (envelope-from bsam@FreeBSD.org) Received: (from bsam@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OMxM2m056178; Mon, 24 Oct 2016 22:59:22 GMT (envelope-from bsam@FreeBSD.org) Message-Id: <201610242259.u9OMxM2m056178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bsam set sender to bsam@FreeBSD.org using -f From: Boris Samorodov Date: Mon, 24 Oct 2016 22:59:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424593 - head/devel/arduino-builder X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 22:59:23 -0000 Author: bsam Date: Mon Oct 24 22:59:22 2016 New Revision: 424593 URL: https://svnweb.freebsd.org/changeset/ports/424593 Log: Alright, this should be the last fundamental change for devel/arduino-builder. =) Right now, there's two possible configurations for building and flashing Arduino projects: 1.) Use devel/arduino16 -- this pulls in devel/arduino-builder and devel/arduino-tools itself, and uses its own method (as it turns out, completely different from arduino-builder's discovery mechanism =() for finding the proper utility for flashing (devel/bossa vs. devel/avrdude) 2.) Use devel/arduino-builder + devel/arduino-tools directly, flash the result yourself -- this has the pro of not requiring Java to build a project, but the con that you do have to figure out how to flash the board (w/ devel/bossa or devel/avrdude) yourself. I suspect that #1 will be the most commonly used configuration, but #2 is nice for "advanced" (or not-so-advanced) applications (such as using a Raspberry Pi to compile+flash firmware for a 3D printer =)). As such, we add an OPTION to make this a more straightforward process of install devel/arduino-builder and then Just Do It. This option will also add in a file at arduino/arduino-builder.options that can be passed into arduino-builder through the -build-options-file. This removes the need for -hardware, -libraries, and -tools flags based on the defaults for devel/arduino-tools. This also auto-populates the core version ("runtime.ide.version", -ide-version/-core-api-version, and the ARDUINO #define) with the minimally supported version (see: _COMPAT_VER, _IDE_VER -- these should be kept in sync, and correspond to versions of devel/arduino-{core,tools}) PR: 213749 Submitted by: Kyle Evans (maintainer) Modified: head/devel/arduino-builder/Makefile Modified: head/devel/arduino-builder/Makefile ============================================================================== --- head/devel/arduino-builder/Makefile Mon Oct 24 22:52:17 2016 (r424592) +++ head/devel/arduino-builder/Makefile Mon Oct 24 22:59:22 2016 (r424593) @@ -2,7 +2,7 @@ PORTNAME= arduino-builder PORTVERSION= 1.3.21 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MAINTAINER= bsdports@kyle-evans.net @@ -20,13 +20,28 @@ GH_TUPLE= go-errors:errors:a418503:goerr stretchr:testify:v1.1.3:stretchr/src/github.com/stretchr/testify \ jstemmer:go-junit-report:833f8ea:jstemmer/src/github.com/jstemmer/go-junit-report +OPTIONS_DEFINE= TOOLS +OPTIONS_DEFAULT=TOOLS + +TOOLS_DESC= Add arduino-tools for a standalone build setup +TOOLS_RUN_DEPENDS= arduino-tools>=${_COMPAT_VER}:devel/arduino-tools +TOOLS_PLIST_FILES= arduino/arduino-builder.options + GO_ENV+= GOPATH=${WRKSRC} STRIP= # stripping can break go binaries +_COMPAT_VER= 1.6.12 +_IDE_VER= 10612 PLIST_FILES= arduino/hardware/platform.keys.rewrite.txt \ arduino/hardware/platform.txt \ bin/${PORTNAME} +do-patch-TOOLS-on: + ${CP} ${FILESDIR}/arduino-builder.options.in ${WRKSRC}/arduino-builder.options + ${REINPLACE_CMD} -e 's|%%IDEVER%%|${_IDE_VER}|' \ + -e 's|%%PREFIX%%|${PREFIX}|' \ + ${WRKSRC}/arduino-builder.options + do-build: @( cd ${WRKSRC} ; ${SETENV} ${GO_ENV} go build arduino.cc/arduino-builder ) @@ -34,4 +49,7 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} (cd ${WRKSRC}/src/arduino.cc/builder && ${COPYTREE_SHARE} "hardware" ${STAGEDIR}${PREFIX}/arduino ${FIND_EXPR}) +do-install-TOOLS-on: + ${INSTALL_DATA} ${WRKSRC}/arduino-builder.options ${STAGEDIR}${PREFIX}/arduino/arduino-builder.options + .include