# -*- 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
PortGroup           cmake 1.1
PortGroup           github 1.0

# Verify the correct util commit for each asmotor version update.
github.setup        asmotor asmotor 1.3.4 release-
set util_commit     5e973b97874f080404bf7cd905eabf8fe3aea4eb
revision            0

worksrcdir          ${name}-release-${version}

categories          devel
maintainers         {gmail.com:csoren @csoren} \
                    openmaintainer
license             GPL-3

description         A cross assembler, linker and librarian for several CPUs.

long_description    ASMotor is a portable and generic assembler engine and \
                    development system written in ANSI C99 and licensed under \
                    the GNU Public License v3. The package consists of the \
                    assembler, the librarian and the linker. It can be used \
                    as either a cross or native development system. The \
                    assembler syntax is based on the friendly, well-known \
                    Motorola style macro language. Currently supported CPUs \
                    are the 680x0 family, 6809, 6502 and derivatives, 65816, \
                    MIPS32, Z80, Game Boy, DCPU-16, CHIP-8/SCHIP and the \
                    RC811 CPU core.

github.tarball_from archive
master_sites        ${master_sites}:main \
                    https://github.com/asmotor/asmotor-util/archive/${util_commit}:util

set main_distfile   ${distfiles}
set util_distname   asmotor-util-${util_commit}
set util_distfile   ${util_distname}${extract.suffix}
distfiles           ${main_distfile}:main \
                    ${util_distfile}:util

checksums           ${main_distfile} \
                    rmd160  d28bd040b6f7f8950bca6e1630d9f6fbf1c90ec7 \
                    sha256  82cff49995d27ba830a7c02f8e9238b1cf9b876183e284b16ee6b046a5f1a509 \
                    size    283372 \
                    ${util_distfile} \
                    rmd160  597db06534cf51ce995a45df410385449258ac69 \
                    sha256  6afcea179462601c801f08a74abed30e925ed5bfe7b4ce50b829bfc107a1fc32 \
                    size    19096

post-extract {
    delete ${worksrcpath}/util
    move ${workpath}/${util_distname} ${worksrcpath}/util
}

cmake.build_type    release

configure.args      -DASMOTOR_VERSION=${version}
