On 2020/01/01 16:29, Edd Barrett wrote:
> On Wed, Jan 01, 2020 at 02:48:52PM +0000, Stuart Henderson wrote:
> > Either list it as an "extra" WANTLIB (with a comment explaining that this
> > has been done so it doesn't get removed in future) or convert to
> > BUILD+RUN_DEPENDS (the first is probably better because it makes sure that
> > major changes to libtk will trigger an update of graphviz).
> > Should be listed as ${MODTK_WANTLIB} rather than the hardcoded "tk85"
> > that the port previously had.
>
> The BUILD_DEPENDS and RUN_DEPENDS solution seems more correct to me
> here. It seems odd to add tk to WANTLIB if it's not actually linked.
WANTLIB isn't just about listing things which are actually listed as a
library dependency. Something which is a listed dependency (i.e. is in a
NEEDED entry in objdump -p) does need to be in WANTLIB but there are
some other reasons for adding a WANTLIB which can't be picked up
automatically like this.
The main point of WANTLIB is so that dependent packages get updated
automatically when the ABI changes in a library, without having to
chase all through the ports tree and manually bumping. Major bump in
library version number -> all packages with this library in their
package signature (which comes from the version numbers of everything in
WANTLIB) get updated.
While the Tcl .so modules in graphviz no longer record the dependency
against the Tcl libraries any more (not sure why this changed but I
don't really feel like digging into it and that's not so important :)
they are still built against the ABI in Tcl's headers so they will be
affected by ABI changes in Tcl. So I think it is more correct to list
the "extra" WANTLIB to ensure that updates are done when necessary.
Just something like this would do:
# "extra" - Tcldot is built against Tcl headers
WANTLIB += ${MODTK_WANTLIB}
[ With dlopen'd modules things can seem a bit "backwards" from the normal
order, the direct dependency on Tcl/Tk libraries is in the interpreter
i.e. wish/tclsh and these then dlopen the Tcldot module provided by
graphviz, the Tcldot module still has access to functions in Tcl/Tk
libs etc ]
> @@ -143,22 +156,21 @@ post-install:
> rm -Rf ${PREFIX}/lib/tcl${MODTCL_VERSION}/graphviz
> ln -s ${TRUEPREFIX}/lib/tcl/graphviz \
> ${PREFIX}/lib/tcl${MODTCL_VERSION}/graphviz
> +# We never want to install .la files.
> + find ${PREFIX}/lib/ -name '*.la' | xargs rm
It's safer to use find .. -delete (or -print0 | xargs -0 rm, but there's
no point now we have -delete).
No comments:
Post a Comment