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

go.setup            github.com/Eyevinn/mp4ff 0.56.0 v
go.offline_build    no
go.toolchain_min    1.19
revision            0

description         \
    Tools for parsing and writing MP4 files including video, audio and \
    subtitles.

long_description    \
    Package mp4ff implements MP4 media file parsing and writing for AVC and \
    HEVC video, AAC and AC-3 audio, and stpp and wvtt subtitles. It is \
    focused on fragmented files as used for streaming in DASH, MSS and HLS \
    fMP4, but can also decode and encode all boxes needed for progressive MP4 \
    files. In particular, the tool mp4ff-crop can be used to crop a \
    progressive file.

categories          multimedia
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

patchfiles          patch-Makefile.diff

build.cmd           make
build.target        build

post-patch {
    reinplace -E "s|@@VERSION@@|${github.tag_prefix}${version}|g" \
        ${worksrcpath}/Makefile
}

destroot {
    foreach mp4bin [glob ${worksrcpath}/out/*] {
        xinstall -m 0755 ${mp4bin} ${destroot}${prefix}/bin/
    }
}

checksums           ${distname}${extract.suffix} \
                        rmd160  640800ba84c1325722981c6d28219f922d2d5a50 \
                        sha256  431a057ca003c2fcca81a9495792a833457e06c79fbc73c2aa6400b94d9f5008 \
                        size    4762501

