# -*- 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           kde4 1.1

name                kdenlive
version             0.9.10
revision            4
categories          multimedia
maintainers         nomaintainer
license             GPL-2+

description         A non-linear video editing suite.
long_description    Kdenlive is a non-linear video editing suite, \
                    which supports DV, HDV and much more formats. \
                    Kdenlive relies on the MLT video engine and \
                    FFmpeg for video formats, thus offering a comprehensive solution.

homepage            https://kdenlive.org
master_sites        kde:Attic/${name}/${version}/src/
use_bzip2           yes

checksums           sha256  f68fdb39173e69ce422fdd57bbc4ced47711317e538b0101eee6a1bc9cedb763 \
                    rmd160  d9c59cb57b96a15987510380185d1dc3cb6ff9ee \
                    size    4666332

# This is a Qt4-based version, so use mlt-legacy here.
# Also it uses SDL, not SDL2: https://trac.macports.org/ticket/60535
depends_lib-append  port:desktop-file-utils \
                    port:gettext-runtime \
                    port:kde4-runtime \
                    port:kdelibs4 \
                    port:libsdl \
                    port:mlt-legacy

depends_run-append  port:cdrtools \
                    port:dvdauthor

# mlt is not universal
universal_variant   no

# https://trac.macports.org/ticket/55160
patchfiles          spectrogram.cpp.diff

#configure.args-append -DNO_JOGSHUTTLE=1

#build.env-append    -DNO_JOGSHUTTLE=1

platform darwin {
    patchfiles-append patch-BUNDLE_INSTALL_DIR.diff
}

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     {Kdenlive (\d+(?:\.\d+)+)}
