forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adam Vandenberg <[email protected]>
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
require 'formula' | ||
|
||
class Jstalk < Formula | ||
url 'git:https://github.com/ccgus/jstalk.git', :tag => "v1.0.1" | ||
homepage 'http:https://jstalk.org/' | ||
version '1.0.1' | ||
|
||
def install | ||
if MACOS_VERSION < 10.6 | ||
onoe "jstalk requires Mac OS X 10.6+" | ||
exit 1 | ||
end | ||
|
||
# JSTalk specifies its particular compiler needs in jstalk.xcodeproj | ||
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| | ||
system "xcodebuild", "-target", target, *args | ||
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 |