pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: About inclusion of buildlink in a buildlink



Am 08.07.2022 um 19:25 schrieb Mayuresh:
Trying to create buildlink of wip/sylvan package. Trying to understand the
following comment:

# XXX Uncomment and keep only the buildlink3 lines below which are # directly
# XXX needed for dependencies to compile, link, and run.  If this package
# XXX provides a wrappered API or otherwise does not expose the APIs of # the
# XXX buildlink3 lines below to dependencies, remove them.
#.include "../../devel/gmp/buildlink3.mk"

Say, the package wip/ltsmin is going to include buildlink of sylvan.

Now sylvan's Makefile already includes buildlink of gmp.

If ltsmin uses gmp directly, it would directly include its buildlink.

So what exactly is the role of including buildlink inside buildlink?

Imagine that ltsmin only declares a build dependency on sylvan, and
sylvan does not declare a buildlink dependency on gmp.

Then, when building ltsmin, the include files and libraries of gmp are
not visible.

This is fine if sylvan provides an abstract API that does not refer to
gmp in any way. But if (a hypothetical) sylvan.h includes (a
hypothetical) gmp.h, the build would fail.

Roland


Home | Main Index | Thread Index | Old Index