# -*- 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               xcode 1.0

# Notice that version 66 lacks some of the tools.
# Do not update unless dependencies are verified to build, or make a separate subport.
name                    developer_cmds
version                 63
revision                1
categories              devel
maintainers             nomaintainer

# We install BSD ctags, conflicting with Exuberant Ctags.
# unifdef and unifdefall is conflicting with unifdef port.
conflicts               ctags unifdef

homepage                http://opensource.apple.com/source/${name}/
master_sites            https://github.com/apple-oss-distributions/${name}/archive
license                 BSD
description             A set of general BSD commands for developers
long_description        Apple's BSD general commands for developers including \
                        the asa utility, ctags, indent, lorder, mkdep, \
                        rpcgen, unifdef and what.

# handle stealth update; remove with next version change
dist_subdir             ${name}/${version}_2
worksrcdir              ${name}-${distname}
checksums               rmd160  8b33e651e3ee65a421bfebed85cd2442c9aabd3c \
                        sha256  076a83feed92d11df2b958484dac430054133f08ecfefbd9f45c8c810fbd64e6 \
                        size    110943

# some old versions of sys/cdefs.h don't have __FBSDID
xcode.build.settings    GCC_PREPROCESSOR_DEFINITIONS='__FBSDID\(s\)= '
xcode.destroot.settings GCC_PREPROCESSOR_DEFINITIONS='__FBSDID\(s\)= '
xcode.destroot.path     ${prefix}/bin

post-extract {
    reinplace "s|\$(DT_TOOLCHAIN_DIR)/usr|${prefix}|g" \
            ${worksrcpath}/${name}.xcodeproj/project.pbxproj
    foreach f [glob ${worksrcpath}/xcodescripts/*.sh] {
        reinplace "s|\"\$DSTROOT\"/\"\$DT_TOOLCHAIN_DIR\"/usr|${destroot}${prefix}|g" $f
    }
}

livecheck.type          regex
livecheck.regex         "${name}-(\[\\d.\]+)"
