# $Id: Portfile 78609 2011-05-14 07:38:20Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python32 1.0

name                py32-pygments
version             1.4
license             BSD
categories-append   devel
maintainers         singingwolfboy openmaintainer
description         Python syntax highlighter
long_description \
    Pygments is a fast syntax highlighter written in Python with a \
    special focus on details. Can highlight source code in many supported \
    languages: Python, Ruby, PHP, HTML etc. Outputs arbitrarily-styled \
    HTML or LaTeX, comes with many builtin styles.

platforms           darwin
supported_archs     noarch

homepage            http://pygments.org
master_sites        http://pypi.python.org/packages/source/P/Pygments
distname            Pygments-${version}

depends_lib         port:py32-distribute

checksums           md5     d77ac8c93a7fb27545f2522abe9cc462 \
                    sha1    d34f96421a86004aa5d26ecf975edefd09f948b1 \
                    rmd160  52775927f5e1b61c4203ae21fa9347c376f59287

post-destroot {
    ln -sf ${python.prefix}/bin/pygmentize \
        ${destroot}${prefix}/bin/pygmentize-${python.branch}

    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} AUTHORS CHANGES LICENSE TODO \
        ${destroot}${docdir}
    copy ${worksrcpath}/docs/build ${destroot}${docdir}/html

    set man1 ${python.prefix}/share/man/man1
    xinstall -d ${destroot}${man1}
    xinstall -m 644 ${worksrcpath}/docs/pygmentize.1 ${destroot}${man1}
    ln -sf ${man1}/pygmentize.1 \
        ${destroot}${prefix}/share/man/man1/pygmentize-${python.branch}.1
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     {Pygments-(\d+(?:\.\d+)*)}
