Page MenuHomeFreeBSD

[NEW PORT] cad/k40-whisperer: GUI control software for the stock K40 laser cutter controller
ClosedPublic

Authored by 0mp on Jul 19 2018, 1:18 AM.
Tags
None
Referenced Files
F81955014: D16339.id48242.diff
Tue, Apr 23, 5:19 PM
F81955010: D16339.id48231.diff
Tue, Apr 23, 5:19 PM
F81955008: D16339.id46147.diff
Tue, Apr 23, 5:19 PM
F81955006: D16339.id.diff
Tue, Apr 23, 5:19 PM
F81955003: D16339.id46320.diff
Tue, Apr 23, 5:19 PM
F81955000: D16339.id46056.diff
Tue, Apr 23, 5:19 PM
F81954996: D16339.id45509.diff
Tue, Apr 23, 5:19 PM
F81954995: D16339.id46683.diff
Tue, Apr 23, 5:19 PM
Subscribers
None

Details

Summary

It is a software to control some models of CNC laser cutters.

Doubts:

  • I am not sure about the category. K40 Whisperer is not a CAD program. From what I've heard it should be categorized as CAM. Interestingly, there are some CAM packages under the cad category.

Bugzilla PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228466

Test Plan

Diff Detail

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

Event Timeline

cad/k40-whisperer/Makefile
30 ↗(On Diff #45509)

New ports should not be using PORTDATA.

cad/k40-whisperer/Makefile
30 ↗(On Diff #45509)

Oh! That's unexpected! I'll try to dig up some info about it tomorrow. Could you point me to some docs/resources/commit logs, which mention this change?

cad/k40-whisperer/Makefile
30 ↗(On Diff #45509)

Mmmm, no, it was discussed at a portmgr meeting a few years back, and we decided to deprecate it because using pkg-plist is cleaner, especially with more than a handful of files. It seems nobody ever got to do it.

Do not use PORTDATA as requested by @mat.

Instead, I've created a pkg-plist file and two variables: DATA and DOCS, which store lists of files to install.

Test plan:

  • portlint -AC: ok
  • poudriere testport: 11.2 i386
cad/k40-whisperer/pkg-plist
2 ↗(On Diff #46056)

What tool generated this plist?

cad/k40-whisperer/pkg-plist
2 ↗(On Diff #46056)
  1. I always fill pkg-plist manually (with poudriere to help me detect missing/invalid entries).
  1. I reread the handbook chapter about @dir and I think I can see my mistake: I should not use @dir unless the directory is empty.

    At first, I misunderstood the chapter and thought that it is a good practice to use @dir whenever you create a directory.

Thanks, @mat :) I'll try upload a revised patch soon.

Remove incorrect uses of "@dir".

cad/k40-whisperer/pkg-plist
2 ↗(On Diff #46056)

You should always re-generate the plist with make makeplist, and use a merge tool, like vimdiff, to merge the added/removed files from it, so that it is 1) always correct 2) always sorted.

cad/k40-whisperer/Makefile
20 ↗(On Diff #46147)

-2.7 makes no sense, use 2.7.

27 ↗(On Diff #46147)

Why +=?

0mp planned changes to this revision.Aug 5 2018, 9:48 PM
0mp marked 4 inline comments as done.
0mp added inline comments.
cad/k40-whisperer/Makefile
27 ↗(On Diff #46147)

I thought that this is just a little bit more robust: we won't have to replace = with += if we want to use some values, which are included in PLIST_SUB by default, in the future.

Replace "python:-2.7" with "python:2.7" in USES as requested by @mat.

cad/k40-whisperer/Makefile
27 ↗(On Diff #46147)

You only use += to append to a variable. This variable is not set before, so you do not need to append to it.

The only outside variables that are existing at this point, are things set in /etc/make.conf. And the only variables we support are the C*FLAGS/LDFLAGS variables. Those are the only one where you use += in the Makefile.

0mp planned changes to this revision.Aug 14 2018, 8:27 PM
0mp marked an inline comment as done.

Mark some todos as done.

I'll send a new revision soon to address the rest of @mat's suggestions.

Changes:

  • Use = instead of += for PLIST_SUB since it is not required in this case.
  • Generate pkg-plist with make makeplist.
  • Add DOCS option so that a user might opt out from installing additional documentation.
0mp marked 5 inline comments as done.Aug 18 2018, 10:08 AM

@mat, I think this port is ready. Can I commit it?

mat added inline comments.
cad/k40-whisperer/Makefile
23 ↗(On Diff #46683)

This is not required, DOCS is always added to OPTIONS_DEFAULT.

This revision is now accepted and ready to land.Sep 16 2018, 8:40 PM

Remove DOCS from OPTIONS_DEFAULT.

This revision now requires review to proceed.Sep 19 2018, 6:40 PM
0mp marked an inline comment as done.Sep 19 2018, 6:42 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 19 2018, 10:44 PM
Closed by commit rP480119: New port: cad/k40-whisperer (authored by 0mp). · Explain Why
This revision was automatically updated to reflect the committed changes.