Created attachment 256130 [details] Patch for libdeflate * Switch from PORTVERSION to DISTVERSION (See Porters Handbook) * Don't (re)define CMAKE_C_FLAGS_RELEASE * Separate USE* section from CMAKE_* variables Compile and runtime tested on FreeBSD 14.1-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 14.2-RELEASE (amd64) using Poudriere: archivers/advancecomp archivers/maxcso biology/fastp biology/htslib biology/vt devel/notcurses graphics/gdal graphics/openexr graphics/py-imagecodecs graphics/tiff graphics/timg math/R net-p2p/transmission-components
(In reply to Daniel Engberg from comment #0) > * Don't (re)define CMAKE_C_FLAGS_RELEASE I don't understand this part, didn't I fix this in commit ports c8d13ef7f338? > * Separate USE* section from CMAKE_* variables Okay, will do.
Its more safeguarding that so nothing unexpected will occur if you (re)define a used variable and/or with no content as its already handled by the framework ( https://cgit.freebsd.org/ports/tree/Mk/Uses/cmake.mk#n104 ).
(In reply to Daniel Engberg from comment #2) > It's more safeguarding that so nothing unexpected will occur if you > (re)define a used variable and/or with no content as its already > handled by the framework Sorry, I still don't understand. You mean, the current /-O2 -DNDEBUG/d is not robust enough and should be /CMAKE_C_FLAGS_RELEASE/d instead?
What I'm saying is removing references to CMAKE_C_FLAGS_RELEASE is a safer approach than relying on that the string always will be appended.
(In reply to Daniel Engberg from comment #4) > removing references to CMAKE_C_FLAGS_RELEASE is a safer approach Right, that's being done in the `post-patch' target. I thought you didn't like that "-O2 -DNDEBUG" was referenced instead of the CMAKE_C_FLAGS_RELEASE itself... > than relying on that the string always will be appended. ... but this part is still utterly confusing, could you please rephrase or elaborate? Why simply removing set(CMAKE_C_FLAGS_RELEASE ...) is not enough?
I've asked* Eric if he could set it conditionally, maybe we can stop doing this in the port after all. *) https://github.com/ebiggers/libdeflate/issues/408
Sounds great, thanks
Can we push this?
(In reply to Daniel Engberg from comment #8) > Can we push this? I still do not understand the proposed CMAKE_C_FLAGS_RELEASE-related changes and how it differs from what the port currently does. FWIW I would have updated the port long time ago after portscout notification but this PR arrived at the last moment. :-)
(In reply to Alexey Dokuchaev from comment #9) https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags
(In reply to Daniel Engberg from comment #10) > 13.9. Respect CFLAGS Yes! The port does it already, with the `post-patch' target! Why simply removing set(CMAKE_C_FLAGS_RELEASE ...) is not enough?
Clobbering variables is (unintentionally) error-prone in general and makes no sense to do if we can avoid it easily.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a643a515f8f0e6387ac4846270a606ee6e7fb26c commit a643a515f8f0e6387ac4846270a606ee6e7fb26c Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2025-05-31 06:41:19 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2025-05-31 10:36:02 +0000 archivers/libdeflate: Update to 1.24 Changelog: https://github.com/ebiggers/libdeflate/blob/v1.24/NEWS.md PR: 283589 Approved by: maintainer timeout, 1+ month archivers/libdeflate/Makefile | 8 +++----- archivers/libdeflate/distinfo | 6 +++--- archivers/libdeflate/files/patch-CMakeLists.txt (new) | 11 +++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-)