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

# strnlen
legacysupport.newest_darwin_requires_legacy 10

# Commit-based until next update due to: https://github.com/adplug/adplug/issues/247
github.setup        adplug adplug 0fd855d82fb88ffe6038e03a2da25f9982dccfe1
version             2.4
revision            2
categories          audio devel
license             LGPL-2.1
maintainers         {makr @mohd-akram} openmaintainer

description         AdLib sound player library

long_description    AdPlug is a free, multi-platform, hardware independent \
                    AdLib sound player library, mainly written in C++. AdPlug \
                    plays sound data, originally created for the AdLib (OPL2/3) \
                    audio board, on top of an OPL2/3 emulator or by using \
                    the real hardware. No OPL2/3 chips are required for playback.
checksums           rmd160  6b112c63fab18bce8fd9857c51f4fcf2b1cf13b8 \
                    sha256  ee8664364df1ecfa1baea63215a3865188ecc77c6e7df67fe2992311b75097c9 \
                    size    2769301
# Switch back to releases on the next update.
# use_bzip2           yes
# github.tarball_from releases
github.tarball_from archive

post-extract {
    foreach f {database.cpp database.h fprovide.cpp fprovide.h pch.h} {
        reinplace "s|<binio.h>|<libbinio/binio.h>|" ${worksrcpath}/src/${f}
    }
}

use_autoreconf      yes

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libbinio

compiler.cxx_standard   2017
