# -*- 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                vmdktool
version             1.4
categories          sysutils emulators
platforms           darwin
maintainers         {e-dad.net:glenn @glennmatthews}
license             BSD

description         converts raw filesystems to VMDK files and vice versa

long_description    ${name} ${description}. \
                    VMDK files can be imported directly into most Virtual Machine servers \
                    as guest filesystems. Automatic machine deployments into products \
                    such as VMware’s ESXi and VirtualBox requires the ability to construct \
                    VMDK files as the initial filesystem images for the created guests.

homepage            https://manned.org/vmdktool

master_sites        https://people.freebsd.org/~brian/vmdktool/ \
                    ftp://ftp.awfulhak.org/pub/vmdktool/

checksums           sha1    ed80b62cd7a97582192ad3a8f97bf73eee9ed36a \
                    sha256  981eb43d3db172144f2344886040424ef525e15c85f84023a7502b238aa7b89c

depends_lib         port:zlib

patchfiles          patch-Makefile.diff \
                    patch-expand_number.c.diff

use_configure       no

variant universal {}

build.env           CC=${configure.cc} \
                    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]"

test.run            yes

destroot.args       PREFIX=${prefix}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
