[FFmpeg-devel] usage of Requires.private in *.pc files
Dominik 'Rathann' Mierzejewski
dominik
Fri Nov 14 11:22:18 CET 2008
On Wednesday, 12 November 2008 at 11:09, Reinhard Tartler wrote:
> Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> writes:
>
> >> --- a/configure
> >> +++ b/configure
> >> @@ -2358,10 +2358,8 @@ Name: $name
> >> Description: $comment
> >> Version: $version
> >> Requires: $(disabled shared && echo $requires)
> >> -Requires.private: $(enabled shared && echo $requires)
> >> -Conflicts:
> >> Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
> >> -Libs.private: $(enabled shared && echo $libs)
> >> +Libs.private: $(enabled shared && echo $libs $requires)
> >> Cflags: -I\${includedir}
> >> EOF
> >> cat <<EOF > $name/$name-uninstalled.pc
> >>
> >>
> >>
> >> Thinking a bit more about it, it seems to me that Libs.private is rather
> >> pointless. See for reference pkg-config(5):
> >>
> >> Libs.private: This line should list any private libraries in use.
> >> Private libraries are libraries which are not exposed through
> >> your library, but are needed in the case of static linking.
> >>
> >> Static linking is only done when ffmpeg is compiled statically. but the
> >> line is only inserted if ffmpeg is compiled as a shared library.
> >
> > That's why it should be inserted only if FFmpeg's libraries are compiled
> > as static. So your patch is wrong.
>
> please clarify how that comment relates to the patch above. What
> specifically is wrong with the patch?
>
> Please keep in mind that the "best" documentation for Requires.private
> seems to be
> http://err.no/personal/blog/tech/2008-03-25-18-07_pkg-config,_sonames_and_Requires.private.html
>
> I still don't think that the circumstances it was created for apply in
> any way to ffmpeg. I'd suggest to avoid it therefore.
If I understand correctly, Requires.private and Libs.private should only be
present if the static versions of FFmpeg libs are built, right? That's why
I said your patch is wrong, too, but the main reason is your proposed addition
of "$requires" to Libs.private, because it'll generate a line like this:
Libs.private: -lz -pthread -lm -lfaac ... -lXext libraw1394 theora vorbisenc libavutil = 49.10.0
Don't you see it's wrong? Libs[.private] is supposed to contain something you
can pass to the linker. Or am I wrong here?
Regards,
R.
--
MPlayer http://mplayerhq.hu | RPMFusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the ffmpeg-devel
mailing list