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

github.setup            nkoriyama aribb24 1.0.3 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball

name                    libaribb24
categories              multimedia
# Note: the software was relicensed to LGPL-3 after the 1.0.3 release, but
#       no new release has been made since relicensing.
license                 GPL-3
maintainers             {@kakuhen} openmaintainer
platforms               darwin freebsd
description             A library for ARIB STD-B24
long_description \
    A library for ARIB STD-B24, decoding JIS 8-bit characters, and parsing \
    MPEG-TS streams.

depends_build           port:pkgconfig
depends_lib             port:libpng

checksums    \
    rmd160  a4cd98433629f4e7619297c38f0daf1aa3ee2fcb \
    sha256  c2507340cca89f13a0f7e590521189957610b7398b9d50fbdf23e6a95bc84f63 \
    size    57417

# The first patch ensures libtool provides the compiler correct include flags.
# The second patch ensures that we look for png.h in the right paths.
patchfiles      \
    Makefile-include-flags.diff drcs-png-include.diff

use_autoconf            yes
autoconf.cmd            ./bootstrap
# Overriding autoconf.cmd removes these dependencies, so append them back.
depends_build-append    port:automake port:autoconf port:libtool
