# $Id: Portfile 67323 2010-05-05 15:51:10Z vinc17@macports.org $

PortSystem 1.0
PortGroup perl5 1.0

perl5.setup         Net-Dict 2.07
maintainers         vinc17 openmaintainer
categories-append   textproc
description         Simple client API for the DICT protocol
long_description    Perl class implementing a simple client API for the \
                    DICT protocol defined in RFC2229
checksums           md5 fb57f694455549861c3c602521162956 \
                    sha1 e96735711be9704b83f165470813bd23f1be7ca5 \
                    rmd160 417d440c7278e6ebb5a778e5483dc409846aaa70
platforms           darwin
depends_lib-append  port:p5-appconfig-std

if {[info exists supported_archs]} {
    supported_archs noarch
} else {
    universal_variant no
}

configure.env       C_INCLUDE_PATH="${prefix}/include" \
                    LIBRARY_PATH="${prefix}/lib"

# This variant avoids a conflict with the dict port, if one wishes
# to install p5-net-dict together with the dict port. The user can
# later add symbolic links in /usr/local or in his home directory
# to choose which dict program if wishes to use.
variant dict_altname description {Avoid a conflict with the dict port} {
  post-destroot {
        set d ${destroot}${prefix}
        file rename ${d}/bin/dict ${d}/bin/dict.perl
        file rename ${d}/share/man/man1/dict.1 ${d}/share/man/man1/dict.perl.1
  }
}
