# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0
PortGroup           perl5 1.0

name                rrdtool
version             1.5.5
revision            1
categories          net
license             GPL-2+
maintainers         nomaintainer
description         Round Robin Database
long_description    RRDtool is a system to store and display time-series data
homepage            http://oss.oetiker.ch/rrdtool/
platforms           darwin
master_sites        ${homepage}pub/

checksums           rmd160 17970e90c72450d5589665f0165733469392cb82 \
                    sha256 3a286d449c05d657e3fc3adcaa5cb4f0cfac8f465324b14f364a45d4ff8ca6f6

depends_build       port:pkgconfig

perl5.branches      5.24

depends_lib         port:expat \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libiconv \
                    port:libffi \
                    port:gettext \
                    path:lib/pkgconfig/pango.pc:pango \
                    port:perl${perl5.major} \
                    port:tcl \
                    port:zlib \
                    port:libpng \
                    port:libxml2 \
                    port:intltool \
                    port:tcp_wrappers

configure.perl      ${perl5.bin}

configure.args      --enable-perl-site-install \
                    --with-perl-options="INSTALLDIRS=vendor" \
                    --with-tcllib=${prefix}/lib \
                    --disable-silent-rules \
                    --disable-lua \
                    --disable-python \
                    --disable-ruby \
                    --disable-tcl

post-destroot {
    fs-traverse f ${destroot}${prefix} {
        if {[file isfile ${f}]} {
            switch [file tail ${f}] {
                .packlist -
                perllocal.pod {
                    delete ${f}
                }
            }
        }
    }
}

variant python27 description {Python 2.7 bindings for RRDtool} {
    depends_lib-append      port:python27
    configure.python        ${prefix}/bin/python2.7
    configure.args-delete   --disable-python
    configure.args-append   --enable-python
}