# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       muniversal 1.0

name            gnome-vfs
version         2.24.4
revision        9
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     nomaintainer
categories      gnome
license         LGPL-2+
description     This is the GNOME Virtual File System.

long_description \
    This is the GNOME Virtual File System. \
    GNOME VFS is currently used as one of the \
    foundations of the Nautilus file manager.

homepage        https://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/
use_bzip2       yes

checksums       rmd160  6a5952bea02dfc96782b6f1129fe765f5313a75b \
                sha256  62de64b5b804eb04104ff98fcd6a8b7276d510a49fbd9c0feb568f8996444faa \
                size    1890370

depends_build   path:bin/pkg-config:pkgconfig \
                port:intltool \
                port:gettext \
                port:gtk-doc \
                port:gnome-common \
                port:gnome-mime-data

depends_lib     port:bzip2 \
                port:dbus \
                port:dbus-glib \
                path:lib/pkgconfig/glib-2.0.pc:glib2 \
                port:gconf \
                port:gettext-runtime \
                path:lib/libssl.dylib:openssl \
                port:libxml2 \
                port:zlib

depends_run     port:gnome-mime-data \
                port:shared-mime-info

patchfiles      patch-configure.diff \
                patch-openssl111-fix.diff \
                patch-test-async-directory.diff

configure.args  --enable-ipv6 \
                --disable-howl \
                --disable-avahi \
                --with-openssl-libs=${prefix}/lib \
                --with-openssl-includes=${prefix}/include \
                --disable-gnutls \
                --disable-fam \
                ac_cv_func_open64=no \
                ac_cv_func_posix_fadvise=no \
                ac_cv_path_KRB5_CONFIG=none

configure.ldflags-append    -lresolv

post-patch {
    reinplace -E "/xdg_data_dirs = \"/s|\"\[^\"\]*\"|\"${prefix}/share\"|" \
        ${worksrcpath}/libgnomevfs/xdgmime.c

    reinplace "s|/etc/fstab|/etc/fstab.hd|" \
        ${worksrcpath}/libgnomevfs/gnome-vfs-unix-mounts.c
}

variant avahi description {Enable Bonjour through avahi} {
    depends_lib-append      port:avahi
    configure.args-delete   --disable-avahi
}
post-activate {
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  gnome
