diff --git a/packages/lazyread/build.sh b/packages/lazyread/build.sh new file mode 100644 index 000000000..6227c46c0 --- /dev/null +++ b/packages/lazyread/build.sh @@ -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 +} diff --git a/packages/lazyread/lessopen-env-warning.patch b/packages/lazyread/lessopen-env-warning.patch new file mode 100644 index 000000000..d6246d5f3 --- /dev/null +++ b/packages/lazyread/lessopen-env-warning.patch @@ -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()"); diff --git a/packages/lazyread/no-link.patch b/packages/lazyread/no-link.patch new file mode 100644 index 000000000..0033f3a59 --- /dev/null +++ b/packages/lazyread/no-link.patch @@ -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)