summaryrefslogtreecommitdiff
path: root/system/less
diff options
context:
space:
mode:
Diffstat (limited to 'system/less')
-rw-r--r--system/less/APKBUILD16
-rw-r--r--system/less/search-path-history-file.patch88
-rw-r--r--system/less/search-path-lesskey-file.patch37
-rw-r--r--system/less/test-tinfow.patch13
4 files changed, 22 insertions, 132 deletions
diff --git a/system/less/APKBUILD b/system/less/APKBUILD
index 793d3bbab..71448ea19 100644
--- a/system/less/APKBUILD
+++ b/system/less/APKBUILD
@@ -1,18 +1,17 @@
# Contributor: Cameron Banta <cbanta@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=less
-pkgver=590
+pkgver=678
pkgrel=0
pkgdesc="File pager"
url="http://www.greenwoodsoftware.com/less/"
arch="all"
license="BSD-2-Clause OR GPL-3.0+"
-options="!check"
+depends=""
makedepends="ncurses-dev"
subpackages="$pkgname-doc"
source="http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz
- search-path-history-file.patch
- search-path-lesskey-file.patch
+ test-tinfow.patch
"
prepare() {
@@ -31,10 +30,13 @@ build() {
make
}
+check() {
+ make check
+}
+
package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 less-590.tar.gz
-d059a3b4e28c8c8473a9834e00eade8bb9ab14922235bf0344d71604ad656449dcb95763f7103a21d2443881d599178d333f1e4c88a4372d9cb526eb36ebd8b0 search-path-history-file.patch
-62d92ba9ae2e152cbf47d214f92a202591f901a68e74afa7a46fbaa6af1f6c38b76e067cf5c9f4fba2ee9602857c5900a0857d5402ebd593ab2410527b5f162d search-path-lesskey-file.patch"
+sha512sums="ad1983229bfb5a30c6139db60012d3a12b613011f044acb4c0ec5c0fc809b8dc9be40255bf420f65d51425152c4cfc943076ccd2ee63b196165d6ab1426ea187 less-678.tar.gz
+ef417e321e8af95cfec0dbd4411f2676f1649052b8a99097472e82b52774d485a304d307183370b14a265c4e2381a0bb9a7d3e389ba17553824e6d6b5216567a test-tinfow.patch"
diff --git a/system/less/search-path-history-file.patch b/system/less/search-path-history-file.patch
deleted file mode 100644
index 7ec0ce9f1..000000000
--- a/system/less/search-path-history-file.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 5e1f4ce2c3a2c0fd6a953c4f7ca2839370f9c3ae Mon Sep 17 00:00:00 2001
-From: Mark Nudelman <markn@greenwoodsoftware.com>
-Date: Fri, 3 Dec 2021 09:38:22 -0800
-Subject: [PATCH] Add $XDG_STATE_HOME and $HOME/.local/state to list of
- directories to search for the history file.
-
----
- cmdbuf.c | 48 ++++++++++++++++++++++++++++++++----------------
- less.nro.VER | 6 +++---
- 2 files changed, 35 insertions(+), 19 deletions(-)
-
-diff --git a/cmdbuf.c b/cmdbuf.c
-index cd99010d..abbda9b9 100644
---- a/cmdbuf.c
-+++ b/cmdbuf.c
-@@ -1401,14 +1401,41 @@ mlist_size(ml)
- /*
- * Get the name of the history file.
- */
-+ static char *
-+histfile_find(must_exist)
-+ int must_exist;
-+{
-+ char *home = lgetenv("HOME");
-+ char *name = NULL;
-+
-+ /* Try in $XDG_DATA_STATE, then in $HOME/.local/state, then in $XDG_DATA_HOME, then in $HOME. */
-+#if OS2
-+ if (isnullenv(home))
-+ home = lgetenv("INIT");
-+#endif
-+ name = dirfile(lgetenv("XDG_STATE_HOME"), &LESSHISTFILE[1], must_exist);
-+ if (name == NULL)
-+ {
-+ char *dir = dirfile(home, ".local/state", 1);
-+ if (dir != NULL)
-+ {
-+ name = dirfile(dir, &LESSHISTFILE[1], must_exist);
-+ free(dir);
-+ }
-+ }
-+ if (name == NULL)
-+ name = dirfile(lgetenv("XDG_DATA_HOME"), &LESSHISTFILE[1], must_exist);
-+ if (name == NULL)
-+ name = dirfile(home, LESSHISTFILE, must_exist);
-+ return (name);
-+}
-+
- static char *
- histfile_name(must_exist)
- int must_exist;
- {
-- char *home;
-- char *xdg;
- char *name;
--
-+
- /* See if filename is explicitly specified by $LESSHISTFILE. */
- name = lgetenv("LESSHISTFILE");
- if (!isnullenv(name))
-@@ -1423,25 +1450,14 @@ histfile_name(must_exist)
- if (strcmp(LESSHISTFILE, "") == 0 || strcmp(LESSHISTFILE, "-") == 0)
- return (NULL);
-
-- /* Try in $XDG_DATA_HOME first, then in $HOME. */
-- xdg = lgetenv("XDG_DATA_HOME");
-- home = lgetenv("HOME");
--#if OS2
-- if (isnullenv(home))
-- home = lgetenv("INIT");
--#endif
- name = NULL;
- if (!must_exist)
- {
- /* If we're writing the file and the file already exists, use it. */
-- name = dirfile(xdg, &LESSHISTFILE[1], 1);
-- if (name == NULL)
-- name = dirfile(home, LESSHISTFILE, 1);
-+ name = histfile_find(1);
- }
- if (name == NULL)
-- name = dirfile(xdg, &LESSHISTFILE[1], must_exist);
-- if (name == NULL)
-- name = dirfile(home, LESSHISTFILE, must_exist);
-+ name = histfile_find(must_exist);
- return (name);
- }
-
diff --git a/system/less/search-path-lesskey-file.patch b/system/less/search-path-lesskey-file.patch
deleted file mode 100644
index 422376930..000000000
--- a/system/less/search-path-lesskey-file.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d3edebf528da8a9e15d6be518c24e90462a28698 Mon Sep 17 00:00:00 2001
-From: Mark Nudelman <markn@greenwoodsoftware.com>
-Date: Tue, 19 Oct 2021 14:24:04 -0700
-Subject: [PATCH] Add $HOME/.config to possible locations of lesskey file.
-
----
- NEWS | 4 ++++
- decode.c | 13 ++++++++++++-
- less.nro.VER | 2 +-
- 3 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/decode.c b/decode.c
-index e1a55198..2eb480fa 100644
---- a/decode.c
-+++ b/decode.c
-@@ -952,9 +952,20 @@ add_hometable(call_lesskey, envname, def_filename, sysvar)
- filename = save(def_filename);
- else /* def_filename is just basename */
- {
-+ /* Remove first char (normally a dot) unless stored in $HOME. */
- char *xdg = lgetenv("XDG_CONFIG_HOME");
- if (!isnullenv(xdg))
-- filename = dirfile(xdg, def_filename+1, 1);
-+ filename = dirfile(xdg, &def_filename[1], 1);
-+ if (filename == NULL)
-+ {
-+ char *home = lgetenv("HOME");
-+ if (!isnullenv(home))
-+ {
-+ char *cfg_dir = dirfile(home, ".config", 0);
-+ filename = dirfile(cfg_dir, &def_filename[1], 1);
-+ free(cfg_dir);
-+ }
-+ }
- if (filename == NULL)
- filename = homefile(def_filename);
- }
diff --git a/system/less/test-tinfow.patch b/system/less/test-tinfow.patch
new file mode 100644
index 000000000..a24c45746
--- /dev/null
+++ b/system/less/test-tinfow.patch
@@ -0,0 +1,13 @@
+Upstream-URL: https://github.com/gwsw/less/issues/631
+
+--- less-678/lesstest/Makefile.old 2025-05-01 15:42:10.000000000 -0500
++++ less-678/lesstest/Makefile 2025-05-31 16:46:46.402951544 -0500
+@@ -1,7 +1,7 @@
+ CC ?= gcc
+ CFLAGS ?= -Wall -O2
+ LDFLAGS ?=
+-TERMLIB = -lncurses
++TERMLIB = -ltinfow
+ srcdir ?= .
+
+ all: lesstest lt_screen