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

github.setup        bernhardu dvbcut-deb 0.7.4 v
github.tarball_from archive
revision            0

name                dvbcut
categories          multimedia
license             GPL-2+
maintainers         nomaintainer
description         Qt application for cutting parts out of DVB streams
long_description    DVBcut is a Qt application that allows you to select certain parts of an \
                    MPEG transport stream and save these parts into a single MPEG output file. \
                    It follows a keyhole surgery approach where the input video and audio data \
                    is mostly kept unchanged, and only very few frames at the beginning and/or \
                    end of the selected range are re-encoded in order to obtain a valid MPEG \
                    file.

checksums           rmd160  c64e2d51c84e35a3d01032b62f8947f90b70500c \
                    sha256  e1009e264079c0fdd3b423a84c31aafd0c3069cd137edbd6e2b16e884550f66e \
                    size    194965

set ffmpeg_ver      6

depends_build       port:pkgconfig
qt5.depends_build_component qttools

depends_lib         port:a52dec \
                    port:ffmpeg${ffmpeg_ver} \
                    port:libao \
                    port:libmad

compiler.cxx_standard   2011

use_autoreconf      yes

configure.cxxflags-append   -std=c++11
configure.cppflags-prepend  -I${prefix}/libexec/ffmpeg${ffmpeg_ver}/include
configure.ldflags-prepend   -L${prefix}/libexec/ffmpeg${ffmpeg_ver}/lib

configure.env       PATH=$env(PATH):${prefix}/libexec/qt5/bin
build.env           PATH=$env(PATH):${prefix}/libexec/qt5/bin

post-destroot {
    file mkdir "${destroot}${prefix}/share/dvbcut/icons"
    file copy "${worksrcpath}/dvbcut.svg" "${destroot}${prefix}/share/dvbcut/icons/dvbcut.svg"
}
