Bug 213749

Summary: [PATCH] devel/arduino-builder: Add TOOLS option to bring in tools for standalone building
Product: Ports & Packages Reporter: Kyle Evans <kevans>
Component: Individual Port(s)Assignee: Boris Samorodov <bsam>
Status: Closed FIXED    
Severity: Affects Some People CC: bsam
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn(1) diff of devel/arduino-builder none

Description Kyle Evans freebsd_committer freebsd_triage 2016-10-24 16:35:09 UTC
Created attachment 176107 [details]
svn(1) diff of devel/arduino-builder

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})

I...I think that's it. =P `poudriere testport` still looks good w/ TOOLS on and TOOLS off, and portlint is still happy.
Comment 1 Boris Samorodov freebsd_committer freebsd_triage 2016-10-24 18:01:02 UTC
Take.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-10-24 22:59:51 UTC
A commit references this bug:

Author: bsam
Date: Mon Oct 24 22:59:22 UTC 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 <bsdports@kyle-evans.net> (maintainer)

Changes:
  head/devel/arduino-builder/Makefile
Comment 3 Boris Samorodov freebsd_committer freebsd_triage 2016-10-24 23:01:04 UTC
Committed, thanks!
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2016-10-25 01:32:41 UTC
(In reply to Boris Samorodov from comment #3)

Hi Boris,

Looks like the additional files/ (files/arduino-builder.options.in) did not make it into the commit. =( pkg-fallout was uh, angry.
Comment 5 Boris Samorodov freebsd_committer freebsd_triage 2016-10-25 10:07:05 UTC
Uh, sorry, should be fixed.
Comment 6 Kyle Evans freebsd_committer freebsd_triage 2016-10-25 13:19:47 UTC
(In reply to Boris Samorodov from comment #5)

Thanks =). I now know what it looks like for pkg-fallout@ to get angry. =D