PortSystem              1.0

name                    csu
version                 85
categories              devel
maintainers             nomaintainer
license                 {APSL-1.1 APSL-2}
description             Common startup and C runtime setup code
long_description        {*}${description}
homepage                http://opensource.apple.com/source/Csu/
master_sites            https://github.com/apple-oss-distributions/Csu/archive

distname                Csu-${version}
checksums               rmd160  c571588a596ed9c54ae5d27c3b67cca98d5615fe \
                        sha256  87a6bfb1030455e17128d5803e02815e35a1c8bd8bda7bd7f4141431a4d0eac6 \
                        size    13389

use_configure           no
default_variants        +universal
build.env-append        "CC=${configure.cc} -Wl,-new_linker"
destroot.env-append     DSTROOT=${destroot}${prefix}/Developer/SDKs/Darwin${os.major}.sdk

variant universal {
    if {${os.major} == 9} {
        configure.universal_archs ppc ppc64 i386 x86_64
    }
    build.env-append    RC_ARCHS=${configure.universal_archs}
}

platform darwin 9 {
    version             75
    distname            Csu-${version}
    checksums           rmd160  45daca7a8f32e6dbbe405c91c94b5ead0f3af98f \
                        sha256  60eef896fd551987ca569190dd809375ccffa3ee3880f61193a5c7eee498118a \
                        size    8304
}

# handle stealth update; remove with next version change
dist_subdir             ${name}/${version}_1
worksrcdir              Csu-${distname}

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