# $Id: Portfile 89315 2012-01-24 22:31:47Z ryandesign@macports.org $

PortSystem      1.0

name            pwman
version         0.4.4
categories      security
platforms       darwin
maintainers     oaf.dk:mni
description     curses based password management program
license         GPL-2

long_description \
    PWman is a curses based password storage application.\
    It uses GnuPG to encrypt and decrypt the password file.\
    The interface was inspired by Jaako Heinonen's abook.

homepage        http://sourceforge.net/projects/pwman
master_sites    sourceforge

checksums       md5     29ddc5028391e224995151b4f959c51a \
                sha1    3eb443858de5dbed10a642323ac7b1a27d2b5e08 \
                rmd160  29207d09666f51e241dbb9db04ba6500878471ba

depends_lib     port:ncurses \
                port:libxml2 \
                port:gnupg

configure.args  --mandir=${prefix}/share/man

if {${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler gcc-4.2
} elseif {${configure.compiler} == "clang"} {
    depends_build-append port:apple-gcc42
    configure.compiler apple-gcc-4.2
    # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
    configure.cxx ${prefix}/bin/g++-apple-4.2
}

livecheck.url   ${homepage}
livecheck.regex {/pwman-(.+?)/ChangeLog}

post-configure {
  reinplace "s|-lcurses|-lncurses|" ${worksrcpath}/src/Makefile
}
