On Wed, Apr 08, 2020 at 04:12:54AM BST, Stuart Longland wrote:
> Hi all,
>
> Silly question… how do you install the dependencies of a port from
> binaries automatically?
>
> Situation is this: I'm wanting to add OPUS support to Asterisk as I have
> an ATA that supports this CODEC, it'd nice to be able to transcode this
> to other formats. I have a work-in-progress patch to the 'asterisk'
> port for doing this (modelled on what's being done for 'asterisk-speex')
> that I'll share once I've done some testing on both versions.
>
> I have two VMs running, one with OpenBSD 6.6 (which I am running on my
> router) and one with OpenBSD current (snapshot made on Monday).
>
> `make install-all` in the `asterisk` port seems to want to drag in the
> kitchen sink. The only thing I really want to compile is Asterisk
> itself (with my patch).
>
> Is there a command that installs the ports' build dependencies via
> `pkg_add` or do I need to extract the dependencies by other means and
> manually install them?
>
Hi Stuart,
>From bsd.port.mk(5):
FETCH_PACKAGES
User settings, defaults to ‘No’. Set to pkg_add(1)
options. Instruct the package target to download
packages missing from the repository from locations
in ${PKG_PATH} and place them into
${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache/, only
building them if no suitable packages are found.
For instance,
make FETCH_PACKAGES=
to use without any options, or
make FETCH_PACKAGES=-Dsnap
to use close to release.
This should do what you need (for -current):
$ echo FETCH_PACKAGES=-Dsnap >> /etc/mk.conf
Regards,
Raf