[FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

James Almer jamrial at gmail.com
Fri Oct 13 01:57:15 EEST 2017

On 10/12/2017 7:48 PM, Helmut K. C. Tessarek wrote:
> On 2017-10-12 17:35, James Almer wrote:
>> bzip2 and zlib show up as dependencies of freetype2 in the
>> "Requires.private" section of its .pc file in your system, right? If
> almost, my freetype2.pc looks like this:
> prefix=/Users/Shared/ffmpeg/sw
> exec_prefix=/Users/Shared/ffmpeg/sw
> libdir=/Users/Shared/ffmpeg/sw/lib
> includedir=/Users/Shared/ffmpeg/sw/include
> Name: FreeType 2
> URL: http://freetype.org
> Description: A free, high-quality, and portable font engine.
> Version: 18.6.12
> Requires:
> Requires.private: zlib
> Libs: -L${libdir} -lfreetype
> Libs.private: -lbz2
> Cflags: -I${includedir}/freetype2

Ideally/IMO, bzip2 would be the same as zlib, but in this case it
probably makes no difference.

>> you're using an static build of freetype2, pkg-config needs to be run
>> with --static to actually get the required ldflags for said dependencies.
>> Now, the issue here is libbluray adding freetype2 ldflags directly
>> instead of setting freetype2 as a dependency, much like freetype2 sets
>> bzip2 and zlib.
> my libbluray.pc look like this:
> prefix=/Users/Shared/ffmpeg/sw
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> Name: libbluray
> Description: library supporting Blu-ray playback
> Version: 1.0.0
> Libs: -L${libdir} -lbluray
> Libs.private:   -L${libdir} -lfreetype -L${libdir} -lfontconfig -lfreetype
> Cflags: -I${includedir}
>> I suppose that if that change is done to libbluray's .pc file (namely,
>> adding a "Requires.private: freetype2 fontconfig" line or similar, if i
>> understand this correctly), you'll be able to use the --static
>> pkg-config-flag and remove most if not all of these LDFLAGS you list below.
> It doesn't seem to work, because I already have those in the
> libs.private section.

Having those in Libs.Private just adds the listed -l* flags. If it had
instead a real dependency on freetype2 (Requires or Requires.private
entry), it'd then also get the bzip2 and zlib ldflags alongside the
freetype2 ldflags when you run pkg-config with the --static flag.

I'll see about sending a patch to libbluray to change this. Unless
someone else can do it instead while i'm busy fixing assorted failures.

More information about the ffmpeg-devel mailing list