Bug 1270 - Update to mingw-cross-compile.sh

* build/mingw/mingw-cross-compile.sh: Update to download latest
	binaries. Patch thanks to David Kedves.
This commit is contained in:
Neil Roberts 2008-11-21 16:38:34 +00:00
parent 21617cc0f1
commit 46d4506478
2 changed files with 35 additions and 33 deletions

View File

@ -1,3 +1,10 @@
2008-11-21 Neil Roberts <neil@linux.intel.com>
Bug 1270 - Update to mingw-cross-compile.sh
* build/mingw/mingw-cross-compile.sh: Update to download latest
binaries. Patch thanks to David Kedves.
2008-11-21 Neil Roberts <neil@linux.intel.com> 2008-11-21 Neil Roberts <neil@linux.intel.com>
Bug 1271 - mingw compiling failed: undefined reference to Bug 1271 - mingw compiling failed: undefined reference to

View File

@ -7,32 +7,34 @@
TOR_URL="http://ftp.gnome.org/pub/gnome/binaries/win32"; TOR_URL="http://ftp.gnome.org/pub/gnome/binaries/win32";
TOR_BINARIES=( \ TOR_BINARIES=( \
glib-2.14.4 \ glib/2.18/glib{-dev,}_2.18.2-1_win32.zip \
gtk+-2.12.3 \ gtk+/2.14/gtk+{-dev,}_2.14.4-2_win32.zip \
pango-1.18.3 \ pango/1.22/pango{-dev,}_1.22.0-1_win32.zip \
atk-1.20.0 ); atk/1.24/atk{-dev,}_1.24.0-1_win32.zip );
TOR_DEP_URL="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies"; TOR_DEP_URL="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies";
TOR_DEPS=( \ TOR_DEPS=( \
cairo-{dev-,}1.4.10.zip \ cairo-{dev-,}1.6.4-2.zip \
gettext-runtime-{dev-,}0.17.zip \ gettext-runtime-{dev-,}0.17-1.zip \
fontconfig-{dev-,}2.4.2-tml-20071015.zip \ fontconfig-{dev-,}2.4.2-tml-20071015.zip \
freetype-{dev-,}2.3.4.zip \ freetype-{dev-,}2.3.6.zip \
expat-2.0.0.zip ); expat-2.0.0.zip );
SF_URL="http://surfnet.dl.sourceforge.net/sourceforge"; #SF_URL="http://kent.dl.sourceforge.net/sourceforge";
#SF_URL="http://surfnet.dl.sourceforge.net/sourceforge";
SF_URL="http://mesh.dl.sourceforge.net/sourceforge";
OTHER_DEPS=( \ OTHER_DEPS=( \
"http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip" \ "http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip" \
"${SF_URL}/libpng/zlib123-dll.zip" \ "${SF_URL}/libpng/zlib123-dll.zip" \
"http://www.libsdl.org/release/SDL-devel-1.2.12-mingw32.tar.gz" \ "http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz" \
"${SF_URL}/mesa3d/MesaLib-7.0.3.tar.bz2" ); "${SF_URL}/mesa3d/MesaLib-7.2.tar.bz2" );
GNUWIN32_URL="${SF_URL}/gnuwin32"; GNUWIN32_URL="${SF_URL}/gnuwin32";
GNUWIN32_DEPS=( \ GNUWIN32_DEPS=( \
libpng-1.2.8-{bin,lib}.zip \ libpng-1.2.33-{bin,lib}.zip \
jpeg-6b-4-{bin,lib}.zip \ jpeg-6b-4-{bin,lib}.zip \
tiff-3.8.2-1-{bin,lib}.zip ); tiff-3.8.2-1-{bin,lib}.zip );
@ -48,7 +50,7 @@ function download_file ()
curl -C - -o "$DOWNLOAD_DIR/$filename" "$url"; curl -C - -o "$DOWNLOAD_DIR/$filename" "$url";
;; ;;
*) *)
"$DOWNLOAD_PROG" -O "$DOWNLOAD_DIR/$filename" -c "$url"; $DOWNLOAD_PROG -O "$DOWNLOAD_DIR/$filename" -c "$url";
;; ;;
esac; esac;
@ -78,7 +80,7 @@ function guess_dir ()
eval $var="\"$dir\""; eval $var="\"$dir\"";
if [ ! -d "$dir" ]; then if [ ! -d "$dir" ]; then
if ! mkdir "$dir"; then if ! mkdir -p "$dir"; then
echo "Error making directory $dir"; echo "Error making directory $dir";
exit 1; exit 1;
fi; fi;
@ -188,7 +190,8 @@ guess_dir DOWNLOAD_DIR "downloads" \
if [ -z "$DOWNLOAD_PROG" ]; then if [ -z "$DOWNLOAD_PROG" ]; then
# If no download program has been specified then check if wget or # If no download program has been specified then check if wget or
# curl exists # curl exists
for x in curl wget; do #wget first, because my curl can't download libsdl...
for x in wget curl; do
if [ "`type -t $x`" != "" ]; then if [ "`type -t $x`" != "" ]; then
DOWNLOAD_PROG="$x"; DOWNLOAD_PROG="$x";
break; break;
@ -214,13 +217,8 @@ quoted_root_dir=`echo "$ROOT_DIR" | sed "$SLASH_SCRIPT" `;
## ##
for bin in "${TOR_BINARIES[@]}"; do for bin in "${TOR_BINARIES[@]}"; do
pkg="${bin%-*}"; bn="${bin##*/}";
ver="${bin#*-}"; download_file "$TOR_URL/$bin" "$bn"
major_ver="${ver%.*}";
download_file "$TOR_URL/$pkg/$major_ver/$pkg-$ver.zip" \
"$pkg-$ver.zip";
download_file "$TOR_URL/$pkg/$major_ver/$pkg-dev-$ver.zip" \
"$pkg-dev-$ver.zip";
done; done;
for dep in "${TOR_DEPS[@]}"; do for dep in "${TOR_DEPS[@]}"; do
@ -241,12 +239,9 @@ done;
## ##
for bin in "${TOR_BINARIES[@]}"; do for bin in "${TOR_BINARIES[@]}"; do
pkg="${bin%-*}"; echo "Extracting $bin...";
ver="${bin#*-}"; bn="${bin##*/}";
echo "Extracting $pkg..."; do_unzip "$DOWNLOAD_DIR/$bn";
for fn in "$DOWNLOAD_DIR/${pkg}"{-dev,}"-${ver}.zip"; do
do_unzip "$fn";
done;
done; done;
for dep in "${TOR_DEPS[@]}"; do for dep in "${TOR_DEPS[@]}"; do
@ -271,17 +266,17 @@ fi;
echo "Extracting SDL..."; echo "Extracting SDL...";
if ! tar -C "$ROOT_DIR" \ if ! tar -C "$ROOT_DIR" \
-zxf "$DOWNLOAD_DIR/SDL-devel-1.2.12-mingw32.tar.gz"; then -zxf "$DOWNLOAD_DIR/SDL-devel-1.2.13-mingw32.tar.gz"; then
echo "Failed to extract SDL"; echo "Failed to extract SDL";
exit 1; exit 1;
fi; fi;
for x in bin docs include lib man share; do for x in bin docs include lib man share; do
if ! cp -pR "$ROOT_DIR/SDL-1.2.12/$x" "$ROOT_DIR/"; then if ! cp -pR "$ROOT_DIR/SDL-1.2.13/$x" "$ROOT_DIR/"; then
echo "Failed to copy SDL files"; echo "Failed to copy SDL files";
exit 1; exit 1;
fi; fi;
done; done;
rm -fr "$ROOT_DIR/SDL-1.2.12"; rm -fr "$ROOT_DIR/SDL-1.2.13";
export SDL_CONFIG="$ROOT_DIR/bin/sdl-config"; export SDL_CONFIG="$ROOT_DIR/bin/sdl-config";
echo "Fixing SDL libtool files..."; echo "Fixing SDL libtool files...";
@ -308,12 +303,12 @@ mv "$ROOT_DIR/lib/pkgconfig/pangoft2.pc"{.tmp,};
echo "Extracting Mesa headers..."; echo "Extracting Mesa headers...";
if ! tar -C "$DOWNLOAD_DIR" \ if ! tar -C "$DOWNLOAD_DIR" \
-jxf "$DOWNLOAD_DIR/MesaLib-7.0.3.tar.bz2" \ -jxf "$DOWNLOAD_DIR/MesaLib-7.2.tar.bz2" \
Mesa-7.0.3/include; then Mesa-7.2/include; then
echo "Failed to extract Mesa headers"; echo "Failed to extract Mesa headers";
exit 1; exit 1;
fi; fi;
cp -R "$DOWNLOAD_DIR/Mesa-7.0.3/include/"* "$ROOT_DIR/include"; cp -R "$DOWNLOAD_DIR/Mesa-7.2/include/"* "$ROOT_DIR/include";
## ##
# Build # Build