2011-04-21 23:19:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ice < Formula
|
|
|
|
homepage 'http://www.zeroc.com'
|
2013-04-02 17:21:49 +00:00
|
|
|
url 'http://www.zeroc.com/download/Ice/3.5/Ice-3.5.0.tar.gz'
|
2013-06-30 03:27:57 +00:00
|
|
|
sha1 '699376c76cfda9ffb24c903a1ea18b789f582421'
|
2011-04-21 23:19:24 +00:00
|
|
|
|
2013-03-13 18:33:39 +00:00
|
|
|
option 'doc', 'Install documentation'
|
|
|
|
option 'demo', 'Build demos'
|
|
|
|
|
2011-04-21 23:19:24 +00:00
|
|
|
depends_on 'berkeley-db'
|
|
|
|
depends_on 'mcpp'
|
|
|
|
|
2012-06-27 23:27:20 +00:00
|
|
|
def patches
|
2013-04-02 17:21:49 +00:00
|
|
|
DATA
|
2012-06-27 23:27:20 +00:00
|
|
|
end
|
|
|
|
|
2011-04-21 23:19:24 +00:00
|
|
|
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'
|
2012-09-03 23:26:10 +00:00
|
|
|
wb += ' doc' if build.include? 'doc'
|
|
|
|
wb += ' demo' if build.include? 'demo'
|
2011-04-21 23:19:24 +00:00
|
|
|
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
|
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "cpp" do
|
2011-04-21 23:19:24 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-04-28 22:28:14 +00:00
|
|
|
|
|
|
|
__END__
|
2013-04-02 17:21:49 +00:00
|
|
|
diff -urN Ice-3.5.0.original/cpp/config/Make.rules.Darwin Ice-3.5.0/cpp/config/Make.rules.Darwin
|
|
|
|
--- ./cpp/config/Make.rules.Darwin 2013-03-11 15:19:46.000000000 +0000
|
|
|
|
+++ ./cpp/config/Make.rules.Darwin 2013-04-02 18:03:40.000000000 +0100
|
|
|
|
@@ -11,25 +11,18 @@
|
|
|
|
# This file is included by Make.rules when uname is Darwin.
|
|
|
|
#
|
|
|
|
|
|
|
|
-CXX = xcrun clang++
|
|
|
|
+CXX ?= g++
|
|
|
|
|
|
|
|
CXXFLAGS = -Wall -Werror -D_REENTRANT
|
|
|
|
|
|
|
|
ifeq ($(OPTIMIZE),yes)
|
|
|
|
- #
|
|
|
|
- # By default we build binaries with both architectures when optimization is enabled.
|
|
|
|
- #
|
|
|
|
- ifeq ($(CXXARCHFLAGS),)
|
|
|
|
- CXXARCHFLAGS := -arch i386 -arch x86_64
|
|
|
|
- endif
|
|
|
|
- CXXFLAGS := $(CXXARCHFLAGS) -O2 -DNDEBUG $(CXXFLAGS)
|
|
|
|
+ CXXFLAGS := -O2 -DNDEBUG $(CXXFLAGS)
|
|
|
|
else
|
|
|
|
- CXXFLAGS := $(CXXARCHFLAGS) -g $(CXXFLAGS)
|
|
|
|
+ CXXFLAGS := -g $(CXXFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CPP11), yes)
|
|
|
|
CPPFLAGS += --std=c++11
|
|
|
|
- CXXFLAGS += --stdlib=libc++
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
@@ -72,7 +65,7 @@
|
|
|
|
ICEUTIL_OS_LIBS = -lpthread
|
|
|
|
ICE_OS_LIBS = -ldl
|
|
|
|
|
|
|
|
-PLATFORM_HAS_READLINE := no
|
|
|
|
+PLATFORM_HAS_READLINE := yes
|
|
|
|
|
|
|
|
#
|
|
|
|
# QT is used only for the deprecated IceGrid and IceStorm SQL plugins
|