mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 01:16:59 +02:00
sys-apps/less: Sync with gentoo
It's from gentoo commit 13917a775eca525fcaa2a22daf2ba2cf4754d94e.
This commit is contained in:
parent
eadd6337c7
commit
b44043204e
@ -1,3 +1,3 @@
|
||||
DIST less-487.tar.gz 318488 BLAKE2B 294ce992da39488fe5b50edf80d70179a45a449f5bcf8b93d6735be9f57db708734984f3a58654773155148c96037e2c445dac63abed1bc4ce655a4e472eca08 SHA512 d31274fdada570fbc6706d7c52637d1accbd18ce947ec062e10b1624c251a8533c6638bc3a1d89d3c70a0c7b9c6d45740598bec9003f281d64c587b1f829125a
|
||||
DIST less-529.tar.gz 339651 BLAKE2B 745146fd584c6144b4052d18bae07a2b4c7a719d36c556c69837f2018ef95efeea35acadcb9946bdde0272848d1bd8537c847e89591d980ceb2eda5a4c5963c4 SHA512 902e3ed86161c5a9eb3c08567b6b702371b5c88a85ef0b21beada223eaa47e0abf4d4d166a4a7a195caef67509fa683d07d0b6a40b529d703ee26aa8910c360a
|
||||
DIST less-530.tar.gz 339723 BLAKE2B 9321548b06330c0b1b5b5a36147f5b9348619ff15d907808744b89581edeb4d8c2118ba455d024a23850902cac4d2c34d1e7b9897e02769584315c0e67ef667e SHA512 8d83a18b5648c4fe85921a563aa2c40bcf495aeb611098c83cd167b1e2f706649846cdf457c8506ae2683ab362ad970a0b261747349673020894bccdb9acbc10
|
||||
DIST less-581.2.tar.gz 349230 BLAKE2B 3f9d3c94f3d9eae5ecd033c5f16a575bd3a179ca335b0318e097a916c6713379cafbe6c57459e86866e890a432fb02be9102726b35c46d9bdd07ca1b35f83058 SHA512 b1189396c798d7cb8655175f31b1af6163dcf8e8d7a72531161cc8396e72e0cf5858ce7b39173be603f9f16eda498f2805cf42c2b92ec6970fd9d2b603fb7b92
|
||||
DIST less-589.tar.gz 352390 BLAKE2B d91eaf0e4a3c14bb8a1c1b820965922c9e795cc8c6489c04dad79d14bc634db1e8e20aae9578ca5375d4d1f1fb861a510527ee9433437457d653453eabf5dce9 SHA512 c2a610c894e98853e73d83cf2c7e94ff75a868280b2ab7fa01676c35d35fdbba808f3630fa4954eca40f0823e654df4c287885499bb24f4d0b7b4558fb91977e
|
||||
DIST less-590.tar.gz 352574 BLAKE2B 0f640f1b6b4d4925c4904ee77460e8becd2dae168fe5c1483bf6a9cfabe9eb0abdc4d4811507ba88a2b4cff6c238158bd8b4463b63d3d7863b44ce8538d32adb SHA512 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903
|
||||
|
@ -1,22 +0,0 @@
|
||||
This version of less comes with some Gentoo enhancements:
|
||||
- default lesspipe.sh script to "view" files
|
||||
- colorization support
|
||||
|
||||
To see what file types are supported, just read the /usr/bin/lesspipe.sh
|
||||
script (it's just a plain text bash script).
|
||||
|
||||
Colorization support is disabled by default. To enable it, export the
|
||||
LESSCOLOR variable to "yes":
|
||||
$ export LESSCOLOR=yes
|
||||
|
||||
We also provide a colorization script, 'code2color', that is used by
|
||||
default. If you wish to use another script, simply export the LESSCOLORIZER
|
||||
variable to name of the script:
|
||||
$ export LESSCOLORIZER=some-other-script
|
||||
|
||||
If you want to use the code2color script and the default color schemes are
|
||||
not acceptable, you can develop your own schemes and save them in one of
|
||||
the following places:
|
||||
/etc/code2color
|
||||
~/.code2color
|
||||
CODE2COLOR_CONFIG env var
|
36
sdk_container/src/third_party/portage-stable/sys-apps/less/files/lesspipe.sh → sdk_container/src/third_party/portage-stable/sys-apps/less/files/lesspipe-r1.sh
vendored
Executable file → Normal file
36
sdk_container/src/third_party/portage-stable/sys-apps/less/files/lesspipe.sh → sdk_container/src/third_party/portage-stable/sys-apps/less/files/lesspipe-r1.sh
vendored
Executable file → Normal file
@ -1,11 +1,13 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Preprocessor for 'less'. Used when this environment variable is set:
|
||||
# LESSOPEN="|lesspipe %s"
|
||||
|
||||
# TODO: handle compressed files better
|
||||
|
||||
[[ -n ${LESSDEBUG} ]] && set -x
|
||||
[[ -n ${LESSDEBUG+set} ]] && set -x
|
||||
|
||||
trap 'exit 0' PIPE
|
||||
|
||||
@ -17,6 +19,7 @@ guesscompress() {
|
||||
*.lzma) echo "unlzma -c" ;;
|
||||
*.lzo) echo "lzop -dc" ;;
|
||||
*.xz) echo "xzdec" ;;
|
||||
*.zst) echo "zstdcat" ;;
|
||||
*) echo "cat" ;;
|
||||
esac
|
||||
}
|
||||
@ -64,8 +67,9 @@ lesspipe() {
|
||||
ls -alF -- "$1"
|
||||
return
|
||||
elif [[ ! -f $1 ]] ; then
|
||||
stat "$1"
|
||||
return
|
||||
# Only return if the stat passes. This is needed to handle pseudo
|
||||
# arguments like URIs.
|
||||
stat -- "$1" && return
|
||||
fi
|
||||
|
||||
case "${match}" in
|
||||
@ -76,6 +80,7 @@ lesspipe() {
|
||||
*.[0-9n].gz|*.man.gz|\
|
||||
*.[0-9n].lzma|*.man.lzma|\
|
||||
*.[0-9n].xz|*.man.xz|\
|
||||
*.[0-9n].zst|*.man.zst|\
|
||||
*.[0-9][a-z].gz|*.[0-9][a-z].gz)
|
||||
local out=$(${DECOMPRESSOR} -- "$1" | file -)
|
||||
case ${out} in
|
||||
@ -104,10 +109,11 @@ lesspipe() {
|
||||
*.doc) antiword "$1" || catdoc "$1" ;;
|
||||
*.rtf) unrtf --nopict --text "$1" ;;
|
||||
*.conf|*.txt|*.log) ;; # force less to work on these directly #150256
|
||||
*.json) python -mjson.tool "$1" ;;
|
||||
|
||||
### URLs ###
|
||||
ftp://*|http://*|*.htm|*.html)
|
||||
for b in links2 links lynx ; do
|
||||
ftp://*|http://*|https://|*.htm|*.html)
|
||||
for b in elinks links2 links lynx ; do
|
||||
${b} -dump "$1" && exit 0
|
||||
done
|
||||
html2text -style pretty "$1"
|
||||
@ -115,23 +121,24 @@ lesspipe() {
|
||||
|
||||
### Tar files ###
|
||||
*.tar|\
|
||||
*.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\
|
||||
*.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|*.tar.zst|\
|
||||
*.tar.lz|*.tar.tlz|\
|
||||
*.tar.lzma|*.tar.xz)
|
||||
${DECOMPRESSOR} -- "$1" | tar tvvf -;;
|
||||
*.tbz2|*.tbz|*.tgz|*.tlz|*.txz)
|
||||
lesspipe "$1" "$1".tar.${1##*.t} ;;
|
||||
lesspipe "$1" "$1.tar.${1##*.t}" ;;
|
||||
|
||||
### Misc archives ###
|
||||
*.bz2|\
|
||||
*.gz|*.z|\
|
||||
*.zst|\
|
||||
*.lz|\
|
||||
*.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;;
|
||||
*.rpm) rpm -qpivl --changelog -- "$1" || rpm2tar -O "$1" | tar tvvf -;;
|
||||
*.cpi|*.cpio) cpio -itv < "$1" ;;
|
||||
*.ace) unace l "$1" ;;
|
||||
*.arc) arc v "$1" ;;
|
||||
*.arj) unarj l -- "$1" ;;
|
||||
*.arj) arj l -- "$1" || unarj l "$1" ;;
|
||||
*.cab) cabextract -l -- "$1" ;;
|
||||
*.lha|*.lzh) lha v "$1" ;;
|
||||
*.zoo) zoo -list "$1" || unzoo -l "$1" ;;
|
||||
@ -207,7 +214,7 @@ lesspipe() {
|
||||
*)
|
||||
case $(( recur++ )) in
|
||||
# Maybe we didn't match due to case issues ...
|
||||
0) lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;;
|
||||
0) lesspipe "$1" "$(echo "$1" | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;;
|
||||
|
||||
# Maybe we didn't match because the file is named weird ...
|
||||
1) lesspipe_file "$1" ;;
|
||||
@ -241,12 +248,12 @@ lesspipe() {
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ -z $1 ]] ; then
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Usage: lesspipe <file>"
|
||||
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
|
||||
cat <<-EOF
|
||||
lesspipe (git)
|
||||
Copyright 2001-2016 Gentoo Foundation
|
||||
Copyright 1999-2019 Gentoo Authors
|
||||
Mike Frysinger <vapier@gentoo.org>
|
||||
(with plenty of ideas stolen from other projects/distros)
|
||||
|
||||
@ -275,7 +282,6 @@ elif [[ $1 == "-h" || $1 == "--help" ]] ; then
|
||||
EOF
|
||||
else
|
||||
recur=0
|
||||
[[ -n ${LESSDEBUG} ]] \
|
||||
&& lesspipe "$1" \
|
||||
|| lesspipe "$1" 2> /dev/null
|
||||
[[ -z ${LESSDEBUG+set} ]] && exec 2>/dev/null
|
||||
lesspipe "$1"
|
||||
fi
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Excellent text file viewer"
|
||||
HOMEPAGE="http://www.greenwoodsoftware.com/less/"
|
||||
@ -9,26 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-3 BSD-2 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="pcre unicode"
|
||||
|
||||
DEPEND=">=app-misc/editor-wrapper-3
|
||||
>=sys-libs/ncurses-5.2:0=
|
||||
pcre? ( dev-libs/libpcre )"
|
||||
pcre? ( dev-libs/libpcre2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_configure() {
|
||||
export ac_cv_lib_ncursesw_initscr=$(usex unicode)
|
||||
export ac_cv_lib_ncurses_initscr=$(usex !unicode)
|
||||
econf \
|
||||
--with-regex=$(usex pcre pcre posix) \
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newbin "${FILESDIR}"/lesspipe.sh lesspipe
|
||||
newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Excellent text file viewer"
|
||||
HOMEPAGE="http://www.greenwoodsoftware.com/less/"
|
||||
@ -9,26 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-3 BSD-2 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="pcre unicode"
|
||||
|
||||
DEPEND=">=app-misc/editor-wrapper-3
|
||||
>=sys-libs/ncurses-5.2:0=
|
||||
pcre? ( dev-libs/libpcre )"
|
||||
pcre? ( dev-libs/libpcre2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_configure() {
|
||||
export ac_cv_lib_ncursesw_initscr=$(usex unicode)
|
||||
export ac_cv_lib_ncurses_initscr=$(usex !unicode)
|
||||
econf \
|
||||
--with-regex=$(usex pcre pcre posix) \
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newbin "${FILESDIR}"/lesspipe.sh lesspipe
|
||||
newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Excellent text file viewer"
|
||||
HOMEPAGE="http://www.greenwoodsoftware.com/less/"
|
||||
@ -9,30 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-3 BSD-2 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="pcre unicode"
|
||||
|
||||
DEPEND=">=app-misc/editor-wrapper-3
|
||||
>=sys-libs/ncurses-5.2:0=
|
||||
pcre? ( dev-libs/libpcre )"
|
||||
pcre? ( dev-libs/libpcre2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
chmod a+x configure || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export ac_cv_lib_ncursesw_initscr=$(usex unicode)
|
||||
export ac_cv_lib_ncurses_initscr=$(usex !unicode)
|
||||
econf \
|
||||
--with-regex=$(usex pcre pcre posix) \
|
||||
local myeconfargs=(
|
||||
--with-regex=$(usex pcre pcre2 posix)
|
||||
--with-editor="${EPREFIX}"/usr/libexec/editor
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newbin "${FILESDIR}"/lesspipe.sh lesspipe
|
||||
newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe
|
||||
newenvd "${FILESDIR}"/less.envd 70less
|
||||
}
|
||||
|
@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:gnu:less</remote-id>
|
||||
<remote-id type="github">gwsw/less</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Loading…
Reference in New Issue
Block a user