| 1 | # Description: Widely used set of C/C++ libraries providing Unicode and Globalization support. |
| 2 | # URL: http://www.icu-project.org/ |
| 3 | # Packager: Younes Hafri, ycrux at club-internet dot fr |
| 4 | # Maintainer: Danny Rawlins, monster dot romster at gmail dot com |
| 5 | # Arch Maintainer System Team devel at crux-arm dot nu |
| 6 | # Depends on: |
| 7 | |
| 8 | name=icu |
| 9 | version=4.4.2 |
| 10 | release=1 |
| 11 | source=(http://download.icu-project.org/files/icu4c/$version/icu4c-${version//./_}-src.tgz \ |
| 12 | $name-$version-arm-assembler.patch) |
| 13 | |
| 14 | build() { |
| 15 | |
| 16 | SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS" |
| 17 | SAVED_AR="$AR" SAVED_RANLIB="$RANLIB" SAVED_LD="$LD" |
| 18 | unset CC CFLAGS CXX CXXFLAGS AR RANLIB LD |
| 19 | |
| 20 | patch -i $SRC/$name-$version-arm-assembler.patch icu/source/tools/toolutil/pkg_genc.c |
| 21 | |
| 22 | cp -r icu build_host |
| 23 | mkdir build_cross |
| 24 | |
| 25 | chmod +x icu/source/{runConfigureICU,configure,install-sh} |
| 26 | cd build_host |
| 27 | ../icu/source/runConfigureICU LinuxRedHat \ |
| 28 | --prefix=/usr \ |
| 29 | --mandir=$PKG/usr/man \ |
| 30 | --enable-shared \ |
| 31 | --disable-samples \ |
| 32 | --disable-tests \ |
| 33 | --enable-rpath |
| 34 | make |
| 35 | |
| 36 | cd $SRC/build_cross |
| 37 | CC="$CTARGET-gcc" CXX="$CTARGET-g++" \ |
| 38 | CFLAGS="$SAVED_CFLAGS -I$CLFS/usr/include" CXXFLAGS="$CFLAGS" \ |
| 39 | RANLIB="$SAVED_RANLIB" AR="$SAVED_AR" \ |
| 40 | ../icu/source/runConfigureICU LinuxRedHat \ |
| 41 | --build=$CHOST \ |
| 42 | --host=$CTARGET \ |
| 43 | --prefix=/usr \ |
| 44 | --mandir=$PKG/usr/man \ |
| 45 | --enable-shared \ |
| 46 | --disable-samples \ |
| 47 | --disable-tests \ |
| 48 | --enable-rpath \ |
| 49 | --with-cross-build=$SRC/build_host |
| 50 | |
| 51 | make CC="$CTARGET-gcc" CXX="$CTARGET-g++" \ |
| 52 | CFLAGS="$SAVED_CFLAGS -I$CLFS/usr/include" CXXFLAGS="$CFLAGS" \ |
| 53 | AR="$SAVED_AR" RANLIB="$SAVED_RANLIB" LD="$SAVED_LD" |
| 54 | |
| 55 | make prefix=$PKG/usr install |
| 56 | |
| 57 | rm $PKG/usr/share/icu/$version/license.html |
| 58 | } |