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

name            libdvdread
version         7.1.1
revision        0
categories      devel multimedia
license         GPL-2+
maintainers     nomaintainer
description     simple foundation for reading DVD-Video images

long_description \
    libdvdread provides a simple foundation for reading DVD-Video \
    images. It offers DVD applications: \
    1. A simple abstraction for reading the files on a DVD image \
       (dvd_reader.h). \
    2. A simple library for parsing the information (IFO) files \
       (ifo_read.h/ifo_types.h). \
    3. A simple library for parsing the navigation (NAV) packets \
       (nav_read.h/nav_types.h).

homepage        http://dvdnav.mplayerhq.hu
master_sites    https://download.videolan.org/pub/videolan/${name}/${version}/
use_xz          yes
checksums       rmd160  6378c6c02d3b8fdda6cc9edd9805266c800321c6 \
                sha256  a0d47876548bec806774bbf8dbf20bb19ba139464383156b32eb8e59915b90a9 \
                size    102460

depends_lib     port:libdvdcss

patchfiles      patch-src_dvd_input.c.diff

post-patch {
    reinplace -locale C "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/src/dvd_input.c
}

compiler.c_standard 2011

configure.args-append \
                    -Dlibdvdcss=enabled

livecheck.type      regex
livecheck.url       https://download.videolan.org/pub/videolan/${name}/
livecheck.regex     {>([0-9.]+)/<}
