summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/less/Manifest1
-rw-r--r--sys-apps/less/less-685.ebuild91
-rw-r--r--sys-apps/less/less-9999.ebuild4
3 files changed, 92 insertions, 4 deletions
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest
index dc458eae81a5..ef81adbda9b6 100644
--- a/sys-apps/less/Manifest
+++ b/sys-apps/less/Manifest
@@ -1,3 +1,4 @@
DIST less-643.tar.gz 592291 BLAKE2B 6dc60dc2e8db05afdae466877a1d26a3008ff5378bbbf2fbdf9efc4f87c0fcfde5703d44a24d4355c98d3a5f438bdb51173150f2a69f801d9c8e4a7401d71b53 SHA512 6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9
DIST less-668.tar.gz 649770 BLAKE2B 0f6a85a1c66577dd2a28682a6f8399e42fdbe9fc1498b2e89c6bb7c47109e8d3ab934abe5dd998b2c8dfacfb174ad9daeb79b3d4c13df22fa035ea792b2eaf5e SHA512 6527741a609849ec27b6ab35de46f2c5c2b2771391e3efe263207bee28915946f44331a42f832a7cb42231a19b135cbadc15ae02cd997b83a13cdfbc7213fc27
DIST less-679.tar.gz 877094 BLAKE2B 024cd7f4014958e9be52a89aefd9404298850c56f0f8d2403e8648b06ce37bcca6742ebd8a3a4900acb78a3884c4f17270919feb3ca76c6978c34ec79043f154 SHA512 f04e37dc4b2839b416a195e107d21328800e75080054788002c109b3b113a6a898b953391912e7538fb9843ef530b1991efc76dbf6fb5960e5530f3ff83421f6
+DIST less-685.tar.gz 882560 BLAKE2B 771ba2fb1f593e80d9e5e203bfe9b7a8a33833fcd3464a0c64c4056359e9ecc723eff87b783c9ab4c3090d7dac1973c1875eb7d926601c512dc0494e7e8adb5c SHA512 aff745f1816e0f996fbdbc33ecae0726cf0d842efc227937ff8c32e734c8b5be4c611ffbb27e5e038b4d95280c95ca60c53af1a47cf419cb06e5fab543c231f3
diff --git a/sys-apps/less/less-685.ebuild b/sys-apps/less/less-685.ebuild
new file mode 100644
index 000000000000..e56db4c2fe29
--- /dev/null
+++ b/sys-apps/less/less-685.ebuild
@@ -0,0 +1,91 @@
+# 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 )"
+
+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
+}
diff --git a/sys-apps/less/less-9999.ebuild b/sys-apps/less/less-9999.ebuild
index d0f19d686a29..e56db4c2fe29 100644
--- a/sys-apps/less/less-9999.ebuild
+++ b/sys-apps/less/less-9999.ebuild
@@ -44,10 +44,6 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="test? ( virtual/pkgconfig )"
-PATCHES=(
- "${FILESDIR}"/${PN}-643-lesstest-pkg-config.patch
-)
-
src_prepare() {
default
# Per upstream README to prepare live build