homepage http://opensource.apple.com/source/${name}/
master_sites http://opensource.apple.com/tarballs/${name}/
description Darwin Core OS Bootstrap Commands
long_description Bootstrapping tools like the Mach Interface \
Generator (MIG) required to build the XNU kernel.
checksums rmd160 fca2a2bd26a1ca825e25281322914b70d3485278 \
sha256 8b8be9a719c60e532454a4fc614e74140ff10a822855b5e6c123872a4d122077
xcode.destroot.path ${prefix}/bin
patchfiles cc_fallback.patch
# for replath and decomment
checksums rmd160 072e399562eb021e4fa0cd66132153afcc02f417 \
sha256 2ae65cd2ca6f0f684b25aad46a649aeb95a774d06a8287c59962fba42900a2fc
xcode.project migcom.tproj/migcom.xcodeproj
file delete ${worksrcpath}/Makefile
system "CC=${configure.cc} make -C ${worksrcpath} decomment.tproj/decomment relpath.tproj/relpath"
catch {file rename ${worksrcpath}/migcom.tproj/build/UninstalledProducts/migcom ${destroot}${prefix}/bin/}
file rename ${destroot}${prefix}/bin/migcom ${destroot}${prefix}/libexec/migcom
file rename ${worksrcpath}/decomment.tproj/decomment ${destroot}${prefix}/bin/
file rename ${worksrcpath}/relpath.tproj/relpath ${destroot}${prefix}/bin/
file rename ${worksrcpath}/migcom.tproj/mig.sh ${destroot}${prefix}/bin/mig
file rename ${worksrcpath}/migcom.tproj/mig.1 ${worksrcpath}/migcom.tproj/migcom.1 \
${destroot}${prefix}/share/man/man1/
xcode.project mig.xcodeproj
reinplace "s|\$(DT_TOOLCHAIN_DIR)/usr|${prefix}|g" \
${worksrcpath}/mig.xcodeproj/project.pbxproj
foreach f [glob ${worksrcpath}/xcodescripts/*.sh] {
reinplace "s|\$DSTROOT/\$DT_TOOLCHAIN_DIR/usr|${destroot}${prefix}|g" $f
file rename ${destroot}${prefix}/bin/migcom ${destroot}${prefix}/libexec/migcom
livecheck.regex "${name}-(\[\\d.\]+)"