# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
github.setup jpsim SourceKitten 0.17.6
description An adorable little framework and command line tool for \
interacting with SourceKit.
long_description ${description}
# Fetch from git instead of distfile because it needs submodules
# everything is built during the prefix_install target
file mkdir ${destroot}${prefix}/Frameworks/
system -W ${worksrcpath} "${build.cmd} prefix_install PREFIX=${destroot}${prefix} TEMPORARY_FOLDER=${destroot} XCODEFLAGS=\"-workspace 'SourceKitten.xcworkspace' -scheme 'sourcekitten' DSTROOT=${destroot} -IDECustomDerivedDataLocation=${worksrcpath}/custombuild OTHER_LDFLAGS='-Wl,-headerpad_max_install_names'\""
delete ${destroot}${prefix}/var
xinstall -d ${destroot}${prefix}/Library
move ${destroot}${prefix}/Frameworks ${destroot}${prefix}/Library/
system -W ${destroot}${prefix}/bin "install_name_tool -add_rpath @executable_path/../Library/Frameworks sourcekitten"
system -W ${destroot}${prefix}/bin "install_name_tool -add_rpath @executable_path/../Library/Frameworks/SourceKittenFramework.framework/Versions/Current/Frameworks sourcekitten"