diff options
| author | Michael Dippery | 2010-09-24 15:49:29 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2010-10-19 21:52:54 -0700 |
| commit | 9fd4464f42572a5b80b290f625e64791f5f8a6e3 (patch) | |
| tree | dbbe3690e65cf5e541257439c70e2b0d6cde5891 /Library/Formula | |
| parent | 121b053f54d378e788c75acca662a927ac154fb5 (diff) | |
| download | homebrew-9fd4464f42572a5b80b290f625e64791f5f8a6e3.tar.bz2 | |
Added fortress
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/fortress.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Library/Formula/fortress.rb b/Library/Formula/fortress.rb new file mode 100644 index 000000000..0c9f1cdeb --- /dev/null +++ b/Library/Formula/fortress.rb @@ -0,0 +1,50 @@ +require 'formula' + +class UnsafeSubversionDownloadStrategy < SubversionDownloadStrategy + def _fetch_command(svncommand, url, target) + [ + svn, '--non-interactive', '--trust-server-cert', + svncommand, '--force', url, target + ] + end +end + +class Fortress < Formula + url 'https://projectfortress.sun.com/svn/Community/tags/1.0', + :using => UnsafeSubversionDownloadStrategy + + homepage 'http://projectfortress.sun.com/' + version '1.0' + + head 'https://projectfortress.sun.com/svn/Community/trunk', + :using => UnsafeSubversionDownloadStrategy + + def install + # Yes it's crazy, but if FORTRESS_HOME is set while building + # compilation will fail. + ENV.delete 'FORTRESS_HOME' if ENV['FORTRESS_HOME'] + + system './ant', 'clean', 'compile' + rm_f Dir['bin/fortress.bat'] + + libexec.install Dir['bin'] + + project_fortress=libexec+'ProjectFortress' + project_fortress.install Dir['ProjectFortress/build'] + third_party = project_fortress+'third_party' + + ['junit', 'xtc', 'jsr166y', 'plt'].each do |pkg| + (third_party+pkg).install Dir["ProjectFortress/third_party/#{pkg}/#{pkg}.jar"] + end + + bin.mkpath + Dir["#{libexec}/bin/*"].each { |f| ln_s f, bin } + end + + def caveats + <<-EOS.undent + You should set the environment variable FORTRESS_HOME to + #{libexec} + EOS + end +end |
