Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2022 14:57:46 +0200
From:      Stefan Esser <se@FreeBSD.org>
To:        jbo@insane.engineer
Cc:        "ports@freebsd.org" <ports@freebsd.org>
Subject:   Re: Difference between LIB_DEPENDS and RUN_DEPENDS
Message-ID:  <6098955d-bfd2-c54c-e832-e48a43cfd8a5@FreeBSD.org>
In-Reply-To: <ATW5B6XJvLk8DwLIVd5VKijiewdSl4nCjaUl1t0yQXSd-UNGePK4PAJ5LP4RvvYnkscdha0QgyIYEd4hinx1k6oLkL99lJKgk40XkYSU1og=@insane.engineer>
References:  <ATW5B6XJvLk8DwLIVd5VKijiewdSl4nCjaUl1t0yQXSd-UNGePK4PAJ5LP4RvvYnkscdha0QgyIYEd4hinx1k6oLkL99lJKgk40XkYSU1og=@insane.engineer>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------b4nUkp9JsQeuL7ZvDJMQ0pOG
Content-Type: multipart/mixed; boundary="------------f6J4KiJN0nEcz1fHLer03YMx";
 protected-headers="v1"
From: Stefan Esser <se@FreeBSD.org>
To: jbo@insane.engineer
Cc: "ports@freebsd.org" <ports@freebsd.org>
Message-ID: <6098955d-bfd2-c54c-e832-e48a43cfd8a5@FreeBSD.org>
Subject: Re: Difference between LIB_DEPENDS and RUN_DEPENDS
References: <ATW5B6XJvLk8DwLIVd5VKijiewdSl4nCjaUl1t0yQXSd-UNGePK4PAJ5LP4RvvYnkscdha0QgyIYEd4hinx1k6oLkL99lJKgk40XkYSU1og=@insane.engineer>
In-Reply-To: <ATW5B6XJvLk8DwLIVd5VKijiewdSl4nCjaUl1t0yQXSd-UNGePK4PAJ5LP4RvvYnkscdha0QgyIYEd4hinx1k6oLkL99lJKgk40XkYSU1og=@insane.engineer>

--------------f6J4KiJN0nEcz1fHLer03YMx
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am 10.06.22 um 14:03 schrieb jbo@insane.engineer:
> Hello folks,
>=20
> Maybe an unusual request but could somebody elaborate on the difference=
 between
> LIB_DEPENDS and RUN_DEPENDS?
> I read the corresponding handbook section thrice and it's not clear to =
me when
> to use which - I must be missing something obvious.
>=20
> RUN_DEPENDS appears to be for runtime dependencies. But when do I want =
to use
> LIB_DEPENDS?

LIB_DEPENDS affects building of the port and the run dependencies registe=
red
in the resulting package.

It tests for the existence of a library, while BUILD_DEPENDS check for a =
file
and RUN_DEPENDS check for an installed package (possibly restricted to so=
me
range of versions of the package).

> I'm working on a port of a C++ library which depends on on some shared
> libraries (provided by existing ports) but it's not clear to me whether=
 those
> should be listed in RUN_DEPENDS or LIB_DEPENDS.

Just use:

LIB_DEPENDS+=3D	libXXXX.so:some/port

This will make sure that library is available when building the port and =
it
will register a run dependency on the package that provides that library =
in
the package built by your port.

See:

https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-de=
pend

for all the details ...

Regards, STefan

--------------f6J4KiJN0nEcz1fHLer03YMx--

--------------b4nUkp9JsQeuL7ZvDJMQ0pOG
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmKjP8sFAwAAAAAACgkQR+u171r99UT0
Xwf/b8E1tFwoLksw3v38gwfZPtSoGHGw5k+XXYSZ0Rs92OW47DBpUzlzcKNVMF+HNgrRpSb2L9fd
NdgRb8NsGp97deVLdrRR4BKk1yXq0c2yZX82ISw9Zu/GPGAgFGLI6bPxzkvL/kUd0BvunMtP2oDv
ynjE9i0G0B+pc3kfJkYMLZOPLH3HclBNgbfQoKj1gle0XXJ2LyJIYTMorc670VsihcqtauvHK1L3
Wkr71bsYiGfdn57mxEkKRdaa449Wyn/ZMM11wWogs04IUWlm7HLyp7kQJy7mjiF8ozfd0PBYkNQQ
OF3L3furnlRdz6JWoOKX+ZOP1X9azdiHoLij70N0xw==
=K/L2
-----END PGP SIGNATURE-----

--------------b4nUkp9JsQeuL7ZvDJMQ0pOG--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6098955d-bfd2-c54c-e832-e48a43cfd8a5>