Opened 11 years ago

Closed 11 years ago

#41569 closed defect (fixed)

cmake: FindFreetype.cmake doesn't work properly after upgrading to FreeType 2.5.1

Reported by: mojca (Mojca Miklavec) Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), cjones051073 (Chris Jones), otto.julio@…, anddam (Andrea D'Amore)
Port: cmake

Description

In the light of Ryan's comment about FreeType (#41567), we seem to have a problem in CMake now, so I'm unable to proceed testing CMake-based installation of Root.

The file contains:

if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
    file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
         REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")

and the three relevant variables are automatically being set to the following values

 FREETYPE_INCLUDE_DIR_freetype2  */usr/X11R6/include/freetype2
 FREETYPE_INCLUDE_DIR_ft2build   */usr/X11R6/include
 FREETYPE_LIBRARY                */usr/X11R6/lib/libfreetype.dylib

I tried setting all possible combinations of variables that came to my mind, but I was unable to point Root to the right version of FreeType.

Change History (9)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: css@… removed
Owner: changed from macports-tickets@… to css@…
Port: freetype root removed

I didn't expect a bugfix version update of freetype would cause all this ruckus!

But according to freetype, cmake is doing it wrong. It shouldn't assume the file ${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h exists, and with freetype 2.5.1 it doesn't anymore. File a bug with cmake.

comment:2 Changed 11 years ago by mojca (Mojca Miklavec)

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

But please leave the ticket open until this gets fixed.

Apparently this update broke both usage of FreeType from X11R6 as well as from MacPorts.

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Do you want to file the cmake bug report or should I?

comment:5 Changed 11 years ago by mojca (Mojca Miklavec)

I would be grateful if you could file the report since I'm not sure what to write in it.

comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

comment:7 Changed 11 years ago by otto.julio@…

Cc: otto.julio@… added

Cc Me!

comment:8 Changed 11 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:9 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Upstream has not moved on this issue, so I committed a quick fix in r114177. This works for MacPorts, but is not suitable for inclusion upstream because it only works with freetype 2.5.1 and later.

Note: See TracTickets for help on using tickets.