[drone] build without static libs on debian

pull/2460/head
nick black 3 years ago
parent 2e745ba753
commit b13d27a058
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -11,7 +11,7 @@ steps:
- export TERM=xterm
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_GPM=on -DUSE_QRCODEGEN=on -DDFSG_BUILD=on
- cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_STATIC=off -DUSE_GPM=on -DUSE_QRCODEGEN=on -DDFSG_BUILD=on
- make -j2
- ./notcurses-info
- ctest --output-on-failure

@ -637,15 +637,15 @@ target_link_libraries(nctetris
endif()
############################################################################
# ncman
# tfman
if(NOT WIN32)
file(GLOB NCMANSRCS CONFIGURE_DEPENDS src/man/*.c)
add_executable(ncman ${NCMANSRCS} ${COMPATSRC})
target_compile_definitions(ncman
file(GLOB tfmanSRCS CONFIGURE_DEPENDS src/man/*.c)
add_executable(tfman ${tfmanSRCS} ${COMPATSRC})
target_compile_definitions(tfman
PRIVATE
_GNU_SOURCE
)
target_include_directories(ncman
target_include_directories(tfman
BEFORE
PRIVATE
include
@ -655,7 +655,7 @@ target_include_directories(ncman
"${libdeflate_INCLUDE_DIRS}"
"${ZLIB_INCLUDE_DIRS}"
)
target_link_libraries(ncman
target_link_libraries(tfman
PRIVATE
notcurses-core
"${libdeflate}"
@ -988,7 +988,7 @@ install(TARGETS notcurses-demo DESTINATION bin)
install(TARGETS notcurses-info DESTINATION bin)
install(TARGETS ncneofetch DESTINATION bin)
if(NOT WIN32)
install(TARGETS ncman DESTINATION bin)
install(TARGETS tfman DESTINATION bin)
endif()
if(${USE_CXX})
install(TARGETS notcurses-input DESTINATION bin)

@ -140,7 +140,6 @@ others are external.
Nine binaries are installed as part of Notcurses:
* `ncls`: an `ls` that displays multimedia in the terminal
* `ncman`: a fancy manual browser
* `ncneofetch`: a [neofetch](https://github.com/dylanaraps/neofetch) ripoff
* `ncplayer`: renders visual media (images/videos)
* `nctetris`: a tetris clone
@ -148,6 +147,7 @@ Nine binaries are installed as part of Notcurses:
* `notcurses-info`: detect and print terminal capabilities/diagnostics
* `notcurses-input`: decode and print keypresses
* `notcurses-tester`: unit testing
* `tfman`: a fancy manual browser
To run `notcurses-demo` from a checkout, provide the `data` directory via
the `-p` argument. Demos requiring data files will otherwise abort. The base

@ -42,7 +42,6 @@
<a href="notcurses.3.html">notcurses(3)</a>—a blingful TUI library<br/>
<h3>Executables (section 1)</h3>
<a href="ncls.1.html">ncls</a>—list files, displaying multimedia along with them<br/>
<a href="ncman.1.html">ncman</a>—swank man page browser<br/>
<a href="ncneofetch.1.html">ncneofetch</a>—generate low-effort posts for r/unixporn<br/>
<a href="ncplayer.1.html">ncplayer</a>—renders images and video to a terminal<br/>
<a href="nctetris.1.html">nctetris</a>—Tetris in a terminal<br/>
@ -52,6 +51,7 @@
<a href="notcurses-tester.1.html">notcurses-tester</a>—unit test driver<br/>
<a href="ncdirect-pydemo.1.html">ncdirect-pydemo</a>—validates the Python direct-mode wrappers<br/>
<a href="notcurses-pydemo.1.html">notcurses-pydemo</a>—validates the Python wrappers<br/>
<a href="tfman.1.html">tfman</a>—swank man page browser<br/>
<h3>C library (section 3)</h3>
<a href="notcurses_capabilities.3.html">notcurses_capabilities</a>—runtime capability detection<br/>
<a href="notcurses_cell.3.html">notcurses_cell</a>—operations on <tt>nccell</tt> objects<br/>

@ -1,18 +1,18 @@
% ncman(1)
% tfman(1)
% nick black <nickblack@linux.com>
% v3.0.0
# NAME
ncman - Swank manual page browser
tfman - Swank manual page browser
# SYNOPSIS
**ncman** [**-h**] [**-V**] files
**tfman** [**-h**] [**-V**] files
# DESCRIPTION
**ncman** displays manual pages ala **man(1)** using the Notcurses
**tfman** displays manual pages ala **man(1)** using the Notcurses
(**notcurses(3)**) terminal UI library.
# OPTIONS
@ -27,6 +27,10 @@ The following keypresses are recognized:
* **Ctrl-L**: Redraw the screen.
* **q**: Quit.
* **k**/**up**: Move up by one line.
* **b**/**pgup**: Move up by one page.
* **j**/**down**: Move down by one line.
* **f**/**pgdown**: Move down by one page.
# NOTES

@ -1829,11 +1829,10 @@ ictx_independent_p(const inputctx* ictx){
}
// try to lex a single control sequence off of buf. return the number of bytes
// consumed if we do so, and -1 otherwise. buf is almost certainly *not*
// NUL-terminated. if we are definitely *not* an escape, or we're unsure when
// we run out of input, return the negated relevant number of bytes, setting
// ictx->midescape if we're uncertain. we preserve a->used, a->state, etc.
// across runs to avoid reprocessing.
// consumed if we do so. otherwise, return the negative number of bytes
// examined. set ictx->midescape if we're uncertain. we preserve a->used,
// a->state, etc. across runs to avoid reprocessing. buf is almost certainly
// *not* NUL-terminated.
//
// our rule is: an escape must arrive as a single unit to be interpreted as
// an escape. this is most relevant for Alt+keypress (Esc followed by the
@ -1846,6 +1845,7 @@ static int
process_escape(inputctx* ictx, const unsigned char* buf, int buflen){
assert(ictx->amata.used < buflen);
while(ictx->amata.used < buflen){
fprintf(stderr, "AMATA USED: %u buflen: %d\n", ictx->amata.used, buflen);
unsigned char candidate = buf[ictx->amata.used++];
unsigned used = ictx->amata.used;
if(candidate >= 0x80){
@ -1902,9 +1902,10 @@ process_escapes(inputctx* ictx, unsigned char* buf, int* bufused){
// if we aren't certain, that's not a control sequence unless we're at
// the end of the tbuf, in which case we really do try reading more. if
// this was not a sequence, we'll catch it on the next read.
fprintf(stderr, "ESCAPE PROC: %d %d %d MID: %u\n", *bufused, consumed, offset, ictx->midescape);
if(consumed < 0){
int tavailable = sizeof(ictx->tbuf) - (offset + *bufused - consumed);
// if midescape is not set, the negative return menas invalid escape. if
// if midescape is not set, the negative return means invalid escape. if
// there was space available, we needn't worry about this escape having
// been broken across distinct reads. in either case, replay it to the
// bulk input buffer; our automaton will have been reset.
@ -1919,15 +1920,17 @@ process_escapes(inputctx* ictx, unsigned char* buf, int* bufused){
memcpy(ictx->ibuf + ictx->ibufvalid, buf + offset, available);
ictx->ibufvalid += available;
}
*bufused -= consumed;
offset += consumed;
ictx->midescape = 0;
*bufused -= consumed;
}else{
break;
}
}
fprintf(stderr, "TIME FOR BIG SUB %d - %d -> %d : %d\n", *bufused, consumed, *bufused - consumed, offset);
*bufused -= consumed;
offset += consumed;
assert(0 <= *bufused);
}
// move any leftovers to the front; only happens if we fill output queue,
// or ran out of input data mid-escape
@ -2093,7 +2096,9 @@ process_ibuf(inputctx* ictx){
if(ictx->tbufvalid){
// we could theoretically do this in parallel with process_bulk, but it
// hardly seems worthwhile without breaking apart the fetches of input.
fprintf(stderr, "TBUFVALID: %u\n", ictx->tbufvalid);
process_escapes(ictx, ictx->tbuf, &ictx->tbufvalid);
fprintf(stderr, "TBUFVALIDPOST: %u\n", ictx->tbufvalid);
}
if(ictx->ibufvalid){
if(ictx_independent_p(ictx)){

@ -32,7 +32,7 @@ parse_args(int argc, char** argv){
case 'h': usage(argv0, stdout);
exit(EXIT_SUCCESS);
break;
case 'V': fprintf(stderr, "ncman version %s\n", notcurses_version());
case 'V': fprintf(stderr, "%s version %s\n", argv[0], notcurses_version());
exit(EXIT_SUCCESS);
break;
default: usage(argv0, stderr);
@ -956,7 +956,7 @@ done:
}
static int
ncman(struct notcurses* nc, const char* arg){
tfman(struct notcurses* nc, const char* arg){
int r = manloop(nc, arg);
return r;
}
@ -975,7 +975,7 @@ int main(int argc, char** argv){
bool success;
for(int i = 0 ; i < argc - nonopt ; ++i){
success = false;
if(ncman(nc, argv[nonopt + i])){
if(tfman(nc, argv[nonopt + i])){
break;
}
success = true;

Loading…
Cancel
Save