summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/less
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/less')
-rw-r--r--sys-apps/less/Manifest6
-rw-r--r--sys-apps/less/files/README.Gentoo22
-rw-r--r--sys-apps/less/files/code2color-0.2.patch26
-rw-r--r--sys-apps/less/files/less.envd2
-rw-r--r--sys-apps/less/files/lesspipe.sh274
-rw-r--r--sys-apps/less/less-458.ebuild56
-rw-r--r--sys-apps/less/less-476.ebuild57
-rw-r--r--sys-apps/less/less-477.ebuild57
-rw-r--r--sys-apps/less/less-478.ebuild57
-rw-r--r--sys-apps/less/less-479.ebuild57
-rw-r--r--sys-apps/less/metadata.xml5
11 files changed, 619 insertions, 0 deletions
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest
new file mode 100644
index 000000000000..3e7e0d126c8a
--- /dev/null
+++ b/sys-apps/less/Manifest
@@ -0,0 +1,6 @@
+DIST code2color-0.2 200711 SHA256 2365c9009b1cc3c30430b88775ec402164df105fd12364871d05dcaed20be954 SHA512 c0ab9f411d5a106c81334343e3c4a63b67d27b95e2d128145e3ac1ee46cd6c228c61796cf96e51826e69b3e465e7bdaa81b1a48cad934c23b310f2ea2ebd8e75 WHIRLPOOL d0207e84a5849c554b1dfc5882ab46d8afc411c7d26e912235ec05565880e6ed0db8449133502234a01ae8f59feae211486b6a523e37859d8404f72fff9b8f93
+DIST less-458.tar.gz 311224 SHA256 e536c7819ede54b3d487f0ffc4c14b3620bed83734d92a81e89f62346db0fcac SHA512 09f4cbd9b7f7969b80dc630d7ec74634ccc19b714b6eef2d9547a1455816ea0d5891cd23f31bd204f41bc4f6c21c721eb35340a259ac20027a444ff549a6f065 WHIRLPOOL b3cdbd5df5d6b36ef40a1b9f6d2a0d9021e544616201fff4ae8cd7dd8b6875f6aae01f08223169e42275ec2c6dcd2d4aa0d47a251b482b9a9913294e471aebe3
+DIST less-476.tar.gz 316352 SHA256 99245fa2945666273056a8f9b54ef096f93ab0ba42dcc918f1d0ad4978629f95 SHA512 7082bbd47520292a5e57e86381e1636c25e7f590dd2949ac5581b5013f5998b9dc0ab54f76ba6a0817a7e3fef22f7e67b095da2033de08b8346b30171490e5ad WHIRLPOOL 6f3cb0803c7691e5cad5b8bc48b711910d05f16d0d831fbea3a65091c7fc5499c59cec37d0ac063722b151ef0bfaab3e4445e64726da6af01317b31c97bb22b8
+DIST less-477.tar.gz 316404 SHA256 b8c55e7032b701d854bbe257286b49a27b1f02205a76e90db7b465e932059bae SHA512 c3e001444eb1adb5ec403d8d3df754ee799112d86e39dc77c13f7c048fc481cd6ad519138e46e98ac855a3f418102d057ccd7d73a92cf3a62c9ae5ac9e049114 WHIRLPOOL 65540e65e1c31c6b8d5fe77c45f249906b8ffad8fa209481f723e386e0c3fc59bfca65e087c5cba60f1a0b8f3c375a9e02175fe43fc20686d68364b0cff927df
+DIST less-478.tar.gz 316439 SHA256 495c7df52199a0c7e6bfbbe7697b2b54f4bf197c8b10b43957762d74483574ce SHA512 f985b427db50f6a488b0ff5b8e94094d093249c0e021b652b728d52deb89749eb9cd688651e76e045f88c4e327e6b7ac888ce70acf41fb5fe10d6742fc21216e WHIRLPOOL c9cfc181705c1c960d7693b7917bfe911b4673d7955a0ec25e1a5ab928de8d41328290155b76fb1525c91e58dccf41d592ab313594d2a8305acad87a21f141c2
+DIST less-479.tar.gz 316484 SHA256 5bf06cb30ee2a2bd1f79f39aa91e46444e7cb19b48c95c4992fa63cfe4527a80 SHA512 56ecfd3c4e586a926e609dabb278eea1554a4a70a1d1d675cea2e9d69ae764f646b25eab197032db6aa571c22a3550ec11a3a7ef556e0d4523092c7a5daaa030 WHIRLPOOL 9b667e1267cd079cbde0a97379495f8f6034be73e0211cb5cae24509671d582fd2e930aa7dd150a1872184eea0e53f5c7fd9decfe4dc1ee38af3b94f3158fd67
diff --git a/sys-apps/less/files/README.Gentoo b/sys-apps/less/files/README.Gentoo
new file mode 100644
index 000000000000..dca832808f1e
--- /dev/null
+++ b/sys-apps/less/files/README.Gentoo
@@ -0,0 +1,22 @@
+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/files/code2color-0.2.patch b/sys-apps/less/files/code2color-0.2.patch
new file mode 100644
index 000000000000..f8a782504e60
--- /dev/null
+++ b/sys-apps/less/files/code2color-0.2.patch
@@ -0,0 +1,26 @@
+--- 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'};
+
+@@ -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/files/less.envd b/sys-apps/less/files/less.envd
new file mode 100644
index 000000000000..b737af921164
--- /dev/null
+++ b/sys-apps/less/files/less.envd
@@ -0,0 +1,2 @@
+LESSOPEN="|lesspipe %s"
+LESS="-R -M --shift 5"
diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe.sh
new file mode 100644
index 000000000000..6edaa3ceb452
--- /dev/null
+++ b/sys-apps/less/files/lesspipe.sh
@@ -0,0 +1,274 @@
+#!/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 -dc" ;;
+ *.lzma) echo "unlzma -c" ;;
+ *.lzo) echo "lzop -dc" ;;
+ *.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-9n].xz|*.man.xz|\
+ *.[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" || rpm2tar -O "$1" | tar tvvf -;;
+ *.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" || 7zr l -- "$1" ;;
+ *.a) ar tv "$1" ;;
+ *.elf) readelf -a -W -- "$1" ;;
+ *.so) readelf -h -d -s -W -- "$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|*.webp)
+ identify "$1" || file -L -- "$1"
+ ;;
+ *.asf|*.avi|*.mov|*.mp4|*.mpeg|*.mpg|*.qt|*.ram|*.rm|*.webm|*.wmv)
+ 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 #285507
+ # fall back to lesspipe_file if .cue doesn't exist, or if
+ # cd-info failed to parse things sanely
+ [[ -e ${1%.*}.cue ]] \
+ && 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" ;;
+ *.csr) openssl req -text -noout -in "$1" ;;
+ *.crt|*.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
+ LESSQUIET=true ${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$
+ Copyright 2001-2013 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: preprocess 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/less-458.ebuild b/sys-apps/less/less-458.ebuild
new file mode 100644
index 000000000000..88ccd60bae0e
--- /dev/null
+++ b/sys-apps/less/less-458.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+CODE2COLOR_PV="0.2"
+CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
+ http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cp "${DISTDIR}"/${CODE2COLOR_P} "${S}"/code2color || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${CODE2COLOR_P}.patch
+}
+
+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) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ dobin code2color
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ dosym lesspipe /usr/bin/lesspipe.sh
+ newenvd "${FILESDIR}"/less.envd 70less
+
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
+}
diff --git a/sys-apps/less/less-476.ebuild b/sys-apps/less/less-476.ebuild
new file mode 100644
index 000000000000..4602bbe70ebb
--- /dev/null
+++ b/sys-apps/less/less-476.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+CODE2COLOR_PV="0.2"
+CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
+ http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cp "${DISTDIR}"/${CODE2COLOR_P} "${S}"/code2color || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${CODE2COLOR_P}.patch
+ 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) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ dobin code2color
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ dosym lesspipe /usr/bin/lesspipe.sh
+ newenvd "${FILESDIR}"/less.envd 70less
+
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
+}
diff --git a/sys-apps/less/less-477.ebuild b/sys-apps/less/less-477.ebuild
new file mode 100644
index 000000000000..4602bbe70ebb
--- /dev/null
+++ b/sys-apps/less/less-477.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+CODE2COLOR_PV="0.2"
+CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
+ http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cp "${DISTDIR}"/${CODE2COLOR_P} "${S}"/code2color || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${CODE2COLOR_P}.patch
+ 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) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ dobin code2color
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ dosym lesspipe /usr/bin/lesspipe.sh
+ newenvd "${FILESDIR}"/less.envd 70less
+
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
+}
diff --git a/sys-apps/less/less-478.ebuild b/sys-apps/less/less-478.ebuild
new file mode 100644
index 000000000000..21dc22854ac8
--- /dev/null
+++ b/sys-apps/less/less-478.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+CODE2COLOR_PV="0.2"
+CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
+ http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cp "${DISTDIR}"/${CODE2COLOR_P} "${S}"/code2color || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${CODE2COLOR_P}.patch
+ 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) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ dobin code2color
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ dosym lesspipe /usr/bin/lesspipe.sh
+ newenvd "${FILESDIR}"/less.envd 70less
+
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
+}
diff --git a/sys-apps/less/less-479.ebuild b/sys-apps/less/less-479.ebuild
new file mode 100644
index 000000000000..4602bbe70ebb
--- /dev/null
+++ b/sys-apps/less/less-479.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+CODE2COLOR_PV="0.2"
+CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
+DESCRIPTION="Excellent text file viewer"
+HOMEPAGE="http://www.greenwoodsoftware.com/less/"
+SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
+ http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+
+LICENSE="|| ( GPL-3 BSD-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="pcre unicode"
+
+DEPEND=">=app-misc/editor-wrapper-3
+ >=sys-libs/ncurses-5.2
+ pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cp "${DISTDIR}"/${CODE2COLOR_P} "${S}"/code2color || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${CODE2COLOR_P}.patch
+ 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) \
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+}
+
+src_install() {
+ default
+
+ dobin code2color
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+ dosym lesspipe /usr/bin/lesspipe.sh
+ newenvd "${FILESDIR}"/less.envd 70less
+
+ dodoc "${FILESDIR}"/README.Gentoo
+}
+
+pkg_postinst() {
+ elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
+}
diff --git a/sys-apps/less/metadata.xml b/sys-apps/less/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-apps/less/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>