Bug 196109 - Allow LIB_DEPENDS depend on ports with USE_LDCONFIG != yes
Summary: Allow LIB_DEPENDS depend on ports with USE_LDCONFIG != yes
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2014-12-18 20:47 UTC by Jan Beich
Modified: 2016-04-13 14:05 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2014-12-18 20:47:49 UTC
When a port defines USE_LDCONFIG != yes its consumers cannot use LIB_DEPENDS because it may match different library.

  LIB_DEPENDS = libfoo.so:${PORTSDIR}/bar/foo1

vs.

  LIB_DEPENDS = libfoo.so:${PORTSDIR}/bar/foo2

One could prepend ldconfig prefix

  # if USE_LDCONFIG = ${PREFIX}/lib/foo2
  LIB_DEPENDS = foo2/libfoo.so:${PORTSDIR}/bar/foo2.

  $ make depends
  ===>   test-0.1 depends on shared library: foo2/libfoo.so - found (/usr/local/lib/foo2/libportaudio.so.0)

except portlint and bsd.sanity.mk claim it's illegal. Workarounds include using soversion if different, renaming library, explicit BUILD/RUN_DEPENDS or doing nothing.

Is this a sane idea?
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-06-14 03:03:40 UTC
Could you provide a patch that makes it valid so that it can be tested ?
Comment 2 Jan Beich freebsd_committer freebsd_triage 2016-04-13 11:58:55 UTC
What's wrong with comment 0 rationale? Don't close an issue just because it lacks a patch. I haven't come up with one as LIB_DEPENDS code is fragile and this is low priority.
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2016-04-13 14:05:50 UTC
I don't want to hurt feeling or such, but it looks like it needs a one line patch to bsd.sanity.mk, if nobody had time to do it in the 10 months the PR had been opened there's no point in keeping it opened.