diff options
| author | Harry Gabriel | 2011-04-22 01:19:24 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2011-12-21 15:47:52 -0800 |
| commit | a64c3f3825274c8277f6678c4526e09337f27e40 (patch) | |
| tree | ed03128198037d7bbc2685af75393a3460e7504b /Library | |
| parent | f82537e93c9307a23234afbfd33e94d9884f7fed (diff) | |
| download | homebrew-a64c3f3825274c8277f6678c4526e09337f27e40.tar.bz2 | |
ice 3.4.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ice.rb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/ice.rb b/Library/Formula/ice.rb new file mode 100644 index 000000000..f8564cdb1 --- /dev/null +++ b/Library/Formula/ice.rb @@ -0,0 +1,48 @@ +require 'formula' + +class Ice < Formula + url 'http://www.zeroc.com/download/Ice/3.4/Ice-3.4.1.tar.gz' + homepage 'http://www.zeroc.com' + md5 '3aae42aa47dec74bb258c1a1b2847a1a' + + depends_on 'berkeley-db' + depends_on 'mcpp' + + def patches + # Patch for Ice-3.4.1 to work with Berkely DB 5.X. + "http://gist.github.com/raw/459204/44183ae997afb8ec19148fec498a11d67b5ae8bf/Ice-3.4.1-db5.patch" + end + + def options + [ + ['--doc', 'Install documentation'], + ['--demo', 'Build demos'] + ] + end + + def install + ENV.O2 + inreplace "cpp/config/Make.rules" do |s| + s.gsub! "#OPTIMIZE", "OPTIMIZE" + s.gsub! "/opt/Ice-$(VERSION)", prefix + s.gsub! "/opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)", prefix + end + + # what want we build? + wb = 'config src include' + wb += ' doc' if ARGV.include? '--doc' + wb += ' demo' if ARGV.include? '--demo' + inreplace "cpp/Makefile" do |s| + s.change_make_var! "SUBDIRS", wb + end + + inreplace "cpp/config/Make.rules.Darwin" do |s| + s.change_make_var! "CXXFLAGS", "#{ENV.cflags} -Wall -D_REENTRANT" + end + + Dir.chdir "cpp" do + system "make" + system "make install" + end + end +end |
