# -*- 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                   cmake 1.1
PortGroup                   github 1.0
PortGroup                   legacysupport 1.1

github.setup                strukturag libde265 1.0.19 v
github.tarball_from         releases
revision                    0

checksums                   rmd160  978c5a419b8f85def29a1e2a6b8d602d670a3782 \
                            sha256  bb19a0b485d2643e0eeb7e91f3ab32d1ad617e7c487dbedc91214ca3dbd8d7eb \
                            size    291375

categories                  multimedia
license                     LGPL-3+
maintainers                 {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description                 an open source implementation of the h.265 video codec
long_description            ${name} is {*}${description}.

compiler.cxx_standard       2017
# see https://trac.macports.org/ticket/59866
legacysupport.newest_darwin_requires_legacy 9

# dec265, a simple player for raw h.265 bitstreams.
# sherlock265, a Qt-based video player.
configure.args-append       -DENABLE_SHERLOCK265=OFF \
                            -DENABLE_ENCODER=OFF \
                            -DENABLE_SIMD=OFF

variant players description {install example video players} {
    PortGroup               qt5 1.0
    PortGroup               active_variants 1.1

    configure.args-replace  -DENABLE_SHERLOCK265=OFF -DENABLE_SHERLOCK265=ON \
                            -DENABLE_ENCODER=OFF -DENABLE_ENCODER=ON

    depends_lib-append      path:lib/pkgconfig/libswscale.pc:ffmpeg8 \
                            port:libsdl2 \
                            port:libvideogfx
    configure.env-append    PATH=${qt_dir}/bin:$env(PATH)

    require_active_variants libvideogfx x11
}
