homebrew-core/Formula/jstalk.rb
Charlie Sharpsteen 1a42f893ab XCodeDependency: Things that call xcodebuild
Anything that calls `xcodebuild` needs a full install of XCode.app. Two
formulae ommitted from this patch:

  - `fuse4x_kext`: Everything that depends on the kernel extension can be
    compiled by the CLT. Therefore, this formula is bottled and XCode is only
    needed to produce the bottles.

  - `graphviz`: XCode is only used to create GraphViz.app which is not used by
    any of the things which depend on `graphviz`. Creating the app should be
    made into an option.
2012-08-24 19:38:04 -07:00

49 lines
1.2 KiB
Ruby

require 'formula'
class NeedsSnowLeopard < Requirement
def satisfied?
MacOS.snow_leopard?
end
def message
"jstalk requires Mac OS X 10.6 or newer"
end
end
class Jstalk < Formula
homepage 'http://jstalk.org/'
url 'https://github.com/ccgus/jstalk.git', :tag => "v1.0.1"
version '1.0.1'
depends_on NeedsSnowLeopard.new
depends_on :xcode # For working xcodebuild.
def install
["JSTalk Framework", "jstalk command line", "JSTalk Editor"].each do |t|
system "xcodebuild", "-target", t, "-configuration", "Release", "ONLY_ACTIVE_ARCH=YES", "SYMROOT=build"
end
cd 'build/Release' do
bin.install 'jstalk'
prefix.install "JSTalk Editor.app"
(prefix+'Frameworks').install 'JSTalk.framework'
end
end
def caveats; <<-EOS.undent
Framework JSTalk was installed to:
#{prefix}/Frameworks/JSTalk.framework
You may want to symlink this Framework to a standard OS X location,
such as:
mkdir ~/Frameworks
ln -s "#{prefix}/Frameworks/JSTalk.framework" ~/Frameworks
JSTalk Editor.app was installed in:
#{prefix}
To symlink into ~/Applications, you can do:
brew linkapps
EOS
end
end