mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
sys-apps/less: Sync with Gentoo
It's from Gentoo commit 86e486d3dce72fdd3fcc8d0982a035eddcb56197.
This commit is contained in:
parent
b6ee1e828a
commit
22ae9f14bf
@ -1,4 +1,3 @@
|
||||
DIST less-643.tar.gz 592291 BLAKE2B 6dc60dc2e8db05afdae466877a1d26a3008ff5378bbbf2fbdf9efc4f87c0fcfde5703d44a24d4355c98d3a5f438bdb51173150f2a69f801d9c8e4a7401d71b53 SHA512 6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9
|
||||
DIST less-668.tar.gz 649770 BLAKE2B 0f6a85a1c66577dd2a28682a6f8399e42fdbe9fc1498b2e89c6bb7c47109e8d3ab934abe5dd998b2c8dfacfb174ad9daeb79b3d4c13df22fa035ea792b2eaf5e SHA512 6527741a609849ec27b6ab35de46f2c5c2b2771391e3efe263207bee28915946f44331a42f832a7cb42231a19b135cbadc15ae02cd997b83a13cdfbc7213fc27
|
||||
DIST less-678.tar.gz 876971 BLAKE2B 5e6644a8c66f35f1b3ab72a0727c76922b7d3cf299d5d1cf1c94882e8b0d3ec0461cd351e6b2db554b331d993760db8eb17209f41f271f5704fee0caf8d6540e SHA512 ad1983229bfb5a30c6139db60012d3a12b613011f044acb4c0ec5c0fc809b8dc9be40255bf420f65d51425152c4cfc943076ccd2ee63b196165d6ab1426ea187
|
||||
DIST less-679.tar.gz 877094 BLAKE2B 024cd7f4014958e9be52a89aefd9404298850c56f0f8d2403e8648b06ce37bcca6742ebd8a3a4900acb78a3884c4f17270919feb3ca76c6978c34ec79043f154 SHA512 f04e37dc4b2839b416a195e107d21328800e75080054788002c109b3b113a6a898b953391912e7538fb9843ef530b1991efc76dbf6fb5960e5530f3ff83421f6
|
||||
|
@ -1,95 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Releases are usually first a beta then promoted to stable if no
|
||||
# issues were found. Upstream explicitly ask "to not generally distribute"
|
||||
# the beta versions. It's okay to keyword beta versions if they fix
|
||||
# a serious bug, but otherwise try to avoid it.
|
||||
|
||||
WANT_AUTOMAKE=none
|
||||
WANT_LIBTOOL=none
|
||||
inherit autotools flag-o-matic optfeature toolchain-funcs
|
||||
|
||||
DESCRIPTION="Excellent text file viewer"
|
||||
HOMEPAGE="https://www.greenwoodsoftware.com/less/"
|
||||
|
||||
MY_PV=${PV/_beta/-beta}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/gwsw/less"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://www.greenwoodsoftware.com/less/${MY_P}.tar.gz"
|
||||
|
||||
if [[ ${PV} != *_beta* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${MY_P/?beta}
|
||||
|
||||
LICENSE="|| ( GPL-3 BSD-2 )"
|
||||
SLOT="0"
|
||||
IUSE="pcre test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
>=app-misc/editor-wrapper-3
|
||||
>=sys-libs/ncurses-5.2:=
|
||||
pcre? ( dev-libs/libpcre2 )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="test? ( virtual/pkgconfig )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-643-lesstest-pkg-config.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Per upstream README to prepare live build
|
||||
[[ ${PV} == 9999 ]] && emake -f Makefile.aut distfiles
|
||||
# Upstream uses unpatched autoconf-2.69, which breaks with clang-16.
|
||||
# https://bugs.gentoo.org/870412
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-lfs-flags # bug #896316
|
||||
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check VERBOSE=1 CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
keepdir /usr/lib/lessfilter.d
|
||||
keepdir /etc/lessfilter.d
|
||||
|
||||
newbin "${FILESDIR}"/lesspipe-r4.sh lesspipe
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
optfeature "Colorized output support" dev-python/pygments
|
||||
|
||||
if has_version "<${CATEGORY}/${PN}-483-r1" ; then
|
||||
elog "The lesspipe.sh symlink has been dropped. If you are still setting"
|
||||
elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
|
||||
fi
|
||||
|
||||
if has_version "<${CATEGORY}/${PN}-643" ; then
|
||||
elog "less now colorizes by default. To disable this, set LESSCOLOR=no."
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue
Block a user