Skip to content

Instantly share code, notes, and snippets.

@seanchas116
Created June 22, 2013 11:58
Show Gist options
  • Save seanchas116/5840630 to your computer and use it in GitHub Desktop.
Save seanchas116/5840630 to your computer and use it in GitHub Desktop.
A libc++ formula for Homebrew Add "-L/usr/local/lib -I/usr/local/lib/c++/v1" to use
require 'formula'
class Libcxx < Formula
homepage 'http://llvm.org/'
url 'http://llvm.org/releases/3.3/libcxx-3.3.src.tar.gz'
sha1 '7bea00bc1031bf3bf6c248e57c1f4e0874c18c04'
def install
cd './lib' do
ENV["TRIPLE"] = '-apple-'
system './buildit'
end
libcxx_name = 'libc++.1.dylib'
libcxx_shorten_name = 'libc++.dylib'
lib.install buildpath/'lib'/libcxx_name
lib.install buildpath/'lib'/libcxx_shorten_name
system "install_name_tool -id #{lib/libcxx_name} #{lib/libcxx_name}"
(lib/'c++').install buildpath/'include'
FileUtils.mv lib/'c++/include', lib/'c++/v1'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment