diff options
Diffstat (limited to 'sys-apps/less')
-rw-r--r-- | sys-apps/less/Manifest | 13 | ||||
-rw-r--r-- | sys-apps/less/files/README.Gentoo | 22 | ||||
-rw-r--r-- | sys-apps/less/files/code2color-0.2.patch | 26 | ||||
-rw-r--r-- | sys-apps/less/files/less.envd | 2 | ||||
-rwxr-xr-x | sys-apps/less/files/lesspipe.sh | 281 | ||||
-rw-r--r-- | sys-apps/less/less-487.ebuild | 46 | ||||
-rw-r--r-- | sys-apps/less/less-497.ebuild | 42 | ||||
-rw-r--r-- | sys-apps/less/less-520.ebuild | 42 | ||||
-rw-r--r-- | sys-apps/less/metadata.xml | 8 |
9 files changed, 482 insertions, 0 deletions
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest new file mode 100644 index 000000000000..3c252406829b --- /dev/null +++ b/sys-apps/less/Manifest @@ -0,0 +1,13 @@ +AUX README.Gentoo 823 SHA256 3985fd1810f660ea1c1f2732f719b069b6934d62d8d9e8a09287e63f049ba27d SHA512 fe18f4f5bac70f31ca833cb25d4f1aecde03c3993495ab964cc67f0e52737e3d04aa2263eff26ded279121cc346ef77738743943b5b092c9586c5622ee3a6c92 WHIRLPOOL 7b4de4d109da49392cf9ded961fc9aa0a7cda1ff82dc837b0303f02d00f76f73563397c14440ab0c8638a5a2a92e3b6c62f20a904ae7cd1dd0f5eb8efa68ec39 +AUX code2color-0.2.patch 919 SHA256 1792992964eb024150025b6e357649e07dab6209254512cc9be1a7d5bcc31b77 SHA512 6569c652dc5bcff9eb0eb3d85699b319f1439bb69268157d2d63a96ebe5a48577ed2f5e6af4510a8c742b38848e5f76a79397fd3b05e7acaf487955d60f6b5ce WHIRLPOOL d661d0226a753e4aaf1d60dc1fc756e05a78490d5781df54db1c2da73fee0a44edf4e70f28aeb9ca6e888a2d5c8cb94f3ed9e864c034d9e9b7219e2f6e191600 +AUX less.envd 47 SHA256 961d6e87eeb2b41d163def66718ee78d4b7c778dbe91b24c6764635b0ae1cdd7 SHA512 261b25887b08b3255e412b36130d014fc37ffc7de75dce3b5ba2521d94a1b0be4c584808b9698c30a8dafea70c62fae2cd0642d0983f96cdb418c3c501433674 WHIRLPOOL dbb1fbec8c6370a5feec2eecdb3e109e035f2f40c2a1d00672d7660d2058aaf0a104487e1ae8c06ecfb32161d4aa2aceed6194e60cacde3590974bbcb00511ba +AUX lesspipe.sh 7797 SHA256 576331d742e19a8cec0adeba185bacb7b4b67f7fb93be9c52fa4701d3c5a0a94 SHA512 d7bbae07e8ddcae2981549f958daffc3750f3a343da37cd5e43df86b4dcab35c3121d7fa7b76d61dd457c972a888bcce1c85d01fa1e685aadf169d5541bb0d8b WHIRLPOOL 63a57b5dacf480680377ff67a285a893b3a3eeb7071159c2139c75af02aeb2a4c419ecf515d4ab16a2c0ac18612039c4dfb2225ac3540663eec7367e302ae6a0 +DIST less-487.tar.gz 318488 SHA256 f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706 SHA512 d31274fdada570fbc6706d7c52637d1accbd18ce947ec062e10b1624c251a8533c6638bc3a1d89d3c70a0c7b9c6d45740598bec9003f281d64c587b1f829125a WHIRLPOOL e1a6c5dc2ea17e57226083f022d3c39b8a9d17428b7aa15385138680e78fa1ee22800e216a40fe5aa0ca38ca4c0025792a2839031faabdf8f9384dec3c750f74 +DIST less-497.tar.gz 321341 SHA256 3a8260a485f85a8aada748559cc42d6e8261325fbcb7d32fff6e60ac837b3ff2 SHA512 8c0efb6e7f775cb0fde69f418b7a9218330b4f8dd1ab630dc75f833ab1658a1580cfd2f5a471b8cf9fb3a0c44d0b3052b09d95b4b166afef0500192cb028dde2 WHIRLPOOL 48c19985baf80c2c75a12a5348d8e3a701be84d816370db1993aeb39fc32ffcb6c8656863cd277f55d0e7596a4173a3d2aefad7d5150af5311ccaaba70895413 +DIST less-520.tar.gz 337959 SHA256 7b89ea8e605c242f792594ca81dc89979f3537d8cce578f628329c748004908b SHA512 67b51f4734a3b5a7871509110f87bbd6d1fa3068ad2d524adaa07b8917ff18a962b706cf5d55cf9800a39f9e583f21d0249837841d3c999babaaf5aa2bc4ff9d WHIRLPOOL 39e78c7a34b229978935c2e9b9013214caa7323a624fce83294c47ebff614e284a7c45072ab88bbf8ab69ee4dd2e87e59e4053687ae137c8a8a480027f72b0c3 +EBUILD less-487.ebuild 1440 SHA256 387fd47561a791fda5a06b659155abc842eecc64978cc53444d2576fbca67c35 SHA512 b7a1ee3d58a3ad29c3ef7d50f5f37c9fea7bbd0bf15a157f323ced895daf6a1aa31544374428df2ebd4e3385897e6721cf530b0c21de688e3cd0dee9c7e2939c WHIRLPOOL db87dbeb58f0cf81532abbc87a803083223776ab4200553163c361acdc20cf34bc4d8760e2f0db336eccd0ffc52e4900b096e8e48f1c9ed4c6d561a0a13e2260 +EBUILD less-497.ebuild 1406 SHA256 b3ba60da13b478f0bb1fcdeef6888fde140bce4e62ce798efcef1ec98c719635 SHA512 0d5ba92f026a3b2c11ad49ccf9ef2179416bd87cd9799ee803718d50a7178ed0c0272aeda72b079b79121d3b1562535c041b0332f4114f6bf22e8cf394602041 WHIRLPOOL 2320e79fbbd843578dbb63618a99ebd6c6075a8dc8a79c27580ecf32daec42f1d0aa13aff782be59670851ea60bc6ea8b9f837afcea323efae338a297af97e21 +EBUILD less-520.ebuild 1404 SHA256 9ae048b7097eecfdc5174498599006b8acc6778e44a43d939432a2a15df219e0 SHA512 10b5c220228b1adf41271de6d7ffc3b222ad2b417194b4f47f0d96f682b73dc0644c1a6ca6d8d8ca2e0712c05cf66d0fa19d0aa612e568d04c95cda763288ac5 WHIRLPOOL 12d6b206e9f8dc3035f62750aaeaf160701c16a64a7f5de70720d528bc63411124caebf754c01fb7d715ccde01a892f29b63252414a3f93041bf671d0a48b33e +MISC ChangeLog 6770 SHA256 231ea462342a5410001f601c3b5be0b8aecddd4bda45ced16d823e54588943ff SHA512 1eeea73307e6c68f8c4026bc22d42fed0b4b3fc6eadf00967cd7f525b3c5843353c2be38591892e6444d2f3d6a374e58a960a0e969c4d9153a373a286c2590ee WHIRLPOOL 15496a1ff7dad80804d3bb76da1508d45e3bccb22bb8452cf6d63438c1d30913dc3da6159e0d426ebac27d1d68e3dcbde154f6c8e7fcc0198225bb4f1469f466 +MISC ChangeLog-2015 23847 SHA256 825f54e1e57d50358f5dc9a197553cb4e9472a7aea705968075815cfd5f90527 SHA512 99e9ed06109e4967a2cdba06c9116fbd1ae7a33489a758ae001c809e3bba6dfa107b3d67dfa69ccdb0ebeaae51c24cb144b13f8c1f46d0e26a274cb1b2e1ece8 WHIRLPOOL a27d97c7da86ff507da122e0e54eb5729e55c2eed535cc86a9d3775f59a2b70c35e70fc6220728c36d893aff0ff546cb8ecccc86a3e61c284966f50dc21ef7fb +MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8 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 100755 index 000000000000..66078850cbda --- /dev/null +++ b/sys-apps/less/files/lesspipe.sh @@ -0,0 +1,281 @@ +#!/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 + + # Handle non-regular file types. + if [[ -d $1 ]] ; then + ls -alF -- "$1" + return + elif [[ ! -f $1 ]] ; then + stat "$1" + return + fi + + 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) ps2ascii "$1" || pstotext "$1" ;; + *.pdf) pdftotext "$1" - || ps2ascii "$1" || pstotext "$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 -verbose -- "$1" || file -L -- "$1" + ;; + *.asf|*.avi|*.flv|*.mkv|*.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 + cat <<-EOF + lesspipe (git) + Copyright 2001-2016 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; default: no) + 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. The script should exit 0 + to indicate it handled the file, or non-zero to tell lesspipe to handle it. + + To use lesspipe, simply add to your environment: + export LESSOPEN="|lesspipe %s" + + Run 'less --help' or 'man less' for more info. + EOF +else + recur=0 + [[ -n ${LESSDEBUG} ]] \ + && lesspipe "$1" \ + || lesspipe "$1" 2> /dev/null +fi diff --git a/sys-apps/less/less-487.ebuild b/sys-apps/less/less-487.ebuild new file mode 100644 index 000000000000..89f64cced928 --- /dev/null +++ b/sys-apps/less/less-487.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +DESCRIPTION="Excellent text file viewer" +HOMEPAGE="http://www.greenwoodsoftware.com/less/" +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 ~sparc-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" +IUSE="pcre unicode" + +DEPEND=">=app-misc/editor-wrapper-3 + >=sys-libs/ncurses-5.2:0= + pcre? ( dev-libs/libpcre )" +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) \ + --with-editor="${EPREFIX}"/usr/libexec/editor +} + +src_install() { + default + + newbin "${FILESDIR}"/lesspipe.sh lesspipe + newenvd "${FILESDIR}"/less.envd 70less +} + +pkg_preinst() { + 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'." + elog "Colorization support has been dropped. If you want that, check out" + elog "the new app-text/lesspipe package." + fi +} diff --git a/sys-apps/less/less-497.ebuild b/sys-apps/less/less-497.ebuild new file mode 100644 index 000000000000..73de792d3bd9 --- /dev/null +++ b/sys-apps/less/less-497.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +DESCRIPTION="Excellent text file viewer" +HOMEPAGE="http://www.greenwoodsoftware.com/less/" +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 ~sparc-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" +IUSE="pcre unicode" + +DEPEND=">=app-misc/editor-wrapper-3 + >=sys-libs/ncurses-5.2:0= + pcre? ( dev-libs/libpcre )" +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) \ + --with-editor="${EPREFIX}"/usr/libexec/editor +} + +src_install() { + default + + newbin "${FILESDIR}"/lesspipe.sh lesspipe + newenvd "${FILESDIR}"/less.envd 70less +} + +pkg_preinst() { + 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'." + elog "Colorization support has been dropped. If you want that, check out" + elog "the new app-text/lesspipe package." + fi +} diff --git a/sys-apps/less/less-520.ebuild b/sys-apps/less/less-520.ebuild new file mode 100644 index 000000000000..643a59bc2b71 --- /dev/null +++ b/sys-apps/less/less-520.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Excellent text file viewer" +HOMEPAGE="http://www.greenwoodsoftware.com/less/" +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 ~sparc-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" +IUSE="pcre unicode" + +DEPEND=">=app-misc/editor-wrapper-3 + >=sys-libs/ncurses-5.2:0= + pcre? ( dev-libs/libpcre )" +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) \ + --with-editor="${EPREFIX}"/usr/libexec/editor +} + +src_install() { + default + + newbin "${FILESDIR}"/lesspipe.sh lesspipe + newenvd "${FILESDIR}"/less.envd 70less +} + +pkg_preinst() { + 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'." + elog "Colorization support has been dropped. If you want that, check out" + elog "the new app-text/lesspipe package." + fi +} diff --git a/sys-apps/less/metadata.xml b/sys-apps/less/metadata.xml new file mode 100644 index 000000000000..56c124413057 --- /dev/null +++ b/sys-apps/less/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +</pkgmetadata> |