llvm: use :codesign requirement symbol.

This commit is contained in:
Mike McQuaid 2018-10-13 13:14:02 -07:00
parent bdc2de66d9
commit 04f19550ef

View file

@ -1,21 +1,3 @@
class CodesignRequirement < Requirement
fatal true
satisfy(:build_env => false) do
mktemp do
FileUtils.cp "/usr/bin/false", "llvm_check"
quiet_system "/usr/bin/codesign", "-f", "-s", "lldb_codesign", "--dryrun", "llvm_check"
end
end
def message
<<~EOS
lldb_codesign identity must be available to build with LLDB.
See: https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt
EOS
end
end
class Llvm < Formula
desc "Next-gen compiler infrastructure"
homepage "https://llvm.org/"
@ -145,7 +127,11 @@ class Llvm < Formula
if build.with? "lldb"
depends_on "swig" if MacOS.version >= :lion
depends_on CodesignRequirement
depends_on :codesign => [{
:identity => "lldb_codesign",
:with => "LLDB",
:url => "https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt",
}]
end
# According to the official llvm readme, GCC 4.7+ is required