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 - Use pkg-config for freetype
Summary: Use pkg-config for freetype
Status: RESOLVED FIXED
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Ozkan Sezer
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 22:32 UTC by Joshua Root
Modified: 2018-10-24 11:44 UTC (History)
2 users (show)

See Also:


Attachments
Patch for configure.in to use pkg-config for freetype2 (1.58 KB, text/plain)
2018-10-23 21:32 UTC, Neil Munday
Details

Note You need to log in before you can comment on or make changes to this bug.
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