Created attachment 256415 [details] Patch for zxing-cpp * Enable unit tests * Remove unnecessary patch * Clean up port Makefile Compile and runtime tested on FreeBSD 14.2-RELEASE (amd64) (make, make check-plist, make test) Poudriere testport OK 13.4-RELEASE (amd64) Poudriere testport OK 14.2-RELEASE (amd64) Tested with following consumers in 13.4-RELEASE and 14.2-RELEASE (amd64) using Poudriere: deskutils/kodaskanna editors/libreoffice graphics/kf5-prison graphics/kf6-prison net/kitinerary net-im/kaidan textproc/gstreamer1-plugins-zxing
Please try to reasonably comply with the corrections given by portclippy(1) and portlint(1), especially for ports maintained by teams unless otherwise specified. Some tooling decisions are dumb and should be ignored and/or corrected, but when multiple people are working on the same port, agreeing with the dumb tool might be the better option as apposed to unnecessary repo churn between updates until said tool is brought up to speed. USE_GITHUB clearly belongs in the USE_ block. No reason to change this. While I can see a case for moving it to a separate block if GH_ variables are also defined, this is not true here. Please revert this line's position in the Makefile. CMAKE_TESTING_ON shouldn't be a separate block. It should be part of the CMAKE_ block, but should be listed towards the end, because testing is done at the end of the process. portclippy(1) actually gets this right. Whitespace alignment within that block would be needed, but that change would be preferable to a separate block. Why nuke the useful comments for the CMAKE_OFF variable in the Makefile, either? Again, this is a team port, so verbosity within the Makefile and patches is an absolute virtue.
(In reply to Jason E. Hale from comment #1) They're tools not rules and Porters Handbook also mentions that they're not to be treated as such. Some suggestions just makes things akward/hard to read/follow and isn't followed overall in the tree due to that. Such as not separating USE_GITHUB which is done all the time so changed consistency with the rest of the tree. Feel free to revert whatever changes you disagree upon. While out of scope for the PR placement suggestions of CONFIGURE_* CMAKE_* MESON_* is also one thing that we don't adhere to what our tools suggests because of convenience and ease of reviewing. While not in this case these are more often than not placed last before defining menu options as these often are related to variables in some way or another while tooling wants these sections in alphabetical order which results in a lot jumping back and forth in the text. I have yet to find someone who objects to this layout. This also why CMAKE_TESTING* isn't grouped together in many cases. Comments are unnecessary now that we have a working unit test? People also seem to prefer that comments are left in commit message rather than cluttering the Makefile?
(In reply to Daniel Engberg from comment #2) The PHB is a fallible document, not the Gospel Truth (TM). Please realize that. Our linting tools aren't perfect, either. Most of us are also smart enough to ignore bad recommendations from tooling. All I was asking for was consistency amongst maintainers of *team* ports. You can do as you wish in your own ports so long as they build. When multiple people work on the same port, however, we need a standard, whether we personally like it or not. Less back and forth variable placements between releases would be preferable.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d36a85f4aee0c36d29b46e898ab1cdfc469e4e5 commit 5d36a85f4aee0c36d29b46e898ab1cdfc469e4e5 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2025-02-21 09:00:20 +0000 Commit: Jason E. Hale <jhale@FreeBSD.org> CommitDate: 2025-02-21 09:03:31 +0000 textproc/zxing-cpp: Update to 2.3.0 https://github.com/zxing-cpp/zxing-cpp/releases/tag/v2.3.0 PR: 283847 textproc/zxing-cpp/Makefile | 9 +++++++-- textproc/zxing-cpp/distinfo | 6 +++--- .../files/patch-core_CMakeLists.txt (gone) | 13 ------------- .../zxing-cpp/files/patch-core_src_Utf.cpp (gone) | 21 --------------------- textproc/zxing-cpp/pkg-plist | 7 ++++--- 5 files changed, 14 insertions(+), 42 deletions(-)
Committed with a few adjustments, thanks!