# -*- 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           xcode 1.0
PortGroup           github 1.0

github.setup        DeaDBeeF-Player deadbeef 1.9.5
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                DeaDBeeF
categories          multimedia

maintainers         nomaintainer
description         ${name} is a modular cross-platform audio player
long_description    {*}${description}. It plays a variety of audio formats,    \
                    converts between them, lets you customize the UI in almost \
                    any way you want, and use many additional plugins which    \
                    can extend it even more.\n\nNOTE: The macOS version has    \
                    not been officially released, and has many unresolved      \
                    issues and unimplemented features.

homepage            https://deadbeef.sourceforge.io
license             zlib LGPL-2.1 GPL-2

fetch.type          git
post-fetch {
    system -W ${worksrcpath} "git submodule update --init"

    # Fix case-sensitive inconsistencies
    move \
        ${worksrcpath}/plugins/cocoaui/images \
        ${worksrcpath}/plugins/cocoaui/Images

    move \
        ${worksrcpath}/plugins/cocoaui/widgets \
        ${worksrcpath}/plugins/cocoaui/Widgets
}

xcode.configuration     Release
xcode.target            DeaDBeeF
xcode.project           osx/deadbeef.xcodeproj
xcode.build.settings    GCC_TREAT_WARNINGS_AS_ERRORS=NO

destroot {
    copy \
        [glob ${worksrcpath}/osx/build/Release/DeaDBeeF.app] \
        ${destroot}${applications_dir}/
}
