Page MenuHomeFreeBSD

New port: devel/arduino-bsd-mk - build Arduino sketches with make(1)
ClosedPublic

Authored by leres on Nov 27 2017, 12:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 1:39 PM
Unknown Object (File)
Jan 8 2024, 4:37 PM
Unknown Object (File)
Dec 20 2023, 2:37 AM
Unknown Object (File)
Nov 26 2023, 9:54 AM
Unknown Object (File)
Nov 17 2023, 10:16 PM
Unknown Object (File)
Nov 7 2023, 3:23 PM
Unknown Object (File)
Nov 6 2023, 2:28 AM
Unknown Object (File)
Nov 5 2023, 3:15 PM
Subscribers

Details

Summary

Proposed commit message:

This adds devel/arduino-bsd-mk which installs a make(1) makefile
(bsd.arduino.mk) that is used to build Arduino sketches from
the command line. It is designed to be an FreeBSD-friendly
alternative to the existing gmake based devel/arduino-mk port.
It includes a man page and optionally installs an example sketch
with an exmaple Makefile.

Reviewed by: ? (mentor)
Approved by: ? (mentor)
Differential Revision: ?

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

matthew requested changes to this revision.Nov 27 2017, 6:57 AM
matthew added inline comments.
devel/arduino-bsd-mk/Makefile
8 ↗(On Diff #35832)

While it is possible to add your disfiles to the ports tree (as you have done here), this is something that should be used sparingly. In this case, I think you've enough
content here that you should create a tarball of it. Place that tarball in ~leres/public_distfiles on Freefall and use MASTERSITE = LOCAL/leres unless you prefer to use some other distribution site.

27 ↗(On Diff #35832)

This line should be wrapped to within 80 columns as far as possible

42 ↗(On Diff #35832)

Using a tarball as I said above makes this target redundant

46 ↗(On Diff #35832)

This is creating the same directory multiple times. Plus it's usual to create the installation directories as part of the 'do-install:' target.

You can simplify all this quite a lot by setting variables something like this:

SCRIPTS_INSTALL_DIR= arduino-bsd-mk/scripts
SCRIPTS= arduino-boards.py arduino-version.sh gcc-version.sh

Alternatively, if you distribute a tarball, you can structure the tarball so that you can use COPYTREE_BIN to install all your scripts in a one-liner, which includes creating all the directories you need under staging

devel/arduino-bsd-mk/pkg-descr
8 ↗(On Diff #35832)

Comic sans?

This revision now requires changes to proceed.Nov 27 2017, 6:57 AM
devel/arduino-bsd-mk/Makefile
20 ↗(On Diff #35832)

Does this run with Python 3.6 ?

leres marked 5 inline comments as done.

Split makefile, man page and scripts into a separate distribution

leres added inline comments.
devel/arduino-bsd-mk/Makefile
8 ↗(On Diff #35832)

Ok, I've reworked it to package the content separately from the port

20 ↗(On Diff #35832)

Not sure; I changed USES to specify python 2 and also patch the script to use ${PYTHON_CMD} in the script.

27 ↗(On Diff #35832)

(It moved to the distribution makefile.)

46 ↗(On Diff #35832)

The ":u" should eliminate the duplicates; but I added :O (sort) just to be sure.

I guess I don't like COPYTREE_BIN in this case since I like to have file extensions in the distribution but remove them on installation. Anyway see if the new version is acceptable.

devel/arduino-bsd-mk/pkg-descr
8 ↗(On Diff #35832)
devel/arduino-bsd-mk/Makefile
40 ↗(On Diff #35942)

USES shebangfix

should be used to set the python interpreter

devel/arduino-bsd-mk/pkg-descr
8 ↗(On Diff #35832)

Heh.

leres marked an inline comment as done.

Add shebangfix to USES as suggested by matthew@

leres added inline comments.
devel/arduino-bsd-mk/Makefile
40 ↗(On Diff #35942)

That's sweet, thanks!

devel/arduino-bsd-mk/Makefile
18–19 ↗(On Diff #35943)
42 ↗(On Diff #35943)

s/"*"/./

20 ↗(On Diff #35832)

No, you just said "I want the python2" symlink. Saying you want Python 2 is written as USES=python:2.7.

leres added inline comments.
devel/arduino-bsd-mk/Makefile
18–19 ↗(On Diff #35943)

(Somewhat surprised portlint doesn't catch this.)

This version should be better.

20 ↗(On Diff #35832)

I guess I don't see how you can have python2 installed and not have some specific version (e.g. 2.7) of python installed?

(Or is your point that I don't *need* python2, just python27?)

Anyway: fixed.

leres marked 2 inline comments as done.

Address mat@'s comments

Address mat@'s comments [take #2: actually update Makefile]

This revision is now accepted and ready to land.Dec 1 2017, 7:29 AM

Note: be sure to use ${PORTSDIR}/Tools/scripts/addport to commit your new port -- this will ensure that it gets hooked up to the ports tree correctly.

This revision was automatically updated to reflect the committed changes.