summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2013-11-10 14:03:09 (GMT)
committer Peter Korsgaard <peter@korsgaard.com>2013-11-10 21:34:24 (GMT)
commitf7313cadf2ca9e0195a873f62f6b6c38a58a3630 (patch)
tree7e4610784c0ca5e31cfaf5bc117cf8d1f708fd0d
parent094d8ec896ef0c447a4bfb884753bf8984d67dbc (diff)
downloadbuildroot-f7313cadf2ca9e0195a873f62f6b6c38a58a3630.tar.gz
buildroot-f7313cadf2ca9e0195a873f62f6b6c38a58a3630.tar.bz2
freetype: add libpng to freetype-config and freetype2.pc
Add libpng libraries to freetype-config and freetype2.pc when they're needed to avoid build breakage for other packages. Patch in a different form is already upstream. Fixing configure & friends is not so good since autoreconf busts things up because of the odd way things are done (upstream fixed too it seems). Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/freetype/freetype.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk
index cc5fbf8..1e378d3 100644
--- a/package/freetype/freetype.mk
+++ b/package/freetype/freetype.mk
@@ -37,6 +37,7 @@ ifeq ($(BR2_PACKAGE_LIBPNG),y)
FREETYPE_DEPENDENCIES += libpng
FREETYPE_CONF_OPT += LIBPNG_CFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \
LIBPNG_LDFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`"
+FREETYPE_LIBPNG_LIBS = "`$(STAGING_DIR)/usr/bin/libpng-config --libs`"
else
FREETYPE_CONF_OPT += --without-png
endif
@@ -49,5 +50,14 @@ define FREETYPE_FIX_CONFIG_FILE
endef
FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE
+# libpng isn't included in freetype-config & freetype2.pc :-/
+define FREETYPE_FIX_CONFIG_FILE_LIBS
+ $(SED) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \
+ $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
+ $(SED) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \
+ $(STAGING_DIR)/usr/bin/freetype-config
+endef
+FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE_LIBS
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))