From 7fb8fc65a33aea59d7a970acefd0eab19d94da69 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 21 Sep 2011 13:37:44 +0100 Subject: [PATCH] mingw-fetch-dependencies: Mirror the changes made to the Cogl version Cogl has a similar script which has had the following additional changes: * Don't pass -c to wget * Explicitly download and run config.guess This patch just syncs up with those. https://bugzilla.gnome.org/show_bug.cgi?id=659625 --- build/mingw/mingw-fetch-dependencies.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build/mingw/mingw-fetch-dependencies.sh b/build/mingw/mingw-fetch-dependencies.sh index bd5f08fd4..2fce3fd44 100755 --- a/build/mingw/mingw-fetch-dependencies.sh +++ b/build/mingw/mingw-fetch-dependencies.sh @@ -35,17 +35,24 @@ GL_HEADER_URLS=( \ GL_HEADERS=( gl.h glext.h ); +CONFIG_GUESS_URL="http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/config.guess" + function download_file () { local url="$1"; shift; local filename="$1"; shift; + if test -f "$DOWNLOAD_DIR/$filename"; then + echo "Skipping download of $filename because the file already exists"; + return 0; + fi; + case "$DOWNLOAD_PROG" in curl) - curl -C - -o "$DOWNLOAD_DIR/$filename" "$url"; + curl -o "$DOWNLOAD_DIR/$filename" "$url"; ;; *) - $DOWNLOAD_PROG -O "$DOWNLOAD_DIR/$filename" -c "$url"; + $DOWNLOAD_PROG -O "$DOWNLOAD_DIR/$filename" "$url"; ;; esac; @@ -263,6 +270,8 @@ for dep in "${SOURCES_DEPS[@]}"; do download_file "$GNOME_SOURCES_URL/$dep" "$src"; done; +download_file "$CONFIG_GUESS_URL" "config.guess"; + ## # Extract files ## @@ -338,6 +347,8 @@ chmod a+x "$RUN_PKG_CONFIG"; find_compiler; +build_config=`bash $DOWNLOAD_DIR/config.guess`; + ## # Build source dependencies ## @@ -357,7 +368,7 @@ echo echo "To get started, you should be able to configure and build from" echo "the top of your clutter source directory as follows:" echo -echo "./configure --host=\"$TARGET\" --target=\"$TARGET\" --build=\"`./config.guess`\" --with-flavour=win32 CFLAGS=\"-mms-bitfields -I$ROOT_DIR/include\" PKG_CONFIG=\"$RUN_PKG_CONFIG\"" +echo "./configure --host=\"$TARGET\" --target=\"$TARGET\" --build=\"$build_config\" --with-flavour=win32 CFLAGS=\"-mms-bitfields -I$ROOT_DIR/include\" PKG_CONFIG=\"$RUN_PKG_CONFIG\"" echo "make" echo echo "Note: the explicit --build option is often necessary to ensure autoconf"