2016-10-11 17:02:05 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= arduino-builder
|
2017-04-19 22:05:40 +02:00
|
|
|
PORTVERSION= 1.3.25
|
2018-03-10 18:46:04 +01:00
|
|
|
PORTREVISION= 1
|
2016-10-11 17:02:05 +02:00
|
|
|
CATEGORIES= devel
|
|
|
|
|
2017-07-06 03:39:08 +02:00
|
|
|
MAINTAINER= kevans@FreeBSD.org
|
2016-10-11 17:02:05 +02:00
|
|
|
COMMENT= Command line tool for building Arduino sketches
|
|
|
|
|
|
|
|
LICENSE= GPLv2
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|
|
|
|
|
|
|
BUILD_DEPENDS= go:lang/go
|
|
|
|
|
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= arduino
|
2017-03-05 09:13:28 +01:00
|
|
|
GH_SUBDIR= src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}
|
2017-04-19 22:05:40 +02:00
|
|
|
GH_TUPLE= go-errors:errors:8fa88b0:goerrors/src/github.com/go-errors/errors \
|
|
|
|
stretchr:testify:v1.1.4:stretchr/src/github.com/stretchr/testify \
|
|
|
|
jstemmer:go-junit-report:6aeed67:jstemmer/src/github.com/jstemmer/go-junit-report
|
2016-10-11 17:02:05 +02:00
|
|
|
|
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)
2016-10-25 00:59:22 +02:00
|
|
|
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
|
|
|
|
|
2016-10-22 22:27:17 +02:00
|
|
|
GO_ENV+= GOPATH=${WRKSRC}
|
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)
2016-10-25 00:59:22 +02:00
|
|
|
_COMPAT_VER= 1.6.12
|
|
|
|
_IDE_VER= 10612
|
2016-10-11 17:02:05 +02:00
|
|
|
|
2016-10-15 23:22:06 +02:00
|
|
|
PLIST_FILES= arduino/hardware/platform.keys.rewrite.txt \
|
|
|
|
arduino/hardware/platform.txt \
|
|
|
|
bin/${PORTNAME}
|
|
|
|
|
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)
2016-10-25 00:59:22 +02:00
|
|
|
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
|
|
|
|
|
2016-10-11 17:02:05 +02:00
|
|
|
do-build:
|
2018-03-07 09:06:24 +01:00
|
|
|
@( cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GO_ENV} go build arduino.cc/arduino-builder )
|
2016-10-11 17:02:05 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
2016-10-15 23:22:06 +02:00
|
|
|
(cd ${WRKSRC}/src/arduino.cc/builder && ${COPYTREE_SHARE} "hardware" ${STAGEDIR}${PREFIX}/arduino ${FIND_EXPR})
|
2016-10-11 17:02:05 +02:00
|
|
|
|
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)
2016-10-25 00:59:22 +02:00
|
|
|
do-install-TOOLS-on:
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/arduino-builder.options ${STAGEDIR}${PREFIX}/arduino/arduino-builder.options
|
|
|
|
|
2016-10-11 17:02:05 +02:00
|
|
|
.include <bsd.port.mk>
|