# -*- 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        BlueM Pashua-Binding-Bash 0.10.1
revision            0
checksums           rmd160  af5631821379adaec1927b2bc60bdfd03878d79f \
                    sha256  6e083cd6818e2eb8efcc4fa91cd119fba7b1a14f842b88eba8b0e555a700ce14 \
                    size    3682

categories          devel
platforms           {macosx any}
maintainers         {ryandesign @ryandesign} openmaintainer
license             MIT
supported_archs     noarch

description         native macOS dialogs for Bash using Pashua

long_description    ${name} is a Bash language binding (glue code) for \
                    using Pashua from Bash scripts. Pashua is a macOS \
                    application for using native GUI dialog windows in \
                    various programming languages.

github.tarball_from archive

depends_run         port:Pashua

patchfiles          applicationsdir.patch \
                    path-to-pashua.patch \
                    tmpdir.patch

post-patch {
    reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/pashua.sh
}

use_configure       no

build {}

destroot {
    set sharedir ${prefix}/share/${subport}
    xinstall -d ${destroot}${sharedir}
    xinstall ${worksrcpath}/example.sh ${destroot}${sharedir}
    xinstall -m 0644 -W ${worksrcpath} Readme.md pashua.sh ${destroot}${sharedir}
}
