2011-07-21 19:19:51 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-12-15 04:13:34 +00:00
|
|
|
class LionOrNewer < Requirement
|
2013-01-19 01:30:43 +00:00
|
|
|
fatal true
|
|
|
|
|
2013-01-20 02:45:59 +00:00
|
|
|
satisfy MacOS.version >= :lion
|
|
|
|
|
2012-12-15 04:13:34 +00:00
|
|
|
def message
|
|
|
|
"Appledoc requires Mac OS X 10.7 (Lion) or newer."
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-07-21 19:19:51 +00:00
|
|
|
class Appledoc < Formula
|
2012-09-01 19:42:00 +00:00
|
|
|
homepage 'http://appledoc.gentlebytes.com/'
|
2012-09-26 17:04:12 +00:00
|
|
|
url "https://github.com/tomaz/appledoc/tarball/v2.1"
|
|
|
|
sha1 'd3bd05ce3f7b755cd0dfcb15316bc9f667c1ff2f'
|
2012-09-01 19:42:00 +00:00
|
|
|
|
2011-07-21 19:19:51 +00:00
|
|
|
head 'https://github.com/tomaz/appledoc.git', :branch => 'master'
|
|
|
|
|
2012-08-24 20:40:24 +00:00
|
|
|
depends_on :xcode # For working xcodebuild.
|
2013-01-27 22:53:24 +00:00
|
|
|
depends_on LionOrNewer
|
2012-08-24 20:40:24 +00:00
|
|
|
|
2011-07-21 19:19:51 +00:00
|
|
|
def install
|
2012-05-15 21:15:46 +00:00
|
|
|
system "xcodebuild", "-project", "appledoc.xcodeproj",
|
|
|
|
"-target", "appledoc",
|
|
|
|
"-configuration", "Release",
|
2012-08-22 22:47:31 +00:00
|
|
|
"clean", "install",
|
2012-05-15 21:15:46 +00:00
|
|
|
"SYMROOT=build",
|
|
|
|
"DSTROOT=build",
|
2012-08-22 22:47:31 +00:00
|
|
|
"INSTALL_PATH=/bin",
|
|
|
|
"OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'"
|
2011-07-21 19:19:51 +00:00
|
|
|
bin.install "build/bin/appledoc"
|
|
|
|
prefix.install "Templates/"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/appledoc", "--version"
|
2011-07-21 19:19:51 +00:00
|
|
|
end
|
|
|
|
end
|