# -*- 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                wimlib
version             1.14.4
revision            0
checksums           rmd160  cf8f08084caeecccf95b7d7385cd44241686f924 \
                    sha256  3633db2b6c8b255eb86d3bf3df3059796bd1f08e50b8c9728c7eb66662e51300 \
                    size    1045888

categories          archivers
maintainers         {ryandesign @ryandesign} openmaintainer
license             {GPL-3+ LGPL-3+}

description         tools for dealing with files in Windows Imaging Format

long_description    wimlib is a library for creating, modifying, \
                    extracting, and mounting files in the Windows \
                    Imaging Format (WIM files). wimlib and its \
                    command-line frontend wimlib-imagex provide a free \
                    and cross-platform alternative to Microsoft's \
                    WIMGAPI, ImageX, and DISM.

homepage            https://wimlib.net
master_sites        ${homepage}/downloads/

depends_build       path:bin/pkg-config:pkgconfig

depends_lib         port:libxml2 \
                    path:lib/libssl.dylib:openssl

depends_run         port:cabextract \
                    port:cdrtools \
                    port:mtools

# cdrtools is not universal but we're only using its programs, not its
# libraries.
depends_skip_archcheck cdrtools

configure.checks.implicit_function_declaration.whitelist-append strchr

configure.args      --disable-silent-rules \
                    --with-libcrypto \
                    --without-fuse \
                    --without-ntfs-3g

variant ntfs conflicts universal description {Capture/apply images directly from/to NTFS volumes} {
    # ntfs-3g is not universal
    depends_lib-append      port:ntfs-3g
    configure.args-replace  --without-ntfs-3g --with-ntfs-3g
}

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