PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Library/Formula/ice.rb

https://gitlab.com/sheldonels/homebrew
Ruby | 158 lines | 138 code | 15 blank | 5 comment | 2 complexity | 20ce08d1ef02a0e868bcaa7c3b7710b3 MD5 | raw file
  1. require 'formula'
  2. class Ice < Formula
  3. homepage 'http://www.zeroc.com'
  4. url 'http://www.zeroc.com/download/Ice/3.5/Ice-3.5.1.tar.gz'
  5. sha1 '63599ea22a1e9638a49356682c9e516b7c2c454f'
  6. option 'doc', 'Install documentation'
  7. option 'demo', 'Build demos'
  8. depends_on 'berkeley-db'
  9. depends_on 'mcpp'
  10. depends_on :python
  11. # 1. TODO: document the first patch
  12. # 2. Patch to fix build with libc++, reported upstream:
  13. # http://www.zeroc.com/forums/bug-reports/6152-mavericks-build-failure-because-unexported-symbols.html
  14. def patches; DATA; end
  15. def install
  16. ENV.O2
  17. # what do we want to build?
  18. wb = 'config src include'
  19. wb += ' doc' if build.include? 'doc'
  20. wb += ' demo' if build.include? 'demo'
  21. inreplace "cpp/Makefile" do |s|
  22. s.change_make_var! "SUBDIRS", wb
  23. end
  24. args = %W[
  25. prefix=#{prefix}
  26. install_mandir=#{man1}
  27. install_slicedir=#{share}/Ice-3.5/slice
  28. embedded_runpath_prefix=#{prefix}
  29. OPTIMIZE=yes
  30. ]
  31. args << "CXXFLAGS=#{ENV.cflags} -Wall -D_REENTRANT"
  32. # Unset ICE_HOME as it interferes with the build
  33. ENV.delete('ICE_HOME')
  34. cd "cpp" do
  35. system "make", *args
  36. system "make", "install", *args
  37. end
  38. cd "php" do
  39. system "make", *args
  40. system "make", "install", *args
  41. end
  42. args << "install_pythondir=#{lib}/python2.7/site-packages"
  43. args << "install_libdir=#{lib}/python2.7/site-packages"
  44. cd "py" do
  45. system "make", *args
  46. system "make", "install", *args
  47. end
  48. end
  49. def caveats
  50. <<-EOS.undent
  51. To enable IcePHP, you will need to change your php.ini
  52. to load the IcePHP extension. You can do this by adding
  53. IcePHP.dy to your list of extensions:
  54. extension=#{prefix}/php/IcePHP.dy
  55. Typical Ice PHP scripts will also expect to be able to 'require Ice.php'.
  56. You can ensure this is possible by appending the path to
  57. Ice's PHP includes to your global include_path in php.ini:
  58. include_path=<your-original-include-path>:#{prefix}/php
  59. However, you can also accomplish this on a script-by-script basis
  60. or via .htaccess if you so desire...
  61. EOS
  62. end
  63. end
  64. __END__
  65. diff -urN Ice-3.5.1.original/cpp/config/Make.rules.Darwin Ice-3.5.1/cpp/config/Make.rules.Darwin
  66. --- Ice-3.5.1.original/cpp/config/Make.rules.Darwin 2013-10-04 16:48:14.000000000 +0100
  67. +++ Ice-3.5.1/cpp/config/Make.rules.Darwin 2013-10-09 10:09:32.000000000 +0100
  68. @@ -11,26 +11,19 @@
  69. # This file is included by Make.rules when uname is Darwin.
  70. #
  71. -CXX = xcrun clang++
  72. +CXX ?= g++
  73. CPPFLAGS += -pthread
  74. CXXFLAGS += -Wall -Werror
  75. ifeq ($(OPTIMIZE),yes)
  76. - #
  77. - # By default we build binaries with both architectures when optimization is enabled.
  78. - #
  79. - ifeq ($(CXXARCHFLAGS),)
  80. - CXXARCHFLAGS := -arch i386 -arch x86_64
  81. - endif
  82. - CXXFLAGS := $(CXXARCHFLAGS) -O2 -DNDEBUG $(CXXFLAGS)
  83. + CXXFLAGS := -O2 -DNDEBUG $(CXXFLAGS)
  84. else
  85. - CXXFLAGS := $(CXXARCHFLAGS) -g $(CXXFLAGS)
  86. + CXXFLAGS := -g $(CXXFLAGS)
  87. endif
  88. ifeq ($(CPP11), yes)
  89. CPPFLAGS += --std=c++11
  90. - CXXFLAGS += --stdlib=libc++
  91. endif
  92. #
  93. diff -urN Ice-3.5.1.original/py/config/Make.rules.Darwin Ice-3.5.1/py/config/Make.rules.Darwin
  94. --- Ice-3.5.1.original/py/config/Make.rules.Darwin 2013-10-04 16:48:15.000000000 +0100
  95. +++ Ice-3.5.1/py/config/Make.rules.Darwin 2013-10-10 12:09:45.000000000 +0100
  96. @@ -17,19 +17,3 @@
  97. mksoname = $(if $(2),lib$(1).$(2).so,lib$(1).so)
  98. mklibname = lib$(1).so
  99. -#
  100. -# We require Python to be built as a Framework for the IcePy plug-in.
  101. -#
  102. -ifneq ($(PYTHON_HOME),)
  103. - ifeq ($(shell test ! -f $(PYTHON_HOME)/Python && echo 0),0)
  104. - $(error Unable to find Python framework See config/Make.rules.Darwin)
  105. - endif
  106. - PYTHON_LIBS = -F$(patsubst %/Python.framework/Versions/,%,$(dir $(PYTHON_HOME))) -framework Python
  107. -else
  108. - XCODE_PATH = $(shell xcode-select --print-path)
  109. - SDKS_DIR = $(XCODE_PATH)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
  110. - PYTHON_HOME = $(SDKS_DIR)/System/Library/Frameworks/Python.framework/Versions/Current
  111. - PYTHON_LIBS = -framework Python
  112. -endif
  113. -
  114. -PYTHON_INCLUDE_DIR = $(PYTHON_HOME)/include/$(PYTHON_VERSION)
  115. diff -urN Ice-3.5.1.original/cpp/src/IceGrid/DescriptorHelper.h Ice-3.5.1/cpp/src/IceGrid/DescriptorHelper.h
  116. --- Ice-3.5.1.original/cpp/src/IceGrid/DescriptorHelper.h 2013-10-04 16:48:14.000000000 +0100
  117. +++ Ice-3.5.1/cpp/src/IceGrid/DescriptorHelper.h 2013-11-15 00:11:22.000000000 +0000
  118. @@ -247,7 +247,6 @@
  119. ServerInstanceHelper(const ServerInstanceDescriptor&, const Resolver&, bool);
  120. ServerInstanceHelper(const ServerDescriptorPtr&, const Resolver&, bool);
  121. - void operator=(const ServerInstanceHelper&);
  122. bool operator==(const ServerInstanceHelper&) const;
  123. bool operator!=(const ServerInstanceHelper&) const;
  124. @@ -265,7 +264,7 @@
  125. void init(const ServerDescriptorPtr&, const Resolver&, bool);
  126. - const ServerInstanceDescriptor _def;
  127. + ServerInstanceDescriptor _def;
  128. std::string _id;
  129. ServerInstanceDescriptor _instance;