summaryrefslogtreecommitdiff
path: root/package/icu/icu.mk
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2010-12-22 09:04:05 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2010-12-22 23:45:17 +0100
commit84241e949901b2e014c92ad55303de7796820bc2 (patch)
treea579319e393dd85fe1f52b49946986607028662c /package/icu/icu.mk
parentff354debfa6391cf5762519652cb6cac27bc96f3 (diff)
icu: convert to autotargets and bump to version 4.4.2
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/icu/icu.mk')
-rw-r--r--package/icu/icu.mk86
1 files changed, 17 insertions, 69 deletions
diff --git a/package/icu/icu.mk b/package/icu/icu.mk
index 7961b0792..ffea1f194 100644
--- a/package/icu/icu.mk
+++ b/package/icu/icu.mk
@@ -1,77 +1,25 @@
#############################################################
#
-# ICU International Components for Unicode
+# International Components for Unicode
#
#############################################################
-ICU_VERSION:=4c-3_8_1
-ICU_SOURCE:=icu$(ICU_VERSION)-src.tgz
-ICU_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/icu
-ICU_CAT:=$(ZCAT)
-ICU_DIR:=$(BUILD_DIR)/icu/source
-ICU_HOST_DIR:=$(BUILD_DIR)/icu-host/source
-
-$(DL_DIR)/$(ICU_SOURCE):
- $(call DOWNLOAD,$(ICU_SITE),$(ICU_SOURCE))
-
-icu-source: $(DL_DIR)/$(ICU_SOURCE)
-
-$(ICU_DIR)/.unpacked: $(DL_DIR)/$(ICU_SOURCE)
- $(ICU_CAT) $(DL_DIR)/$(ICU_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(ICU_DIR)
- cp -a $(BUILD_DIR)/icu $(BUILD_DIR)/icu-host
- toolchain/patch-kernel.sh $(ICU_DIR) package/icu/ \*.patch
- toolchain/patch-kernel.sh $(ICU_HOST_DIR) package/icu/ \*both\*.patch
- touch $(ICU_DIR)/.unpacked
-
-$(ICU_HOST_DIR)/.configured: $(ICU_DIR)/.unpacked
- (cd $(ICU_HOST_DIR); ./configure $(QUIET) \
- --prefix=/usr;);
- touch $(ICU_HOST_DIR)/.configured
-
-$(ICU_DIR)/.configured: $(ICU_HOST_DIR)/.configured
- (cd $(ICU_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- CXX="$(TARGET_CXX)" \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --enable-samples \
- );
- touch $(ICU_DIR)/.configured
-
-$(ICU_HOST_DIR)/.done: $(ICU_DIR)/.configured
- $(MAKE1) -C $(ICU_HOST_DIR)
- ln -s -f $(ICU_HOST_DIR)/bin $(ICU_DIR)/bin-host
- ln -s -f $(ICU_HOST_DIR)/lib $(ICU_DIR)/lib-host
- touch $(ICU_HOST_DIR)/.done
-
-$(ICU_DIR)/.done: $(ICU_HOST_DIR)/.done
- $(MAKE1) -C $(ICU_DIR)
- $(MAKE) -C $(ICU_DIR) install DESTDIR=$(STAGING_DIR)
- $(MAKE) -C $(ICU_DIR) install DESTDIR=$(TARGET_DIR)
+ICU_VERSION = 4.4.2
+ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz
+ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION)
+ICU_DEPENDENCIES = host-icu
+ICU_INSTALL_STAGING = YES
+ICU_CONF_OPT = --with-cross-build=$(HOST_ICU_DIR)/source --disable-samples \
+ --disable-tests
+HOST_ICU_CONF_OPT = --disable-samples --disable-tests
+ICU_SUBDIR = source
+HOST_ICU_SUBDIR = source
+
+define ICU_PREFIX_FIXUP
$(SED) "s,^default_prefix=.*,default_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/icu-config
- touch $(ICU_DIR)/.done
+endef
-icu: $(ICU_DIR)/.done
+ICU_POST_INSTALL_TARGET_HOOKS += ICU_PREFIX_FIXUP
-icu-clean:
- rm -f $(TARGET_DIR)/bin/icu
- -$(MAKE) -C $(ICU_DIR) clean
-
-icu-dirclean:
- rm -rf $(ICU_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_ICU),y)
-TARGETS+=icu
-endif
+$(eval $(call AUTOTARGETS,package,icu))
+$(eval $(call AUTOTARGETS,package,icu,host))