Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New Formula: omniORB #15119

Closed
wants to merge 1 commit into from

5 participants

@guitorri

omniORB is a robust high performance CORBA ORB for C++ and Python.
Python is required by the omniORB IDL compiler.

The omniORBpy Python mapping needs to be installed whithin the omniORB prefix.
omniORBpy is required in order to reach CORBA from Python.

The user needs to amend the PYTHONPATH in order to use both packages.

Formula tested on Snow-Leopard.

fixes on onmiorb formula

added a function to get the prefix of omniORB to be displayed
on the caveats.

Small fixes to comply to current formula style.

@guitorri guitorri referenced this pull request
Closed

New Formula: omniORB #13277

@guitorri

Re-opening pull request with changes proposed at:
#13277

@guitorri

Better this way?

Library/Formula/omniorb.rb
((31 lines not shown))
+ system "make install"
+ end
+ end
+ end
+
+ def caveats
+ s = ''
+ if build.include? 'python'
+ s += <<-EOS.undent
+ The Python mappings won't function until you amend your PYTHONPATH like so:
+ export PYTHONPATH="#{`brew --prefix omniorb`.strip}/src/lib/lib/#{which_python}/site-packages:$PYTHONPATH"
+
+ If you get an error like:
+ $ omniidl: Could not import back-end 'python'
+ You might want to further amend your PYTHONPATH like:
+ export PYTHONPATH="#{`brew --prefix omniorb`.strip}/src/lib/lib/#{which_python}/site-packages/omniidl_be:$PYTHONPATH"
@jacknagel Owner

Don't need to shell out to get the prefix, just #{prefix}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@guitorri

I rebased/squashed the last suggestion. Do you see any further improvement?

@yocchi

@guitorri Thanks for your work. But when trying to use this formula on Lion, I got the following problem.

clang++ -o catior -O2 -fno-common -bind_at_load -L../../../../lib -L../../../../../lib catior.o -lomniORB4 -lomnithread
ld: warning: directory not found for option '-L../../../../../lib'
Undefined symbols for architecture x86_64:
  "operator<<=(unsigned int&, cdrStream&)", referenced from:
      _CORBA_Unbounded_Sequence<IOP::TaggedProfile>::operator<<=(cdrStream&) in catior.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But this is already known issue.
https://trac.macports.org/ticket/32062

The small patch can fix this problem.
http://www.omniorb-support.com/pipermail/omniorb-list/2012-February/031202.html

I applied the following patch to current formula and it works fine.
I hope this will be of some help.

--- omniorb_org.rb  2012-11-24 17:40:21.000000000 +0900
+++ omniorb.rb  2012-11-24 17:26:38.000000000 +0900
@@ -13,6 +13,10 @@

   option 'python', 'Enable Python mappings'

+  def patches
+    DATA
+  end
+
   def install
     python_exec = `python-config --exec-prefix`.strip

@@ -62,3 +66,19 @@
    end
   end
 end
+
+__END__
+--- a/include/omniORB4/CORBA_sysdep.h
++++ b/include/omniORB4/CORBA_sysdep.h
+@@ -231,6 +231,11 @@
+ #endif
+ 
+ 
++#if defined(__clang__)
++#  define OMNI_NO_INLINE_FRIENDS
++#endif
++
++
+ //
+ // Windows DLL hell
+ //
@guitorri

@yocchi thanks for the report. Indeed this patch is already on their SVN.
I updated the formula. Now it should at least work on Snow Leopard (tested by me) and Lion (tested by you).
Perhaps @jacknagel can have another look whether if this formula can be merged.

Library/Formula/omniorb.rb
((7 lines not shown))
+end
+
+class Omniorb < Formula
+ homepage 'http://omniorb.sourceforge.net/'
+ url 'http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.1.6/omniORB-4.1.6.tar.bz2'
+ sha1 '383e3b3b605188fe6358316917576e0297c4e1a6'
+
+ option 'python', 'Enable Python mappings'
+
+ def patches
+ # http://www.omniorb-support.com/pipermail/omniorb-list/2012-February/031202.html
+ DATA
+ end
+
+ def install
+ python_exec = `python-config --exec-prefix`.strip

