# -*- 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           github 1.0
PortGroup           qmake 1.0

github.setup        rodlie qtfm 6.2.1
revision            0
categories          sysutils
license             GPL-2
maintainers         {@barracuda156 macos-powerpc.org:barracuda}
description         Qt File Manager
long_description    {*}${description}
homepage            https://qtfm.eu
checksums           rmd160  82451c9ec6dedff680bb6a9dc7caebf47fbf5b62 \
                    sha256  b9c707443e20644f6e5f0393ce5158843724ac08f92cf8d7ea8e1109957b5c00 \
                    size    410958
github.tarball_from archive

fetch.type          git
post-fetch {
    system -W ${worksrcpath} "git submodule update --init"
}

patchfiles          0001-mimeutils-fix-for-macOS.patch \
                    0002-mymodel.h-avoid-nullptr-use-macro.patch \
                    0003-mymodel.cpp-add-missing-QFileDevice.patch \
                    0004-Fix-QtConcurrent-includes.patch \
                    0005-Include-libfm-to-find-headers.patch \
                    0006-settingsdialog-no-setClearButtonEnabled.patch \
                    0007-mainwindow-queueFile.patch \
                    0008-mainwindow-BackButton.patch \
                    0009-main-msgHandler.patch \
                    0010-Fix-build-files.patch

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libinotify-kqueue \
                    port:qt4-mimetypes

configure.cxxflags-append \
                    -DQ_NULLPTR=0 -I${prefix}/include/QtMimeTypes
configure.ldflags-append \
                    -lQtMimeTypes

destroot {
    copy ${worksrcpath}/fm/${name}.app ${destroot}${applications_dir}/
}
