]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/build-win32-cross-tools
kes Reapply my bat.conf install script in qt-console. I think I
[bacula/bacula] / bacula / src / win32 / build-win32-cross-tools
index 293872434ba7f3e6c158c48cbbd3853151e732ce..956384aefc21a253a668baec8cedd27a40a0e08c 100755 (executable)
@@ -85,7 +85,7 @@ PURGE_DIR="Y"
 # You need to set both the URL they will be downloaded from
 # and the exact name of the individual component files.
 
-MINGW_URL="http://heanet.dl.sourceforge.net/sourceforge/mingw"
+MINGW_URL="http://superb-west.dl.sourceforge.net/sourceforge/mingw"
 
 # GCC_CORE is required; the other components are optional.
 # Set any you don't want to "".  You need binutils,
@@ -160,7 +160,7 @@ PATH="$PREFIX/bin:$PATH"
 #-----------------------------------------------------
 
 
-function download_files
+download_files()
 {
         # Download a file from a given url, only if it is not present
         mkdir -p "$SRCDIR"
@@ -204,7 +204,7 @@ function download_files
 }
 
 
-function download_file
+download_file()
 {
         cd "$SRCDIR"
         if test ! -f $1 ; then
@@ -221,7 +221,7 @@ function download_file
 }
 
 
-function purge_existing_install
+purge_existing_install()
 {
         echo "Purging the existing files in $PREFIX"
         if cd "$PREFIX"; then
@@ -231,7 +231,7 @@ function purge_existing_install
 }
 
 
-function install_libs
+install_libs()
 {
         echo "Installing cross libs and includes"
         mkdir -p "$PREFIX/$TARGET"
@@ -252,7 +252,7 @@ function install_libs
 }
 
 
-function extract_binutils
+extract_binutils()
 {
         cd "$SRCDIR"
         BINUTILS=`tar -tzf "$SRCDIR/$BINUTILS_ARCHIVE" | head -n 1`
@@ -265,7 +265,7 @@ function extract_binutils
 }
 
 
-function configure_binutils
+configure_binutils()
 {
         cd "$BUILDDIR"
         rm -rf "binutils-$TARGET"
@@ -278,7 +278,7 @@ function configure_binutils
 }
 
 
-function build_binutils
+build_binutils()
 {
         cd "$BUILDDIR/binutils-$TARGET"
         echo "Building binutils"
@@ -291,7 +291,7 @@ function build_binutils
 }
 
 
-function install_binutils
+install_binutils()
 {
         cd "$BUILDDIR/binutils-$TARGET"
         echo "Installing binutils"
@@ -304,7 +304,7 @@ function install_binutils
 }
 
 
-function extract_gcc
+extract_gcc()
 {
         cd "$SRCDIR"
         GCC=`tar -tzf "$SRCDIR/$GCC_CORE_ARCHIVE" | head -n 1`
@@ -336,7 +336,7 @@ function extract_gcc
 }
 
 
-function patch_gcc
+patch_gcc()
 {
         if [ "$GCC_PATCH" != "" ]; then
                 echo "Patching gcc"
@@ -347,7 +347,7 @@ function patch_gcc
 }
 
 
-function configure_gcc
+configure_gcc()
 {
         cd "$BUILDDIR"
         rm -rf "gcc-$TARGET"
@@ -367,7 +367,7 @@ function configure_gcc
 }
 
 
-function build_gcc
+build_gcc()
 {
         cd "$BUILDDIR/gcc-$TARGET"
         echo "Building gcc"
@@ -388,7 +388,7 @@ function build_gcc
 }
 
 
-function install_gcc
+install_gcc()
 {
         cd "$BUILDDIR/gcc-$TARGET"
         echo "Installing gcc"
@@ -401,68 +401,68 @@ function install_gcc
 }
 
 
