# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 84649 2011-09-29 10:35:46Z jmr@macports.org $

PortSystem      1.0

name            hamcrest-core
set my_name     hamcrest
version         1.2
categories      java devel
license         BSD
platforms       darwin
maintainers     nomaintainer
description     library of matchers for building test expressions

long_description \
    Provides a library of matcher objects (also known as constraints \
    or predicates) allowing 'match' rules to be defined declaratively, \
    to be used in other frameworks. Typical scenarios include testing \
    frameworks, mocking libraries and UI validation rules.

homepage        http://code.google.com/p/hamcrest/
master_sites    googlecode:${my_name}
dist_subdir     ${my_name}
distname        ${my_name}-${version}
extract.suffix  .tgz

checksums       md5     b4bd43f44d082d77daf7ec564d304cdf \
                sha1    236b0e01ed002f5c889eb3152e34677363ea1e83 \
                rmd160  6e6c747a467c0864a625048cd516b37153cd3a72

depends_build   port:apache-ant

use_configure   no

build.cmd       ant
build.target    core
build.args      -Dversion=${version}

destroot {
    set javadir ${prefix}/share/java
    set docdir ${prefix}/share/doc/${name}-${version}
    
    xinstall -d ${destroot}${javadir} ${destroot}${docdir}
    xinstall -m 0644 ${worksrcpath}/build/${name}-${version}.jar ${destroot}${javadir}/${name}.jar
    xinstall -m 0644 -W ${worksrcpath} CHANGES.txt LICENSE.txt README.txt \
        ${destroot}${docdir}
}

livecheck.type  regex
livecheck.regex $name-(\\d+(?:\\.\\d+)*)
