PortSystem 1.0
PortGroup  github 1.0
PortGroup  xcode 1.0

github.setup        timthedevguy BGHUDAppKit 0.7
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          aqua devel
license             BSD
maintainers         nomaintainer

description         Aqua HUD window framework
long_description    BGHUDAppKit is a small framework to assist GUI apps in designing HUD windows

master_sites        macports_distfiles
checksums           rmd160  3a26a8497eff103774e86bcd04c1c61b2601faa6 \
                    sha256  e0f89ecb2692c53a3144ce6f2fcd8b9c2cb814d52a16ed2cc8f5b15b7e87ea52

xcode.destroot.type framework

platform darwin 9 {
    patchfiles-append leopard.patch
}

if {[vercmp $xcodeversion 5] >= 0 && [vercmp $xcodeversion 10.0] < 0} {
    patchfiles-append xcode5.patch
}

# This is a temporary kludge. The new Xcode build system fails to
# build and destroot this for reasons that are poorly understood.
# Remove this when a better fix is known.
if {[vercmp ${xcodeversion} 10.0] >= 0} {
    patchfiles-append xcode-10-1.patch
    build.pre_args      -UseNewBuildSystem=NO
    destroot.pre_args   -UseNewBuildSystem=NO
}

post-destroot {
    move ${destroot}${frameworks_dir}/BGHUDAppKitPlugin.ibplugin ${destroot}${frameworks_dir}/BGHUDAppKit.framework/Resources
}
