# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
PortSystem          1.0
PortGroup           fuse 1.0

name                ext2fuse
version             0.8.1
revision            4
categories          fuse
license             GPL-2+
maintainers         nomaintainer

description         ext2 filesystem in user space
long_description    Implementation of the ext2 filesystem in user space, \
                    using the FUSE library.

homepage            https://sourceforge.net/projects/ext2fuse/
master_sites        sourceforge:project/${name}/${name}/${version}
distname            ${name}-src-${version}

checksums           rmd160  7ba8c6f88550d1dcf4de235ab39dd13249e36eea \
                    sha256  431035797b2783216ec74b6aad5c721b4bffb75d2174967266ee49f0a3466cd9 \
                    size    323336

depends_lib-append  port:e2fsprogs

patchfiles          implicit.patch \
                    _XOPEN_SOURCE.patch

configure.cflags-append -std=gnu89
configure.cflags-append -D__FreeBSD__=10
configure.cflags-append -DENABLE_SWAPFS
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include

pre-configure {
    # The configure script only knows about -lfuse which works for macFUSE but
    # not for OSXFUSE. This adds the right library flag, whichever port is used.
    configure.ldflags-append [exec ${prefix}/bin/pkg-config fuse --libs]
}
