Files
haikuports/sys-apps/less/less-643.recipe
Joachim Mairböck 4669db151e less: bump version, remove old version (#10327)
* less: bump version, remove old version

Fixes CVE-2022-46663

* less: use B_USER_VAR_DIRECTORY for the history file

It now uses XDG_STATE_DIR by default, the find_directory based code path is
only used as fallback instead of `~/.local/state` if that isn't defined.
XDG_STATE_DIR is defined since hrev57631 and defaults to B_USER_VAR_DIRECTORY.
2024-04-12 19:11:17 +02:00

71 lines
1.6 KiB
Bash

SUMMARY="A free, open-source file pager"
DESCRIPTION="GNU 'less' is a program similar to 'more', but which allows \
backward movement in the file as well as forward movement. Also, 'less' \
does not have to read the entire input file before starting, so with \
large input files it starts up faster than text editors like 'vi'.
Less uses 'termcap' (or 'terminfo' on some systems), so it can run on a \
variety of terminals. There is even limited support for hardcopy terminals."
HOMEPAGE="http://www.greenwoodsoftware.com/less/"
COPYRIGHT="1984-2023 Mark Nudelman"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="http://www.greenwoodsoftware.com/less/less-$portVersion.tar.gz"
CHECKSUM_SHA256="2911b5432c836fa084c8a2e68f6cd6312372c026a58faaa98862731c8b6052e8"
PATCHES="less-$portVersion.patchset"
ADDITIONAL_FILES="sysless.in"
ARCHITECTURES="all"
GLOBAL_WRITABLE_FILES="
settings/etc/sysless.src keep-old
settings/etc/sysless keep-old
"
PROVIDES="
less = $portVersion
cmd:less
cmd:lessecho
cmd:lesskey
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libncurses$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
autoconf
runConfigure ./configure --with-editor=nano \
--sysconfdir="$settingsDir/etc"
make
}
INSTALL()
{
make install-strip
syslessDir=$settingsDir/etc
mkdir "$syslessDir"
cp "$portDir/additional-files/sysless.in" \
"$syslessDir/sysless.src"
"$binDir"/lesskey -o "$syslessDir/sysless" \
"$syslessDir/sysless.src"
}
TEST()
{
make check
}