mplayer-devel: unofficial dependencies
Rainer Müller
raimue at macports.org
Tue Nov 21 11:57:59 UTC 2017
On 2017-11-20 17:38, Peter Brommer wrote:
> Hi,
>
> According to port deps mplayer-devel, this port has the following dependencies:
>
> Fetch Dependencies: subversion, git
> Build Dependencies: pkgconfig, yasm
> Library Dependencies: jpeg, openjpeg15, lame, libiconv, libmad, gnutls, libogg, libopus, libpng, libtheora, libvorbis, lzo2, ncurses, zlib, bzip2, liboil, libass
>
> However, on one of my machines I now find mplayer-devel to be a broken port, as a number of library files are not available:
> * /opt/local/lib/libdvdnav.4.dylib
> * /opt/local/lib/librtmp.1.dylib
> * /opt/local/lib/libfaad.2.dylib
> * /opt/local/lib/libdca.0.dylib
> * /opt/local/lib/libmpg123.0.dylib
> * /opt/local/lib/libdvdread.4.dylib
>
> These libraries are provided by libdvdnav, rtmpdump, faad2, libdca, mpg123, libdvdread, none of which are in the dependency list.
>
> Is this a bug?
Yes.
We usually refer to this as "opportunistic linking" when the build
system picks up additional libraries without being explicitly instructed
to do so.
> If not, can (and should) a macports package use files provided by packages that are present at compile time (but are not formal dependencies of the package to be installed), which are then silently used, and will cause the port to break if they are removed at any point?
>
> The “cure” is obviously to rebuild this port once libraries have been removed, it’s more a question of principle.
The configure instructions in the Portfile need to written such that the
port only uses libraries that are explicitly listed in the dependencies.
Most configure scripts will just try to link with all libraries that are
available, but something like 'configures.args --disable-foo' should
prevent the linking with the library.
In case of mplayer-devel, it looks like the port is supposed to link
with the checked out version of libdvdnav and libdvdread. However,
nothing in the Portfile or configure script seems to use that at all, so
it gets the system libraries via pkg-config instead.
For the others, it just looks like the corresponding --disable-foo flags
and variants are missing.
Rainer
More information about the macports-dev
mailing list