-function extract_mingw_utils
+extract_mingw_utils()
 {
-       cd "$SRCDIR"
-       MINGW_UTILS=`tar -tzf "$SRCDIR/$MINGW_UTILS_ARCHIVE" | head -n 1`
-       if [ "x${MINGW_UTILS}" != "x./" ]; then
-          rm -rf "$MINGW_UTILS"
-       fi
-       echo "Extracting mingw-utils"
-       tar -xzf "$SRCDIR/$MINGW_UTILS_ARCHIVE"
-       cd "$BUILDDIR"
+        cd "$SRCDIR"
+        MINGW_UTILS=`tar -tzf "$SRCDIR/$MINGW_UTILS_ARCHIVE" | head -n 1`
+        if [ "x${MINGW_UTILS}" != "x./" ]; then
+           rm -rf "$MINGW_UTILS"
+        fi
+        echo "Extracting mingw-utils"
+        tar -xzf "$SRCDIR/$MINGW_UTILS_ARCHIVE"
+        cd "$BUILDDIR"
 }
 
 
-function patch_mingw_utils
+patch_mingw_utils()
 {
-       MINGW_UTILS=`tar -tzf "$SRCDIR/$MINGW_UTILS_ARCHIVE" | head -n 1`
-       cd "${SRCDIR}/${MINGW_UTILS}"
-       echo "Patching mingw-utils"
-       patch -p0 < ${SCRIPTDIR}/patches/mingw-utils.patch 2>&1 > patch.log
-       cd "$BUILDDIR"
+        MINGW_UTILS=`tar -tzf "$SRCDIR/$MINGW_UTILS_ARCHIVE" | head -n 1`
+        cd "${SRCDIR}/${MINGW_UTILS}"
+        echo "Patching mingw-utils"
+        patch -p0 < ${SCRIPTDIR}/patches/mingw-utils.patch 2>&1 > patch.log
+        cd "$BUILDDIR"
 }
 
 
-function configure_mingw_utils
+configure_mingw_utils()
 {
-       cd "$BUILDDIR"
-       rm -rf "mingw-utils"
-       mkdir "mingw-utils"
-       cd "mingw-utils"
-       echo "Configuring mingw-utils"
-       "$SRCDIR/$MINGW_UTILS/configure" --disable-nonportable --prefix="${PREFIX}/${TARGET}" 2>&1 > configure.log
-       cd "$BUILDDIR"
+        cd "$BUILDDIR"
+        rm -rf "mingw-utils"
+        mkdir "mingw-utils"
+        cd "mingw-utils"
+        echo "Configuring mingw-utils"
+        "$SRCDIR/$MINGW_UTILS/configure" --disable-nonportable --prefix="${PREFIX}/${TARGET}" 2>&1 > configure.log
+        cd "$BUILDDIR"
 }
 
 
-function build_mingw_utils
+build_mingw_utils()
 {
-       cd "$BUILDDIR/mingw-utils"
-       echo "Building mingw-utils"
-       make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" 2>&1 > make.log
-       if test $? -ne 0; then
-               echo "make of mingw-utils failed - log available: mingw-utils/make.log"
-               exit 1
-       fi
-       cd "$BUILDDIR"
+        cd "$BUILDDIR/mingw-utils"
+        echo "Building mingw-utils"
+        make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" 2>&1 > make.log
+        if test $? -ne 0; then
+                echo "make of mingw-utils failed - log available: mingw-utils/make.log"
+                exit 1
+        fi
+        cd "$BUILDDIR"
 }
 
 
-function install_mingw_utils
+install_mingw_utils()
 {
-       cd "$BUILDDIR/mingw-utils"
-       echo "Installing mingw-utils"
-       make install 2>&1 > make-install.log
-       if test $? -ne 0; then
-               echo "install of mingw-utils failed - log available: mingw-utils/make-install.log"
-               exit 1
-       fi
-       cd "$BUILDDIR"
+        cd "$BUILDDIR/mingw-utils"
+        echo "Installing mingw-utils"
+        make install 2>&1 > make-install.log
+        if test $? -ne 0; then
+                echo "install of mingw-utils failed - log available: mingw-utils/make-install.log"
+                exit 1
+        fi
+        cd "$BUILDDIR"
 }
 
 
-function final_tweaks
+final_tweaks()
 {
         echo "Finalizing installation"
 
@@ -523,11 +523,11 @@ build_gcc
 install_gcc
 
 if test -n "${MINGW_UTILS_ARCHIVE}"; then
-       extract_mingw_utils
-       patch_mingw_utils
-       configure_mingw_utils
-       build_mingw_utils
-       install_mingw_utils
+        extract_mingw_utils
+        patch_mingw_utils
+        configure_mingw_utils
+        build_mingw_utils
+        install_mingw_utils
 fi
 
 final_tweaks