mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-04 00:08:09 -07:00
sys-apps/less: add 704
This now builds tests separately. Building with tests changes the built binary, so build separately and throw it away at the end. Bug: https://github.com/gwsw/less/issues/791 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -9,3 +9,5 @@ DIST less-692.tar.gz 987633 BLAKE2B 379d7738894f16fed1b429c9e26c2e46fd27c790be2b
|
||||
DIST less-692.tar.gz.sig 95 BLAKE2B 530d6274ba8045975c26123ed3a239a5272350cf229287dc73fbe5c1e862a81618e14e280d63ed6b30087bb86e15b259a33a5b0e3b4bb945cbd9ffeefa382eed SHA512 738b3ed934f877674cf076a788a9aca5bae33a62db4c26b604bd7e819ca472465417a8d2d0bdedc1126e8eeba7c78e8d5b165f134ecca4426e30a7c3a1e31f4b
|
||||
DIST less-702.tar.gz 996416 BLAKE2B 89d52e986a4bf62f6bb8fccf80a7e256e91a1a8e8935e6a4e0bf6ca02080008494b31e5f6d91a4ac5fb7eadb8d49d5289f1020b174bfc344534130baf00b0a39 SHA512 6cdb7e4d023aad412453b5c13b89d4025c7dc8641370f066cb5c13ee5dcd645b98f95fc0d8371c6b6446e2f24a07a3eef8d54965460a2bfb693bdf300f44b1eb
|
||||
DIST less-702.tar.gz.sig 95 BLAKE2B e7f0483b2d0ed3aae3d5947d6e8ff19b1257e9171f7bac33f2486224ef90a198c461ef55adec68ea2ac2cb1a114aef274bc8f00c3ee4fe85a172b9a5ae685a43 SHA512 27542dff2e0b2ee07218c22b0de64cfda589bfa868d19d2d8278ccefe2252e889bd2ce3529bd80c6d66468b930d83719cec473801b59f9a658e5b9353539009c
|
||||
DIST less-704.tar.gz 996650 BLAKE2B 490b5ea9006cec85b8a44f19bfc47f99da7394664e4dc4ed37fb9610c42d9fbe206a702540aaa04fe9b3320e0672522fb740ad189c835aa5a4580da4175fae71 SHA512 c6a933dd6dc058f912de524fc4e71614deb3873e4d8e3830d7cfc0e45dca8f4e8671d1e63d6099ebc9cd224f52e8dbdb4fe00a89a00d33e937fd9b852ad3609c
|
||||
DIST less-704.tar.gz.sig 95 BLAKE2B 3a465b3d725a0b25968aff6a76470ab692dcdd3469511e77db3d0a7a6ef8b15322b9f82bdcc86e453687784435cdcf087bcbd0346569b6348f52ca390687b460 SHA512 e2ca6f46c08fe68693391f38e794faa7f42c52fa61404da253d860d7ce56af6a6653cd791c5a770fd2d814a73782c677211356d95fa3b2e445dd672470849f27
|
||||
|
||||
136
sys-apps/less/less-704.ebuild
Normal file
136
sys-apps/less/less-704.ebuild
Normal file
@@ -0,0 +1,136 @@
|
||||
# Copyright 1999-2026 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 multibuild 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
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/less.asc
|
||||
inherit verify-sig
|
||||
|
||||
SRC_URI="
|
||||
https://www.greenwoodsoftware.com/less/${MY_P}.tar.gz
|
||||
verify-sig? (
|
||||
https://www.greenwoodsoftware.com/less/${MY_P}.sig -> ${MY_P}.tar.gz.sig
|
||||
)
|
||||
"
|
||||
|
||||
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-less )"
|
||||
|
||||
if [[ ${PV} != *_beta* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-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
|
||||
|
||||
MULTIBUILD_VARIANTS=(
|
||||
base
|
||||
$(usev test)
|
||||
)
|
||||
|
||||
multibuild_copy_sources
|
||||
}
|
||||
|
||||
less_configure() {
|
||||
cd "${BUILD_DIR}" || die
|
||||
append-lfs-flags # bug #896316
|
||||
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
|
||||
ECONF_SOURCE=${PWD} econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant less_configure
|
||||
}
|
||||
|
||||
less_compile() {
|
||||
emake -C "${BUILD_DIR}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant less_compile
|
||||
}
|
||||
|
||||
less_test() {
|
||||
# https://github.com/gwsw/less/issues/791
|
||||
[[ ${MULTIBUILD_VARIANT} == "test" ]] || return
|
||||
emake -C "${BUILD_DIR}" check VERBOSE=1 CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant less_test
|
||||
}
|
||||
|
||||
less_install() {
|
||||
[[ ${MULTIBUILD_VARIANT} == "base" ]] || return
|
||||
|
||||
emake -C "${BUILD_DIR}" DESTDIR="${D}" install
|
||||
einstalldocs
|
||||
|
||||
keepdir /usr/lib/lessfilter.d
|
||||
keepdir /etc/lessfilter.d
|
||||
|
||||
newbin "${FILESDIR}"/lesspipe-r4.sh lesspipe
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant less_install
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
@@ -10,7 +10,7 @@ EAPI=8
|
||||
|
||||
WANT_AUTOMAKE=none
|
||||
WANT_LIBTOOL=none
|
||||
inherit autotools flag-o-matic optfeature toolchain-funcs
|
||||
inherit autotools flag-o-matic multibuild optfeature toolchain-funcs
|
||||
|
||||
DESCRIPTION="Excellent text file viewer"
|
||||
HOMEPAGE="https://www.greenwoodsoftware.com/less/"
|
||||
@@ -56,29 +56,60 @@ 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
|
||||
|
||||
MULTIBUILD_VARIANTS=(
|
||||
base
|
||||
$(usev test)
|
||||
)
|
||||
|
||||
multibuild_copy_sources
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
less_configure() {
|
||||
cd "${BUILD_DIR}" || die
|
||||
append-lfs-flags # bug #896316
|
||||
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
ECONF_SOURCE=${PWD} econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant less_configure
|
||||
}
|
||||
|
||||
less_compile() {
|
||||
emake -C "${BUILD_DIR}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant less_compile
|
||||
}
|
||||
|
||||
less_test() {
|
||||
# https://github.com/gwsw/less/issues/791
|
||||
[[ ${MULTIBUILD_VARIANT} == "test" ]] || return
|
||||
emake -C "${BUILD_DIR}" check VERBOSE=1 CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake check VERBOSE=1 CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
|
||||
multibuild_foreach_variant less_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
less_install() {
|
||||
[[ ${MULTIBUILD_VARIANT} == "base" ]] || return
|
||||
|
||||
emake -C "${BUILD_DIR}" DESTDIR="${D}" install
|
||||
einstalldocs
|
||||
|
||||
keepdir /usr/lib/lessfilter.d
|
||||
keepdir /etc/lessfilter.d
|
||||
@@ -87,6 +118,10 @@ src_install() {
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant less_install
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
optfeature "Colorized output support" dev-python/pygments
|
||||
|
||||
|
||||
Reference in New Issue
Block a user