freetype: fixup config file
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Thu, 13 Jun 2013 13:00:23 +0000 (10:00 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 13 Jun 2013 13:15:12 +0000 (15:15 +0200)
Fix freetype-config's includedir and libdir since they're expanded from
configure values since bumping to version 2.4.12

Fixes:
http://autobuild.buildroot.net/results/1c7/1c70ce0ff350623cc38baf4b8b61c8a7a8586aba/
...and many others.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/freetype/freetype.mk

index 16f00fe64cde244ce6257091682e070b651a02bb..177adf50ac6d8267f059fe7cd2eb9b08a4526532 100644 (file)
@@ -18,5 +18,13 @@ FREETYPE_CONFIG_SCRIPTS = freetype-config
 
 HOST_FREETYPE_DEPENDENCIES = host-pkgconf
 
+# Extra fixing since includedir and libdir are expanded from configure values
+define FREETYPE_FIX_CONFIG_FILE
+       $(SED) 's:^includedir=.*:includedir="$${prefix}/include":' \
+               -e 's:^libdir=.*:libdir="$${exec_prefix}/lib":' \
+               $(STAGING_DIR)/usr/bin/freetype-config
+endef
+FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))