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

PortSystem          1.0

name                android-ndk
version             9d
categories          cross devel
maintainers         openmaintainer krischik
platforms           darwin
description         Android NDK
long_description \
    The Android NDK allows native development for the Android mobile platform.

set prog            ${name}-r${version}-darwin-x86.tar.bz2

homepage            https://developer.android.com/tools/sdk/ndk
master_sites        http://dl.google.com/android/ndk
use_bzip2           yes
extract.mkdir       no

distfiles           ${prog}:prog
distname            android-ndk-macosx
worksrcdir          android-ndk-r${version}

checksums           ${prog} \
                    rmd160  c9bdb257758266cc309fc1a2bc0cc024b57eb7dd \
                    sha256  82ee78e79fb049f099dcee6680e229339f4c5507308d67c9e145e0964d0b40af

use_configure       no
build.cmd           true

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/java

    system "
        cp -a ${worksrcpath} ${destroot}${prefix}/share/java/${distname};
        chgrp -R _developer  ${destroot}${prefix}/share/java/${distname};
        chmod -R g+w         ${destroot}${prefix}/share/java/${distname};
    "
}

notes "
${distname} has been made group _developer writable
"
