5 |
5 |
|
6 |
6 |
WANT_AUTOMAKE=none
|
7 |
7 |
WANT_LIBTOOL=none
|
|
8 |
|
|
9 |
if [[ ${PV} == 9999 ]]; then
|
|
10 |
EGIT_REPO_URI="https://github.com/gwsw/less"
|
|
11 |
inherit git-r3
|
|
12 |
fi
|
|
13 |
|
8 |
14 |
inherit autotools
|
9 |
15 |
|
|
16 |
# Releases are usually first a beta then promoted to stable if no
|
|
17 |
# issues were found. Upstream explicitly ask "to not generally distribute"
|
|
18 |
# the beta versions. It's okay to keyword beta versions if they fix
|
|
19 |
# a serious bug, but otherwise try to avoid it.
|
|
20 |
|
|
21 |
MY_PV=${PV/_beta/-beta}
|
|
22 |
MY_P=${PN}-${MY_PV}
|
10 |
23 |
DESCRIPTION="Excellent text file viewer"
|
11 |
|
HOMEPAGE="http://www.greenwoodsoftware.com/less/"
|
12 |
|
SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
|
|
24 |
HOMEPAGE="https://www.greenwoodsoftware.com/less/"
|
|
25 |
[[ ${PV} != 9999 ]] && SRC_URI="https://www.greenwoodsoftware.com/less/${MY_P}.tar.gz"
|
|
26 |
S="${WORKDIR}"/${MY_P/?beta}
|
13 |
27 |
|
14 |
28 |
LICENSE="|| ( GPL-3 BSD-2 )"
|
15 |
29 |
SLOT="0"
|
16 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
17 |
|
IUSE="pcre unicode"
|
18 |
|
|
19 |
|
DEPEND=">=app-misc/editor-wrapper-3
|
20 |
|
>=sys-libs/ncurses-5.2:0=
|
21 |
|
pcre? ( dev-libs/libpcre2 )"
|
|
30 |
if [[ ${PV} != 9999 && ${PV} != *_beta* ]] ; then
|
|
31 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
32 |
fi
|
|
33 |
IUSE="pcre"
|
|
34 |
# As of 623_beta, lesstest is not included in dist tarballs
|
|
35 |
# https://github.com/gwsw/less/issues/344
|
|
36 |
RESTRICT="test"
|
|
37 |
|
|
38 |
DEPEND="
|
|
39 |
>=app-misc/editor-wrapper-3
|
|
40 |
>=sys-libs/ncurses-5.2:=
|
|
41 |
pcre? ( dev-libs/libpcre2 )
|
|
42 |
"
|
22 |
43 |
RDEPEND="${DEPEND}"
|
23 |
44 |
|
24 |
45 |
src_prepare() {
|
25 |
|
local PATCHES=(
|
26 |
|
"${FILESDIR}/less-608-procfs.patch"
|
27 |
|
"${FILESDIR}/less-608-CVE-2022-46663.patch"
|
28 |
|
)
|
29 |
|
|
30 |
46 |
default
|
|
47 |
# Per upstream README to prepare live build
|
|
48 |
[[ ${PV} == 9999 ]] && emake -f Makefile.aut distfiles
|
31 |
49 |
# Upstream uses unpatched autoconf-2.69, which breaks with clang-16.
|
32 |
50 |
# https://bugs.gentoo.org/870412
|
33 |
51 |
eautoreconf
|
34 |
52 |
}
|
35 |
53 |
|
36 |
54 |
src_configure() {
|
37 |
|
export ac_cv_lib_ncursesw_initscr=$(usex unicode)
|
38 |
|
export ac_cv_lib_ncurses_initscr=$(usex !unicode)
|
39 |
55 |
local myeconfargs=(
|
40 |
56 |
--with-regex=$(usex pcre pcre2 posix)
|
41 |
57 |
--with-editor="${EPREFIX}"/usr/libexec/editor
|
... | ... | |
43 |
59 |
econf "${myeconfargs[@]}"
|
44 |
60 |
}
|
45 |
61 |
|
|
62 |
src_test() {
|
|
63 |
emake check VERBOSE=1
|
|
64 |
}
|
|
65 |
|
46 |
66 |
src_install() {
|
47 |
67 |
default
|
48 |
68 |
|