Bug 280940 - x11-wm/spectrwm: Upgrade 3.4.1 to 3.6.0
Summary: x11-wm/spectrwm: Upgrade 3.4.1 to 3.6.0
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: Zsolt Udvari
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-20 07:52 UTC by kaltheat
Modified: 2025-01-12 17:17 UTC (History)
4 users (show)

See Also:


Attachments
x11-wm/spectrwm.patch: Update to 3.6.0 (6.22 KB, patch)
2025-01-06 18:38 UTC, Yusuf Yaman
no flags Details | Diff
x11-wm/spectrwm.patch: Update to 3.6.0 (6.37 KB, patch)
2025-01-07 14:35 UTC, Yusuf Yaman
no flags Details | Diff
0001-x11-wm-spectrwm-Update-to-3.6.0.patch (7.94 KB, patch)
2025-01-10 20:54 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 kaltheat 2024-08-20 07:52:50 UTC
Hi,

spectrwm currently in ports is 3.4.1 from June, 25th 2020.

Please upgrade to version 3.6.0 which was released on June, 10th 2024[1]!


Regards
kaltheat

[1] https://github.com/conformal/spectrwm/releases/tag/SPECTRWM_3_6_0
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-20 13:50:02 UTC
The patch are welcome!
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2024-09-26 18:19:52 UTC
The maintainer drops the port.
https://cgit.freebsd.org/ports/commit/?id=8d035e9eaeed5f5447b7e4d18fe32f516aa28c84
Comment 3 Yusuf Yaman 2025-01-06 18:38:51 UTC
Created attachment 256476 [details]
x11-wm/spectrwm.patch: Update to 3.6.0

Hi. I want to take maintainership of this port.

It build fine on my 14.2-RELEASE/latest machine, unfortunately can't test in poudriere.

Thanks in advance.
Comment 4 Yusuf Yaman 2025-01-07 14:35:09 UTC
Created attachment 256500 [details]
x11-wm/spectrwm.patch: Update to 3.6.0

Just changed git commit message:

+ - Submitter becomes maintainer

+ ChangeLogs:
+ https://github.com/conformal/spectrwm/releases/tag/SPECTRWM_3_5_0
+ https://github.com/conformal/spectrwm/releases/tag/SPECTRWM_3_5_1
+ https://github.com/conformal/spectrwm/releases/tag/SPECTRWM_3_6_0
Comment 5 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-09 18:34:13 UTC
Hi Yusuf,
thanks for patch. I'd suggest simplify the port's Makefile.

The spectrwm's source ships freebsd/Makefile which is usable. If you add "MAKE_ARGS = -C freebsd" can build - so the overwrite of do-build target is unnecessary.
IMHO can remove the do-install target.

