# -*- 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: Portfile 91086 2012-03-23 19:28:08Z ryandesign@macports.org $

PortSystem          1.0

name                libical
version             0.43
revision            1
categories          devel
license             {LGPL-2.1 MPL-1.0}
maintainers         nomaintainer
description         An implementation of iCalendar protocols and data formats
long_description    ${description}
platforms           darwin
homepage            http://sourceforge.net/projects/freeassociation/
master_sites	    sourceforge:freeassociation
checksums           md5     5f0a1feb60894d0be537aefea5647474 \
                    sha1    a972fa876b3b9834a6e8102b7e2a670f73091cdf \
                    rmd160  a0a79aec38970c5d694a3e9065a4cb7746b31fea
                    
patchfiles          patch-src-libical-icaltz-util.c.diff

post-configure {
    if {[variant_isset universal]} {
        reinplace "s|CC -dynamiclib|CC ${configure.universal_ldflags} -dynamiclib|g" ${worksrcpath}/libtool
    } else {
        reinplace "s|CC -dynamiclib|CC ${configure.cc_archflags} -dynamiclib|g" ${worksrcpath}/libtool
    }
}

livecheck.url       http://sourceforge.net/projects/freeassociation/files/
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
