aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorChristian Eager2010-11-21 18:02:52 -0500
committerMike McQuaid2010-11-22 22:40:17 +0000
commita5b9fab92855dab2d4b21575fda434a111d9890c (patch)
tree3828ec350851fcabcdbfc4a5a3176321c3504650 /Library
parent049f7e443e3334a79ff4c2e31b8d05ab148b5bc1 (diff)
downloadhomebrew-a5b9fab92855dab2d4b21575fda434a111d9890c.tar.bz2
New formula: JSTalk
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/jstalk.rb66
1 files changed, 66 insertions, 0 deletions
diff --git a/Library/Formula/jstalk.rb b/Library/Formula/jstalk.rb
new file mode 100644
index 000000000..591dbd43f
--- /dev/null
+++ b/Library/Formula/jstalk.rb
@@ -0,0 +1,66 @@
+require 'formula'
+
+class Jstalk <Formula
+ homepage 'http://jstalk.org'
+ head 'git://github.com/ccgus/jstalk.git'
+ url 'http://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://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