Bug 283800 - x11/dwmblocks: Update to g20240823
Summary: x11/dwmblocks: Update to g20240823
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: Nuno Teixeira
URL: https://github.com/torrinfail/dwmbloc...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-02 17:41 UTC by Yusuf Yaman
Modified: 2025-01-05 16:56 UTC (History)
3 users (show)

See Also:
echo: maintainer-feedback+


Attachments
x11/dwmblocks.patch (1.85 KB, patch)
2025-01-02 17:42 UTC, Yusuf Yaman
no flags Details | Diff
x11/dwmblocks.patch (1.82 KB, patch)
2025-01-04 10:59 UTC, Yusuf Yaman
echo: maintainer-approval+
Details | Diff
x11/dwmblocks.patch (1.80 KB, patch)
2025-01-05 14:41 UTC, Yusuf Yaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2025-01-02 17:41:04 UTC

    
Comment 1 Yusuf Yaman 2025-01-02 17:42:10 UTC
This version brings some fixes.
Updated patching stage for the recent Makefile.

Thanks in advance and happy new year.
Comment 2 Yusuf Yaman 2025-01-02 17:42:55 UTC
Created attachment 256347 [details]
x11/dwmblocks.patch
Comment 3 Echo Nar 2025-01-04 03:45:21 UTC
Two things

1) Use the short commit hash instead of full hash. 8cedd22
2) Looks like your date is off by a day. Should be g20240823

Other than that looks good.

Note: I really like the REINPLACE_CMD change.

- Echo
Comment 4 Yusuf Yaman 2025-01-04 10:59:12 UTC
Created attachment 256407 [details]
x11/dwmblocks.patch

Okay, I fixed these two things after your feedback, thanks!
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 13:33:03 UTC
Could you provide a changelog link?
Comment 6 Echo Nar 2025-01-05 14:06:30 UTC
Comment on attachment 256407 [details]
x11/dwmblocks.patch

update looks good
Comment 7 Echo Nar 2025-01-05 14:18:06 UTC
(In reply to Nuno Teixeira from comment #5)
"Changelog" for upstream is the project commit history. No separate Changelog file.

A brief rundown of changes between Aug 23, 2024 (8cedd22) and May 28, 2021 (6be2a10) are:
- Makefile Changes
	- structure/format changes
	- BSD specific flags adjusted
- bug fixes
	- \0 delimeter issue
	- disappearing block when signaling
- spelling corrections

https://github.com/torrinfail/dwmblocks/commits/master/
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 14:28:11 UTC
port doesn't seem to respect framework CFLAGS:
https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags

dwmblocks build options:
CFLAGS  = -pedantic -Wall -Wno-deprecated-declarations -Os
LDFLAGS = -lX11 -L/usr/local/lib -I/usr/local/include

cc -o dwmblocks dwmblocks.c -pedantic -Wall -Wno-deprecated-declarations -Os -lX11 -L/usr/local/lib -I/usr/local/include

Could you take a look?
Comment 9 Yusuf Yaman 2025-01-05 14:41:29 UTC
Created attachment 256440 [details]
x11/dwmblocks.patch

Thanks, can you try again?
Comment 10 Echo Nar 2025-01-05 15:04:26 UTC
(In reply to Yusuf Yaman from comment #9)
I'm thinking all the CFLAGS options can be removed to just follow the global build options.

-pedantic, -Wall, and -Wno-deprecated-declarations are all warning configurations while -Os is an optimization so it should work. Yusuf, are you able to compile without any of those and/or an alternate optimization (ie -O3)?

If not we may need to mark this one as non respecting instead by adding NO_PACKAGE=ignores cflags.

- Echo

Note: I don't have access to a build environment to test myself at the moment
Comment 11 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 15:35:34 UTC
(In reply to Yusuf Yaman from comment #9)
With latest patch I see:

dwmblocks build options:
CFLAGS  = -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -pedantic -Wall -Wno-deprecated-declarations -Os
LDFLAGS =  -fstack-protector-strong  -lX11 -L/usr/local/lib -I/usr/local/include

cc -o dwmblocks dwmblocks.c -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -pedantic -Wall -Wno-deprecated-declarations -Os  -fstack-protector-strong  -lX11 -L/usr/local/lib -I/usr/local/include

I think this way CFLAGS are respected.
Comment 12 Yusuf Yaman 2025-01-05 15:49:23 UTC
(In reply to Nuno Teixeira from comment #11)
> I think this way CFLAGS are respected.
Nice.
(In reply to Echo Nar from comment #10)
I think it's all good now.
Comment 13 Echo Nar 2025-01-05 15:59:44 UTC
(In reply to Nuno Teixeira from comment #11)
> I think this way CFLAGS are respected.

If that's the case we can probably ignore everything I said above (comment #10).
Comment 14 commit-hook freebsd_committer freebsd_triage 2025-01-05 16:09:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b79af5a62702512dee5f522f6defbafa4a8d9dec

commit b79af5a62702512dee5f522f6defbafa4a8d9dec
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2025-01-05 16:06:22 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2025-01-05 16:08:07 +0000

    x11/dwmblocks: Update to g20240823

    - Respect CFLAGS

    ChangeLog:
    https://github.com/torrinfail/dwmblocks/compare/96cbb45...8cedd22

    PR:             283800

 x11/dwmblocks/Makefile | 12 +++++++-----
 x11/dwmblocks/distinfo |  6 +++---
 2 files changed, 10 insertions(+), 8 deletions(-)
Comment 15 Nuno Teixeira freebsd_committer freebsd_triage 2025-01-05 16:10:35 UTC
Committed, thanks!
Comment 16 Yusuf Yaman 2025-01-05 16:56:26 UTC
(In reply to Nuno Teixeira from comment #15)
You are welcome and thanks for checking.