# -*- 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.2 release-
set util_commit     9eda7afa576ee9b691f6389eaaef1c715174b32d
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  07fe83a855a75ea37fa7fd9baa9541759ad4c422 \
                    sha256  ecc371521471d3fbddb736414659b0b74f24b180042d16ef1dd081d2fbfeec11 \
                    size    275955 \
                    ${util_distfile} \
                    rmd160  bf16d79447e27b77f503d3a27b87cbb53cbae063 \
                    sha256  514da08b74d123b8b6b0935003d8aac48be448ea5d1c24555c705e4820d01379 \
                    size    18307

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

cmake.build_type    release

configure.args      -DASMOTOR_VERSION=${version}
