summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/freetype/freetype.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk
index 262053435..940510f86 100644
--- a/package/freetype/freetype.mk
+++ b/package/freetype/freetype.mk
@@ -23,3 +23,42 @@ $(FREETYPE_HOOK_POST_INSTALL):
$(STAGING_DIR)/usr/bin/freetype-config
touch $@
+# freetype for the host
+FREETYPE_HOST_DIR:=$(BUILD_DIR)/freetype-$(FREETYPE_VERSION)-host
+FREETYPE_HOST_BINARY:=$(HOST_DIR)/usr/bin/freetype-config
+
+$(FREETYPE_HOST_DIR)/.unpacked: $(DL_DIR)/$(FREETYPE_SOURCE)
+ mkdir -p $(@D)
+ $(INFLATE$(suffix $(FREETYPE_SOURCE))) $< | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ touch $@
+
+$(FREETYPE_HOST_DIR)/.configured: $(FREETYPE_HOST_DIR)/.unpacked $(PKGCONFIG_HOST_BINARY)
+ (cd $(@D); rm -rf config.cache; \
+ $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ $(@D)/configure \
+ --prefix=$(HOST_DIR)/usr \
+ --sysconfdir=$(HOST_DIR)/etc \
+ )
+ touch $@
+
+$(FREETYPE_HOST_DIR)/.compiled: $(FREETYPE_HOST_DIR)/.configured
+ $(MAKE) -C $(@D)
+ touch $@
+
+$(FREETYPE_HOST_BINARY): $(FREETYPE_HOST_DIR)/.compiled
+ $(HOST_MAKE_ENV) $(MAKE) -C $(<D) install
+
+host-freetype: $(FREETYPE_HOST_BINARY)
+
+host-freetype-source: freetype-source
+
+host-freetype-clean:
+ rm -f $(addprefix $(FREETYPE_HOST_DIR)/,.unpacked .configured .compiled)
+ -$(MAKE) -C $(FREETYPE_HOST_DIR) uninstall
+ -$(MAKE) -C $(FREETYPE_HOST_DIR) clean
+
+host-freetype-dirclean:
+ rm -rf $(FREETYPE_HOST_DIR)