# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 108173 2013-07-15 06:48:35Z devans@macports.org $

PortSystem      1.0

name            libsigcxx2
set my_name     libsigc++
version         2.2.11
license         LGPL-2.1
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      devel
platforms       darwin
maintainers     nomaintainer
description     C++ signal callback system

long_description \
    libsigc++ implements a typesafe callback system for standard C++. It allows you to define signals and to \
    connect those signals to any callback function, either global or a member function, regardless of whether it is \
    static or virtual.

homepage        http://libsigc.sourceforge.net/
master_sites    gnome:sources/${my_name}/${branch}/
distname        ${my_name}-${version}
use_xz          yes

checksums       sha256  9834045f74f56752c2c6b3cdc195c30ab8314ad22dc8e626d6f67f940f1e4957 \
                rmd160  f06228d3af1d4e21d6762c2f294281f7205ae3dd

configure.args  --enable-static

set docdir      ${prefix}/share/doc/${my_name}-${version}

post-destroot {
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README TODO \
        ${destroot}${docdir}

    if { [variant_isset doc]} {
        foreach {f} {images index.html reference tutorial} {
            file rename ${destroot}${prefix}/share/doc/libsigc++-2.0/${f} \
                ${destroot}${docdir}/${f}
        }
    }
    file delete -force ${destroot}${prefix}/share/doc/libsigc++-2.0
}

variant doc description {Install extra documentation} {
}

livecheck.type  gnome
livecheck.name  ${my_name}
