# -*- 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           cmake 1.0
PortGroup           github 1.0

cmake.out_of_source yes

name                libical

if {${subport} eq "${name}"} {
	github.setup    libical libical 1.0.1 v
	conflicts       libical-devel
} else {
    # libical-devel:
    github.setup    libical libical 25bc500e15bafcef7324ec9b6472982b56dcdc6d
    version         1.0.1.351
	conflicts       libical
}

categories          devel
license             {LGPL-2.1 MPL-1}
maintainers         nomaintainer
description         An implementation of iCalendar protocols and data formats
long_description    ${description}
platforms           darwin
homepage            https://github.com/libical

subport libical-devel {
    description-append \
                    . Follows the development version.
    long_description \
                    ${description}
}

if {${subport} eq "${name}"} {
    # v 1.0.1
    checksums       rmd160  780f9fb08b324536af362f8812ff671e4d1082d0 \
                    sha256  b3898c9ca3522ba4f0454e8b7c26a85b2b1259e16d670cccf7abb035c8a6caa9
} else {
    # v1.0.1-351-g25bc500
	checksums       rmd160  4379c5d6d31a78ecb2ceaff6e64a8900e9b30cfe \
	                sha256  f7c22344a461f8ee1ce65e3efa477e9846b1ca39f44af622a149ce37f3850332

    maintainers     gmail.com:rjvbertin openmaintainer
    distname        ${name}-git
}

# use_autoreconf      yes
# autoreconf.args     -fvi

patch.pre_args      -p1

livecheck.url       https://github.com/libical/libical/releases
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"