homebrew-core/Formula/cctools-headers.rb

27 lines
902 B
Ruby
Raw Normal View History

2013-03-11 00:33:21 +00:00
require 'formula'
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
homepage 'http://opensource.apple.com/'
url 'http://www.opensource.apple.com/tarballs/cctools/cctools-836.tar.gz'
sha1 'fe2aab3f527adf6c775462ac045699a150dc7f82'
keg_only :provided_by_osx
2013-08-07 05:39:56 +00:00
resource 'headers' do
url 'http://opensource.apple.com/tarballs/xnu/xnu-2050.18.24.tar.gz'
sha1 '3a2a0b3629cb215b17aca3bb365b8b10b8b408fe'
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
(prefix/'usr').rmtree
2013-08-07 05:39:56 +00:00
# ld64 requires an updated mach/machine.h to build
resource('headers').stage {(include/'mach').install 'osfmk/mach/machine.h'}
2013-03-11 00:33:21 +00:00
end
end