summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--groups/231.native_packages_etc.group4
-rw-r--r--patches/ncdu-1.18.local.patch62
-rw-r--r--patches/ncdu-1.18_pre.local.patch12
3 files changed, 76 insertions, 2 deletions
diff --git a/groups/231.native_packages_etc.group b/groups/231.native_packages_etc.group
index c3ae8140..05681505 100644
--- a/groups/231.native_packages_etc.group
+++ b/groups/231.native_packages_etc.group
@@ -311,8 +311,8 @@ gl_cv_func_getopt_gnu=yes"};
: ${PKG_MUSL_FTS_VERSION:=1.2.7};
: ${PKG_MUSL_FTS_URL:=https://midipix.org/mirror/musl-fts/musl-fts-${PKG_MUSL_FTS_VERSION}.tar.xz};
: ${PKG_NCDU_DEPENDS:="ncursesw"};
-: ${PKG_NCDU_SHA256SUM:=2b915752a183fae014b5e5b1f0a135b4b408de7488c716e325217c2513980fd4};
-: ${PKG_NCDU_VERSION:=1.16};
+: ${PKG_NCDU_SHA256SUM:=3c37a1a96580c9c5d2cc352dc3c5eef0d909158c05f1cc29db4712544c8b9f95};
+: ${PKG_NCDU_VERSION:=1.18};
: ${PKG_NCDU_URL:=https://dev.yorhel.nl/download/ncdu-${PKG_NCDU_VERSION}.tar.gz};
: ${PKG_NCURSES_SHA256SUM:=97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059};
: ${PKG_NCURSES_VERSION:=6.3};
diff --git a/patches/ncdu-1.18.local.patch b/patches/ncdu-1.18.local.patch
new file mode 100644
index 00000000..72f20723
--- /dev/null
+++ b/patches/ncdu-1.18.local.patch
@@ -0,0 +1,62 @@
+diff -ru ncdu-1.18.orig/src/dir.h ncdu-1.18/src/dir.h
+--- ncdu-1.18.orig/src/dir.h 2022-04-28 11:16:45.000000000 +0200
++++ ncdu-1.18/src/dir.h 2022-12-23 15:57:39.201824078 +0100
+@@ -113,7 +113,7 @@
+ extern int dir_import_active;
+ int dir_import_init(const char *fn);
+
+-#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS
++#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS || __midipix__
+ extern int exclude_kernfs;
+ #endif
+
+diff -ru ncdu-1.18.orig/src/dir_scan.c ncdu-1.18/src/dir_scan.c
+--- ncdu-1.18.orig/src/dir_scan.c 2022-04-28 11:16:57.000000000 +0200
++++ ncdu-1.18/src/dir_scan.c 2022-12-23 15:57:10.769823906 +0100
+@@ -38,10 +38,12 @@
+ #include <sys/attr.h>
+ #endif
+
+-#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS
++#if HAVE_SYS_STATFS_H && HAVE_STATFS
+ #include <sys/statfs.h>
++#if HAVE_LINUX_MAGIC_H
+ #include <linux/magic.h>
+ #endif
++#endif
+
+
+ /* set S_BLKSIZE if not defined already in sys/stat.h */
+@@ -60,7 +62,7 @@
+ static unsigned int buf_nlink;
+
+
+-#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS
++#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS || __midipix__
+ int exclude_kernfs; /* Exclude Linux pseudo filesystems */
+
+ static int is_kernfs(unsigned long type) {
+diff -ru ncdu-1.18.orig/src/main.c ncdu-1.18/src/main.c
+--- ncdu-1.18.orig/src/main.c 2022-11-30 11:30:55.000000000 +0100
++++ ncdu-1.18/src/main.c 2022-12-23 15:58:20.801824331 +0100
+@@ -291,7 +291,7 @@
+ printf(" -X, --exclude-from FILE Exclude files that match any pattern in FILE\n");
+ printf(" -L, --follow-symlinks Follow symbolic links (excluding directories)\n");
+ printf(" --exclude-caches Exclude directories containing CACHEDIR.TAG\n");
+-#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS
++#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS || __midipix__
+ printf(" --exclude-kernfs Exclude Linux pseudo filesystems (procfs,sysfs,cgroup,...)\n");
+ #endif
+ #if HAVE_SYS_ATTR_H && HAVE_GETATTRLIST && HAVE_DECL_ATTR_CMNEXT_NOFIRMLINKPATH
+@@ -395,9 +395,11 @@
+ else if(!arg_option()) die("Unknown option '%s'.\n", argparser_state.last);
+ }
+
++#ifndef __midipix__
+ #if !(HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS)
+ if(exclude_kernfs) die("The --exclude-kernfs flag is currently only supported on Linux.\n");
+ #endif
++#endif
+
+ if(export) {
+ if(dir_export_init(export)) die("Can't open %s: %s\n", export, strerror(errno));
diff --git a/patches/ncdu-1.18_pre.local.patch b/patches/ncdu-1.18_pre.local.patch
new file mode 100644
index 00000000..6a9a0be3
--- /dev/null
+++ b/patches/ncdu-1.18_pre.local.patch
@@ -0,0 +1,12 @@
+diff -ru ncdu-1.18.orig/configure ncdu-1.18/configure
+--- ncdu-1.18.orig/configure 2022-12-06 10:47:01.000000000 +0100
++++ ncdu-1.18/configure 2022-12-23 16:05:20.100553280 +0100
+@@ -6464,7 +6464,7 @@
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_NCURSES_LIBS=`$PKG_CONFIG --libs "ncursesw" 2>/dev/null`
++ pkg_cv_NCURSES_LIBS=`$PKG_CONFIG --libs-only-l "ncursesw" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes