On Thu, Jan 05, 2017 at 04:24:16PM +0100, Antoine Jacoutot wrote:
> > On 2017/01/05 13:28, Alexander Bluhm wrote:
> > > Somehow I can uninstall llvm although py-llvm should depend on it.
> > > Should llvm appear in the signature of py-llvm?  Does
> > > LIB_DEPENDS-python=${BUILD_PKGPATH},-main not work as expected?
> > 
> > For the LIB_DEPENDS to be registered you need an entry in WANTLIB for
> > a library from that package. The best idea is probably to set
> > "WANTLIB-python=clang". (Python modules often dlopen their libraries
> > so they don't show up anywhere that port-lib-depends-check can find
> > them).
> 
> Hmm, but is it a real WANTLIB, what does port-lib-depends-check have to say
> about it?

$ make port-lib-depends-check
Asking ports for dependency python-2.7.13(lang/python/2.7,-main)
py-llvm-3.9.1(devel/llvm,-python):
Extra:  clang.4

The python code loads the library dynamically.
            file = 'libclang.so'
            library = cdll.LoadLibrary(self.get_filename())

The lib check does not find it, but a real library is used.

> Or maybe just a RUN_DEPENDS?
> RUN_DEPENDS-python = ${BASE_PKGPATH},-main=${LLVM_V}

It works with WANTLIB now.  cindex.py also does some compatibility
checks that the library version matches the python binding version.
So I think the ports wantlib mechanism is what we want.

bluhm

Reply via email to