# $Id: Portfile 117043 2014-02-13 21:28:21Z mfeiri@macports.org $

PortSystem              1.0
name                    libc-headers
revision                2
version                 997.1.1
categories              devel
platforms               macosx
maintainers             mfeiri openmaintainer
license                 APSL-1.1 APSL-2 BSD MIT

description             Darwin Libc Headers
long_description        Headers files for the C standard library

homepage                http://opensource.apple.com/source/Libc/
master_sites            http://opensource.apple.com/tarballs/Libc/

distname                Libc-${version}

checksums               rmd160  a6d0700f16e564b99ec3886f361088404d9820bc \
                        sha256  2a93e74078d43c28ea1986b9f08ffebc49c92f9c6a38e32b69574949e4ba687b

depends_build           path:bin/unifdef:developer_cmds

use_configure           no

build                   {}

destroot.target         installhdrs
destroot.destdir        DESTDIR=${destroot}${prefix}/Developer/SDKs/Darwin${os.major}.sdk


platform darwin 9 {
    version             498.1.7
    distname            Libc-${version}
    checksums           rmd160  4f2c531805165b82e3f3587fca3cd88dd56db592 \
                        sha256  77122a555050d6b4ba866699507195d05d270700a9b411ab5ee8740857078609

    build.type          bsd
}

platform darwin 10 {
    version             594.9.5
    distname            Libc-${version}
    checksums           rmd160  160ea30d68d79d5aa10608a67f0246cb65bb33f2 \
                        sha256  a7a7b65fc4d185db076d30ac8e453f16be555d36c9b8a3b6162d317713686840

    depends_build-append    port:coreosmakefiles
    build.type              bsd
}

platform darwin 11 {
    version             763.13
    distname            Libc-${version}
    checksums           rmd160  d2484c13b9ff5b401e732946e1929dd5ca8e9ad4 \
                        sha256  a1d88010d04f7bc3af3b52d61aacdf0c6826aa0cfa2814e65bdef365cae28bc9

    depends_build-append    port:coreosmakefiles
    build.type              bsd
}

platform darwin 12 {
    version             825.40.1
    distname            Libc-${version}
    checksums           rmd160  9ab5a7dba00ba5e45c89d5532ccc2f5d62bbf271 \
                        sha256  8ef12ebf437227bbe2f6661ef14c6465fa962c84d052b233ab943f516a0c5d77

    pre-destroot {
        file attributes ${worksrcpath}/xcodescripts/headers.sh -permissions +x
        file attributes ${worksrcpath}/xcodescripts/manpages.sh -permissions +x
    }

    destroot.env        ARCHS=${build_arch} PLATFORM_NAME=${platforms} \
                        DSTROOT=${destroot}${prefix}/Developer/SDKs/Darwin${os.major}.sdk \
                        DERIVED_FILES_DIR=${workpath} SRCROOT=${worksrcpath} \
                        PUBLIC_HEADERS_FOLDER_PATH=/usr/include \
                        PRIVATE_HEADERS_FOLDER_PATH=/usr/local/include

    destroot.cmd        "./xcodescripts/headers.sh && ./xcodescripts/manpages.sh"
}


platform darwin 13 {
    pre-destroot {
        file attributes ${worksrcpath}/xcodescripts/headers.sh -permissions +x
        file attributes ${worksrcpath}/xcodescripts/manpages.sh -permissions +x
    }

    destroot.env        ARCHS=${build_arch} PLATFORM_NAME=${platforms} \
                        DSTROOT=${destroot}${prefix}/Developer/SDKs/Darwin${os.major}.sdk \
                        DERIVED_FILES_DIR=${workpath} SRCROOT=${worksrcpath} \
                        PUBLIC_HEADERS_FOLDER_PATH=/usr/include \
                        PRIVATE_HEADERS_FOLDER_PATH=/usr/local/include

    destroot.cmd        "./xcodescripts/headers.sh && ./xcodescripts/manpages.sh"
}


livecheck.type          regex
livecheck.regex         "Libc-(\[\\d.\]+)"
