diff options
author | Martin Väth <martin@mvath.de> | 2011-06-07 07:54:51 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2015-10-11 10:46:35 +0200 |
commit | 0450dc222439bd83c1a5b6aaee6b5abb85ad4cd1 (patch) | |
tree | 7dcf24b17028fdb62dfeb2a84f4fc7c13ed39af4 /sys-apps/less-select | |
parent | Add zsh-syntax-highlighting (diff) | |
download | mv-0450dc222439bd83c1a5b6aaee6b5abb85ad4cd1.tar.gz mv-0450dc222439bd83c1a5b6aaee6b5abb85ad4cd1.tar.bz2 mv-0450dc222439bd83c1a5b6aaee6b5abb85ad4cd1.zip |
rename sys-apps/less-select -> sys-apps/less[less-select]
Diffstat (limited to 'sys-apps/less-select')
-rw-r--r-- | sys-apps/less-select/ChangeLog | 69 | ||||
-rw-r--r-- | sys-apps/less-select/Manifest | 9 | ||||
-rw-r--r-- | sys-apps/less-select/files/README.Gentoo | 22 | ||||
-rw-r--r-- | sys-apps/less-select/files/code2color.patch | 34 | ||||
-rw-r--r-- | sys-apps/less-select/files/lesspipe.sh | 267 | ||||
-rw-r--r-- | sys-apps/less-select/less-select-443.ebuild | 79 | ||||
-rw-r--r-- | sys-apps/less-select/metadata.xml | 12 |
7 files changed, 0 insertions, 492 deletions
diff --git a/sys-apps/less-select/ChangeLog b/sys-apps/less-select/ChangeLog deleted file mode 100644 index 4562f2db..00000000 --- a/sys-apps/less-select/ChangeLog +++ /dev/null @@ -1,69 +0,0 @@ -# ChangeLog for sys-apps/less-select -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header $ - -*less-select-443.ebuild (11 Apr 2011) - - 11 Apr 2011; Martin Väth <martin@mvath.de> - Bump less version. Remove old ebuild. - -*less-select-441.ebuild (28 Feb 2011) - - 29 Feb 2011; Martin Väth <martin@mvath.de> - Bump less version. Remove old ebuild. - -*less-select-440.ebuild (06 Jan 2011) - - 04 Jan 2011; Martin Väth <martin@mvath.de> - Bump less version. Remove old ebuild. - -*less-select-438.ebuild (01 Jan 2011) - - 04 Jan 2011; Martin Väth <martin@mvath.de> - Bump to EAPI=4. - - 01 Jan 2011; Martin Väth <martin@mvath.de> : - Bump less version. Remove old ebuild. - -*less-select-436-r1.ebuild (30 Mar 2010) - - 12 Jun 2010; Martin Väth <martin@mvath.de> : - Remove unneeded files/less.envd. Remove arches which I never tested. - - 30 Mar 2010; Martin Väth <martin@mvath.de> : - -less-select-436.ebuild +less-select-436-r1.ebuild files/lesspipe.sh: - Update lesspipe.sh and related changes of sys-apps/less in portage tree. - - 22 Jul 2009; Martin Väth <martin@mvath.de> : - Version bump to less-436 - - 12 Apr 2009; Martin Väth <martin@mvath.de> : - Version bump to less-429 - - 09 Feb 2009; Martin Väth <martin@mvath.de> : - Version bump to less-424 - - 04 Jan 2008; Martin Väth <martin@mvath.de> : - Version bump to less-418 - - 29 Nov 2007; Martin Väth <martin@mvath.de> : - Version bump to less-416 - - 16 Nov 2007; Martin Väth <martin@mvath.de> : - Version bump to less-415 - - 10 Oct 2007; Martin Väth <martin@mvath.de> : - Version bump to less-409 - - 29 Jun 2007; Martin Väth <martin@mvath.de> : - Version bump to less-406 - - 29 Dec 2005; Martin Väth <martin@mvath.de> : - Version bump to less-394 - - 03 Dec 2005; Martin Väth <martin@mvath.de> : - Version bump to less-393 - - 06 Mar 2005; Martin Väth <martin@mvath.de> : - Initial version based on less-382-r2.ebuild - diff --git a/sys-apps/less-select/Manifest b/sys-apps/less-select/Manifest deleted file mode 100644 index f52678c4..00000000 --- a/sys-apps/less-select/Manifest +++ /dev/null @@ -1,9 +0,0 @@ -AUX README.Gentoo 823 RMD160 be59c37906fca17fa25f6781d3f5e7abc114dc57 SHA1 5a1f126af728f5220b97623050e2f9b1ea5ae58e SHA256 3985fd1810f660ea1c1f2732f719b069b6934d62d8d9e8a09287e63f049ba27d -AUX code2color.patch 1110 RMD160 712f7b79c94f92ee62825d5f53627f18fae693d2 SHA1 a82f937f3a923b52adc4f14cfc9b641903884839 SHA256 a3887126826ef0b4b821bd97cf4e7abfc8b1c9280bf2bb18a2a4cec9a2973936 -AUX lesspipe.sh 7245 RMD160 c7fb8ed5351864a4e5735118a47b018b7f0c9635 SHA1 05018b6749b182b36d92f8d0cda8846f23cf9dae SHA256 ac4130bd95c0dcbfbffb3b9e3b88b39540af23ca356b8ba75907f41990a6c250 -DIST code2color 199875 RMD160 378d340a20c3fe500f19116220d54816fe279225 SHA1 b30526dd52c747b8bd6dcf53cf5cc94824c47feb SHA256 ce63f148293a81b0fe5e072f33285f9bf4f1d832f64b23a2220519674a47091d -DIST less-443.tar.gz 307234 RMD160 e5e7b72266d218a225be7d28c4b8d8d9c0fc75d2 SHA1 72cf3d3c77990e04ad04ea63b377b893c8a7a2cd SHA256 a4c3e8af81fd0944941ee7c74eecc7759422a227df52335e899e69de5eae30ca -DIST less-select-patch-436.tar.gz 47383 RMD160 5ccbe853d1f6ce5940f283bd8265ce8b75e20363 SHA1 21f3f8b16be8cd0724820c167d6f685d236cec36 SHA256 bbdd0ee9241803b8de719c358090354bde63472d1df6db271a50be51bfc800f3 -EBUILD less-select-443.ebuild 2383 RMD160 1afaaa4e60dca6773eb1237afdb996465839a859 SHA1 8ad4fcaa1368c5f305caff5d4b80f21959add3a3 SHA256 4759da49a8d51828fb939ae8a51b6d246a4de955e21d2ac420c66a3061f1ae5f -MISC ChangeLog 2228 RMD160 7e936a31d7472be9d7415fdaeff2b0a152bedc17 SHA1 56a307f43db063e059574c4dface52fe8aacbbfd SHA256 e58fcc3a851eac8b604cb7dcd2ecf8a112d785dfec3f22a577e10055b03925b7 -MISC metadata.xml 502 RMD160 3e3f84a9d63d37d044acba98f3add536f1dc98a6 SHA1 a45389d6d02b23a47a70a174d4d49b9c24480f62 SHA256 24b8610aa08d7c0ef1f1e84af06ffe327396a5132cb9bf51c426496e4ad8df61 diff --git a/sys-apps/less-select/files/README.Gentoo b/sys-apps/less-select/files/README.Gentoo deleted file mode 100644 index dca83280..00000000 --- a/sys-apps/less-select/files/README.Gentoo +++ /dev/null @@ -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 diff --git a/sys-apps/less-select/files/code2color.patch b/sys-apps/less-select/files/code2color.patch deleted file mode 100644 index 5d4ac7fe..00000000 --- a/sys-apps/less-select/files/code2color.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- code2color -+++ code2color -@@ -163,11 +163,11 @@ - # building up the database - # newer entries overwrite old ones - my @CONFIG_FILES; -- push @CONFIG_FILES, "/etc/code2html.config"; -+ push @CONFIG_FILES, "/etc/code2color"; - push @CONFIG_FILES, -- $ENV{'HOME'}."/.code2html.config" if $ENV{'HOME'}; -+ $ENV{'HOME'}."/.code2color" if $ENV{'HOME'}; - push @CONFIG_FILES, -- split(/:/,$ENV{'CODE2HTML_CONFIG'}) if $ENV{'CODE2HTML_CONFIG'}; -+ split(/:/,$ENV{'CODE2COLOR_CONFIG'}) if $ENV{'CODE2COLOR_CONFIG'}; - push @CONFIG_FILES, - split(/:/,$params{'langfile'}) if $params{'langfile'}; - -@@ -446,7 +446,6 @@ - - $_[2] = $langmode; - $_[3] = $alt_langmode; -- print "==> append : to filename to switch off syntax highlighting\n"; - return \$code; - }; - -@@ -3192,7 +3192,7 @@ - # - - $LANGUAGE{'shellscript'} = { -- 'filename' => '\\.(sh|shell)$', -+ 'filename' => '\\.(ebuild|eclass|sh|shell)$', - 'regex' => '^\\s*#\\s*![^\\s]*(sh|bash|ash|zsh|ksh)', - 'patterns' => [ { - 'name' => 'comment', diff --git a/sys-apps/less-select/files/lesspipe.sh b/sys-apps/less-select/files/lesspipe.sh deleted file mode 100644 index b656e306..00000000 --- a/sys-apps/less-select/files/lesspipe.sh +++ /dev/null @@ -1,267 +0,0 @@ -#!/bin/bash -# -# Preprocessor for 'less'. Used when this environment variable is set: -# LESSOPEN="|lesspipe %s" - -# TODO: handle compressed files better - -[[ -n ${LESSDEBUG} ]] && set -x - -trap 'exit 0' PIPE - -guesscompress() { - case "$1" in - *.gz|*.z) echo "gunzip -c" ;; - *.bz2|*.bz) echo "bunzip2 -c" ;; - *.lz) echo "lzip -c" ;; - *.lzma) echo "unlzma -c" ;; - *.xz) echo "xzdec" ;; - *) echo "cat" ;; - esac -} - -lesspipe_file() { - local out=$(file -L -- "$1") - local suffix - case ${out} in - *" 7-zip archive"*) suffix="7z";; - *" ar archive"*) suffix="a";; - *" CAB-Installer"*) suffix="cab";; - *" cpio archive"*) suffix="cpio";; - *" ELF "*) suffix="elf";; - *" LHa"*archive*) suffix="lha";; - *" troff "*) suffix="man";; - *" script text"*) suffix="sh";; - *" shared object"*) suffix="so";; - *" tar archive"*) suffix="tar";; - *" Zip archive"*) suffix="zip";; - *": data") hexdump -C -- "$1"; return 0;; - *) return 1;; - esac - lesspipe "$1" ".${suffix}" - return 0 -} - -lesspipe() { - local match=$2 - [[ -z ${match} ]] && match=$1 - - local DECOMPRESSOR=$(guesscompress "$match") - - # User filters - if [[ -x ~/.lessfilter ]] ; then - ~/.lessfilter "$1" && exit 0 - fi - - local ignore - for ignore in ${LESSIGNORE} ; do - [[ ${match} == *.${ignore} ]] && exit 0 - done - - case "$match" in - - ### Doc files ### - *.[0-9n]|*.man|\ - *.[0-9n].bz2|*.man.bz2|\ - *.[0-9n].gz|*.man.gz|\ - *.[0-9n].lzma|*.man.lzma|\ - *.[0-9][a-z].gz|*.[0-9][a-z].gz) - local out=$(${DECOMPRESSOR} -- "$1" | file -) - case ${out} in - *troff*) - # Need to make sure we pass path to man or it will try - # to locate "$1" in the man search paths - if [[ $1 == /* ]] ; then - man -- "$1" - else - man -- "./$1" - fi - ;; - *text*) - ${DECOMPRESSOR} -- "$1" - ;; - *) - # We could have matched a library (libc.so.6), so let - # `file` figure out what the hell this thing is - lesspipe_file "$1" - ;; - esac - ;; - *.dvi) dvi2tty "$1" ;; - *.ps|*.pdf) ps2ascii "$1" || pstotext "$1" || pdftotext "$1" ;; - *.doc) antiword "$1" || catdoc "$1" ;; - *.rtf) unrtf --nopict --text "$1" ;; - *.conf|*.txt|*.log) ;; # force less to work on these directly #150256 - - ### URLs ### - ftp://*|http://*|*.htm|*.html) - for b in links2 links lynx ; do - ${b} -dump "$1" && exit 0 - done - html2text -style pretty "$1" - ;; - - ### Tar files ### - *.tar|\ - *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\ - *.tar.lz|*.tar.tlz|\ - *.tar.lzma|*.tar.xz) - ${DECOMPRESSOR} -- "$1" | tar tvvf -;; - *.tbz2|*.tbz|*.tgz|*.tlz|*.txz) - lesspipe "$1" "$1".tar.${1##*.t} ;; - - ### Misc archives ### - *.bz2|\ - *.gz|*.z|\ - *.lz|\ - *.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;; - *.rpm) rpm -qpivl --changelog -- "$1" ;; - *.cpi|*.cpio) cpio -itv < "$1" ;; - *.ace) unace l "$1" ;; - *.arc) arc v "$1" ;; - *.arj) unarj l -- "$1" ;; - *.cab) cabextract -l -- "$1" ;; - *.lha|*.lzh) lha v "$1" ;; - *.zoo) zoo -list "$1" || unzoo -l "$1" ;; - *.7z|*.exe) 7z l -- "$1" || 7za l -- "$1" ;; - *.a) ar tv "$1" ;; - *.elf) readelf -a -- "$1" ;; - *.so) readelf -h -d -s -- "$1" ;; - *.mo|*.gmo) msgunfmt -- "$1" ;; - - *.rar|.r[0-9][0-9]) unrar l -- "$1" ;; - - *.jar|*.war|*.ear|*.xpi|*.zip) - unzip -v "$1" || miniunzip -l "$1" || miniunz -l "$1" || zipinfo -v "$1" - ;; - - *.deb|*.udeb) - if type -P dpkg > /dev/null ; then - dpkg --info "$1" - dpkg --contents "$1" - else - ar tv "$1" - ar p "$1" data.tar.gz | tar tzvvf - - fi - ;; - - ### Filesystems ### - *.squashfs) unsquashfs -s "$1" && unsquashfs -ll "$1" ;; - - ### Media ### - *.bmp|*.gif|*.jpeg|*.jpg|*.ico|*.pcd|*.pcx|*.png|*.ppm|*.tga|*.tiff|*.tif) - identify "$1" || file -L -- "$1" - ;; - *.avi|*.mpeg|*.mpg|*.mov|*.qt|*.wmv|*.asf|*.rm|*.ram) - midentify "$1" || file -L -- "$1" - ;; - *.mp3) mp3info "$1" || id3info "$1" ;; - *.ogg) ogginfo "$1" ;; - *.flac) metaflac --list "$1" ;; - *.torrent) torrentinfo "$1" || torrentinfo-console "$1" || ctorrent -x "$1" ;; - *.bin|*.cue|*.raw) - # not all .bin/.raw files are cd images, so fall back to hexdump - cd-info --no-header --no-device-info "$1" || lesspipe_file "$1" - ;; - *.iso) - iso_info=$(isoinfo -d -i "$1") - echo "${iso_info}" - # Joliet output overrides Rock Ridge, so prefer the better Rock - case ${iso_info} in - *$'\n'"Rock Ridge"*) iso_opts="-R";; - *$'\n'"Joliet"*) iso_opts="-J";; - *) iso_opts="";; - esac - isoinfo -l ${iso_opts} -i "$1" - ;; - - ### Encryption stuff ### - *.crl) openssl crl -hash -text -noout -in "$1" ;; - *.pem) openssl x509 -hash -text -noout -in "$1" ;; - -# May not be such a good idea :) -# ### Device nodes ### -# /dev/[hs]d[a-z]*) -# fdisk -l "${1:0:8}" -# [[ $1 == *hd* ]] && hdparm -I "${1:0:8}" -# ;; - - ### Everything else ### - *) - case $(( recur++ )) in - # Maybe we didn't match due to case issues ... - 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" ;; - esac - - # So no matches from above ... finally fall back to an external - # coloring package. No matching here so we don't have to worry - # about keeping in sync with random packages. Any coloring tool - # you use should not output errors about unsupported files to - # stdout. If it does, it's your problem. - - # Allow people to flip color off if they dont want it - case ${LESSCOLOR} in - always) LESSCOLOR=2;; - [yY][eE][sS]|[yY]|1|true) LESSCOLOR=1;; - [nN][oO]|[nN]|0|false) LESSCOLOR=0;; - *) LESSCOLOR=0;; # default to no color #188835 - esac - if [[ ${LESSCOLOR} != "0" ]] && [[ -n ${LESSCOLORIZER=code2color} ]] ; then - # 2: Only colorize if user forces it ... - # 1: ... or we know less will handle raw codes -- this will - # not detect -seiRM, so set LESSCOLORIZER yourself - if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then - ${LESSCOLORIZER} "$1" - fi - fi - - # Nothing left to do but let less deal - exit 0 - ;; - esac -} - -if [[ -z $1 ]] ; then - echo "Usage: lesspipe <file>" -elif [[ $1 == "-V" || $1 == "--version" ]] ; then - Id="cvsid" - cat <<-EOF - $Id: lesspipe.sh,v 1.45 2011/01/20 03:26:14 vapier Exp $ - Copyright 2001-2010 Gentoo Foundation - Mike Frysinger <vapier@gentoo.org> - (with plenty of ideas stolen from other projects/distros) - - - EOF - less -V -elif [[ $1 == "-h" || $1 == "--help" ]] ; then - cat <<-EOF - lesspipe: preproccess files before sending them to less - - Usage: lesspipe <file> - - lesspipe specific settings: - LESSCOLOR env - toggle colorizing of output (no/yes/always) - LESSCOLORIZER env - program used to colorize output (default: code2color) - LESSIGNORE - list of extensions to ignore (don't do anything fancy) - - You can create per-user filters as well by creating the executable file: - ~/.lessfilter - One argument is passed to it: the file to display. - - To use lesspipe, simply add to your environment: - export LESSOPEN="|lesspipe %s" - - Run 'less --help' or 'man less' for more info - EOF -elif [[ -d $1 ]] ; then - ls -alF -- "$1" -else - recur=0 - [[ -n ${LESSDEBUG} ]] \ - && lesspipe "$1" \ - || lesspipe "$1" 2> /dev/null -fi diff --git a/sys-apps/less-select/less-select-443.ebuild b/sys-apps/less-select/less-select-443.ebuild deleted file mode 100644 index 5d5628ba..00000000 --- a/sys-apps/less-select/less-select-443.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header $ - -EAPI="4" -inherit eutils - -DESCRIPTION="Excellent text file viewer, patched with additional selection feature" -HOMEPAGE="http://www.greenwoodsoftware.com/less/" -PATCHVER=436 -SRC_URI="http://www.greenwoodsoftware.com/less/less-${PV}.tar.gz - http://www-zeuthen.desy.de/~friebel/unix/less/code2color - http://www.mathematik.uni-wuerzburg.de/~vaeth/download/less-select-patch-${PATCHVER}.tar.gz" - -LICENSE="|| ( GPL-3 BSD-2 )" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="unicode dummy-less" - -DEPEND=">=sys-libs/ncurses-5.2 - !dummy-less? ( !sys-apps/less )" - -S="${WORKDIR}/less-${PV}" - -MYSUBDIR="./less-select-patch-${PATCHVER}" - -src_unpack() { - unpack "less-${PV}.tar.gz" - cp -- "${DISTDIR}"/code2color "${S}" - cd "${S}" - unpack "less-select-patch-${PATCHVER}.tar.gz" -} - -src_prepare() { - epatch "${FILESDIR}"/code2color.patch - mv -- "${MYSUBDIR}/INSTALL" "${MYSUBDIR}/README.less-select" - if test -e "${MYSUBDIR}/less-${PV}-select.patch" - then epatch "${MYSUBDIR}/less-${PV}-select.patch" || die "Patch less-${PV}-select failed" - else epatch "${MYSUBDIR}/less-${PATCHVER}-select.patch" || die "Patch less-${PATCHVER}-select failed" - fi - "${MYSUBDIR}"/after-patch || die "${MYSUBDIR}/after-patch failed" -} - -yesno() { use $1 && echo yes || echo no ; } -src_configure() { - export ac_cv_lib_ncursesw_initscr=$(yesno unicode) - export ac_cv_lib_ncurses_initscr=$(yesno !unicode) - econf || die -} - -src_compile() { - default_src_compile - ./lesskey -o less-normal-key.bin "${MYSUBDIR}/less-normal-key.src" || die - ./lesskey -o less-select-key.bin "${MYSUBDIR}/less-select-key.src" || die -} - -src_install() { - default_src_install - - dobin code2color || die "dobin" - newbin "${FILESDIR}"/lesspipe.sh lesspipe || die "newbin" - dosym lesspipe /usr/bin/lesspipe.sh - echo 'LESSOPEN="|lesspipe.sh %s" -LESS="-sFR -iMX --shift 5"' > 70less - doenvd 70less - - dodoc NEWS README* "${FILESDIR}"/README.Gentoo "${MYSUBDIR}"/README.less-select - - newbin "${MYSUBDIR}/less-select" less-select - insinto /etc - newins less-normal-key.bin lesskey.bin - newins less-select-key.bin less-select-key.bin - newins "${MYSUBDIR}/less-normal-key.src" lesskey.src - newins "${MYSUBDIR}/less-select-key.src" less-select-key.src -} - -pkg_postinst() { - einfo "lesspipe offers colorization options. Run 'lesspipe -h' for info." -} diff --git a/sys-apps/less-select/metadata.xml b/sys-apps/less-select/metadata.xml deleted file mode 100644 index 9841cf48..00000000 --- a/sys-apps/less-select/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>no-herd</herd> -<maintainer> - <email>martin@mvath.de</email> - <name>Martin Väth</name> -</maintainer> -<use> - <flag name="dummy-less">Set this if you use /etc/portage/env/sys-apps/less to install only a dummy version of less. Only useful if you want to get informed about new less ebuilds by portage despite using less-select.</flag> -</use> -</pkgmetadata> |