Re: Getting pathname of BUILD_DEPENDS application

Gleb Popov <[email protected]> Thu, 28 May 2026 23:03:20 +0300
Newsgroups gmane.os.freebsd.devel.ports
Message-ID <CALH631nzKVb2L=5CgHaaADgaB9iuQhyRnHoqj3g=utPwgPnsOw@mail.gmail.com>
On Thu, May 28, 2026 at 10:36 PM Nikolaj Thygesen
<[email protected]> wrote:
>
> When compiling lang/swipl it is required to run.
>
>         /usr/local/bin/uuid-config --cflags | --ldflags
>
> ... as part of deducing header / library placement of misc/ossp-uuid. This is all part of the cmake setup of lang/swipl, and currently I use an awful patch to hardcode something in the cmake file pre-make - but this file actually allows one to set a variable - $LibUUID_ROOT - to the path of uuid-config from the outside. I have successfully experimented with this, so I added:
>
>         BUILD_DEPENDS=  uuid-config:misc/ossp-uuid
>
> .. to the makefile. Now my question is: How do I properly get to the pathname of uuid-config?? In order to pass it to cmake somewhat like (pseudo):
>
>         CMAKE_ARGS=     -DLibUUID_ROOT=${which uuid-config:sh:H}

The proper and canonical solution for this problem is

-DLibUUID_ROOT=${LOCALBASE}

Ports should expect their dependencies to be installed under ${LOCALBASE}.