We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2324

Summary: Use pkg-config for freetype
Product: SDL_ttf Reporter: Joshua Root <josh+sdl>
Component: miscAssignee: Ozkan Sezer <sezeroz>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: musclesmunday, sezeroz
Version: unspecified   
Hardware: All   
OS: All   
Attachments: Patch for configure.in to use pkg-config for freetype2

Description Joshua Root 2013-12-23 22:32:55 UTC
Currently, SDL2_ttf's configure script uses freetype-config to find the freetype libs and cflags. The problem is that it doesn't have a flag like pkg-config's --static to distinguish between static and dynamic builds, so it always gives you the libs needed for static linking, which means you overlink in the dynamic case.

Using 'pkg-config {--libs,--cflags} freetype2' if available would avoid this problem.

Also, I'm pretty sure SDL2_ttf.pc needs to list freetype2 in its Requires: line so that 'pkg-config --libs --static SDL2_ttf' works properly.
Comment 1 Neil Munday 2018-10-23 21:32:59 UTC
Created attachment 3395 [details]
Patch for configure.in to use pkg-config for freetype2

This patch removes the reliance on freetype-config which has been removed from freetype2 and instead uses pkg-config instead.
Comment 2 Ozkan Sezer 2018-10-24 11:44:21 UTC
Fixed configury to use both pkg-config, and also freetype-config in
case it's not available.
https://hg.libsdl.org/SDL_ttf/rev/512e248bd4db
https://hg.libsdl.org/SDL_ttf/rev/268a58ec51b9