Bug 283589 - archivers/libdeflate: Update to 1.23
Summary: archivers/libdeflate: Update to 1.23
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Daniel Engberg
URL: https://github.com/ebiggers/libdeflat...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-25 10:39 UTC by Daniel Engberg
Modified: 2025-05-31 10:39 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
Patch for libdeflate (2.11 KB, patch)
2024-12-25 10:39 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2024-12-25 10:39:35 UTC
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
Comment 1 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-01-05 06:40:39 UTC
(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.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2025-01-05 15:48:51 UTC
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 ).
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-01-06 17:26:21 UTC
(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?
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2025-01-06 17:52:40 UTC
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.
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-01-07 17:15:08 UTC
(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?
Comment 6 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-01-09 16:31:10 UTC
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
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2025-01-11 10:43:54 UTC
Sounds great, thanks
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2025-04-21 10:47:51 UTC
Can we push this?
Comment 9 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-04-28 08:21:22 UTC
(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. :-)
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2025-04-28 18:24:13 UTC
(In reply to Alexey Dokuchaev from comment #9)
https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags
Comment 11 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-04-30 06:54:12 UTC
(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?
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2025-05-31 06:45:14 UTC
Clobbering variables is (unintentionally) error-prone in general and makes no sense to do if we can avoid it easily.
Comment 13 commit-hook freebsd_committer freebsd_triage 2025-05-31 10:37:11 UTC
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(-)