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

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.64
revision                    0
checksums                   rmd160  9b11e0d8a4326d1d28bf7e3b0d679f6d1d404cee \
                            sha256  bb37695bccc8c03616b877779c6d659005f5ad0f2d6d0ab3937c38b2c0c6fa58 \
                            size    113953

categories                  devel graphics
platforms                   darwin
maintainers                 {ryandesign @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

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>}
# The developer does not want to list the latest version of the source code on
# his web site.
livecheck.type              moddate
livecheck.url               [lindex ${master_sites} 0]${distfiles}
