On 2013/5/16 Greg Allen wrote:
> I've been working on a MacPorts port for oce. You can see the current
> version on bitbucket:
>
https://bitbucket.org/gallen/macports-occ/src/default/devel/oce/Portfile
>
> It successfully builds and installs oce and dependencies. I was curious for
> some input at this stage, while I move on to other dependencies of
> python-occ.
>
> Here are a few topics in no particular order:
> - most of the non-tagged ports in MacPorts use datestamps, so I did too
> [lines 8,19,21]
> - Why OCE_INSTALL_PREFIX instead of the usual CMAKE_INSTALL_PREFIX? [line
> 27]
Hi Greg,
I agree that we should use CMAKE_INSTALL_PREFIX.
> - I also added some variants (test and draw), but they both have issues
> [lines 29-36]
> - installing OCE.framework in ${prefix} is a little unusual;
> I moved it to ${prefix}/Library/Frameworks per MacPorts convention [lines
> 38-41]
Yes, feel free to fix this. I could not find detailed explanations on
how to build/install Mac frameworks with CMake.
> I'm having trouble with both variants. Are those of any use, or should I get
> rid of them?
Tests are useful for us. IMO it may be useful for you too, other
people will use your file with different compilers, and these tests
may catch errors.
If you are only interested by pythonocc, you can skip Draw. It is
useful though, there are lots of scripts on OCC forum.
> I've been able to demonstrate passing tests (except 29&30)
What are these failures?
> by installing then testing:
> port install oce
> port -v test oce +test
Normally one can run tests before installation.
> Draw won't install because DRAWEXE depends on a shared library that doesn't
> get installed (TKDraw?):
> port install oce +draw # fails
Libraries which are used only by DRAWEXE have been put into a private
directory to avoid name clashes with system libraries.
On Linux, those libraries are found thanks to RPATH. We discussed
this issue for OSX, I do not remember if this is supposed to work or
if you have to set DYLD_LIBRARY_PATH environment variable.
BTW if you pass -DOCE_INSTALL_PACKAGE_LIB_DIR=lib to cmake, all
libraries will be installed at the same place.
Denis