Portfile

# $Id: Portfile 22335 2007-02-26 17:11:51Z takanori@macports.org $

PortSystem 1.0
name lv
version 4.51
revision 2
categories textproc
maintainers takanori@macports.org
description Powerful Multilingual File Viewer / Grep
long_description ${description}
homepage http://www.ff.iij4u.or.jp/~nrt/lv/index.html
master_sites http://www.ff.iij4u.or.jp/~nrt/freeware/
platforms darwin
distfiles ${name}451.tar.gz
checksums md5 85b70ae797f935741ec9a1cbe92f00e9 \
sha1 1a70299c27aa317a436976a557853858db4dcb5f \
rmd160 ae0d58b52dbf714f8b371f51ac87490ecba1c994
depends_lib port:ncurses
depends_run bin:bzcat:bzip2 bin:gzcat:gzip

worksrcdir ${name}451
patchfiles patch-src_stream.c patch-src_configure

configure.env CFLAGS="-I${prefix}/include/ncurses" LDFLAGS="-L${prefix}/lib"
configure.dir ${worksrcpath}/build
configure.cmd ../src/configure

build.dir ${worksrcpath}/build
build.target

pre-patch {
if {[variant_isset lesslikeslash]} {
patchfiles-append lv451_lesslikeslash.patch
}
}

destroot {
xinstall -m 755 -d ${destroot}${prefix}/lib/lv

xinstall -m 755 ${worksrcpath}/build/lv ${destroot}${prefix}/bin
xinstall -m 755 ${worksrcpath}/build/lv ${destroot}${prefix}/bin/lgrep
xinstall -m 644 ${worksrcpath}/lv.hlp ${destroot}${prefix}/lib/lv
xinstall -m 644 ${worksrcpath}/lv.1 ${destroot}${prefix}/share/man/man1
}

post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
foreach f {GPL.txt README hello* index.html relnote.html} {
eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
}
}

variant lesslikeslash {}

livecheck.check regex
livecheck.url ${homepage}
livecheck.regex The latest version is ver (\[0-9.a-z\]+)

files