Subject: indirect dependencies through build tools [Re: pkg/33100 (devel/darcs
To: Thomas Klausner <wiz@NetBSD.org>
From: Johnny Lam <firstname.lastname@example.org>
Date: 03/21/2006 12:25:28
> Synopsis: devel/darcs missing DEPENDS=gmp
> Responsible-Changed-From-To: pkg-manager->jlam
> Responsible-Changed-By: email@example.com
> Responsible-Changed-When: Sun, 19 Mar 2006 15:55:20 +0000
> Committed a workaround. jlam can hopefully explain what's happening here...
These packages want ghc as a build dependency, but want gmp (through
ghc) as a run-time dependency. In the case of darcs, because the ghc
dependency is expressed by including ghc/buildlink3.mk, gmp is
considered an indirect dependency for darcs, and so is not added as a
dependency for darcs.
It's important to remember that dependencies are (mostly) only
registered if a package directly includes a buildlink3.mk for that
dependency in the package Makefile. This is the distinction between
"BUILDLINK_DEPENDS", which are actual dependencies, and
"BUILDLINK_PACKAGES", which are merely the packages whose libraries and
headers are symlinked into the buildlink work directory. If you look at
a typical buildlink3.mk file, you'll see that BUILDLINK_PACKAGES is
always modified when the buildlink3.mk is included, but
BUILDLINK_DEPENDS is only modified if the buildlink3.mk is not
"recursively" included (BUILDLINK_DEPTH == 1).
You can force all packages that directly include ghc/buildlink3.mk to
build with ghc to have a dependency on gmp by modifying
ghc/buildlink3.mk so that gmp/buildlink3.mk is included outside of the
BUILDLINK_DEPTH guards, i.e. move that inclusion to the end of the file.
Should I go ahead and do this?
-- Johnny Lam <firstname.lastname@example.org>