ncdu2: update to 2.4
This commit is contained in:
parent
998c752385
commit
ec8bad3c34
4 changed files with 16 additions and 37 deletions
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/build.zig b/build.zig
|
|
||||||
index 45bd314..02926f0 100644
|
|
||||||
--- a/build.zig
|
|
||||||
+++ b/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.pie = true;
|
|
||||||
exe.install();
|
|
||||||
|
|
||||||
const run_cmd = exe.run();
|
|
|
@ -1,23 +0,0 @@
|
||||||
From e6cfacfa068bbe05873583e68eb82e668875d48c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yorhel <git@yorhel.nl>
|
|
||||||
Date: Sun, 2 Apr 2023 11:57:34 +0200
|
|
||||||
Subject: [PATCH] scan.zig: Add explicit cast for struct statfs.f_type
|
|
||||||
|
|
||||||
Hopefully fixes #221.
|
|
||||||
---
|
|
||||||
src/scan.zig | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/scan.zig b/src/scan.zig
|
|
||||||
index 328bd86..76b8fea 100644
|
|
||||||
--- a/src/scan.zig
|
|
||||||
+++ b/src/scan.zig
|
|
||||||
@@ -60,7 +60,7 @@ fn isKernfs(dir: std.fs.Dir, dev: u64) bool {
|
|
||||||
if (kernfs_cache.get(dev)) |e| return e;
|
|
||||||
var buf: c_statfs.struct_statfs = undefined;
|
|
||||||
if (c_statfs.fstatfs(dir.fd, &buf) != 0) return false; // silently ignoring errors isn't too nice.
|
|
||||||
- const iskern = switch (buf.f_type) {
|
|
||||||
+ const iskern = switch (util.castTruncate(u32, buf.f_type)) {
|
|
||||||
// These numbers are documented in the Linux 'statfs(2)' man page, so I assume they're stable.
|
|
||||||
0x42494e4d, // BINFMTFS_MAGIC
|
|
||||||
0xcafe4a11, // BPF_FS_MAGIC
|
|
13
srcpkgs/ncdu2/patches/no-preferred-optimize-mode.patch
Normal file
13
srcpkgs/ncdu2/patches/no-preferred-optimize-mode.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/build.zig b/build.zig
|
||||||
|
index 231c2e6..f92c70d 100644
|
||||||
|
--- a/build.zig
|
||||||
|
+++ b/build.zig
|
||||||
|
@@ -6,7 +6,7 @@ const std = @import("std");
|
||||||
|
pub fn build(b: *std.Build) void {
|
||||||
|
const target = b.standardTargetOptions(.{});
|
||||||
|
const optimize = b.standardOptimizeOption(.{
|
||||||
|
- .preferred_optimize_mode = .ReleaseFast,
|
||||||
|
+ //.preferred_optimize_mode = .ReleaseFast,
|
||||||
|
});
|
||||||
|
|
||||||
|
const pie = b.option(bool, "pie", "Build with PIE support (by default false)") orelse false;
|
|
@ -1,8 +1,9 @@
|
||||||
# Template file for 'ncdu2'
|
# Template file for 'ncdu2'
|
||||||
pkgname=ncdu2
|
pkgname=ncdu2
|
||||||
version=2.2.2
|
version=2.4
|
||||||
revision=1
|
revision=1
|
||||||
build_style=zig-build
|
build_style=zig-build
|
||||||
|
configure_args="-Dpie"
|
||||||
makedepends="ncurses-devel"
|
makedepends="ncurses-devel"
|
||||||
short_desc="NCurses Disk Usage utility version 2"
|
short_desc="NCurses Disk Usage utility version 2"
|
||||||
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
|
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
|
||||||
|
@ -10,7 +11,7 @@ license="MIT"
|
||||||
homepage="https://dev.yorhel.nl/ncdu"
|
homepage="https://dev.yorhel.nl/ncdu"
|
||||||
changelog="https://dev.yorhel.nl/ncdu/changes2"
|
changelog="https://dev.yorhel.nl/ncdu/changes2"
|
||||||
distfiles="https://dev.yorhel.nl/download/ncdu-${version}.tar.gz"
|
distfiles="https://dev.yorhel.nl/download/ncdu-${version}.tar.gz"
|
||||||
checksum=90d920024e752318b469776ce57e03b3c702d49329ad9825aeeab36c3babf993
|
checksum=4a3d0002309cf6a7cea791938dac9becdece4d529d0d6dc8d91b73b4e6855509
|
||||||
conflicts="ncdu"
|
conflicts="ncdu"
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue