# -*- 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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           xcode 1.0

github.setup        amazingsyco VillainousStyle 20110713
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories          devel graphics
maintainers         ryandesign
license             Apache-2

description         a drawing library for defining a visual style from a \
                    chain of individual drawing instructions

long_description    VillainousStyle is a drawing library for defining a \
                    visual style from a chain of individual drawing \
                    instructions. Each instruction modifies the drawing \
                    context to perform common operations\; such operations \
                    include shadows, fills, borders, and shapes. It allows \
                    for multiple style sheets which can be used to theme \
                    an application in multiple visual contexts. \
                    VillainousStyle sits on top of CoreGraphics, and does \
                    not use WebKit for rendering at all. It is a fork of \
                    the VSStyle and VSShape classes, originally from the \
                    Three20 project.

platform darwin 8 {
    pre-fetch {
        ui_error "${name} requires Mac OS X 10.5 or greater."
        return -code error "incompatible Mac OS X version"
    }
}

if {${name} eq ${subport}} {
    supported_archs     noarch
    platforms           any
    distfiles

    depends_run         port:${name}-framework \
                        port:lib${name}

    build {}

    destroot {
        set docdir ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${docdir}
        system "echo ${name} is a meta port > ${docdir}/README"
    }
} else {
    fetch.type          git
    git.branch          e05e72da703b39de3d8b1c53b308f4b2a8b62aef

    build.dir           ${worksrcpath}/Source

    xcode.configuration Release

    livecheck.type      none
}

subport lib${name} {
    xcode.target        "lib${name}.a - Mac"
    xcode.destroot.path ${prefix}/lib
}

subport ${name}-framework {
    xcode.destroot.type framework
    xcode.target        ${name}.framework
}