git: cb09c762742f - main - x11-fm/krusader2: fix folder view for zip archives

From: Max Brazhnikov <makc_at_FreeBSD.org>
Date: Wed, 16 Jul 2025 13:04:20 UTC
The branch main has been updated by makc:

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

commit cb09c762742f00418056761ba8e7dc769473beef
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2025-07-16 12:27:21 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2025-07-16 13:03:46 +0000

    x11-fm/krusader2: fix folder view for zip archives
    
    - bsdunzip has different options, force Krusader to use unzip from ports.
    
    PR:             270879
    Reported by:    danfe@
---
 x11-fm/krusader2/Makefile                            |  5 +++++
 x11-fm/krusader2/files/patch-plugins_krarc_krarc.cpp | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/x11-fm/krusader2/Makefile b/x11-fm/krusader2/Makefile
index 44486aae19e2..470830fa8b8b 100644
--- a/x11-fm/krusader2/Makefile
+++ b/x11-fm/krusader2/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	krusader
 DISTVERSION=	2.9.0
+PORTREVISION=	1
 CATEGORIES=	x11-fm kde
 MASTER_SITES=	KDE/stable/${PORTNAME}/${PORTVERSION}/
 
@@ -22,4 +23,8 @@ USE_KDE=	archive bookmarks codecs completion config coreaddons \
 USE_QT=		5compat base
 USE_XORG=	x11
 
+post-patch:
+# Prefer unzip from ports to the base bsdunzip.
+	${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/plugins/krarc/krarc.cpp
+
 .include <bsd.port.mk>
diff --git a/x11-fm/krusader2/files/patch-plugins_krarc_krarc.cpp b/x11-fm/krusader2/files/patch-plugins_krarc_krarc.cpp
new file mode 100644
index 000000000000..2c23e15c75fc
--- /dev/null
+++ b/x11-fm/krusader2/files/patch-plugins_krarc_krarc.cpp
@@ -0,0 +1,17 @@
+--- plugins/krarc/krarc.cpp.orig	2025-07-16 12:16:19 UTC
++++ plugins/krarc/krarc.cpp
+@@ -1568,10 +1568,10 @@ KIO::WorkerResult kio_krarcProtocol::initArcParameters
+ 
+     if (arcType == "zip") {
+         noencoding = true;
+-        cmd = fullPathName("unzip");
+-        listCmd << fullPathName("unzip") << "-ZTs-z-t-h";
+-        getCmd << fullPathName("unzip") << "-p";
+-        copyCmd << fullPathName("unzip") << "-jo";
++        cmd = QString("%%LOCALBASE%%/bin/unzip");
++        listCmd << cmd << "-ZTs-z-t-h";
++        getCmd << cmd << "-p";
++        copyCmd << cmd << "-jo";
+ 
+         if (QStandardPaths::findExecutable(QStringLiteral("zip")).isEmpty()) {
+             delCmd = QStringList();