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

name                objconv
version             2.57
revision            0
epoch               1
categories          devel
license             GPL-3+
maintainers         nomaintainer
description         Object converter / disassembler.
long_description    This utility can be used for converting object files \
                    between COFF/PE, OMF, ELF and Mach-O formats for all \
                    32-bit and 64-bit x86 platforms. Can modify symbol names \
                    in object files. Can build, modify and convert function \
                    libraries across platforms. Can dump object files and \
                    executable files. Also includes a very good disassembler \
                    supporting the SSE4, AVX, AVX2, AVX512, FMA3, FMA4, XOP \
                    and Knights Corner instruction sets.

use_zip             yes
homepage            https://www.agner.org/optimize
master_sites        ${homepage}/${name}${extract.suffix}?dummy=

checksums           rmd160  1381a6dca7784aa1ea3903a0b929e77050c60981 \
                    sha256  0f604f93f97f689afd7615c86176eb15bc95001eadf8317f17ebd099c50c59e1 \
                    size    1081109

post-extract {
    system -W ${workpath} "unzip -d ${worksrcdir} source.zip"
}

build.args-append   -f ${filespath}/Makefile
destroot.args       {*}${build.args}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${workpath}/${name}-instructions.pdf \
        ${destroot}${prefix}/share/doc/${name}/
}
