Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Sep 2023 21:31:24 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e0dd8c342aca - main - sysutils/ncdu2: Use zig built-in strip instead of llvm-strip
Message-ID:  <202309042131.384LVOY0092128@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

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

commit e0dd8c342aca95f7c51ae33da3786a64accf12c2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-04 21:25:35 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-04 21:30:06 +0000

    sysutils/ncdu2: Use zig built-in strip instead of llvm-strip
    
    - Bump PORTREVISION for package change
    
    zig built-in strip generates smaller binary executables than llvm-strip.
---
 sysutils/ncdu2/Makefile              |  7 ++-----
 sysutils/ncdu2/files/patch-build.zig | 10 ++++++++++
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/sysutils/ncdu2/Makefile b/sysutils/ncdu2/Makefile
index 00f3d4401a94..119f3c2c6c7d 100644
--- a/sysutils/ncdu2/Makefile
+++ b/sysutils/ncdu2/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ncdu
 PORTVERSION=	2.2.2
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	sysutils
 MASTER_SITES=	https://dev.yorhel.nl/download/
 PKGNAMESUFFIX=	2
@@ -17,7 +17,7 @@ BUILD_DEPENDS=	zig>=0.10.0<0.10.1_99:lang/zig
 
 USES=		ncurses
 
-BUILD_ARGS=	--prefix "${PREFIX}" --verbose
+BUILD_ARGS=	--prefix "${PREFIX}" --verbose ${STRIP:C|.+|-Dstrip|}
 MAKE_ENV=	DESTDIR="${STAGEDIR}"
 
 PLIST_FILES=	bin/ncdu2 \
@@ -27,9 +27,6 @@ do-build:
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} zig build ${BUILD_ARGS}
 
 do-install:
-.if !defined(WITH_DEBUG)
-	/usr/bin/llvm-strip ${STAGEDIR}${PREFIX}/bin/ncdu
-.endif
 	${MV} ${STAGEDIR}${PREFIX}/bin/ncdu ${STAGEDIR}${PREFIX}/bin/ncdu2
 	${INSTALL_MAN} ${WRKSRC}/ncdu.1 ${STAGEDIR}${PREFIX}/share/man/man1/ncdu2.1
 
diff --git a/sysutils/ncdu2/files/patch-build.zig b/sysutils/ncdu2/files/patch-build.zig
new file mode 100644
index 000000000000..f2cd6be02ecc
--- /dev/null
+++ b/sysutils/ncdu2/files/patch-build.zig
@@ -0,0 +1,10 @@
+--- build.zig.orig	2023-01-19 06:57:48 UTC
++++ build.zig
+@@ -13,6 +13,7 @@ pub fn build(b: *std.build.Builder) void {
+     exe.addCSourceFile("src/ncurses_refs.c", &[_][]const u8{});
+     exe.linkLibC();
+     exe.linkSystemLibrary("ncursesw");
++    exe.strip = b.option(bool, "strip", "Strip debug information") orelse false;
+     exe.install();
+ 
+     const run_cmd = exe.run();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309042131.384LVOY0092128>