ports/74933: new port: misc/lesspipe (a preprocessor for less)
Slaven Rezic
slaven at rezic.de
Sun Dec 12 00:40:19 UTC 2004
The following reply was made to PR ports/74933; it has been noted by GNATS.
From: Slaven Rezic <slaven at rezic.de>
To: Sergey Matveychuk <sem at FreeBSD.org>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: ports/74933: new port: misc/lesspipe (a preprocessor for less)
Date: 11 Dec 2004 20:53:06 +0100
Sergey Matveychuk <sem at FreeBSD.org> writes:
> Slaven Rezic wrote:
>
> > Can you give me more diagnostics, i.e. capturing the configuration and
> > installation output and send it to me?
>
[...]
OK, here's the revised port (with a patch file to make some bug fixes
in the configure file and with "bash" as a dependency). BTW, is it
possible to specify alternatives in the *_DEPENDS variables? It would
be nice if I could say
BUILD_DEPENDS=(bash:${PORTSDIR}/shells/bash|zsh:${PORTSDIR}/shells/zsh)
as lesspipe works with either bash or zsh.
The new port follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# lesspipe
# lesspipe/distinfo
# lesspipe/Makefile
# lesspipe/pkg-descr
# lesspipe/pkg-message
# lesspipe/files
# lesspipe/files/patch-configure
#
echo c - lesspipe
mkdir -p lesspipe > /dev/null 2>&1
echo x - lesspipe/distinfo
sed 's/^X//' >lesspipe/distinfo << 'END-of-lesspipe/distinfo'
XMD5 (lesspipe-1.43.tar.gz) = 76c5ce7b45afc3fa7584acb299e0d98f
XSIZE (lesspipe-1.43.tar.gz) = 51922
END-of-lesspipe/distinfo
echo x - lesspipe/Makefile
sed 's/^X//' >lesspipe/Makefile << 'END-of-lesspipe/Makefile'
X# New ports collection makefile for: lesspipe
X# Date created: 11 December 2004
X# Whom: Slaven Rezic <slaven at rezic.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME= lesspipe
XPORTVERSION= 1.43
XCATEGORIES= misc
XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= lesspipe
X
XMAINTAINER= slaven at rezic.de
XCOMMENT= A preprocessor for less
X
XBUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
X.if defined(WITH_FANCY)
X.if ${WITH_FANCY} == yes
XBUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
X rpm:${PORTSDIR}/archivers/rpm \
X dpkg:${PORTSDIR}/archivers/dpkg \
X antiword:${PORTSDIR}/textproc/antiword \
X lynx:${PORTSDIR}/www/lynx \
X pdftotext:${PORTSDIR}/graphics/xpdf \
X unrtf:${PORTSDIR}/textproc/unrtf \
X dvi2tty:${PORTSDIR}/print/dvi2tty \
X pstotext:${PORTSDIR}/print/pstotext \
X mp3info:${PORTSDIR}/audio/mp3info \
X isoinfo:${PORTSDIR}/sysutils/cdrtools \
X cabextract:${PORTSDIR}/archivers/cabextract
X.endif
X.endif
X
XUSE_PERL5= yes
X
XHAS_CONFIGURE= yes
XCONFIGURE_ARGS= --default --prefix=${PREFIX}
X
XPLIST_FILES= bin/lesspipe.sh \
X bin/code2color
X
Xdo-build:
X
Xpost-install:
X @${CAT} pkg-message
X
X.include <bsd.port.mk>
END-of-lesspipe/Makefile
echo x - lesspipe/pkg-descr
sed 's/^X//' >lesspipe/pkg-descr << 'END-of-lesspipe/pkg-descr'
Xlesspipe is a powerful preprocessor for less(1). The features include
X
X* Reading of various file formats like tar files, word, pdf and
X postscript documents
X
X* Transparent handling of compressed files (gzip, bzip2, zip)
X
X* Optional syntax highlightning of source files
X
XWWW: http://sourceforge.net/projects/lesspipe
END-of-lesspipe/pkg-descr
echo x - lesspipe/pkg-message
sed 's/^X//' >lesspipe/pkg-message << 'END-of-lesspipe/pkg-message'
XTo use lesspipe.sh, type in the following commands
X
X LESSOPEN="|lesspipe.sh %s"; export LESSOPEN (sh, bash, ksh, zsh)
X
X setenv LESSOPEN "|lesspipe.sh %s" (csh, tcsh)
X
Xor put these commands in your shell's startup file (e.g. .cshrc or .bashrc).
X
END-of-lesspipe/pkg-message
echo c - lesspipe/files
mkdir -p lesspipe/files > /dev/null 2>&1
echo x - lesspipe/files/patch-configure
sed 's/^X//' >lesspipe/files/patch-configure << 'END-of-lesspipe/files/patch-configure'
X--- configure~ Thu Dec 9 09:30:52 2004
X+++ configure Sat Dec 11 20:46:04 2004
X@@ -28,7 +28,7 @@
X The Makefile is of little use (copy lesspipe.sh and code2color to the
X install location)
X EOF
X- exit;
X+ exit !$opt_help ? 1 : 0;
X }
X $opt_prefix ||= '/usr/local';
X open OUT, ">Makefile";
X@@ -188,7 +188,7 @@
X my $rc = system "$have{file} -L ./configure >/dev/null 2>&1";
X if ( $rc ) {
X print " found system version of file, looking for GNU file\n";
X- exit unless inpath("Continue anyway", 'gfile');
X+ exit 1 unless inpath("Continue anyway", 'gfile');
X $have{file} = $have{gfile} if $have{gfile};
X }
X $rc = system "$have{file} -L ./configure >/dev/null 2>&1";
X@@ -215,7 +215,7 @@
X $have{file} = $rep{file};
X check_file_vers();
X }
X- exit if $yesno =~ /^n/i;
X+ exit 1 if $yesno =~ /^n/i;
X } else {
X $have{file} .= ' -L -s';
X print " found GNU file$vers (ok)\n";
X@@ -277,10 +277,10 @@
X print OUT "#!$file$opt\n";
X $selected_shell = $name if ! $selected_shell;
X }
X- if ( $#bad == 2 ) {
X+ if ( !$selected_shell ) {
X print "Sorry, no useable shell found, cannot create lesspipe.sh\n", @bad;
X print "You could edit lesspipe.sh.in to adjust the path to the shell(s)\n";
X- exit;
X+ exit 1;
X } else {
X print OUT @bad;
X }
END-of-lesspipe/files/patch-configure
exit
--
Slaven Rezic - slaven <at> rezic <dot> de
Tk-AppMaster: a perl/Tk module launcher designed for handhelds
http://tk-appmaster.sf.net
More information about the freebsd-ports-bugs
mailing list