Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#41593 closed defect (worksforme)

freetype: many ports fail with freetype 2.5.1 due to change in include path structure

Reported by: dbevans (David B. Evans) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: su-v, nick.lavrik@…, cooljeanius (Eric Gallager)
Port: freetype

Description

I know this might be considered a duplicate but I'm hoping to get some clarification on this issue before doing wholesale changes to ports.

With the update to freetype 2.5.1, the include file path structure has changed from

/opt/local/include/freetype2/freetype/freetype.h

to just

/opt/local/include/freetype2/freetype.h

Many ports that reference freetype header files use something like

#include <freetype/freetype.h>
#include <freetype/tttables.h>

After the change, these are broken due to the removal of the freetype path element. Example ports that I saw today are gimp2, webkit-gtk3 and probably many more.

So is this change intentional and the various ports need to change to

#include <freetype2/freetype.h>
#include <freetype2/tttables.h>

or something else or is this a probem that should be fixed in freetype?

Change History (10)

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

As far as I can tell, any port doing e.g.

#include <freetype/freetype.h>
#include <freetype/tttables.h>

is doing it wrong. It should instead be doing:

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TRUETYPE_TABLES_H

This has been the case for years; the deprecated usage was finally (and unexpectedly, to me) broken in 2.5.1 by rearranging the files.

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

The freetype CHANGES file explains:

CHANGES BETWEEN 2.5 and 2.5.1

...

  II. IMPORTANT CHANGES

...

    - The header  file layout  has been changed.   After installation,
      all files are now located in `<prefix>/include/freetype2'.

      Applications  that  use   (a)  `freetype-config'  or  FreeType's
      `pkg-config' file to get the include directory for the compiler,
      and (b) the documented way for header inclusion like

        #include <ft2build.h>
        #include FT_FREETYPE_H
        ...

      don't need any change to the source code.

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

Feel free to send me any tickets for this issue (or just the names of affected ports) and I can try to fix them.

comment:4 Changed 11 years ago by dbevans (David B. Evans)

Resolution: worksforme
Status: newclosed

Thanks, Ryan. This answers my question. Will proceed according to these guidelines and notify upstream where appropriate.

comment:6 Changed 11 years ago by su-v

Cc: suv-sf@… added

Cc Me!

comment:7 Changed 11 years ago by nick.lavrik@…

Cc: nick.lavrik@… added

Cc Me!

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

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

Summary: freetype: many ports fail to build due to change in include path structurefreetype: many ports fail with freetype 2.5.1 due to change in include path structure

comment:10 Changed 11 years ago by jmroot (Joshua Root)

#41970 is an instance of this.

Note: See TracTickets for help on using tickets.