mxe/src/icu4c.mk

50 lines
1.6 KiB
Makefile
Raw Normal View History

2013-05-18 11:57:56 +01:00
# This file is part of MXE.
# See index.html for further information.
PKG := icu4c
$(PKG)_IGNORE :=
$(PKG)_VERSION := 53.1
$(PKG)_CHECKSUM := 7eca017fdd101e676d425caaf28ef862d3655e0f
2013-05-18 11:57:56 +01:00
$(PKG)_SUBDIR := icu
$(PKG)_FILE := $(PKG)-$(subst .,_,$($(PKG)_VERSION))-src.tgz
$(PKG)_URL := http://download.icu-project.org/files/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
2013-10-20 07:54:48 +01:00
$(WGET) -q -O- 'http://bugs.icu-project.org/trac/browser/icu/tags' | \
$(SED) -n 's,.*release-\([0-9-]*\)<.*,\1,p' | \
tr '-' '.' | \
$(SORT) -V | \
tail -1
2013-05-18 11:57:56 +01:00
endef
define $(PKG)_BUILD_COMMON
cd '$(1)/source' && autoreconf -fi
2013-05-23 10:20:12 +01:00
mkdir '$(1).native' && cd '$(1).native' && '$(1)/source/configure' \
CC=gcc CXX=g++
2013-05-18 11:57:56 +01:00
$(MAKE) -C '$(1).native' -j '$(JOBS)'
mkdir '$(1).cross' && cd '$(1).cross' && '$(1)/source/configure' \
$(MXE_CONFIGURE_OPTS) \
2013-05-18 11:57:56 +01:00
--with-cross-build='$(1).native' \
CFLAGS=-DU_USING_ICU_NAMESPACE=0 \
2013-11-09 06:13:30 +00:00
CXXFLAGS='--std=gnu++0x' \
2013-05-18 11:57:56 +01:00
SHELL=bash
$(MAKE) -C '$(1).cross' -j '$(JOBS)' install
ln -sf '$(PREFIX)/$(TARGET)/bin/icu-config' '$(PREFIX)/bin/$(TARGET)-icu-config'
endef
define $(PKG)_BUILD_SHARED
$($(PKG)_BUILD_COMMON)
# icu4c installs its DLLs to lib/. Move them to bin/.
mv -fv $(PREFIX)/$(TARGET)/lib/icu*.dll '$(PREFIX)/$(TARGET)/bin/'
endef
define $(PKG)_BUILD
$($(PKG)_BUILD_COMMON)
# Static libs are prefixed with an `s` but the config script
# doesn't detect it properly, despite the STATIC_PREFIX="s" line
$(SED) -i 's,ICUPREFIX="icu",ICUPREFIX="sicu",' '$(PREFIX)/$(TARGET)/bin/icu-config'
2013-05-18 11:57:56 +01:00
endef