# -*- coding: utf-8; mode: portfile; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
# $Id: Portfile 92827 2012-05-08 07:48:45Z g5pw@macports.org $

PortSystem              1.0

name                    msp430-libc
version                 20120224
revision                1
set lts_date            20120406

conflicts               ${name}-devel

categories              cross
maintainers             g5pw
supported_archs         noarch
license                 GPL-3+

description             C library for the MSP430 series microcontrollers.
long_description        MSP430 Libc is a Free Software project whose goal is \
                        to provide a high quality C library for use with \
                        GCC on TI MSP430 microcontrollers.
platforms               darwin
homepage                http://mspgcc.sourceforge.net/
master_sites            sourceforge:project/mspgcc/${name}/

patch_sites             sourceforge:project/mspgcc/Patches/LTS/${lts_date}/ \

patchfiles              ${name}-${version}-sf3522752.patch

depends_lib             port:msp430mcu
depends_build           port:gettext port:msp430-gcc

# installs deliberately files outside regular tree:
destroot.violate_mtree  yes

use_bzip2               yes

checksums               msp430-libc-20120224-sf3522752.patch \
                        rmd160  2aaef7bff7ece9cbba11f6ab235728d2ed2940f1 \
                        sha256  641d1625c4d78e20d2a70059eca2eac77628e497c1643551f8b11b6812040b08 \
                        msp430-libc-20120224.tar.bz2 \
                        rmd160  209f52ea4c38d617bad2052ae7f27db7299e91a8 \
                        sha256  b67a33881aa6b456c5c99dea5ea655892455fde1317d5bda818e9c6ee34a3f82

patch.pre_args          -p1


use_configure           no

build.dir               ${worksrcpath}/src

destroot.env            PREFIX=${destroot}${prefix}

livecheck.type          regex
livecheck.url           http://sourceforge.net/projects/mspgcc/files/${name}/
livecheck.regex         "${name}-((?!.*${name}.*|\\${extract.suffix}).*)\\${extract.suffix}"
