# $Id: Portfile 96305 2012-08-07 07:35:08Z ryandesign@macports.org $

PortSystem 1.0
name		pinfo
version             0.6.10
categories	textproc
maintainers	iaas.msu.ru:master
license             GPL-2

description	Pinfo - Ncurses based info documentation browser
long_description \
		Pinfo is a hypertext info file viewer \
		with a user interface similar to lynx. \
		It is based on curses/ncurses, \
		and can handle info pages as well as man pages. \
		It also features regexp searching and user-defined colors/keys.

platforms	darwin

homepage	http://pinfo.alioth.debian.org/
master_sites        http://alioth.debian.org/frs/download.php/3351
use_bzip2           yes

checksums           rmd160  46d6990cda262f50ea4682d5ff94d4e15d91111a \
                    sha256  122180a0c23d11bc9eb569a4de3ff97d3052af96e32466fa62f2daf46ff61c5d

depends_lib         port:gettext \
                    port:ncurses \
                    port:readline

patchfiles          patch-doc-pinfo.1.in.diff \
                    patch-doc-pinfo.texi.diff \
                    patch-src-datatypes.c.diff \
                    patch-src-filehandling_functions.c.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/datatypes.c
}

use_autoreconf      yes

configure.args      --with-curses=${prefix} \
                    --with-readline=${prefix}

configure.cflags-append -std=gnu89

livecheck.type      regex
livecheck.url       https://alioth.debian.org/frs/?group_id=30592
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
