Werner LEMBERG | 6 Dec 2002 11:23
Picon

Re: Questions before releasing


> How do I check in my configure that I have a recent enough
> libfreetype?  I see that 2.0.9 fixed a problem for us, and would
> like to have at least that version.  The debian libfreetype6-dev
> comes with a freetype-config program, but its --version output is
> 9.1.3, which doesn't make much sense.

It makes sense, but unfortunately we forgot to update libtool's
version number.  From VERSION.DLL in the current snapshot:

  Libtool's version for FreeType 2.1.3 is `9.2.3'.

  On most platforms, the soname will be `6.3.2'
  (e.g. `libfreetype.so.6.3.2').

  Libtool's version for FreeType 2.1.2 is `9.1.3'.

  On most platforms, the soname will be `6.3.1'
  (e.g. `libfreetype.so.6.3.1').

> I am considering distributing three standard fonts (for sans, serif and
> monospace, the only fonts our objects are supposed to name).  What would be
> the right way to distribute these fonts using Automake so that Freetype can
> find them?  Or should I leave that entirely up to the packagers?

Leave it to the packager.

    Werner
Lars Clausen | 6 Dec 2002 15:29
Picon

Re: Questions before releasing

On Fri, 06 Dec 2002, Werner LEMBERG wrote:
> 
>> How do I check in my configure that I have a recent enough
>> libfreetype?  I see that 2.0.9 fixed a problem for us, and would
>> like to have at least that version.  The debian libfreetype6-dev
>> comes with a freetype-config program, but its --version output is
>> 9.1.3, which doesn't make much sense.
> 
> It makes sense, but unfortunately we forgot to update libtool's
> version number.  From VERSION.DLL in the current snapshot:
> 
>   Libtool's version for FreeType 2.1.3 is `9.2.3'.
> 
>   On most platforms, the soname will be `6.3.2'
>   (e.g. `libfreetype.so.6.3.2').
> 
>   Libtool's version for FreeType 2.1.2 is `9.1.3'.
> 
>   On most platforms, the soname will be `6.3.1'
>   (e.g. `libfreetype.so.6.3.1').

That's... rather confusing.  What do I do to check if a freetype >= 2.0.9
is installed?

>> I am considering distributing three standard fonts (for sans, serif and
>> monospace, the only fonts our objects are supposed to name).  What would
>> be the right way to distribute these fonts using Automake so that
>> Freetype can find them?  Or should I leave that entirely up to the
>> packagers?
> 
(Continue reading)

Werner LEMBERG | 6 Dec 2002 23:18
Picon

Re: Questions before releasing

> > It makes sense, but unfortunately we forgot to update libtool's
> > version number.  From VERSION.DLL in the current snapshot:
> > 
> >   Libtool's version for FreeType 2.1.3 is `9.2.3'.
> > 
> >   On most platforms, the soname will be `6.3.2'
> >   (e.g. `libfreetype.so.6.3.2').
> > 
> >   Libtool's version for FreeType 2.1.2 is `9.1.3'.
> > 
> >   On most platforms, the soname will be `6.3.1'
> >   (e.g. `libfreetype.so.6.3.1').
> 
> That's... rather confusing.  What do I do to check if a freetype >=
> 2.0.9 is installed?

Normally, the FreeType version is rather meaningless (provided that
the libtool version number is updated properly which we missed for
2.1.2).  If you really want a test for 2.0.9, check freetype.h for
`FREETYPE_MAJOR', `FREETYPE_MINOR', and `FREETYPE_PATCH' with grep.

Writing a C program to read out these macros won't work with dynamic
libraries, and FT_Library_Version is buggy up to 2.1.3.

    Werner
Lars Clausen | 7 Dec 2002 00:04
Picon

Re: Questions before releasing

On Fri, 06 Dec 2002, Werner LEMBERG wrote:
>> That's... rather confusing.  What do I do to check if a freetype >=
>> 2.0.9 is installed?
> 
> Normally, the FreeType version is rather meaningless (provided that
> the libtool version number is updated properly which we missed for
> 2.1.2).  If you really want a test for 2.0.9, check freetype.h for
> `FREETYPE_MAJOR', `FREETYPE_MINOR', and `FREETYPE_PATCH' with grep.
> 
> Writing a C program to read out these macros won't work with dynamic
> libraries, and FT_Library_Version is buggy up to 2.1.3.

For those in the same boat, here's some configure.in code to test for the
freetype version:

    AC_MSG_CHECKING([for version of FreeType])
    FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
    FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
    FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR * 1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
    AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
    if test "$FREETYPE_VERSION" -ge 2000009; then

-Lars

--

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
(Continue reading)


Gmane