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

name                py-pywidevine
version             1.8.0
revision            0
platforms           {darwin any}
license             GPL-3
maintainers         nomaintainer
description         Widevine CDM (Content Decryption Module)
long_description    {*}${description} implementation in Python.
homepage            https://github.com/devine-dl/pywidevine
checksums           rmd160  3cbc12a6d18edd8a292dd105aeaa4398f0ae6280 \
                    sha256  c14f3fe2864473416b9caa73d9a21251a02d72138e6d54d8c1a3f44b7a6b05c9 \
                    size    76406
supported_archs     noarch

python.versions         310 311 312 313
python.pep517_backend   poetry

# FIXME: see discussion in https://github.com/devine-dl/pywidevine/issues/59
# Try migrate to 1.9.0 and newer protobuf.

if {${subport} ne ${name}} {
    # This is a hack!
    patchfiles-append   patch-unbreak-device.py

    depends_lib-append \
        port:py${python.version}-aiohttp \
        port:py${python.version}-click \
        port:py${python.version}-protobuf3 \
        port:py${python.version}-pycryptodome \
        port:py${python.version}-pymp4 \
        port:py${python.version}-requests \
        port:py${python.version}-unidecode \
        port:py${python.version}-yaml
}
