new package: lazyread
Requested in https://github.com/termux/termux-packages/issues/2245.
This commit is contained in:
parent
65f8832cde
commit
8a6c606cb5
16
packages/lazyread/build.sh
Normal file
16
packages/lazyread/build.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://lazyread.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="An auto-scroller, pager, and e-book reader all in one"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=2.0
|
||||
TERMUX_PKG_SRCURL=https://liquidtelecom.dl.sourceforge.net/project/lazyread/lazyread/lazyread%20${TERMUX_PKG_VERSION}/lazyread-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=7e462c5c9fe104d69e410c537336af838a30a030699dd9320f75fe85a20746a1
|
||||
TERMUX_PKG_DEPENDS="coreutils, lesspipe, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make() {
|
||||
$CC $CPPFLAGS $CFLAGS lazyread.c -o lazyread $LDFLAGS -lncurses
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 lazyread $TERMUX_PREFIX/bin/lazyread
|
||||
}
|
14
packages/lazyread/lessopen-env-warning.patch
Normal file
14
packages/lazyread/lessopen-env-warning.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -uNr lazyread-2.0/lazyread.c lazyread-2.0.mod/lazyread.c
|
||||
--- lazyread-2.0/lazyread.c 2003-02-02 15:28:15.000000000 +0200
|
||||
+++ lazyread-2.0.mod/lazyread.c 2020-01-04 15:57:14.580179280 +0200
|
||||
@@ -393,7 +393,9 @@
|
||||
snprintf(command, (strlen(lesscommand) + strlen(qfilename)), lesscommand, qfilename);
|
||||
}
|
||||
system(command); /* run lesspipe.sh */
|
||||
- }
|
||||
+ } else {
|
||||
+ printf("LESSOPEN is not set!\n");
|
||||
+ }
|
||||
|
||||
if (!(fp_write = fopen(lfile.lazy_file, "r")))
|
||||
my_perror("fopen()");
|
29
packages/lazyread/no-link.patch
Normal file
29
packages/lazyread/no-link.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -uNr lazyread-2.0/lazyread.c lazyread-2.0.mod/lazyread.c
|
||||
--- lazyread-2.0/lazyread.c 2003-02-02 15:28:15.000000000 +0200
|
||||
+++ lazyread-2.0.mod/lazyread.c 2020-01-04 15:54:01.364514351 +0200
|
||||
@@ -437,10 +437,8 @@
|
||||
|
||||
if (unlink(lfile.lazy_file))
|
||||
my_perror("unlink()");
|
||||
- if (link(lfile.lazy_tmp, lfile.lazy_file) != 0)
|
||||
- my_perror("link()");
|
||||
- if (unlink(lfile.lazy_tmp))
|
||||
- my_perror("unlink()");
|
||||
+ if (rename(lfile.lazy_tmp, lfile.lazy_file) != 0)
|
||||
+ my_perror("rename()");
|
||||
}
|
||||
|
||||
void strip_extra_blanks(void)
|
||||
@@ -469,10 +467,8 @@
|
||||
fclose(fp_write);
|
||||
if (unlink(lfile.lazy_file))
|
||||
my_perror("unlink()");
|
||||
- if (link(lfile.lazy_tmp, lfile.lazy_file) != 0)
|
||||
- my_perror("link()");
|
||||
- if (unlink(lfile.lazy_tmp))
|
||||
- my_perror("unlink()");
|
||||
+ if (rename(lfile.lazy_tmp, lfile.lazy_file) != 0)
|
||||
+ my_perror("rename()");
|
||||
}
|
||||
|
||||
void scroll_it(unsigned int scroll_speed, int argc, char *filename_nodashf)
|
Loading…
Reference in New Issue
Block a user