# -*- 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
# $Id: Portfile 91472 2012-04-02 21:23:45Z jmr@macports.org $

PortSystem          1.0
PortGroup           kde4   1.1

name                krusader
version             2.0.0
revision            1
categories          kde kde4
maintainers         nomaintainer
description         Advanced twin panel (commander style) file manager for KDE.
long_description    Krusader is an advanced twin panel (commander style) file manager for KDE, \
                    similar to Midnight or Total Commander (formerly Windows Commander), with \
                    many extras such as directory synchronization, transparent archive handling, \
                    FTP, advanced search, internal viewer, ...

platforms           darwin
homepage            http://krusader.org
master_sites	    sourceforge:krusader
checksums           md5     f80f500a136d549739ad5d4bcab7fa5f \
                    sha1    e78abf03c910ef1f98251eb0959f8b3955bbd1f0 \
                    rmd160  b017b3291e0f3e52865bb9d4226efc5dc886b286

depends_lib-append  port:kdelibs4 \
                    port:kde4-runtime

post-extract {
    # if there is no 128x128 icon, no Mac OS X application icon will be generated
    # (at least cmake-2.8 shows this behaviour)
    copy ${filespath}/hi128-app-krusader_user.png ${workpath}/${distname}/krusader/
}

patchfiles          app-install-bug.patch \
                    7429ec2e1a43a5d2d0c883311b181a8d3ea53dc6.patch \
                    000feab199d06f0dcd816d958aae01f0ebf2631c.patch
patch.dir           ${workpath}/${distname}

# ticket #31655
# krusader/Dialogs/checksumdlg.cpp:32:61: error: default arguments can only be specified for parameters in a function declaration
#   const QString checksumFile, bool recursive, const QString& type=QString());
if {${configure.compiler} == "clang"} {
    configure.compiler  llvm-gcc-4.2
}

# awful hack to avoid meinproc crash, ticket #30162
build.asroot        yes
