Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nccf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
702
Provoz
nccf
Commits
1de70064
Commit
1de70064
authored
3 years ago
by
Yorhel
Browse files
Options
Downloads
Patches
Plain Diff
Version 2.0-beta2 + more convenient static binary generation
parent
5929bf57
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+6
-0
6 additions, 0 deletions
ChangeLog
Makefile
+26
-17
26 additions, 17 deletions
Makefile
src/main.zig
+1
-1
1 addition, 1 deletion
src/main.zig
with
33 additions
and
18 deletions
ChangeLog
+
6
−
0
View file @
1de70064
# SPDX-FileCopyrightText: 2021 Yoran Heling <projects@yorhel.nl>
# SPDX-License-Identifier: MIT
2.0-beta2 - 2021-07-31
- Requires Zig 0.8
- Significantly reduce memory usage for hard links
- Slightly increase memory usage for directory entries
- Fix reporting of fatal errors in the -0 and -1 scanning UIs
2.0-beta1 - 2021-07-22
- Full release announcement: https://dev.yorhel.nl/doc/ncdu2
- Requires Zig 0.8
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
26
−
17
View file @
1de70064
...
...
@@ -55,34 +55,43 @@ dist: doc
# ASSUMPTION: the ncurses source tree has been extracted into ncurses/
static
:
mkdir
-p
static-
$
{
TARGET
}
/nc static-
$
{
TARGET
}
/inst/pkg
cd
static-
$
{
TARGET
}
/nc
&&
../../ncurses/configure
--prefix
=
"
`
pwd
`
/../inst"
\
static
-%.tar.gz
:
mkdir
-p
static-
$
*
/nc static-
$
*
/inst/pkg
cd
static-
$
*
/nc
&&
../../ncurses/configure
--prefix
=
"
`
pwd
`
/../inst"
\
--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
\
--with-fallbacks
=
"screen linux vt100 xterm xterm-256color"
--host
=
$
{
TARGET
}
\
CC
=
"zig cc --target=
$
{
TARGET
}
"
\
LD
=
"zig cc --target=
$
{
TARGET
}
"
\
--with-fallbacks
=
"screen linux vt100 xterm xterm-256color"
--host
=
$
*
\
CC
=
"zig cc --target=
$
*
"
\
LD
=
"zig cc --target=
$
*
"
\
AR
=
"zig ar"
RANLIB
=
"zig ranlib"
\
CPPFLAGS
=
-D_GNU_SOURCE
&&
make
&&
make install.libs
@
# zig-build - cleaner approach but doesn't work, results in a dynamically linked binary.
@
#cd static-
$
{
TARGET
}
&&
PKG_CONFIG_LIBDIR
=
"
`
pwd
`
/inst/pkg"
zig build
-Dtarget
=
$
{
TARGET
}
@
#cd static-$
*
&& PKG_CONFIG_LIBDIR="`pwd`/inst/pkg" zig build -Dtarget=$
*
@
# --build-file ../build.zig --search-prefix inst/ --cache-dir zig -Drelease-fast=true
@
# Alternative approach, bypassing zig-build
cd
static-
$
{
TARGET
}
&&
zig build-exe
-target
$
{
TARGET
}
\
cd
static-
$
*
&&
zig build-exe
-target
$
*
\
-Iinst
/include
-Iinst
/include/ncursesw
-lc
inst/lib/libncursesw.a
\
--cache-dir
zig-cache
-static
--strip
-O
ReleaseFast ../src/main.zig ../src/ncurses_refs.c
cd
static-
$
{
TARGET
}
&&
mv
main ncdu
&&
tar
-czf
../
ncdu-
${
NCDU_VERSION
}
-
$(
shell
echo
${
TARGET
}
|
sed
s/-musl//
)
.tar.gz ncdu
rm
-rf
static-
$
{
TARGET
}
cd
static-
$
*
&&
mv
main ncdu
&&
tar
-czf
../
static-
$*
.tar.gz ncdu
rm
-rf
static-
$
*
static-
target-%
:
$(
MAKE
)
static
TARGET
=
$*
static-
linux-x86_64
:
static-x86_64-linux-musl.tar.gz
mv
$<
ncdu-
${
NCDU_VERSION
}
-linux-x86_64
.tar.gz
static-all
:
\
static-target-x86_64-linux-musl
\
static-target-aarch64-linux-musl
\
static-target-i386-linux-musl
\
static-target-arm-linux-musleabi
static-linux-i386
:
static-i386-linux-musl.tar.gz
mv
$<
ncdu-
${
NCDU_VERSION
}
-linux-i386
.tar.gz
static-linux-aarch64
:
static-aarch64-linux-musl.tar.gz
mv
$<
ncdu-
${
NCDU_VERSION
}
-linux-aarch64
.tar.gz
static-linux-arm
:
static-arm-linux-musleabi.tar.gz
mv
$<
ncdu-
${
NCDU_VERSION
}
-linux-arm
.tar.gz
static
:
\
static-linux-x86_64
\
static-linux-i386
\
static-linux-aarch64
\
static-linux-arm
This diff is collapsed.
Click to expand it.
src/main.zig
+
1
−
1
View file @
1de70064
// SPDX-FileCopyrightText: 2021 Yoran Heling <projects@yorhel.nl>
// SPDX-License-Identifier: MIT
pub
const
program_version
=
"2.0-beta
1
"
;
pub
const
program_version
=
"2.0-beta
2
"
;
const
std
=
@import
(
"std"
);
const
model
=
@import
(
"model.zig"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment