On 2023/09/19 22:07, Johannes Thyssen Tishman wrote:
> Hi everyone,
> 
> I'm currently working on porting the following three FreeCAD
> dependencies:
> 
> PySide6: Python Qt bindings for Qt 6
> PySide6-tools: PySide6 development tools
> Shiboken6: Python binding generator for C++ libraries
> 
> Since their sources are provided as a single tarball, I think they
> should be ported as sub-packages of one port with MULTI_PACKAGES.
> However this is the first time I'm trying to use this feature and I'm
> struggling to make it work. I initially made a separate port for each of
> them by adapting ${WRKSRC} so that I could tell their *_DEPENDS,
> WANTLIBs and PLISTs apart. Now that all three ports are finished, I've
> merged them into one and suffixed their specific COMMENT, WANTLIB and
> {LIB,RUN}_DEPENDS accordingly with a sub-package name. 
> 
> The problem is that the PySide6 (-main) sub-package depends on the
> SHARED_LIBS installed by the Shiboken6 (-shiboken) sub-package, which of
> course is throwing me an error.

I think this maybe because you haven't generated PLISTs with the
libraries included. AFAIK you need to do the build without the
internal deps/wantlib listed first, then generate PLISTs, then you
can add them.

What is more of a problem for the all-in-one approach is that building
some parts requires finding python modules done as part of the shiboken
build, and the way that the build is being run in this port, that
doesn't work, it's not passing in a PYTHONPATH that allows it to find
them.

It seems that the build is intended to be run by their python setup.py
scripts which then call cmake - whereas you're calling cmake directly,
which might be reponsible for this.

Anyway separate ports probably seems like less of a headache to me
for this.

I would probably group them under one dir, x11/pyside6 (not devel/),
with subdirs for the different things and share common parts via
x11/pyside6/Makefile.inc

ports/x11/pyside6/pyside6
ports/x11/pyside6/tools
ports/x11/pyside6/shiboken

> Another issue that I'm having is that the Shiboken6 port installs both
> libraries and a Python module, so I'm not sure if this should be split
> as well. What is the convention in this kind of case?

Not split.

> Lastly, when running 'make port-lib-depends-check' for both Shiboken6
> and PySide6-tools, I'm getting a warning like the following:
> 
> > Missing lib: clang.8 (/usr/local/bin/shiboken6) (NOT REACHABLE)
> 
> I think this is due to clang being a runtime dependency for this ports.
> I've had a similar issue in the past with another port and, if I
> remember correctly, this was due to the library not being present in
> LIB_DEPENDS. However here I've tried adding devel/llvm/13 to LIB_DEPENDS
> and using the lang/clang module and I'm still getting the error. Any
> idea what could be causing this?

check-lib-depends doesn't properly handle libraries in subdirs.

Reply via email to