# $Id: Portfile 88158 2011-12-21 00:33:31Z vinc17@macports.org $

PortSystem 1.0
PortGroup perl5 1.0

perl5.setup         Net-Dict 2.08 ../../authors/id/N/NE/NEILB/
revision            1
maintainers         nomaintainer
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     90e47f1e02a9814510f6c9713393ca2e \
                    sha1    f8e77206f7c84534ebcb7cd4e6a0472f82acdf54 \
                    rmd160  c2cd03424866b6f96d6c1c9bfe226335d680cfb5
platforms           darwin
if {${perl5.major} != ""} {
depends_lib-append  port:p${perl5.major}-appconfig-std

supported_archs noarch

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 end user can
# later add symbolic links in /usr/local or in his home directory to
# choose which dict program (and man page) he wishes to use. For this
# reason, the dict documentation is not modified to reflect this new
# program name.
# Even though there is no filename conflict for the man page, it is
# better to rename it too for consistency when running "man dict".
# Even "man 1 dict" would select the dict.1pm version.
variant dict_altname description {Avoid a conflict with the dict port} {
  post-destroot {
        set d ${destroot}${prefix}
        set m ${d}/share/man/man1
        file rename ${d}/bin/dict ${d}/bin/dict.perl
        file rename ${m}/dict.1pm ${m}/dict.perl.1pm
  }
}
}
