diff options
author | edwin <edwin@FreeBSD.org> | 2003-04-13 18:43:20 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2003-04-13 18:43:20 +0800 |
commit | da7176994842f0bf136b514d7a88d01a525a6ad6 (patch) | |
tree | 22ba0f43e6fbe59b81d6ce59f4ecf557ef5c6a67 /misc | |
parent | c1df00c279f0fd88064467357ec046f08afb2ab8 (diff) | |
download | freebsd-ports-gnome-da7176994842f0bf136b514d7a88d01a525a6ad6.tar.gz freebsd-ports-gnome-da7176994842f0bf136b514d7a88d01a525a6ad6.tar.zst freebsd-ports-gnome-da7176994842f0bf136b514d7a88d01a525a6ad6.zip |
Update port: [Maintainer Update]: misc/lr
- Update to latest release.
(Including use of lesspipe.sh)
PR: ports/50823
Submitted by: Michael L. Hostbaek <mich@freebsdcluster.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/lr/Makefile | 33 | ||||
-rw-r--r-- | misc/lr/distinfo | 2 | ||||
-rw-r--r-- | misc/lr/files/lesspipe.sh | 13 | ||||
-rw-r--r-- | misc/lr/pkg-plist | 1 |
4 files changed, 45 insertions, 4 deletions
diff --git a/misc/lr/Makefile b/misc/lr/Makefile index 5ca1473ade54..981be5264e22 100644 --- a/misc/lr/Makefile +++ b/misc/lr/Makefile @@ -7,24 +7,51 @@ # PORTNAME= lr -PORTVERSION= 1.9 +PORTVERSION= 2.0 CATEGORIES= misc MASTER_SITES= http://www.seekrut.com/rk/ DISTNAME= lazyread-${PORTVERSION} MAINTAINER= mich@freebsdcluster.org COMMENT= Lazyread can auto-scroll files on your screen in movie credit fashion + +.include <bsd.port.pre.mk> + +.if exists(/usr/bin/lesspipe.sh) +LESSPIPE_PATH=/usr/bin/ +PLIST_SUB+= LESSPIPE="@comment " +.else +.if exists(${LOCALBASE}/bin/lesspipe.sh) +LESSPIPE_PATH=${LOCALBASE}/bin/ +PLIST_SUB+= LESSPIPE="@comment " +.else +INSTALL_LESSPIPE=1 +LESSPIPE_PATH=${LOCALBASE}/bin/ +PLIST_SUB+= LESSPIPE="" +.endif +.endif + +LDFLAGS+= -lncurses WRKSRC= ${WRKDIR}/${DISTNAME} +USE_REINPLACE= yes + +pre-patch: + @${REINPLACE_CMD} -e 's|getenv("LESSOPEN")|"\|${LESSPIPE_PATH}lesspipe.sh"|' ${WRKSRC}/lazyread.c + do-build: - cd ${WRKSRC}; ${CC} ${CFLAGS} -o lr lazyread.c -lncurses + cd ${WRKSRC}; ${CC} ${CFLAGS} -o lr lazyread.c ${LDFLAGS} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/lr ${PREFIX}/bin +.if defined(INSTALL_LESSPIPE) + ${INSTALL_SCRIPT} ${FILESDIR}/lesspipe.sh ${PREFIX}/bin +.endif + .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/misc/lr/distinfo b/misc/lr/distinfo index ccca856c7c6f..5af18dc988c4 100644 --- a/misc/lr/distinfo +++ b/misc/lr/distinfo @@ -1 +1 @@ -MD5 (lazyread-1.9.tar.gz) = 4ed53cd11497d23ae895d086d29a0cba +MD5 (lazyread-2.0.tar.gz) = 8776c44ea2439d40cce3b449f1186bf4 diff --git a/misc/lr/files/lesspipe.sh b/misc/lr/files/lesspipe.sh new file mode 100644 index 000000000000..21cf0243cbf0 --- /dev/null +++ b/misc/lr/files/lesspipe.sh @@ -0,0 +1,13 @@ +#! /bin/sh +# ex:ts=8 + +# $FreeBSD: /tmp/pcvs/ports/misc/lr/files/lesspipe.sh,v 1.1 2003-04-13 10:43:20 edwin Exp $ + +case "$1" in + *.Z) uncompress -c $1 2>/dev/null + ;; + *.gz) gzip -d -c $1 2>/dev/null + ;; + *.bz2) bzip2 -d -c $1 2>/dev/null + ;; +esac diff --git a/misc/lr/pkg-plist b/misc/lr/pkg-plist index f34f426b5693..e14cb20bf0b6 100644 --- a/misc/lr/pkg-plist +++ b/misc/lr/pkg-plist @@ -1,3 +1,4 @@ bin/lr +%%LESSPIPE%%bin/lesspipe.sh %%PORTDOCS%%share/doc/lr/README %%PORTDOCS%%@dirrm share/doc/lr |