Opened 9 years ago

Closed 9 years ago

#47716 closed defect (fixed)

freetype: revert header layout to prevent conflicts with ftgl

Reported by: repagh (Rene van Paassen) Owned by: blair (Blair Zajac)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: krugazor@…, ryandesign (Ryan Carsten Schmidt), mojca (Mojca Miklavec)
Port: freetype, ftgl

Description (last modified by mf2k (Frank Schima))

Freetype used to install most header files in

<includedir>/freetype2/freetype

for 2.5.5, this changed to:

<includedir>/freetype2

This creates a conflict when attempting to use ftgl, which depends on freetype; on a case-insensitive mac (as most are), the ftgl FTGlyph.h is confused with freetype's ftglyph.h. For compilation with freetype, the <includedir>/freetype2 dir needs to be in the include path, which makes that all header files there are visible to the compiler.

Attached portfile path reverts to the old install path, and adjusts the <includedir>/freetype2/config/ftheader.h file accordingly.

I also made a bug report for freetyps, no idea whether and when this is taken up.

Attachments (1)

freetype.diff (1.4 KB) - added by repagh (Rene van Paassen) 9 years ago.
diff for port file

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by repagh (Rene van Paassen)

Attachment: freetype.diff added

diff for port file

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Cc: ryandesign@… removed
Description: modified (diff)
Keywords: freetype development ftgl removed
Owner: changed from macports-tickets@… to ryandesign@…

comment:2 in reply to:  description Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to rene.vanpaassen@…:

Attached portfile path reverts to the old install path, and adjusts the <includedir>/freetype2/config/ftheader.h file accordingly.

No, we're not going to do that.

This is an FTGL bug. They should rename their header files.

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

Cc: krugazor@… ryandesign@… added
Owner: changed from ryandesign@… to blair@…
Port: ftgl added; freetype removed
Summary: revert freetype to old filestructure, for compatibility with ftglftgl: installs headers with names that conflict with freetype headers

See also #41572.

Unfortunately the last ftgl release was in 2008 so the project may be dead and we may have to fix it ourselves.

comment:4 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:5 Changed 9 years ago by repagh (Rene van Paassen)

I still think the main problem is with freetype2. With the current set-up;

pkg-config --cflags freetype2
-I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 

over 40 files with short names -- and short prefixes, ft or tt -- are added to the compiler's search path. If all libraries would do that, projects with more than just a few libraries become a compilation nightmare. In version 2.5.0 (don't know where the exact change was), most of these files were still under a directory freetype/

FTGL, although old, still nicely hides its file names under an FTGL/ directory.

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

If you believe the freetype headers should be moved back to where they were before, you would have to contact the freetype developers about that. I don't want to second-guess them.

comment:7 Changed 9 years ago by mojca (Mojca Miklavec)

comment:8 Changed 9 years ago by repagh (Rene van Paassen)

Yes, I tried.

Let's see if they come to their senses, but indeed the 40972 (which I didn't find on freetype by the way, I opened a new bug report) was flagged as a wontfix.

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

Port: freetype added
Resolution: fixed
Status: newclosed
Summary: ftgl: installs headers with names that conflict with freetype headersfreetype: revert header layout to prevent conflicts with ftgl

It looks like they have come to their senses after all. The CHANGES file in the freetype 2.6.1 release says:

  II. IMPORTANT CHANGES

    - The header  file layout  has been  changed (again),  moving  all
      header files except `ft2build.h' into a subdirectory tree.

      Doing so  reduces the  possibility of  header file  name clashes
      (e.g., FTGL's  `FTGlyph.h' with FreeType's `ftglyph.h')  on case
      insensitive file systems like Mac OS X or Windows.
Note: See TracTickets for help on using tickets.