Created
May 24, 2012 15:00
-
-
Save milkypostman/2782079 to your computer and use it in GitHub Desktop.
AquaTerm Formula Supporting HEAD
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
require 'formula' | |
class Aquaterm <Formula | |
url 'http://sourceforge.net/projects/aquaterm/files/AquaTerm/v1.0.1/aquaterm_src.1.0.1.tar.gz/download' | |
homepage 'http://aquaterm.sourceforge.net/' | |
md5 'e9d3ecdfe770d6f09a748add9886d1a9' | |
version '1.0.1' | |
head 'git://aquaterm.git.sourceforge.net/gitroot/aquaterm/aquaterm' | |
def install | |
# This build is untested for ppc and ppc64 | |
productVersion = `sw_vers -productVersion`[0,4] | |
sdk = "-sdk macosx#{productVersion}" | |
archs = [] | |
parch = `uname -p`.strip | |
archs << parch | |
if Hardware.is_64_bit? then | |
case parch | |
when /ppc/ | |
archs << 'ppc64' | |
when /i386/ | |
archs << 'x86_64' | |
end | |
end | |
system "cd aquaterm; xcodebuild -target AquaTerm #{sdk} ARCHS='#{archs.join(' ')}' MACOSX_DEPLOYMENT_TARGET=''" | |
(prefix).install(Dir['build/Development/AquaTerm.app']) | |
(prefix+'Frameworks').install(Dir['build/Development/AquaTerm.framework']) | |
lib.mkpath() | |
include.mkpath() | |
aqFramework = (prefix+'Frameworks/AquaTerm.framework/Versions/A') | |
(lib+'libaquaterm.dylib').make_link aqFramework+'AquaTerm' | |
(lib+'libaquaterm.1.0.0.dylib').make_link aqFramework+'AquaTerm' | |
(include+'aquaterm').install Dir[aqFramework+'Headers/*'] | |
end | |
def caveats; <<-EOS.undent | |
AquaTerm.app installed to: | |
#{prefix} | |
To link the application to a normal Mac OS X location: | |
brew linkapps | |
or: | |
ln -s #{prefix}/AquaTerm.app /Applications | |
AquaTerm Framework was installed to: | |
#{prefix}/Frameworks/AquaTerm.framework | |
You must link to allow AquaTerm to work: | |
mkdir -p ~/Library/Frameworks | |
ln -s #{prefix+'Frameworks'}/AquaTerm.framework ~/Library/Frameworks/ | |
EOS | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment