pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ncdu2: add upgrade candidate from a fork
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Mon Oct 5 17:47:16 2026 +0200
Changeset: 04272c5918ce9fcc670ef4ec6d60a4959b4aad5e
Modified Files:
Makefile
Added Files:
ncdu2/DESCR
ncdu2/Makefile
ncdu2/PLIST
ncdu2/TODO
ncdu2/distinfo
ncdu2/patches/patch-build.zig
Log Message:
ncdu2: add upgrade candidate from a fork
Doesn't build, reported upstream
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=04272c5918ce9fcc670ef4ec6d60a4959b4aad5e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
ncdu2/DESCR | 4 ++++
ncdu2/Makefile | 27 +++++++++++++++++++++++++++
ncdu2/PLIST | 3 +++
ncdu2/TODO | 24 ++++++++++++++++++++++++
ncdu2/distinfo | 6 ++++++
ncdu2/patches/patch-build.zig | 23 +++++++++++++++++++++++
7 files changed, 88 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 6c7da3d21c..1f9ec2a1db 100644
--- a/Makefile
+++ b/Makefile
@@ -2590,6 +2590,7 @@ SUBDIR+= ncbi-bin
SUBDIR+= ncbi-blast+
SUBDIR+= ncbi-c++-lib
SUBDIR+= ncbi-lib
+SUBDIR+= ncdu2
SUBDIR+= ncnn
SUBDIR+= ncp
SUBDIR+= ncrack
diff --git a/ncdu2/DESCR b/ncdu2/DESCR
new file mode 100644
index 0000000000..2976b315e3
--- /dev/null
+++ b/ncdu2/DESCR
@@ -0,0 +1,4 @@
+ncdu (NCurses Disk Usage) is a curses-based version of the well-known
+'du', and provides a fast way to see what directories are using
+your disk space. This is a complete rewrite in zig, with lower memory
+usage and better performance.
diff --git a/ncdu2/Makefile b/ncdu2/Makefile
new file mode 100644
index 0000000000..ab601621df
--- /dev/null
+++ b/ncdu2/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.11 2026/04/27 08:32:54 wiz Exp $
+
+DISTNAME= ncdu-2.11
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=rcalixte/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+COMMENT= Disk usage visualization tool
+MAINTAINER= nikita%NetBSD.org@localhost
+HOMEPAGE= https://github.com/rcalixte/ncdu
+#HOMEPAGE= https://dev.yorhel.nl/ncdu
+LICENSE= mit
+
+USE_TOOLS+= pkg-config
+
+# Temporary required, a zig build system parser is being written.
+ALLOW_NETWORK_ACCESS= yes
+
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1
+
+post-install:
+ ${INSTALL_MAN} ${WRKSRC}/ncdu.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../lang/zig/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/ncdu2/PLIST b/ncdu2/PLIST
new file mode 100644
index 0000000000..33f590cecd
--- /dev/null
+++ b/ncdu2/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2023/02/28 21:07:43 nikita Exp $
+bin/ncdu
+man/man1/ncdu.1
diff --git a/ncdu2/TODO b/ncdu2/TODO
new file mode 100644
index 0000000000..27e6356bd8
--- /dev/null
+++ b/ncdu2/TODO
@@ -0,0 +1,24 @@
+Doesn't build:
+
+install
+└─ install ncdu
+ └─ compile exe ncdu ReleaseSafe native-native
+ └─ translate-c 81 errors
+error: translation failure
+/usr/include/time.h:277:1: error: unknown type name 'pragma'
+__END_DECLS
+^
+/usr/include/sys/cdefs.h:432:22: note: expanded from here
+#define __END_DECLS __END_PUBLIC_DECLS
+ ^
+/usr/include/sys/cdefs.h:413:45: note: expanded from here
+# define __END_PUBLIC_DECLS __END_EXTERN_C _Pragma("GCC visibility pop")
+ ^
+<scratch space>:12:2: note: expanded from here
+#pragma GCC visibility pop
+ ^
+
+Reported upstream at
+https://github.com/rcalixte/ncdu/issues/3
+
+Once that is resolved: Clean up patches/ to avoid hardcoding PREFIX.
diff --git a/ncdu2/distinfo b/ncdu2/distinfo
new file mode 100644
index 0000000000..b39cfd677e
--- /dev/null
+++ b/ncdu2/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.5 2026/03/31 18:01:01 wiz Exp $
+
+BLAKE2s (ncdu-2.11.tar.gz) = 9815a9e535907c71927c928e626f13242f18976f4ae9ab042a512f32660a1ab1
+SHA512 (ncdu-2.11.tar.gz) = 48a6d2a8a88b4e11cdbd681c3bc8ca7d04e17b6b3094db76c2c18f081a572dbb26a0be9be8660f12a1bdfac699518388dd97a00b546871bc34b406a0ebb75d6a
+Size (ncdu-2.11.tar.gz) = 75269 bytes
+SHA1 (patch-build.zig) = 41edc272a920273787f72b85663815a365963075
diff --git a/ncdu2/patches/patch-build.zig b/ncdu2/patches/patch-build.zig
new file mode 100644
index 0000000000..9acdc66f6b
--- /dev/null
+++ b/ncdu2/patches/patch-build.zig
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Help it find zstd.h (and libzstd, perhaps not needed).
+
+--- build.zig.orig 2026-10-05 15:29:52.502307458 +0000
++++ build.zig
+@@ -52,6 +52,16 @@ pub fn build(b: *std.Build) void {
+ .target = target,
+ .optimize = optimize,
+ });
++ const include_path: std.Build.LazyPath = .{
++ .cwd_relative = "/usr/pkg/include",
++ };
++
++ const library_path: std.Build.LazyPath = .{
++ .cwd_relative = "/usr/pkg/lib",
++ };
++
++ translate_c.addIncludePath(include_path);
++ main_mod.addLibraryPath(library_path);
+ main_mod.addImport("c", translate_c.createModule());
+
+ const exe = b.addExecutable(.{
Home |
Main Index |
Thread Index |
Old Index