mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-28 22:50:12 +00:00
47 lines
2.2 KiB
Diff
47 lines
2.2 KiB
Diff
diff --git a/Makefile b/Makefile
|
|
index ad9d7f7..3ce01a3 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -71,8 +71,8 @@ static-%.tar.gz:
|
|
--with-pkg-config-libdir="`pwd`/../inst/pkg"\
|
|
--without-cxx --without-cxx-binding --without-ada --without-manpages --without-progs\
|
|
--without-tests --enable-pc-files --without-pkg-config --without-shared --without-debug\
|
|
- --without-gpm --without-sysmouse --enable-widec --with-default-terminfo-dir=/usr/share/terminfo\
|
|
- --with-terminfo-dirs=/usr/share/terminfo:/lib/terminfo:/usr/local/share/terminfo\
|
|
+ --without-gpm --without-sysmouse --enable-widec --with-default-terminfo-dir=@TERMUX_PREFIX@/share/terminfo\
|
|
+ --with-terminfo-dirs=@TERMUX_PREFIX@/share/terminfo:@TERMUX_PREFIX@/lib/terminfo\
|
|
--with-fallbacks="screen linux vt100 xterm xterm-256color" --host=$*\
|
|
CC="${ZIG} cc --target=$*"\
|
|
LD="${ZIG} cc --target=$*"\
|
|
@@ -85,7 +85,7 @@ static-%.tar.gz:
|
|
cd static-$* && ${ZIG} build-exe -target $*\
|
|
-Iinst/include -Iinst/include/ncursesw -Izstd -lc inst/lib/libncursesw.a zstd/libzstd.a\
|
|
--cache-dir zig-cache -static -fstrip -O ReleaseFast ../src/main.zig
|
|
- strip -R .eh_frame -R .eh_frame_hdr static-$*/main
|
|
+ ${STRIP} -R .eh_frame -R .eh_frame_hdr static-$*/main
|
|
cd static-$* && mv main ncdu && tar -czf ../static-$*.tar.gz ncdu
|
|
rm -rf static-$*
|
|
|
|
diff --git a/src/main.zig b/src/main.zig
|
|
index bdf98ef..8ebc165 100644
|
|
--- a/src/main.zig
|
|
+++ b/src/main.zig
|
|
@@ -492,14 +492,14 @@ pub fn main() void {
|
|
};
|
|
|
|
if (loadConf) {
|
|
- tryReadArgsFile("/etc/ncdu.conf");
|
|
+ tryReadArgsFile("@TERMUX_PREFIX@/etc/ncdu2.conf");
|
|
|
|
if (std.posix.getenvZ("XDG_CONFIG_HOME")) |p| {
|
|
- const path = std.fs.path.joinZ(allocator, &.{p, "ncdu", "config"}) catch unreachable;
|
|
+ const path = std.fs.path.joinZ(allocator, &.{p, "ncdu2", "config"}) catch unreachable;
|
|
defer allocator.free(path);
|
|
tryReadArgsFile(path);
|
|
} else if (std.posix.getenvZ("HOME")) |p| {
|
|
- const path = std.fs.path.joinZ(allocator, &.{p, ".config", "ncdu", "config"}) catch unreachable;
|
|
+ const path = std.fs.path.joinZ(allocator, &.{p, ".config", "ncdu2", "config"}) catch unreachable;
|
|
defer allocator.free(path);
|
|
tryReadArgsFile(path);
|
|
}
|