aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2004-12-12 21:19:08 +0800
committersem <sem@FreeBSD.org>2004-12-12 21:19:08 +0800
commitf4e5e66bb1e15081e25cb1e7ff4f2c42e9602db3 (patch)
treee19b0be172dd90cb8e2967d113e54e6511808fde /misc
parent2cd5bfb041c7056e8858d28e2ae6086d9877d4ea (diff)
downloadfreebsd-ports-graphics-f4e5e66bb1e15081e25cb1e7ff4f2c42e9602db3.tar.gz
freebsd-ports-graphics-f4e5e66bb1e15081e25cb1e7ff4f2c42e9602db3.tar.zst
freebsd-ports-graphics-f4e5e66bb1e15081e25cb1e7ff4f2c42e9602db3.zip
lesspipe is a powerful preprocessor for less(1)
PR: ports/74933 Submitted by: Slaven Rezic <slaven(at)rezic.de>
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile1
-rw-r--r--misc/lesspipe/Makefile50
-rw-r--r--misc/lesspipe/distinfo2
-rw-r--r--misc/lesspipe/files/patch-configure42
-rw-r--r--misc/lesspipe/files/pkg-message.in7
-rw-r--r--misc/lesspipe/pkg-descr10
6 files changed, 112 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index ee6890a225d..0394b360fe2 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -255,6 +255,7 @@
SUBDIR += latex-mk
SUBDIR += lc
SUBDIR += less
+ SUBDIR += lesspipe
SUBDIR += libhome
SUBDIR += libmcal
SUBDIR += libpri
diff --git a/misc/lesspipe/Makefile b/misc/lesspipe/Makefile
new file mode 100644
index 00000000000..5765c6a2868
--- /dev/null
+++ b/misc/lesspipe/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: lesspipe
+# Date created: 11 December 2004
+# Whom: Slaven Rezic <slaven@rezic.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= lesspipe
+PORTVERSION= 1.43
+CATEGORIES= misc
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= lesspipe
+
+MAINTAINER= slaven@rezic.de
+COMMENT= A preprocessor for less
+
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
+
+.if defined(WITH_FANCY)
+BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
+ rpm:${PORTSDIR}/archivers/rpm \
+ dpkg:${PORTSDIR}/archivers/dpkg \
+ antiword:${PORTSDIR}/textproc/antiword \
+ lynx:${PORTSDIR}/www/lynx \
+ pdftotext:${PORTSDIR}/graphics/xpdf \
+ unrtf:${PORTSDIR}/textproc/unrtf \
+ dvi2tty:${PORTSDIR}/print/dvi2tty \
+ pstotext:${PORTSDIR}/print/pstotext \
+ mp3info:${PORTSDIR}/audio/mp3info \
+ isoinfo:${PORTSDIR}/sysutils/cdrtools \
+ cabextract:${PORTSDIR}/archivers/cabextract
+.endif
+
+USE_PERL5= yes
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --default --prefix=${PREFIX}
+
+PLIST_FILES= bin/lesspipe.sh \
+ bin/code2color
+
+PKGMESSAGE= ${WRKDIR}/pkg-message
+SUB_FILES= pkg-message
+
+do-build:
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/misc/lesspipe/distinfo b/misc/lesspipe/distinfo
new file mode 100644
index 00000000000..0376c9fcc5c
--- /dev/null
+++ b/misc/lesspipe/distinfo
@@ -0,0 +1,2 @@
+MD5 (lesspipe-1.43.tar.gz) = 76c5ce7b45afc3fa7584acb299e0d98f
+SIZE (lesspipe-1.43.tar.gz) = 51922
diff --git a/misc/lesspipe/files/patch-configure b/misc/lesspipe/files/patch-configure
new file mode 100644
index 00000000000..7ede0aee6e3
--- /dev/null
+++ b/misc/lesspipe/files/patch-configure
@@ -0,0 +1,42 @@
+--- configure~ Thu Dec 9 09:30:52 2004
++++ configure Sat Dec 11 20:46:04 2004
+@@ -28,7 +28,7 @@
+ The Makefile is of little use (copy lesspipe.sh and code2color to the
+ install location)
+ EOF
+- exit;
++ exit !$opt_help ? 1 : 0;
+ }
+ $opt_prefix ||= '/usr/local';
+ open OUT, ">Makefile";
+@@ -188,7 +188,7 @@
+ my $rc = system "$have{file} -L ./configure >/dev/null 2>&1";
+ if ( $rc ) {
+ print " found system version of file, looking for GNU file\n";
+- exit unless inpath("Continue anyway", 'gfile');
++ exit 1 unless inpath("Continue anyway", 'gfile');
+ $have{file} = $have{gfile} if $have{gfile};
+ }
+ $rc = system "$have{file} -L ./configure >/dev/null 2>&1";
+@@ -215,7 +215,7 @@
+ $have{file} = $rep{file};
+ check_file_vers();
+ }
+- exit if $yesno =~ /^n/i;
++ exit 1 if $yesno =~ /^n/i;
+ } else {
+ $have{file} .= ' -L -s';
+ print " found GNU file$vers (ok)\n";
+@@ -277,10 +277,10 @@
+ print OUT "#!$file$opt\n";
+ $selected_shell = $name if ! $selected_shell;
+ }
+- if ( $#bad == 2 ) {
++ if ( !$selected_shell ) {
+ print "Sorry, no useable shell found, cannot create lesspipe.sh\n", @bad;
+ print "You could edit lesspipe.sh.in to adjust the path to the shell(s)\n";
+- exit;
++ exit 1;
+ } else {
+ print OUT @bad;
+ }
diff --git a/misc/lesspipe/files/pkg-message.in b/misc/lesspipe/files/pkg-message.in
new file mode 100644
index 00000000000..7d31ac813ed
--- /dev/null
+++ b/misc/lesspipe/files/pkg-message.in
@@ -0,0 +1,7 @@
+To use lesspipe.sh, type in the following commands
+
+LESSOPEN="|%%PREFIX%%/bin/lesspipe.sh %s"; export LESSOPEN (sh, bash, ksh, zsh)
+
+setenv LESSOPEN "|%%PREFIX%%/bin/lesspipe.sh %s" (csh, tcsh)
+
+or put these commands in your shell's startup file (e.g. .cshrc or .bashrc).
diff --git a/misc/lesspipe/pkg-descr b/misc/lesspipe/pkg-descr
new file mode 100644
index 00000000000..c5c363a8d7d
--- /dev/null
+++ b/misc/lesspipe/pkg-descr
@@ -0,0 +1,10 @@
+lesspipe is a powerful preprocessor for less(1). The features include
+
+* Reading of various file formats like tar files, word, pdf and
+ postscript documents
+
+* Transparent handling of compressed files (gzip, bzip2, zip)
+
+* Optional syntax highlightning of source files
+
+WWW: http://sourceforge.net/projects/lesspipe