2014-07-28 04:54:45 +00:00
|
|
|
require "formula"
|
2013-03-11 00:33:21 +00:00
|
|
|
|
2013-03-11 00:37:52 +00:00
|
|
|
# The system versions are too old to build ld64
|
2013-03-11 00:33:21 +00:00
|
|
|
class CctoolsHeaders < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "cctools-headers via Apple"
|
2014-07-28 04:54:45 +00:00
|
|
|
homepage "https://opensource.apple.com/"
|
|
|
|
url "https://opensource.apple.com/tarballs/cctools/cctools-855.tar.gz"
|
|
|
|
sha1 "b6997939aa9f4f3c4ac70ec819e719330dcd7bcb"
|
2013-03-11 00:33:21 +00:00
|
|
|
|
|
|
|
keg_only :provided_by_osx
|
|
|
|
|
2014-07-28 04:54:45 +00:00
|
|
|
resource "headers" do
|
|
|
|
url "https://opensource.apple.com/tarballs/xnu/xnu-2422.90.20.tar.gz"
|
|
|
|
sha1 "4aa6b80cc0ff6f9b27825317922b51c5f33d5bae"
|
2013-08-07 05:39:56 +00:00
|
|
|
end
|
|
|
|
|
2013-03-11 00:33:21 +00:00
|
|
|
def install
|
|
|
|
# only supports DSTROOT, not PREFIX
|
|
|
|
inreplace "include/Makefile", "/usr/include", "/include"
|
|
|
|
system "make", "installhdrs", "DSTROOT=#{prefix}", "RC_ProjectSourceVersion=#{version}"
|
|
|
|
# installs some headers we don't need to DSTROOT/usr/local/include
|
2014-07-28 04:54:45 +00:00
|
|
|
(prefix/"usr").rmtree
|
2013-03-11 00:33:21 +00:00
|
|
|
|
2013-08-07 05:39:56 +00:00
|
|
|
# ld64 requires an updated mach/machine.h to build
|
2014-07-28 04:54:45 +00:00
|
|
|
resource("headers").stage {(include/"mach").install "osfmk/mach/machine.h"}
|
2013-03-11 00:33:21 +00:00
|
|
|
end
|
|
|
|
end
|