you could just use which 'python' where you need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/omniorb.rb
((10 lines not shown))
+ homepage 'http://omniorb.sourceforge.net/'
+ url 'http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.1.6/omniORB-4.1.6.tar.bz2'
+ sha1 '383e3b3b605188fe6358316917576e0297c4e1a6'
+
+ option 'python', 'Enable Python mappings'
+
+ def patches
+ # http://www.omniorb-support.com/pipermail/omniorb-list/2012-February/031202.html
+ DATA
+ end
+
+ def install
+ python_exec = `python-config --exec-prefix`.strip
+
+ system "./configure", "--prefix=#{prefix}",
+ "PYTHON=#{python_exec}/bin/python"
"PYTHON=#{which 'python'}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/omniorb.rb
((17 lines not shown))
+ # http://www.omniorb-support.com/pipermail/omniorb-list/2012-February/031202.html
+ DATA
+ end
+
+ def install
+ python_exec = `python-config --exec-prefix`.strip
+
+ system "./configure", "--prefix=#{prefix}",
+ "PYTHON=#{python_exec}/bin/python"
+ system "make"
+ system "make install"
+
+ if build.include? 'python'
+ OmniorbBindings.new.brew do
+ args = [ "--with-omniorb=#{prefix}",
+ "--prefix=#{prefix}/src/lib", # install into omniORB tree

is it possible to install the python bindings into lib/which_python()/"site-packages"?
Then (at least for a brewed Python) you don't need to amend the PYTHONPATH.

If find them in Cellar/omniorb/4.1.6/src/lib/lib/python2.7/site-packages after installing, so the last part of the directory is already fine. Perhaps just setting "--prefix=#{prefix}" will do the trick. Then, in the brew link step, they get linked correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@samueljohn

Besides the location of the python bindings, I am fine with this formula.

I can build it on 10.8.2 Xcode-only with and without python. Nice.

@guitorri

Actually the brew link doesn't succeed with you prefix suggestion. I don't know exactly why!
Furthermore, the package readme file mentions something about the installation of the omniORBpy sources on $TOP/src/lib, where $TOP is the prefix of omniORB.
I guess I will leave as is for the time being. If you find a working solution please let me know.
I will update this pull request with the 'which python' fixes.

@samueljohn

I'd really like to have the python bindings end up in "#{prefix}/lib/#{which_python}/site-packages" so that it would work out of the box with a brewed python.

Perhaps moving it after the build?

@adamv
Owner

Any word here?

@guitorri

I couldn't work further on this. It seems the python bindings are expected (hardcoded?) to be installed within the omniorb prefix. I will give another try on the following days.

@guitorri guitorri New Formula: omniORB
omniORB is a robust high performance CORBA ORB for C++ and Python.
Python is required by the omniORB IDL compiler.

omniORBpy Python mappings given as optional.
b1b6df0
@guitorri

@samueljohn @adamv please check again. I believe it is OK now. It works out of the box with a brewed python... Let me know otherwise.

@samueljohn

Yes, works. The Python bindings are in the right place now.

@adamv
Owner

Missing pkg-config dep.

@adamv adamv closed this pull request from a commit
@guitorri guitorri omniORB 4.1.6
Closes #15119.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
724cfbe
@adamv adamv closed this in 724cfbe
@guitorri guitorri deleted the branch
@dholm dholm referenced this pull request from a commit in dholm/homebrew
@guitorri guitorri omniORB 4.1.6
Closes #15119.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
29ed61d
@norioxkimura norioxkimura referenced this pull request from a commit in norioxkimura/homebrew
@guitorri guitorri omniORB 4.1.6
Closes #15119.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
05ee0b2
@guyzmo guyzmo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@guyzmo guyzmo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 3, 2013
  1. @guitorri

    New Formula: omniORB

    guitorri authored
    omniORB is a robust high performance CORBA ORB for C++ and Python.
    Python is required by the omniORB IDL compiler.
    
    omniORBpy Python mappings given as optional.
This page is out of date. Refresh to see the latest.
Showing with 78 additions and 0 deletions.
  1. +78 −0 Library/Formula/omniorb.rb
View
78 Library/Formula/omniorb.rb
@@ -0,0 +1,78 @@
+require 'formula'
+
+class OmniorbBindings < Formula
+ homepage 'http://omniorb.sourceforge.net/'
+ url 'http://sourceforge.net/projects/omniorb/files/omniORBpy/omniORBpy-3.6/omniORBpy-3.6.tar.bz2'
+ sha1 '2def5ded7cd30e8d298113ed450b7bd09eaaf26f'
+end
+
+class Omniorb < Formula
+ homepage 'http://omniorb.sourceforge.net/'
+ url 'http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.1.6/omniORB-4.1.6.tar.bz2'
+ sha1 '383e3b3b605188fe6358316917576e0297c4e1a6'
+
+ option 'python', 'Enable Python mappings'
+
+ def patches
+ # http://www.omniorb-support.com/pipermail/omniorb-list/2012-February/031202.html
+ DATA
+ end
+
+ def install
+ system "./configure", "--prefix=#{prefix}",
+ "PYTHON=#{which 'python'}"
+ system "make"
+ system "make install"
+
+ if build.include? 'python'
+ OmniorbBindings.new.brew do
+ args = [ "--prefix=#{prefix}",
+ "PYTHON=#{which 'python'}" ]
+ system "./configure", *args
+ system "make install"
+ end
+ end
+ end
+
+ def caveats
+ s = ''
+ if build.include? 'python'
+ s += <<-EOS.undent
+ For non-homebrew Python, you need to amend your PYTHONPATH like so:
+ export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH
+ EOS
+ end
+ return s.empty? ? nil : s
+ end
+
+ def which_python
+ "python" + `python -c 'import sys;print(sys.version[:3])'`.strip
+ end
+
+ def test
+ system "omniidl", "-h"
+
+ if build.include? 'python'
+ system "python", "-c", %(import omniORB; print 'omniORBpy', omniORB.__version__)
+ end
+ end
+end
+
+__END__
+diff --git a/include/omniORB4/CORBA_sysdep.h b/include/omniORB4/CORBA_sysdep.h
+index 3ff1f22..e3b8d3c 100644
+--- a/include/omniORB4/CORBA_sysdep.h
++++ b/include/omniORB4/CORBA_sysdep.h
+@@ -231,6 +231,11 @@
+ #endif
+
+
++#if defined(__clang__)
++# define OMNI_NO_INLINE_FRIENDS
++#endif
++
++
+ //
+ // Windows DLL hell
+ //
+
Something went wrong with that request. Please try again.