Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 16:52:14 +0200 (CEST)
From:      "Michael L.Hostbaek" <mich@freebsdcluster.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/50823: Update port: [Maintainer Update]: misc/lr
Message-ID:  <20030411145214.A25DC14C8C@icommerce-france.com>
Resent-Message-ID: <200304111500.h3BF0NOq005954@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         50823
>Category:       ports
>Synopsis:       Update port: [Maintainer Update]: misc/lr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 11 08:00:23 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Michael L. Hostbaek
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
FreeBSDCluster.org
>Environment:
System: FreeBSD extranet.itxmarket.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Oct 11 17:00:45 CEST 2002 root@extranet.itxmarket.com:/usr/obj/usr/src/sys/EXTRANET1 i386

>Description:
	- Update to latest release.
	(Including use of lesspipe.sh)
>How-To-Repeat:
>Fix:

	
diff -u -ruN lr.bak/Makefile lr/Makefile
--- lr.bak/Makefile	Thu Apr 10 18:09:30 2003
+++ lr/Makefile	Fri Apr 11 16:46:50 2003
@@ -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 -u -ruN lr.bak/distinfo lr/distinfo
--- lr.bak/distinfo	Thu Apr 10 18:09:30 2003
+++ lr/distinfo	Thu Apr 10 18:09:47 2003
@@ -1 +1 @@
-MD5 (lazyread-1.9.tar.gz) = 4ed53cd11497d23ae895d086d29a0cba
+MD5 (lazyread-2.0.tar.gz) = 8776c44ea2439d40cce3b449f1186bf4
diff -u -ruN lr.bak/files/lesspipe.sh lr/files/lesspipe.sh
--- lr.bak/files/lesspipe.sh	Thu Jan  1 01:00:00 1970
+++ lr/files/lesspipe.sh	Fri Apr 11 16:37:47 2003
@@ -0,0 +1,13 @@
+#! /bin/sh
+# ex:ts=8
+
+# $FreeBSD: src/usr.bin/less/lesspipe.sh,v 1.1.2.1 2003/03/16 04:48:44 obrien 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 -u -ruN lr.bak/pkg-plist lr/pkg-plist
--- lr.bak/pkg-plist	Thu Apr 10 18:09:30 2003
+++ lr/pkg-plist	Fri Apr 11 16:23:05 2003
@@ -1,3 +1,4 @@
 bin/lr
+%%LESSPIPE%%bin/lesspipe.sh
 %%PORTDOCS%%share/doc/lr/README
 %%PORTDOCS%%@dirrm share/doc/lr

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030411145214.A25DC14C8C>