3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
|
6 |
# Releases are usually first a beta then promoted to stable if no
|
|
7 |
# issues were found. Upstream explicitly ask "to not generally distribute"
|
|
8 |
# the beta versions. It's okay to keyword beta versions if they fix
|
|
9 |
# a serious bug, but otherwise try to avoid it.
|
|
10 |
|
6 |
11 |
WANT_AUTOMAKE=none
|
7 |
12 |
WANT_LIBTOOL=none
|
|
13 |
inherit autotools flag-o-matic optfeature toolchain-funcs
|
|
14 |
|
|
15 |
DESCRIPTION="Excellent text file viewer"
|
|
16 |
HOMEPAGE="https://www.greenwoodsoftware.com/less/"
|
|
17 |
|
|
18 |
MY_PV=${PV/_beta/-beta}
|
|
19 |
MY_P=${PN}-${MY_PV}
|
8 |
20 |
|
9 |
21 |
if [[ ${PV} == 9999 ]]; then
|
10 |
22 |
EGIT_REPO_URI="https://github.com/gwsw/less"
|
11 |
23 |
inherit git-r3
|
12 |
|
fi
|
13 |
|
|
14 |
|
inherit autotools flag-o-matic optfeature
|
|
24 |
else
|
|
25 |
SRC_URI="https://www.greenwoodsoftware.com/less/${MY_P}.tar.gz"
|
15 |
26 |
|
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.
|
|
27 |
if [[ ${PV} != *_beta* ]] ; then
|
|
28 |
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"
|
|
29 |
fi
|
|
30 |
fi
|
20 |
31 |
|
21 |
|
MY_PV=${PV/_beta/-beta}
|
22 |
|
MY_P=${PN}-${MY_PV}
|
23 |
|
DESCRIPTION="Excellent text file viewer"
|
24 |
|
HOMEPAGE="https://www.greenwoodsoftware.com/less/"
|
25 |
|
[[ ${PV} != 9999 ]] && SRC_URI="https://www.greenwoodsoftware.com/less/${MY_P}.tar.gz"
|
26 |
32 |
S="${WORKDIR}"/${MY_P/?beta}
|
27 |
33 |
|
28 |
34 |
LICENSE="|| ( GPL-3 BSD-2 )"
|
29 |
35 |
SLOT="0"
|
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"
|
|
36 |
IUSE="pcre test"
|
|
37 |
# chinese1, utf8-2
|
|
38 |
RESTRICT="test !test? ( test )"
|
37 |
39 |
|
38 |
40 |
DEPEND="
|
39 |
41 |
>=app-misc/editor-wrapper-3
|
... | ... | |
41 |
43 |
pcre? ( dev-libs/libpcre2 )
|
42 |
44 |
"
|
43 |
45 |
RDEPEND="${DEPEND}"
|
|
46 |
BDEPEND="test? ( virtual/pkgconfig )"
|
44 |
47 |
|
45 |
48 |
PATCHES=(
|
46 |
|
"${FILESDIR}"/${PN}-633-tinfow.patch
|
|
49 |
"${FILESDIR}"/${PN}-643-lesstest-pkg-config.patch
|
47 |
50 |
)
|
48 |
51 |
|
49 |
52 |
src_prepare() {
|
... | ... | |
66 |
69 |
}
|
67 |
70 |
|
68 |
71 |
src_test() {
|
69 |
|
emake check VERBOSE=1
|
|
72 |
emake check VERBOSE=1 CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
70 |
73 |
}
|
71 |
74 |
|
72 |
75 |
src_install() {
|
... | ... | |
83 |
86 |
elog "The lesspipe.sh symlink has been dropped. If you are still setting"
|
84 |
87 |
elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
|
85 |
88 |
fi
|
|
89 |
|
|
90 |
if has_version "<${CATEGORY}/${PN}-643" ; then
|
|
91 |
elog "less now colorizes by default. To disable this, set LESSCOLOR=no."
|
|
92 |
fi
|
86 |
93 |
}
|