# -*- 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 118429 2014-04-02 07:44:35Z and.damore@macports.org $

PortSystem          1.0

name                capstone
version             3.0
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  49e41d662c5ed4dcd391ec4cfce75fb31ca4bfd245eba9e8f0cb69d6f6e8d7cc \
                    rmd160  c4a542752c1ffc6262507a799f96470e076429b9

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}
