# -*- 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       legacysupport 1.0

name            xfe
version         2.1.1
revision        0

categories      x11
platforms       darwin freebsd
license         GPL-2+
maintainers     nomaintainer

description     X File Explorer (Xfe) is an MS-Explorer like file manager for X.
long_description    \
    X File Explorer (Xfe) is a filemanager for X. It is based on the popular \
    X Win Commander, which is discontinued. Xfe is desktop independent and \
    is written with the C++ Fox Toolkit. It has Windows Commander or \
    MS-Explorer look and is very fast and simple. The main features are: \
    file associations, mount/umount devices, directory tree for quick cd, \
    change file attributes, auto save registry, compressed archives \
    view/creation/extraction and much more.

homepage        http://roland65.free.fr/xfe/
master_sites    sourceforge:project/xfe/xfe/${version}/

use_xz          yes

checksums       rmd160  651c6a52f6e717caac04c94a7dfdb13953d82c10 \
                sha256  e357363546da79077f5e5a546464be1ed8a29d51fa3cdf0492de118d9a6938bb \
                size    3193704

depends_build   port:gettext \
                port:intltool \
                port:pkgconfig

depends_lib     port:fox \
                port:freetype \
                port:fontconfig \
                port:gettext-runtime \
                port:libpng \
                port:xorg-libX11 \
                port:xorg-libXrandr \
                port:xorg-xcb-util \
                port:Xft2

patchfiles      patch-declare-pkg_format.diff \
                patch-defaulticonpath.diff

post-patch {
    reinplace "s|/usr/local/share|${prefix}/share|g" \
        ${worksrcpath}/src/XFileExplorer.cpp \
        ${worksrcpath}/src/xfedefs.h

    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/src/icons.cpp
}

configure.args-append \
                --datadir=${prefix}/share
