[MPlayer-users] Re: zlib and fontconfig
Nicholas Schell
nschell at gmail.com
Fri Nov 3 15:45:49 CET 2006
Reimar Döffinger wrote:
>please try attached patch.
>
>Greetings,
>Reimar Döffinger
Thanks the patch works perfectly.
John Brown wrote:
>MPlayer (and every program that depends on freetype, fontconfig, etc.) gets
>this information from pkg-config scripts, so what I normally do in a case
>like this is edit the scripts. So if freetype2.pc says:
>Libs: -L${libdir} -lfreetype
>I add -lz to it. fontconfig.pc had only -lfontconfig, if I recall correctly.
>I manually added -lexpat -lfreetype -lz.
>
>Reimar's patch will fix MPlayer, but if one day you should try to compile
>another application that depends on fontconfig (or any of the many libraries
>that MPlayer can use but does not have a "correct" pkg-config script), you
>will probably run into the same problem. Fix the relevant .pc file, and you
>solve the problem permanently.
In my MSYS environment pkg-config is already set up correctly. Example
my freetype2.pc already has -lz added all on its own, I don't need to
edit anything
prefix=/mingw
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: FreeType 2
Description: A free, high-quality, and portable font engine.
Version: 9.10.3
Requires:
Libs: -L${libdir} -lfreetype -lz
Cflags: -I${includedir}/freetype2 -I${includedir}
It might just be that it is not setup correctly on your system, but on
mine it is. Also even though pkg-config is not used, while fontconfig
is building it has no issues noticing that freetype is also dependent
on zlib and adds -lz. The problems you are mentioning seem to be your
own and unrelated to what I'm doing. As far as I can understand the
problem was in fact the method in which mplayer's configure looked for
fontconfig and its dependent libs because pkg-config was last in the
elifs. I am guessing that means something already made the test true
before it could even attempt to use pkg-config.
>Editing the source should not be necessary. fontconfig's configure script
>has a parameter --with-confdir=DIR. I have not tried it myself, but see if
>it works for you.
That option only affects where fonts.conf is installed on the system,
it does not change the behavior of where fontconfig expects to find
it. For shared libfontconfig builds there is a predefined location to
search for fonts.conf which is "etc/fonts" and if you edit that
portion of the source you can change where the shared binary will look
for it. --with-conf-dir does not effect any of that except where 'make
install' puts fonts.conf when you finish compiling fontconfig.
As to this fonts.conf business, after having played with a static
fontconfig mplayer build awhile longer now the issue seems to grow
deeper. When you build fontconfig as static it hardcodes the _entire_
fonts.conf path into the lib. As on my system it only looks for
fonts.conf at "C:\msys\1.0\mingw\etc\fonts\fonts.conf" the default
install location (which is the only thing --with-conf-dir does, change
the installation path). Which means you can't really distribute a
static fontconfig build to other people :(. Gahh this is evil.
Also I hope this message doesn't destroy the formatting of the ML,
sorry in advance.
More information about the MPlayer-users
mailing list