# -*- 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           boost 1.0
PortGroup           fuse 1.0
PortGroup           github 1.0
PortGroup           legacysupport 1.1
PortGroup           makefile 1.0

boost.version       1.81
# unlinkat
legacysupport.newest_darwin_requires_legacy 13

github.setup        google fuse-archive 1.16 v
revision            0
categories          fuse
license             Apache-2
maintainers         nomaintainer
description         Mount archives with FUSE
long_description    Mount an archive or compressed file as a FUSE file system.

checksums           rmd160  05f0f4db76720755d4677b06ff5de06a015fe362 \
                    sha256  e03929f280de7eded6de8817f1aa61f55ae07551bd8c6f30c4112a9b6d154f02 \
                    size    634488
github.tarball_from archive

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libarchive

patchfiles          make.diff

compiler.cxx_standard   2020

if {${os.platform} eq "darwin" && ${os.major} < 16} {
    build.args-append   FUSE_MAJOR_VERSION=2
}

destroot {
    xinstall -m 755 ${worksrcpath}/out/fuse-archive ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 644 ${worksrcpath}/fuse-archive.1 ${destroot}${prefix}/share/man/man1
}
