summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-03-18 21:22:00 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-03-18 21:22:00 +0000
commit33552590d5376e095cea99e650e967c5b278a2d0 (patch)
tree19e521bcbe5050ee5363ea1aa38de529a3b9b599 /package
parent0296059112348bb82506ae2ff4af0cb66f535bc0 (diff)
freetype: add host version
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)