The examples are only a few kbytes. If you think can remove the EXAMPLES option and install the examples everytime.
Comment 6 Yusuf Yaman 2025-01-09 18:46:08 UTC
(In reply to Zsolt Udvari from comment #5)
You are welcome. I tried simplifying it. I'd like to hear your opinion on this diff. I can rebase it onto the whole patch if you tell it's OK.

diff --git a/x11-wm/spectrwm/Makefile b/x11-wm/spectrwm/Makefile
index fa361baad50d..6a17ec38fc91 100644
--- a/x11-wm/spectrwm/Makefile
+++ b/x11-wm/spectrwm/Makefile
@@ -10,10 +10,6 @@ WWW=		https://github.com/conformal/spectrwm
 LICENSE=	ISCL
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-LIB_DEPENDS+=	libfontconfig.so:x11-fonts/fontconfig \
-		libxcb-icccm.so:x11/xcb-util-wm \
-		libxcb-keysyms.so:x11/xcb-util-keysyms \
-		libxcb-util.so:x11/xcb-util
 RUN_DEPENDS+=	dmenu:x11/dmenu \
 		xlock:x11/xlockmore
 
@@ -23,9 +19,8 @@ GH_ACCOUNT=	conformal
 USE_LDCONFIG=	yes
 USE_XORG=	x11 xcb xcursor xft xrandr xt
 
-OPTIONS_DEFINE=	EXAMPLES
-
-.include <bsd.port.options.mk>
+MAKE_ARGS+=	-C \
+		freebsd
 
 CONFEXAMPLES=	spectrwm_cz.conf spectrwm_es.conf spectrwm_fr.conf \
 		spectrwm_fr_ch.conf spectrwm_se.conf spectrwm_us.conf
@@ -37,30 +32,9 @@ post-patch:
 		"spectrwm.conf*" \ -o ! -name "spectrwm.desktop"\) | \
 		${XARGS} ${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g'
 
-do-build:
-	@${LN} -sf ${WRKSRC}/linux/pledge.h ${WRKSRC}/pledge.h
-	@${LN} -sf ${WRKSRC}/linux/queue_compat.h ${WRKSRC}/queue_compat.h
-	${CC} ${CFLAGS} -Wall -Wextra -Wshadow -Werror -I${LOCALBASE}/include \
-		-I${LOCALBASE}/include/freetype2 -I${WRKSRC}/freebsd \
-		-lutil -L${LOCALBASE}/lib -lX11 -lX11-xcb -lxcb -lxcb-icccm \
-		-lxcb-keysyms -lxcb-randr -lxcb-util -lxcb-xinput -lxcb-xtest \
-		-lXcursor -lXft -lfontconfig -DSWM_LIB=\"${PREFIX}/lib/libswmhack.so\" \
-		-o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c
-	${CC} ${CFLAGS} -Wall -Wextra -Wshadow -Werror -I${LOCALBASE}/include \
-		-shared -fpic -DPIC -L${LOCALBASE}/lib -lX11 -o ${WRKSRC}/libswmhack.so \
-		${WRKSRC}/lib/swm_hack.c
-
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
-		${STAGEDIR}${PREFIX}/bin
-	${INSTALL_LIB} ${WRKSRC}/libswmhack.so \
-		${STAGEDIR}${PREFIX}/lib
-	${INSTALL_MAN} ${WRKSRC}/spectrwm.1 \
-		${STAGEDIR}${PREFIX}/share/man/man1
 	${INSTALL_DATA} ${WRKSRC}/spectrwm.conf \
 		${STAGEDIR}${PREFIX}/etc/spectrwm.conf.sample
-
-do-install-EXAMPLES-on:
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 .for f in ${CONFEXAMPLES}
 	${INSTALL_DATA} ${WRKSRC}/${f} \
Comment 7 Yusuf Yaman 2025-01-10 14:53:34 UTC
I am not in favor of using that freebsd/Makefile because I couldn't make it install binary, manpage and libraries. I tried re-defining SWM_{BIN,LIB,MAN}DIR variable in port's Makefile but no success.
Comment 8 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-10 19:11:21 UTC
(In reply to Yusuf Yaman from comment #7)
Yes, you're right. The freebsd/Makefile doesn't support staging. You've two choices: patch the freebsd/Makefile or the do-install does the install stage.

Another thing: as I see the ${FIND} doesn't find any file in post-patch. If it's true you should remove it.

If you think you're ready share the diff.
Comment 9 Yusuf Yaman 2025-01-10 20:54:35 UTC
Created attachment 256606 [details]
0001-x11-wm-spectrwm-Update-to-3.6.0.patch

(In reply to Zsolt Udvari from comment #8)
> You've two choices: patch the freebsd/Makefile or
> the do-install does the install stage.

Unfortunately I had to do the both. I got faced with "the lib file does not have a SONHAME" error in stage-qa and this patch in filesdir fixes it by removing version name from .so lib file.

Other than that, I think it's ready.

> as I see the ${FIND} doesn't find any file in post-patch. If it's true you should remove it.

I think I fixed it too.

Thanks in advance.
Comment 10 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-12 17:15:19 UTC
Thanks for your work. Committed, thanks!
Comment 11 commit-hook freebsd_committer freebsd_triage 2025-01-12 17:15:38 UTC
A commit in branch main references this bug:

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

commit 48f3eb71a699438e78ef3241423f9cb881943f34
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2025-01-12 17:12:11 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2025-01-12 17:14:52 +0000

    x11-wm/spectrwm: Update to 3.6.0

    Remove do-build target, the freebsd/Makefile works well.
    Remove EXAMPLES option, installs only some kilobytes.
    Add xterm to RUN_DEPENDS.
    Add LICENSE_FILE.
    Submitter takes maintainership.

    PR:             280940

 x11-wm/spectrwm/Makefile                           | 78 ++++++++++------------
 x11-wm/spectrwm/distinfo                           |  6 +-
 x11-wm/spectrwm/files/patch-freebsd_Makefile (new) | 35 ++++++++++
 x11-wm/spectrwm/files/patch-spectrwm.c (gone)      | 11 ---
 x11-wm/spectrwm/pkg-plist                          | 18 ++---
 5 files changed, 81 insertions(+), 67 deletions(-)
Comment 12 Yusuf Yaman 2025-01-12 17:17:28 UTC
(In reply to Zsolt Udvari from comment #10)
You are welcome and thanks for giving a look.