wok rev 12830
gettext: cross-compile for ARM
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 22 15:17:22 2012 +0200 (2012-05-22) |
parents | 98e7fe8d84f0 |
children | 2ce43b9c164d |
files | gettext-base/receipt gettext/receipt |
line diff
1.1 --- a/gettext-base/receipt Tue May 22 15:15:50 2012 +0200 1.2 +++ b/gettext-base/receipt Tue May 22 15:17:22 2012 +0200 1.3 @@ -8,14 +8,21 @@ 1.4 DEPENDS="glibc-base" 1.5 WANTED="gettext" 1.6 WEB_SITE="http://www.gnu.org/software/gettext/" 1.7 +HOST_ARCH="i486 arm" 1.8 + 1.9 +# Just to be sure when cross compiling, gettext is part of base system. 1.10 +testsuite() 1.11 +{ 1.12 + readelf -h $install/usr/bin/gettext 1.13 +} 1.14 1.15 # Rules to gen a SliTaz package suitable for Tazpkg. 1.16 genpkg_rules() 1.17 { 1.18 mkdir -p $fs/usr/bin 1.19 - cp -a $_pkg/usr/bin/gettext $fs/usr/bin 1.20 - cp -a $_pkg/usr/bin/gettext.sh $fs/usr/bin 1.21 + cp -a $install/usr/bin/gettext $fs/usr/bin 1.22 + cp -a $install/usr/bin/gettext.sh $fs/usr/bin 1.23 # These are used in gettext.sh so there needed 1.24 - cp -a $_pkg/usr/bin/envsubst $fs/usr/bin 1.25 - cp -a $_pkg/usr/bin/ngettext $fs/usr/bin 1.26 + cp -a $install/usr/bin/envsubst $fs/usr/bin 1.27 + cp -a $install/usr/bin/ngettext $fs/usr/bin 1.28 }
2.1 --- a/gettext/receipt Tue May 22 15:15:50 2012 +0200 2.2 +++ b/gettext/receipt Tue May 22 15:17:22 2012 +0200 2.3 @@ -8,43 +8,34 @@ 2.4 TARBALL="$PACKAGE-$VERSION.tar.gz" 2.5 WEB_SITE="http://www.gnu.org/software/gettext/" 2.6 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" 2.7 +HOST_ARCH="i486 arm" 2.8 2.9 +# Why deps on glib-dev ??? And glib build depends on gettext anyway... 2.10 DEPENDS="gettext-base libgomp ncurses gcc-lib-base glib libxml2" 2.11 BUILD_DEPENDS="glibc-locale ncurses-dev glib-dev libxml2-dev" 2.12 2.13 -# Rules to compile & install the temporary toolchain. 2.14 -cook_tmp_toolchain() 2.15 -{ 2.16 - cd $src/gettext-tools 2.17 - ./configure --disable-shared && 2.18 - make -C gnulib-lib && 2.19 - make -C src msgfmt && 2.20 - cp -a src/msgfmt /tools/bin && 2.21 - cd ../gettext-runtime && 2.22 - ./configure --disable-shared && 2.23 - make -C gnulib-lib && 2.24 - make -C src envsubst && 2.25 - make -C src gettext && 2.26 - make -C src ngettext && 2.27 - cp -a src/envsubst src/gettext src/gettext.sh src/ngettext /tools/bin 2.28 -} 2.29 +# Handle cross compilation. Glibc-locale are installed in cross chroot. 2.30 +case "$ARCH" in 2.31 + arm) BUILD_DEPENDS="ncurses-dev libxml2-dev" ;; 2.32 +esac 2.33 2.34 # Rules to configure and make the package. 2.35 compile_rules() 2.36 { 2.37 cd $src 2.38 - ./configure $CONFIGURE_ARGS && make && make install 2.39 + ./configure $CONFIGURE_ARGS && 2.40 + make && make install 2.41 } 2.42 2.43 # Rules to gen a SliTaz package suitable for Tazpkg. 2.44 genpkg_rules() 2.45 { 2.46 mkdir -p $fs/usr/share 2.47 - cp -a $_pkg/usr/bin $fs/usr 2.48 - cp -a $_pkg/usr/lib $fs/usr 2.49 - cp -a $_pkg/usr/include $fs/usr 2.50 - cp -a $_pkg/usr/share/aclocal $fs/usr/share 2.51 - cp -a $_pkg/usr/share/gettext $fs/usr/share 2.52 + cp -a $install/usr/bin $fs/usr 2.53 + cp -a $install/usr/lib $fs/usr 2.54 + cp -a $install/usr/include $fs/usr 2.55 + cp -a $install/usr/share/aclocal $fs/usr/share 2.56 + cp -a $install/usr/share/gettext $fs/usr/share 2.57 # Remove gettext-base files. 2.58 rm $fs/usr/bin/gettext 2.59 rm $fs/usr/bin/gettext.sh