From f72e3365ba94c5162190db0c21345dc50ecca73a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 19 Mar 2013 07:46:50 +0100 Subject: [PATCH] icu: cross build and dbg support. --- srcpkgs/icu/template | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/srcpkgs/icu/template b/srcpkgs/icu/template index 83811987d20..9332692e92d 100644 --- a/srcpkgs/icu/template +++ b/srcpkgs/icu/template @@ -2,10 +2,9 @@ pkgname=icu version=49.1.2 _distver="$(echo $version|sed -e 's|\.|_|g')" -revision=1 +revision=2 wrksrc=icu build_wrksrc=source -build_style=gnu-configure subpackages="icu-devel icu-libs" short_desc="Robust and full-featured Unicode services" maintainer="Juan RP " @@ -31,6 +30,37 @@ long_desc=" - Transliteration - Word, line and sentence breaks" -post_install() { +pre_configure() { + if [ -n "$XBPS_CROSS_BUILD" ]; then + # Configure and build for host. + mkdir host-build + cd host-build + env CC=gcc LD=ld CXX=g++ AR=ar RANLIB=ranlib \ + AS=as STRIP=strip CFLAGS="-Os" CXXFLAGS="-Os" \ + ../configure --prefix=/ + make ${makejobs} + mkdir -p ${wrksrc}/host-icu/config + cp config/icucross.mk ${wrksrc}/host-icu/config + make DESTDIR=${wrksrc}/host-icu install + mv ${wrksrc}/host-icu/sbin/* ${wrksrc}/host-icu/bin + fi +} + +do_configure() { + if [ -n "$XBPS_CROSS_BUILD" ]; then + ./configure ${CONFIGURE_SHARED_ARGS} \ + --with-cross-build=${wrksrc}/host-icu + else + ./configure ${CONFIGURE_SHARED_ARGS} + fi +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DESTDIR=${DESTDIR} install + vinstall $wrksrc/license.html 644 usr/share/licenses/icu }