# -*- 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: Portfile 117652 2014-03-07 05:09:28Z ryandesign@macports.org $

PortSystem          1.0

name                capstone
version             2.1.1
categories          devel
platforms           darwin
maintainers         gmail.com:aquynh
license             BSD

description         Capstone disassembly engine

long_description    Capstone is a multi-arch, multi-platform disassembly framework with advanced features

homepage            http://www.capstone-engine.org/
master_sites        ${homepage}download/${version}/
extract.suffix      .tgz

checksums           sha256  8af3c0a0f439d516277f308938935003d072f34a34fcf2e8dcf07dd415b1ca65 \
                    rmd160  ae65771d182feef575fd4a19bc597170ba42ebcf

patchfiles          patch-Makefile.diff

variant universal {}

use_configure       no

build.env           CC=${configure.cc} \
                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" \
                    PREFIX=${prefix}

eval destroot.env   ${build.env}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
