2011-04-21 23:19:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ice < Formula
|
|
|
|
homepage 'http://www.zeroc.com'
|
2013-10-09 09:24:30 +00:00
|
|
|
url 'http://www.zeroc.com/download/Ice/3.5/Ice-3.5.1.tar.gz'
|
|
|
|
sha1 '63599ea22a1e9638a49356682c9e516b7c2c454f'
|
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'
|
2013-10-09 09:24:30 +00:00
|
|
|
depends_on :python
|
2011-04-21 23:19:24 +00:00
|
|
|
|
2013-11-19 19:39:27 +00:00
|
|
|
# 1. TODO: document the first patch
|
|
|
|
# 2. Patch to fix build with libc++, reported upstream:
|
|
|
|
# http://www.zeroc.com/forums/bug-reports/6152-mavericks-build-failure-because-unexported-symbols.html
|
|
|
|
def patches; DATA; end
|
2012-06-27 23:27:20 +00:00
|
|
|
|
2011-04-21 23:19:24 +00:00
|
|
|
def install
|
|
|
|
ENV.O2
|
|
|
|
|
2013-10-09 09:24:30 +00:00
|
|
|
# what do we want to build?
|
2011-04-21 23:19:24 +00:00
|
|
|
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
|
|
|
|
|
2013-10-09 09:24:30 +00:00
|
|
|
args = %W[
|
|
|
|
prefix=#{prefix}
|
2013-11-08 02:11:44 +00:00
|
|
|
install_mandir=#{man1}
|
2013-10-09 09:24:30 +00:00
|
|
|
install_slicedir=#{share}/Ice-3.5/slice
|
|
|
|
embedded_runpath_prefix=#{prefix}
|
|
|
|
OPTIMIZE=yes
|
|
|
|
]
|
|
|
|
args << "CXXFLAGS=#{ENV.cflags} -Wall -D_REENTRANT"
|
2011-04-21 23:19:24 +00:00
|
|
|
|
2013-11-16 01:07:58 +00:00
|
|
|
# Unset ICE_HOME as it interferes with the build
|
|
|
|
ENV.delete('ICE_HOME')
|
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "cpp" do
|
2013-10-09 09:24:30 +00:00
|
|
|
system "make", *args
|
|
|
|
system "make", "install", *args
|
|
|
|
end
|
2014-01-04 13:07:29 +00:00
|
|
|
args << "install_pythondir=#{lib}/python2.7/site-packages"
|
|
|
|
args << "install_libdir=#{lib}/python2.7/site-packages"
|
2013-10-09 09:24:30 +00:00
|
|
|
cd "py" do
|
|
|
|
system "make", *args
|
|
|
|
system "make", "install", *args
|
2011-04-21 23:19:24 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-04-28 22:28:14 +00:00
|
|
|
|
|
|
|
__END__
|
2013-10-09 09:24:30 +00:00
|
|
|
diff -urN Ice-3.5.1.original/cpp/config/Make.rules.Darwin Ice-3.5.1/cpp/config/Make.rules.Darwin
|
|
|
|
--- Ice-3.5.1.original/cpp/config/Make.rules.Darwin 2013-10-04 16:48:14.000000000 +0100
|
|
|
|
+++ Ice-3.5.1/cpp/config/Make.rules.Darwin 2013-10-09 10:09:32.000000000 +0100
|
|
|
|
@@ -11,26 +11,19 @@
|
2013-04-02 17:21:49 +00:00
|
|
|
# This file is included by Make.rules when uname is Darwin.
|
|
|
|
#
|
|
|
|
|
|
|
|
-CXX = xcrun clang++
|
|
|
|
+CXX ?= g++
|
|
|
|
|
2013-10-09 09:24:30 +00:00
|
|
|
CPPFLAGS += -pthread
|
|
|
|
CXXFLAGS += -Wall -Werror
|
2013-04-02 17:21:49 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
#
|
2013-10-09 09:24:30 +00:00
|
|
|
diff -urN Ice-3.5.1.original/py/config/Make.rules.Darwin Ice-3.5.1/py/config/Make.rules.Darwin
|
|
|
|
--- Ice-3.5.1.original/py/config/Make.rules.Darwin 2013-10-04 16:48:15.000000000 +0100
|
|
|
|
+++ Ice-3.5.1/py/config/Make.rules.Darwin 2013-10-10 12:09:45.000000000 +0100
|
|
|
|
@@ -17,19 +17,3 @@
|
|
|
|
mksoname = $(if $(2),lib$(1).$(2).so,lib$(1).so)
|
|
|
|
mklibname = lib$(1).so
|
2013-04-02 17:21:49 +00:00
|
|
|
|
2013-10-09 09:24:30 +00:00
|
|
|
-#
|
|
|
|
-# We require Python to be built as a Framework for the IcePy plug-in.
|
|
|
|
-#
|
|
|
|
-ifneq ($(PYTHON_HOME),)
|
|
|
|
- ifeq ($(shell test ! -f $(PYTHON_HOME)/Python && echo 0),0)
|
|
|
|
- $(error Unable to find Python framework See config/Make.rules.Darwin)
|
|
|
|
- endif
|
|
|
|
- PYTHON_LIBS = -F$(patsubst %/Python.framework/Versions/,%,$(dir $(PYTHON_HOME))) -framework Python
|
|
|
|
-else
|
|
|
|
- XCODE_PATH = $(shell xcode-select --print-path)
|
|
|
|
- SDKS_DIR = $(XCODE_PATH)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
|
|
|
|
- PYTHON_HOME = $(SDKS_DIR)/System/Library/Frameworks/Python.framework/Versions/Current
|
|
|
|
- PYTHON_LIBS = -framework Python
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
-PYTHON_INCLUDE_DIR = $(PYTHON_HOME)/include/$(PYTHON_VERSION)
|
2013-11-15 00:32:15 +00:00
|
|
|
diff -urN Ice-3.5.1.original/cpp/src/IceGrid/DescriptorHelper.h Ice-3.5.1/cpp/src/IceGrid/DescriptorHelper.h
|
|
|
|
--- Ice-3.5.1.original/cpp/src/IceGrid/DescriptorHelper.h 2013-10-04 16:48:14.000000000 +0100
|
|
|
|
+++ Ice-3.5.1/cpp/src/IceGrid/DescriptorHelper.h 2013-11-15 00:11:22.000000000 +0000
|
|
|
|
@@ -247,7 +247,6 @@
|
|
|
|
ServerInstanceHelper(const ServerInstanceDescriptor&, const Resolver&, bool);
|
|
|
|
ServerInstanceHelper(const ServerDescriptorPtr&, const Resolver&, bool);
|
|
|
|
|
|
|
|
- void operator=(const ServerInstanceHelper&);
|
|
|
|
bool operator==(const ServerInstanceHelper&) const;
|
|
|
|
bool operator!=(const ServerInstanceHelper&) const;
|
|
|
|
|
|
|
|
@@ -265,7 +264,7 @@
|
|
|
|
|
|
|
|
void init(const ServerDescriptorPtr&, const Resolver&, bool);
|
|
|
|
|
|
|
|
- const ServerInstanceDescriptor _def;
|
|
|
|
+ ServerInstanceDescriptor _def;
|
|
|
|
std::string _id;
|
|
|
|
ServerInstanceDescriptor _instance;
|
|
|
|
|