# -*- 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$

PortSystem                  1.0

name                        flasm
# flasm's version number appears to be expressed as a floating-point number
# instead of a dotted decimal; expect to need to increase the epoch often
version                     1.63
categories                  devel graphics
platforms                   darwin
maintainers                 ryandesign openmaintainer
license                     BSD

description                 Flash command-line assembler and disassembler

long_description            ${name} is a command-line assembler and \
                            disassembler of Flash ActionScript bytecode

homepage                    http://www.nowrap.de/flasm.html
master_sites                http://www.nowrap.de/download/
dist_subdir                 ${name}/${version}
distname                    ${name}[lindex [split ${version} .] 0][string index [lindex [split ${version} .] 1] 0]src
use_zip                     yes

checksums                   md5     28a4586409061b385d1cd27d3f120c0b \
                            sha1    3b383fa042eae414c5e5608bfa91a42f44bd1a86 \
                            rmd160  8dd4bbb9841fa6a66f2e1499b419084564f54e53

depends_build               port:bison \
                            port:flex \
                            port:gperf

depends_lib                 port:zlib

extract.mkdir               yes

use_configure               no

variant universal {}

build.args                  CC=${configure.cc} \
                            CFLAGS="${configure.cflags} [get_canonical_archflags cc]"

destroot {
    xinstall -W ${worksrcpath} flasm ${destroot}${prefix}/bin
    
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}/html
    xinstall -m 644 -W ${worksrcpath} CHANGES.TXT LICENSE.TXT flasm.ini ${docdir}
    xinstall -m 644 -W ${worksrcpath} classic.css flasm.html logo.gif ${docdir}/html
}

livecheck.type              regex
livecheck.regex             {version is <b>([0-9.]+)</b>}