# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 79475 2011-06-14 17:10:59Z mk@macports.org $

PortSystem          1.0

name                makeicns
version             1.4.8
categories          graphics
maintainers         mk pixilla
platforms           darwin
license             MIT

description         This program lets you convert all kinds of images to Apple icns format on the command line.
long_description    ${description}

homepage            http://bitbucket.org/mkae/makeicns
master_sites        ${homepage}/downloads

livecheck.type      regex
livecheck.url       ${homepage}/downloads
livecheck.regex     "/mkae/makeicns/src/.*>(1\\.\\d+.\\d+)<"

use_bzip2           yes

worksrcdir          ${name}

checksums           md5     e89c15d8e1481ce03fccbb6ad82695de \
                    sha1    339c2ffa5cb5ea4d7853b613fdfb37d29aaf9f2b \
                    rmd160  74d524d47e0c111c853316a8b0a96301acadf486

use_configure       no

variant universal {
}

if {[variant_isset universal]} {
    set archflags ${configure.universal_cflags}
} else {
    set archflags ${configure.cc_archflags}
}

build.env-append    CC=${configure.cc} \
                    CXX=${configure.cxx} \
                    CFLAGS="${configure.cflags} ${archflags}" \
                    CXXFLAGS="${configure.cxxflags} ${archflags}" \
                    LDFLAGS="[join ${configure.ldflags}] ${archflags}"

if {${configure.sdkroot} != ""} {
    build.env-append SDK=${configure.sdkroot}
}

destroot {
    xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name}
}
