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

# strnlen
legacysupport.newest_darwin_requires_legacy 10

github.setup        Netatalk netatalk_client 0.9.4
revision            0
categories-append   net fuse
license             GPL-2
maintainers         nomaintainer
github.tarball_from archive

description         AFP file sharing client

long_description    Netatalk Client is a file sharing client written \
                    in C which can be used to access AFP shares exposed \
                    by multiple devices, notably personal file sharing \
                    on older Mac OS X and Classic Mac OS computers, \
                    Netatalk servers hosted on Linux/*BSD/Solaris/macOS, \
                    Apple AirPort and Time Capsule products as well as \
                    other AFP enabled NAS devices from various vendors. \
                    Netatalk Client is an improved fork of afpfs-ng.

homepage            https://netatalk.io/

checksums           rmd160  4d962510ba583889d5fe8e53500a41e9a25e5a24 \
                    sha256  9c50ee65f870cdd09b6989a546561476e082b72539631c07f34a26b9fbaea045 \
                    size    221117

meson.wrap_mode     nodownload

if {${os.platform} eq "darwin" && ${os.major} < 10} {
    patchfiles-append \
                    patch-10.5-compat.diff

    configure.args-append \
                    -Dforce-fuse-v2=true
}

if {${os.platform} eq "darwin" && ${os.major} > 22} {
    configure.cflags-append \
                    -Wno-error=incompatible-function-pointer-types
}

depends_lib-append  port:libgcrypt \
                    port:libiconv \
                    port:readline

compiler.c_standard 2011

configure.args-append \
                    -Denable-fuse=true
