cross-compile-gettext.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
  4. #
  5. # Distributed under the Boost Software License, Version 1.0. (See
  6. # accompanying file LICENSE_1_0.txt or copy at
  7. # http://www.boost.org/LICENSE_1_0.txt)
  8. #
  9. # Small and Fast Cross Compile Script
  10. rm -r build
  11. cd build
  12. BUILD_TYPE=i586-mingw32msvc
  13. GETTEXT_VER=0.18.1.1
  14. ICONV_VER=1.13.1
  15. wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz || exit 1
  16. wget http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz || exit 1
  17. tar -xzf libiconv-$ICONV_VER.tar.gz || exit 1
  18. tar -xzf gettext-$GETTEXT_VER.tar.gz || exit 1
  19. mkdir win32
  20. PACKAGE_DIR=gettext-tools-static-$GETTEXT_VER
  21. mkdir $PACKAGE_DIR
  22. PREFIX=`pwd`/win32
  23. cd libiconv-$ICONV_VER
  24. ./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX || exit 1
  25. make -j 4 && make install || exit 1
  26. cp ./COPYING ../$PACKAGE_DIR/COPYING-libiconv.txt
  27. cd ../gettext-$GETTEXT_VER
  28. ./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX --with-libiconv-prefix=$PREFIX || exit 1
  29. cd gettext-tools
  30. make -j 4 && make install || exit 1
  31. cd ..
  32. cp ./gettext-tools/gnulib-lib/libxml/COPYING ../$PACKAGE_DIR/COPYING-libxml.txt
  33. cp ./COPYING ../$PACKAGE_DIR/COPYING-gettext.txt
  34. cd ..
  35. echo http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz > $PACKAGE_DIR/sources.txt
  36. echo http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz >> $PACKAGE_DIR/sources.txt
  37. cp win32/bin/*.exe $PACKAGE_DIR
  38. unix2dos $PACKAGE_DIR/*.txt
  39. zip $PACKAGE_DIR.zip $PACKAGE_DIR/*
  40. mv $PACKAGE_DIR.zip ..