summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/locale/tools/cross-compile-gettext.sh
blob: ce8491baa76a1ccb192e0a6aa3113d54f3a09066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
#
#  Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
#
#  Distributed under the Boost Software License, Version 1.0. (See
#  accompanying file LICENSE_1_0.txt or copy at
#  http://www.boost.org/LICENSE_1_0.txt)
#


# Small and Fast Cross Compile Script

rm -r build
cd build

BUILD_TYPE=i586-mingw32msvc
GETTEXT_VER=0.18.1.1
ICONV_VER=1.13.1

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz || exit 1
wget http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz || exit 1

tar -xzf libiconv-$ICONV_VER.tar.gz || exit 1
tar -xzf gettext-$GETTEXT_VER.tar.gz || exit 1


mkdir win32
PACKAGE_DIR=gettext-tools-static-$GETTEXT_VER
mkdir $PACKAGE_DIR

PREFIX=`pwd`/win32

cd libiconv-$ICONV_VER

./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX || exit 1
make -j 4 && make install || exit 1
cp ./COPYING ../$PACKAGE_DIR/COPYING-libiconv.txt

cd ../gettext-$GETTEXT_VER

./configure --disable-shared --host=$BUILD_TYPE --prefix=$PREFIX --with-libiconv-prefix=$PREFIX || exit 1
cd gettext-tools
make -j 4 && make install || exit 1
cd ..

cp ./gettext-tools/gnulib-lib/libxml/COPYING ../$PACKAGE_DIR/COPYING-libxml.txt
cp ./COPYING ../$PACKAGE_DIR/COPYING-gettext.txt

cd ..

echo http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$ICONV_VER.tar.gz > $PACKAGE_DIR/sources.txt
echo http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz >> $PACKAGE_DIR/sources.txt

cp win32/bin/*.exe $PACKAGE_DIR

unix2dos $PACKAGE_DIR/*.txt

zip $PACKAGE_DIR.zip $PACKAGE_DIR/*

mv $PACKAGE_DIR.zip ..