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 10 11# Small and Fast Cross Compile Script 12 13rm -r build 14cd build 15 16BUILD_TYPE=i586-mingw32msvc 17GETTEXT_VER=0.18.1.1 18ICONV_VER=1.13.1 19 20wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz || exit 1 21wget http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz || exit 1 22 23tar -xzf libiconv-$ICONV_VER.tar.gz || exit 1 24tar -xzf gettext-$GETTEXT_VER.tar.gz || exit 1 25 26 27mkdir win32 28PACKAGE_DIR=gettext-tools-static-$GETTEXT_VER 29mkdir $PACKAGE_DIR 30 31PREFIX=`pwd`/win32 32 33cd libiconv-$ICONV_VER 34 35./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX || exit 1 36make -j 4 && make install || exit 1 37cp ./COPYING ../$PACKAGE_DIR/COPYING-libiconv.txt 38 39cd ../gettext-$GETTEXT_VER 40 41./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX --with-libiconv-prefix=$PREFIX || exit 1 42cd gettext-tools 43make -j 4 && make install || exit 1 44cd .. 45 46cp ./gettext-tools/gnulib-lib/libxml/COPYING ../$PACKAGE_DIR/COPYING-libxml.txt 47cp ./COPYING ../$PACKAGE_DIR/COPYING-gettext.txt 48 49cd .. 50 51echo http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz > $PACKAGE_DIR/sources.txt 52echo http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz >> $PACKAGE_DIR/sources.txt 53 54cp win32/bin/*.exe $PACKAGE_DIR 55 56unix2dos $PACKAGE_DIR/*.txt 57 58zip $PACKAGE_DIR.zip $PACKAGE_DIR/* 59 60mv $PACKAGE_DIR.zip .. 61