f0c9b700d4
Closes Homebrew/homebrew#16582.
41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
Ruby
require 'formula'
|
|
|
|
class LionOrNewer < Requirement
|
|
def satisfied?
|
|
MacOS.version >= :lion
|
|
end
|
|
def fatal?
|
|
true
|
|
end
|
|
def message
|
|
"Appledoc requires Mac OS X 10.7 (Lion) or newer."
|
|
end
|
|
end
|
|
|
|
class Appledoc < Formula
|
|
homepage 'http://appledoc.gentlebytes.com/'
|
|
url "https://github.com/tomaz/appledoc/tarball/v2.1"
|
|
sha1 'd3bd05ce3f7b755cd0dfcb15316bc9f667c1ff2f'
|
|
|
|
head 'https://github.com/tomaz/appledoc.git', :branch => 'master'
|
|
|
|
depends_on :xcode # For working xcodebuild.
|
|
depends_on LionOrNewer.new
|
|
|
|
def install
|
|
system "xcodebuild", "-project", "appledoc.xcodeproj",
|
|
"-target", "appledoc",
|
|
"-configuration", "Release",
|
|
"clean", "install",
|
|
"SYMROOT=build",
|
|
"DSTROOT=build",
|
|
"INSTALL_PATH=/bin",
|
|
"OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'"
|
|
bin.install "build/bin/appledoc"
|
|
prefix.install "Templates/"
|
|
end
|
|
|
|
def test
|
|
system "#{bin}/appledoc", "--version"
|
|
end
|
|
end
|