Skip to content

Commit

Permalink
New formula: JSTalk
Browse files Browse the repository at this point in the history
Signed-off-by: Mike McQuaid <[email protected]>
  • Loading branch information
eager authored and MikeMcQuaid committed Nov 22, 2010
1 parent 049f7e4 commit a5b9fab
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions Library/Formula/jstalk.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
require 'formula'

class Jstalk <Formula
homepage 'http:https://jstalk.org'
head 'git:https://github.com/ccgus/jstalk.git'
url 'http:https://jstalk.org/download/JSTalkPreview.zip'
version '1.0b'
md5 '405ffbb0f37b8244461b3872cc8d76fa'

def install

if ARGV.build_head?
ENV.delete 'CC'
ENV.delete 'CXX'

args = ["-configuration", "Release", "ONLY_ACTIVE_ARCH=YES"]
targets = ["JSTalk Framework", "jstalk command line", "JSTalk Editor"]

targets.each do |target|
# Workaround
# http:https://jstalk.lighthouseapp.com/projects/26692-jstalk/tickets/25
args << "CC=/usr/bin/clang" if target == "JSTalk Editor"
system "xcodebuild", "-target", target, *args
end

cd 'build/Release' do
bin.install 'jstalk'
prefix.install "JSTalk Editor.app"
prefix.install "JSTalk.framework"
end

else
bin.install 'jstalk'
prefix.install Dir['*']
end

cd prefix do
mkdir 'Frameworks'; mv 'JSTalk.framework', 'Frameworks'
end
end

def caveats
framework_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
EOS

general_caveats = <<-EOS.undent
JSTalk Editor.app was installed in:
#{prefix}
To symlink into ~/Applications, you can do:
brew linkapps
EOS

return general_caveats + framework_caveats
end

end

0 comments on commit a5b9fab

Please sign in to comment.