# -*- 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.3 release-
set util_commit     96bab24a1672734025a2297c104ff894e26aa0be
revision            0

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

categories          devel
maintainers         {gmail.com:csoren @csoren}
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  b61b495a197b542f52ed242220b255cf4ecad6de \
                    sha256  4e94756a317a7bc7f71026c3f5125a3fa84f2033b48b9e386090a070df4d1e6d \
                    size    280888 \
                    ${util_distfile} \
                    rmd160  47b40c087ebed670f7b31d7fd9a8adab1622dc68 \
                    sha256  192ea6724212f8114175dded542d81519db4c6595df3d8827714fc0626a881b5 \
                    size    18352

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

cmake.build_type    release

configure.args      -DASMOTOR_VERSION=${version}
