[FFmpeg-devel] [PATCH] Add --enable-rpath option to add -Wl, -rpath to pkg-config files.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Nov 10 23:31:04 CET 2013


On Sun, Nov 10, 2013 at 02:11:14PM -0800, Timothy Gu wrote:
> On Nov 10, 2013 12:18 AM, "Reimar Döffinger" <Reimar.Doeffinger at gmx.de>
> wrote:
> > @@ -4458,6 +4461,7 @@ enabled extra_warnings && check_cflags -Winline
> >  # add some linker flags
> >  check_ldflags -Wl,--warn-common
> >  check_ldflags
> -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
> > +enabled rpath && add_ldflags -Wl,-rpath=$libdir
> >  test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
> >
> >  enabled xmm_clobber_test &&
> > @@ -4976,7 +4980,7 @@ Version: $version
> >  Requires: $(enabled shared || echo $requires)
> >  Requires.private: $(enabled shared && echo $requires)
> >  Conflicts:
> > -Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
> > +Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}")
> -l${shortname} $(enabled shared || echo $libs)
> >  Libs.private: $(enabled shared && echo $libs)
> >  Cflags: -I\${includedir}
> >  EOF
> > --
> > 1.8.4.2
> 
> So here is another problem: wouldn't multiple pkg-config files with the
> same name conflict?

In which context?
Yes, you can't have two with the same name.
They could be renamed, but that makes the whole process
non-transparent to applications.
In the distribution context: for something like a Ubuntu PPA the
solution would/could be to just have only exactly one -dev
package installed.
That would probably be annoying for anyone trying to use some
official build infrastructure, and it doesn't work for something
like Gentoo at all.
On the other hand, a mv is all that is needed to rename them,
and I guess most distributions have some kind of
alternatives/eselect/... system to select between to projects
providing the "same thing" (like a sendmail binary).


More information about the ffmpeg-devel mailing list