summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-text/lesspipe/Manifest (renamed from sys-apps/lesspipe/Manifest)0
-rw-r--r--app-text/lesspipe/lesspipe-1.83.ebuild (renamed from sys-apps/lesspipe/lesspipe-1.83.ebuild)18
-rw-r--r--app-text/lesspipe/metadata.xml (renamed from sys-apps/lesspipe/metadata.xml)0
-rw-r--r--profiles/use.local.desc74
-rw-r--r--sys-apps/less/Manifest1
-rw-r--r--sys-apps/less/files/code2color-0.2.patch26
-rw-r--r--sys-apps/less/files/lesspipe.sh27
-rw-r--r--sys-apps/less/less-483-r1.ebuild (renamed from sys-apps/less/less-483.ebuild)35
-rw-r--r--sys-apps/less/metadata.xml2
9 files changed, 76 insertions, 107 deletions
diff --git a/sys-apps/lesspipe/Manifest b/app-text/lesspipe/Manifest
index acfea077..acfea077 100644
--- a/sys-apps/lesspipe/Manifest
+++ b/app-text/lesspipe/Manifest
diff --git a/sys-apps/lesspipe/lesspipe-1.83.ebuild b/app-text/lesspipe/lesspipe-1.83.ebuild
index 874ba79a..0403086e 100644
--- a/sys-apps/lesspipe/lesspipe-1.83.ebuild
+++ b/app-text/lesspipe/lesspipe-1.83.ebuild
@@ -6,8 +6,8 @@ EAPI=6
RESTRICT="mirror"
DESCRIPTION="Wolfgang Friebel's preprocessor for sys-apps/less. Disable by appending colon"
-HOMEPAGE="http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html"
-SRC_URI="http://www-zeuthen.desy.de/~friebel/unix/less/${P}.tar.gz"
+HOMEPAGE="https://github.com/wofr06/lesspipe"
+SRC_URI="https://www-zeuthen.desy.de/~friebel/unix/less/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -33,11 +33,10 @@ REQUIRED_USE="!rpm2targz? ( rpm? ( cpio ) )
sparc? ( !catdoc !fastjar !id3v2 !libplist !mp3info2 !netcdf
!ooffice !pstotext )"
-RDEPEND="sys-apps/file
+BOTH_DEPEND="sys-apps/file
app-arch/xz-utils
app-arch/bzip2
dev-lang/perl
- sys-apps/less[lesspipe]
unzip? ( app-arch/unzip )
fastjar? ( !amd64-fbsd? ( !alpha? ( !arm? ( !hppa? ( !ia64? ( !ppc64?
( !sparc? ( app-arch/fastjar ) ) ) ) ) ) ) )
@@ -103,7 +102,10 @@ RDEPEND="sys-apps/file
dpkg? ( !amd64-fbsd? ( app-arch/dpkg ) )
hdf5? ( !hppa? ( sci-libs/hdf5 ) )
netcdf? ( !alpha? ( !hppa? ( !ia64? ( !sparc? ( sci-libs/netcdf ) ) ) ) )"
-DEPEND="${RDEPEND}"
+DEPEND="${BOTH_DEPEND}"
+RDEPEND="${BOTH_DEPEND}
+ sys-apps/less
+ !sys-apps/lesspipe"
ModifyStart() {
sedline=
@@ -200,7 +202,11 @@ src_prepare() {
}
src_configure() {
- ./configure --fixed --prefix=/usr
+ ./configure --fixed --prefix=/usr || die
+}
+
+src_compile() {
+ :
}
src_install() {
diff --git a/sys-apps/lesspipe/metadata.xml b/app-text/lesspipe/metadata.xml
index b0cbac41..b0cbac41 100644
--- a/sys-apps/lesspipe/metadata.xml
+++ b/app-text/lesspipe/metadata.xml
diff --git a/profiles/use.local.desc b/profiles/use.local.desc
index d090d8a7..be04415d 100644
--- a/profiles/use.local.desc
+++ b/profiles/use.local.desc
@@ -55,6 +55,42 @@ app-shells/zsh-completions:completion_session - Install zsh completion for sessi
app-shells/zsh-completions:completion_subtitles - Install zsh completion for subtitle tools
app-shells/zsh-completions:completion_virtualization - Install zsh completion for virtualization programs
app-shells/zsh-completions:completion_web - Install zsh completion for web-related tools incl. java/javascript/scala
+app-text/lesspipe:antiword - Support doc files with app-text/antiword; this overrides catdoc
+app-text/lesspipe:cabextract - Support cabextract files
+app-text/lesspipe:catdoc - Support doc files with app-text/catdoc; unused if antiword is set
+app-text/lesspipe:cpio - Support cpio files
+app-text/lesspipe:djvu - Support djvu files
+app-text/lesspipe:dpkg - Support Debian package files
+app-text/lesspipe:dvi2tty - Support dvi files with dev-tex/dvi2tty
+app-text/lesspipe:elinks - Support html files with www-client/elinks; ignored if html2text, links, or lynx is set; this overrides w3m
+app-text/lesspipe:fastjar - Support jar files with app-arch/fastjar
+app-text/lesspipe:ghostscript - Support ps files with app-text/ghostscript-gpl; ignored if pstotext is set
+app-text/lesspipe:gpg - Support gpg files
+app-text/lesspipe:groff - Support man and nroff files
+app-text/lesspipe:hdf5 - Support h5dump from sci-libs/hdf5
+app-text/lesspipe:html2text - Support html files with app-text/html2text; this overrides links, lynx, elinks, w3m
+app-text/lesspipe:id3v2 - Support mp3 files with media-sound/id3v2; this overrides mp3info2, mp3info
+app-text/lesspipe:image - Support image/jpg files
+app-text/lesspipe:isoinfo - Support CD/DVD-iso files
+app-text/lesspipe:libplist - Support Apple Property List files
+app-text/lesspipe:links - Support html files with www-client/links; ignored if html2text is set; this overrides lynx, elinks, w3m
+app-text/lesspipe:lynx - Support html files with www-client/lynx; ignored if html2text or links is set; this overrides elinks, w3m
+app-text/lesspipe:lzip - Support lzip files
+app-text/lesspipe:mp3info - Support mp3 files with media-sound/mp3info; unused if id3v2 or mp3info2 is set
+app-text/lesspipe:mp3info2 - Support mp3 files with dev-perl/MP3-Tag (mp3info2); ignored if id3v2 is set; this overrides mp3info
+app-text/lesspipe:netcdf - Support ncdump from sci-libs/netcdf
+app-text/lesspipe:ooffice - Support OpenOffice files
+app-text/lesspipe:p7zip - Support p7zip files
+app-text/lesspipe:pdf - Support pdf files
+app-text/lesspipe:pstotext - Support ps files with app-text/pstotext; this overrides ghostscript
+app-text/lesspipe:rar - Support rar files with app-arch/rar; unused if unrar is set
+app-text/lesspipe:rpm - Support rpm files with app-arch/rpm or rpm5; ignored if rpm2targz is set
+app-text/lesspipe:rpm2targz - Support rpm files with app-arch/rpm2targz; this overrides rpm
+app-text/lesspipe:unrar - Support rar files with app-arch/unrar; this overrides rar
+app-text/lesspipe:unrtf - Support rtf files with app-text/unrtf
+app-text/lesspipe:unzip - Support zip files with app-arch/unzip
+app-text/lesspipe:w3m - Support html files with www-client/w3m; ignored if html2text, links, lynx, or elinks is set
+app-text/lesspipe:xlhtml - Support Excel and Powerpoint files with app-arch/xlhtml
app-text/stardict:espeak - Enable text to speech synthesizer using espeak engine
app-text/stardict:pronounce - Install WyabdcRealPeopleTTS package (it is just many .wav files) to make StarDict pronounce English words
app-text/stardict:qqwry - Enable QQWry plugin, which provides information (in Chinese language) about geographical positions, owner, etc. for IP addresses
@@ -89,45 +125,9 @@ media-tv/sundtek-tv:pax_kernel - Mark package which is necessary if you use a PA
net-dns/noip-updater:ezipupd - Use user/group ezipupd instead of nobody: Useful if you restrict outgoing network traffic for user nobody
net-misc/sshstart:keychain - Pull in keychain as dependency. Not required, but recommended for smoother operation.
sys-apps/less:less-select - Add the less-select feature (additional options and a binary helper).
-sys-apps/less:lesspipe - Use sys-apps/lesspipe instead of Gentoo's default lesspipe.sh.
+sys-apps/less:lesspipe - Default to lesspipe.sh from app-text/lesspipe instead of the gentoo specific lesspipe.
sys-apps/less:original-gentoo - Use the gentoo default for the LESS variable.
sys-apps/less:source - Install sources for keybindings (only useful with less-select).
-sys-apps/lesspipe:antiword - Support doc files with app-text/antiword; this overrides catdoc
-sys-apps/lesspipe:cabextract - Support cabextract files
-sys-apps/lesspipe:catdoc - Support doc files with app-text/catdoc; unused if antiword is set
-sys-apps/lesspipe:cpio - Support cpio files
-sys-apps/lesspipe:djvu - Support djvu files
-sys-apps/lesspipe:dpkg - Support Debian package files
-sys-apps/lesspipe:dvi2tty - Support dvi files with dev-tex/dvi2tty
-sys-apps/lesspipe:elinks - Support html files with www-client/elinks; ignored if html2text, links, or lynx is set; this overrides w3m
-sys-apps/lesspipe:fastjar - Support jar files with app-arch/fastjar
-sys-apps/lesspipe:ghostscript - Support ps files with app-text/ghostscript-gpl; ignored if pstotext is set
-sys-apps/lesspipe:gpg - Support gpg files
-sys-apps/lesspipe:groff - Support man and nroff files
-sys-apps/lesspipe:hdf5 - Support h5dump from sci-libs/hdf5
-sys-apps/lesspipe:html2text - Support html files with app-text/html2text; this overrides links, lynx, elinks, w3m
-sys-apps/lesspipe:id3v2 - Support mp3 files with media-sound/id3v2; this overrides mp3info2, mp3info
-sys-apps/lesspipe:image - Support image/jpg files
-sys-apps/lesspipe:isoinfo - Support CD/DVD-iso files
-sys-apps/lesspipe:libplist - Support Apple Property List files
-sys-apps/lesspipe:links - Support html files with www-client/links; ignored if html2text is set; this overrides lynx, elinks, w3m
-sys-apps/lesspipe:lynx - Support html files with www-client/lynx; ignored if html2text or links is set; this overrides elinks, w3m
-sys-apps/lesspipe:lzip - Support lzip files
-sys-apps/lesspipe:mp3info - Support mp3 files with media-sound/mp3info; unused if id3v2 or mp3info2 is set
-sys-apps/lesspipe:mp3info2 - Support mp3 files with dev-perl/MP3-Tag (mp3info2); ignored if id3v2 is set; this overrides mp3info
-sys-apps/lesspipe:netcdf - Support ncdump from sci-libs/netcdf
-sys-apps/lesspipe:ooffice - Support OpenOffice files
-sys-apps/lesspipe:p7zip - Support p7zip files
-sys-apps/lesspipe:pdf - Support pdf files
-sys-apps/lesspipe:pstotext - Support ps files with app-text/pstotext; this overrides ghostscript
-sys-apps/lesspipe:rar - Support rar files with app-arch/rar; unused if unrar is set
-sys-apps/lesspipe:rpm - Support rpm files with app-arch/rpm or rpm5; ignored if rpm2targz is set
-sys-apps/lesspipe:rpm2targz - Support rpm files with app-arch/rpm2targz; this overrides rpm
-sys-apps/lesspipe:unrar - Support rar files with app-arch/unrar; this overrides rar
-sys-apps/lesspipe:unrtf - Support rtf files with app-text/unrtf
-sys-apps/lesspipe:unzip - Support zip files with app-arch/unzip
-sys-apps/lesspipe:w3m - Support html files with www-client/w3m; ignored if html2text, links, lynx, or elinks is set
-sys-apps/lesspipe:xlhtml - Support Excel and Powerpoint files with app-arch/xlhtml
sys-fs/aufs:all-patches - Apply all patches - also those which do not start with aufs
sys-fs/aufs:kernel-patch - Apply the aufs kernel patches instead of just copying them
sys-fs/squash_dir:aufs - Prefer aufs
diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest
index f2e3a449..0f090058 100644
--- a/sys-apps/less/Manifest
+++ b/sys-apps/less/Manifest
@@ -1,3 +1,2 @@
-DIST code2color-0.2 200711 SHA256 2365c9009b1cc3c30430b88775ec402164df105fd12364871d05dcaed20be954
DIST less-483.tar.gz 316897 SHA256 7ebb1a0a141a94f863c0b83eff94fb115d716802fabe8007e442adbaf81ce41f
DIST less-select-2.6.tar.gz 26354 SHA256 df4ab8f17568cabd864358e5f0a765241f586b8c30341116a649db91db9048bf
diff --git a/sys-apps/less/files/code2color-0.2.patch b/sys-apps/less/files/code2color-0.2.patch
deleted file mode 100644
index f8a78250..00000000
--- a/sys-apps/less/files/code2color-0.2.patch
+++ /dev/null
@@ -1,26 +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'};
-
-@@ -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/lesspipe.sh b/sys-apps/less/files/lesspipe.sh
index 6edaa3ce..291d6d66 100644
--- a/sys-apps/less/files/lesspipe.sh
+++ b/sys-apps/less/files/lesspipe.sh
@@ -59,6 +59,15 @@ lesspipe() {
[[ ${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 ###
@@ -90,7 +99,8 @@ lesspipe() {
esac
;;
*.dvi) dvi2tty "$1" ;;
- *.ps|*.pdf) ps2ascii "$1" || pstotext "$1" || pdftotext "$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
@@ -234,14 +244,12 @@ lesspipe() {
if [[ -z $1 ]] ; then
echo "Usage: lesspipe <file>"
elif [[ $1 == "-V" || $1 == "--version" ]] ; then
- Id="cvsid"
cat <<-EOF
- $Id$
- Copyright 2001-2013 Gentoo Foundation
+ 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
@@ -251,21 +259,20 @@ elif [[ $1 == "-h" || $1 == "--help" ]] ; then
Usage: lesspipe <file>
lesspipe specific settings:
- LESSCOLOR env - toggle colorizing of output (no/yes/always)
+ 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.
+ 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
+ Run 'less --help' or 'man less' for more info.
EOF
-elif [[ -d $1 ]] ; then
- ls -alF -- "$1"
else
recur=0
[[ -n ${LESSDEBUG} ]] \
diff --git a/sys-apps/less/less-483.ebuild b/sys-apps/less/less-483-r1.ebuild
index 6ce6c2bc..11b232c2 100644
--- a/sys-apps/less/less-483.ebuild
+++ b/sys-apps/less/less-483-r1.ebuild
@@ -4,8 +4,6 @@
EAPI=6
-CODE2COLOR_PV="0.2"
-CODE2COLOR_P="code2color-${CODE2COLOR_PV}"
DESCRIPTION="Excellent text file viewer, optionally with additional selection feature"
PATCHN="less-select"
PATCHV="2.6"
@@ -15,8 +13,7 @@ PATCHBALL="${PATCHRUMP}.tar.gz"
SELECTDIR="${WORKDIR}/${PATCHRUMP}"
HOMEPAGE="http://www.greenwoodsoftware.com/less/ https://github.com/vaeth/${PATCHN}"
SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz
- less-select? ( https://github.com/vaeth/${PATCHN}/archive/v${PATCHV}.tar.gz -> ${PATCHBALL} )
- http://www-zeuthen.desy.de/~friebel/unix/less/code2color -> ${CODE2COLOR_P}"
+ less-select? ( https://github.com/vaeth/${PATCHN}/archive/v${PATCHV}.tar.gz -> ${PATCHBALL} )"
LICENSE="|| ( GPL-3 BSD-2 )"
SLOT="0"
@@ -29,7 +26,7 @@ DEPEND=">=app-misc/editor-wrapper-3
RDEPEND="${DEPEND}
less-select? ( dev-lang/perl )"
# || ( >=dev-lang/perl-5.10.1 >=virtual/perl-File-Temp-0.19 )
-PDEPEND="lesspipe? ( sys-apps/lesspipe )"
+PDEPEND="lesspipe? ( app-text/lesspipe )"
pkg_setup() {
if use source && ! use less-select
@@ -37,14 +34,6 @@ pkg_setup() {
fi
}
-src_unpack() {
- unpack ${P}.tar.gz
- cp "${DISTDIR}/${CODE2COLOR_P}" "${S}"/code2color || die
- if use less-select
- then unpack ${PATCHBALL}
- fi
-}
-
src_prepare() {
if use less-select
then eapply "${SELECTDIR}/patches/less-${PATCHVER}-select.patch"
@@ -52,7 +41,6 @@ src_prepare() {
sed -i -e 's|\([^a-zA-Z]\)/etc/less-select-key.bin|\1'"${EPREFIX}"'/etc/less/select-key.bin|g' \
"${SELECTDIR}/bin/less-select" || die
fi
- eapply -p0 "${FILESDIR}/${CODE2COLOR_P}.patch"
chmod a+x configure || die
eapply_user
}
@@ -74,19 +62,19 @@ src_compile() {
}
src_install() {
- local a
+ local a b
default
- if ! use lesspipe
- then dobin code2color
- newbin "${FILESDIR}"/lesspipe.sh lesspipe
- dosym lesspipe /usr/bin/lesspipe.sh
- fi
+ newbin "${FILESDIR}"/lesspipe.sh lesspipe
+
if use original-gentoo
then a="-R -M --shift 5"
else a="-sFRiMX --shift 5"
fi
- printf '%s\n' 'LESSOPEN="|lesspipe.sh %s"' "LESS=\"${a}\"" >70less
+ printf '%s\n' \
+ 'LESSOPEN="|lesspipe'$(! use lesspipe || echo .sh)'%s"' \
+ "LESS=\"${a}\"" \
+ >70less || die
doenvd 70less
dodoc "${FILESDIR}"/README.Gentoo
@@ -102,8 +90,3 @@ src_install() {
fi
fi
}
-
-pkg_postinst() {
- use lesspipe || \
- elog "lesspipe offers colorization options. Run 'lesspipe -h' for info."
-}
diff --git a/sys-apps/less/metadata.xml b/sys-apps/less/metadata.xml
index d56b6e96..812305c4 100644
--- a/sys-apps/less/metadata.xml
+++ b/sys-apps/less/metadata.xml
@@ -21,7 +21,7 @@
</upstream>
<use>
<flag name="original-gentoo">Use the gentoo default for the LESS variable.</flag>
- <flag name="lesspipe">Use sys-apps/lesspipe instead of Gentoo's default lesspipe.sh.</flag>
+ <flag name="lesspipe">Default to lesspipe.sh from app-text/lesspipe instead of the gentoo specific lesspipe.</flag>
<flag name="less-select">Add the less-select feature (additional options and a binary helper).</flag>
<flag name="source">Install sources for keybindings (only useful with less-select).</flag>
</use>