I think the guide is slightly misleading here, and I'll open a thread in tech-pkg to update it sooner or later. The conversion to buildlink files seems almost if not completely done already.
I don't know how dependencies were handled in the pre-buildlink days, but at the current state buildlink files and DEPENDS entries serve very different purposes. Again buildlink files are meant for build-time dependencies providing shared objects which other packages need to be linked against (or headers needing to be included), while DEPENDS entries are meant for run-rime dependencies.
Yet, some confusion may still arise when discriminating the use of TOOLS_DEPENDS / BUILD_DEPENDS and buidlink3.mk files, since apparently they both account for build-time dependencies. In reality, a package pulled through the buildlink framework represents actually a full dependency, meaning it carries shared objects needed also at run-time. As a consequence (to my understanding), a package providing both development libraries/headers, and binaries potentially required as tools at build stage, may be alternatively pulled via the buildlink framework or *_DEPENDS entries, depending on the specific use case.
This is all explained in:
The difference actually matters, because it shall affect how dependencies are tracked in the package database, influencing the behavior or commands like make depends
, pkg_add
, pkg_delete
, and pkgin autoremove
. This is well evident if you try to run make depends
in a package subdir. For example, in lang/rust I get:
=> Tool dependency cmake-[0-9]*: found cmake-3.27.4
=> Tool dependency libtool-base>=2.4.2nb9: found libtool-base-2.4.7nb1
=> Tool dependency mktools-[0-9]*: found mktools-20220614
=> Tool dependency bash-[0-9]*: found bash-5.2.15
=> Tool dependency gmake>=3.81: found gmake-4.4.1
=> Tool dependency gtar-base>=1.13.25: found gtar-base-1.35
=> Tool dependency perl>=5.0: found perl-5.38.0
=> Tool dependency pkgconf-[0-9]*: found pkgconf-2.0.2
=> Tool dependency cwrappers>=20150314: found cwrappers-20220403
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Build dependency cmake>=2.8.5nb1: found cmake-3.27.4
=> Build dependency python311>=3.11.0: found python311-3.11.5
=> Full dependency llvm>=15.0.7nb2<16: found llvm-15.0.7nb2
=> Full dependency curl>=8.2.1nb1: found curl-8.2.1nb1