]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Windows cross-compile compatibilty problems with FreeBSD.
authorRobert Nelson <robertn@the-nelsons.org>
Tue, 8 Aug 2006 07:49:09 +0000 (07:49 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Tue, 8 Aug 2006 07:49:09 +0000 (07:49 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3268 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/build-dependencies
bacula/src/win32/build-win32-cross-tools
bacula/src/win32/installer/Makefile
bacula/src/win32/patches/mt.patch
bacula/src/win32/patches/nsis.patch
bacula/src/win32/patches/openssl.patch
bacula/src/win32/patches/wx.sed

index 9ebd2beb7fe2c085f005ef50fe48715ea22f8608..4dbca5e0db1982267436a89fbba497860d792bdc 100755 (executable)
@@ -106,7 +106,7 @@ get_source()
        then
                rm -rf ${SRC_DIR}
                echo Extracting ${ARCHIVE}
-               ${ARCHIVER} ${ARCHIVE} &> ${ARCHIVE}.log
+               ${ARCHIVER} ${ARCHIVE} 2>&1 > ${ARCHIVE}.log
                cd ${SRC_DIR}
                return 0
        fi
@@ -182,7 +182,7 @@ process_pcre()
                do_patch pcre.patch
        fi
        echo Configuring PCRE
-       ./configure CC_FOR_BUILD=gcc CXX_FOR_BUILD=g++ --host=mingw32 --prefix=${DEPPKG_DIR} --enable-utf8 --enable-unicode-properties &>make.log
+       ./configure CC_FOR_BUILD=gcc CXX_FOR_BUILD=g++ --host=mingw32 --prefix=${DEPPKG_DIR} --enable-utf8 --enable-unicode-properties 2>&1 >make.log
        echo Building PCRE
        do_make Makefile PREFIX=${DEPPKG_DIR} all
        echo Installing PCRE
@@ -217,7 +217,7 @@ process_openssl()
                do_patch openssl.patch
        fi
        echo Configuring openssl
-       ./Configure --prefix=${DEPPKG_DIR} shared zlib-dynamic threads --with-zlib-include=${DEPPKG_DIR}/include mingw32 &> make.log
+       ./Configure --prefix=${DEPPKG_DIR} shared zlib-dynamic threads --with-zlib-include=${DEPPKG_DIR}/include mingw32 2>&1 > make.log
        echo Building openssl
        perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
        perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
@@ -253,7 +253,7 @@ process_postgreSQL()
                do_patch postgresql.patch
        fi
        echo Configuring postgreSQL
-       ./configure --host=mingw32 --enable-shared --enable-thread-safety --prefix=${DEPPKG_DIR} --with-includes=${DEPPKG_DIR}/include:${DEPPKG_DIR}/include/pthreads --with-libraries=${DEPPKG_DIR}/lib &> make.log
+       ./configure --host=mingw32 --enable-shared --enable-thread-safety --prefix=${DEPPKG_DIR} --with-includes=${DEPPKG_DIR}/include:${DEPPKG_DIR}/include/pthreads --with-libraries=${DEPPKG_DIR}/lib 2>&1 > make.log
        echo Building postgreSQL
        if [ -e /usr/sbin/zic ]; then ZIC=/usr/sbin/zic
        elif [ -e /sbin/zic ]; then ZIC=/sbin/zic
@@ -325,7 +325,7 @@ process_scons()
 {
        get_source "${URL_SCONS}" "${DIR_SCONS}"
        echo Installing scons
-       if python setup.py install --prefix=${DEPPKG_DIR}/scons &> make.log
+       if python setup.py install --prefix=${DEPPKG_DIR}/scons 2>&1 > make.log
        then
                :
        else
@@ -346,11 +346,19 @@ process_nsis()
                >patch.log
                do_patch nsis.patch
        fi
+       if [ "`uname -s`" = "FreeBSD" ]
+       then
+               ICONV_VARS="CPPPATH=/usr/local/include LIBPATH=/usr/local/lib"
+       else
+               ICONV_VARS=
+       fi
        echo Building nsis
        if ../../scons/bin/scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \
                PREFIX=${DEPPKG_DIR}/nsis PREFIX_BIN=${DEPPKG_DIR}/nsis/Bin \
                PREFIX_CONF=${DEPPKG_DIR}/nsis PREFIX_DATA=${DEPPKG_DIR}/nsis \
-               PREFIX_DOC=${DEPPKG_DIR}/nsis/Docs 2>&1 | tee make.log | parse_output
+               PREFIX_DOC=${DEPPKG_DIR}/nsis/Docs \
+               ${ICONV_VARS} \
+               2>&1 | tee make.log | parse_output
        then
                :
        else
index 3f72bbddc2b025abcf37d015ddf5e1ddb5493779..293872434ba7f3e6c158c48cbbd3853151e732ce 100755 (executable)
@@ -273,7 +273,7 @@ function configure_binutils
         cd "binutils-$TARGET"
         echo "Configuring binutils"
         "$SRCDIR/$BINUTILS/configure" --prefix="$PREFIX" --target=$TARGET --disable-nls \
-                --with-gcc --with-gnu-as --with-gnu-ld --disable-shared &> configure.log
+                --with-gcc --with-gnu-as --with-gnu-ld --disable-shared 2>&1 > configure.log
         cd "$BUILDDIR"
 }
 
@@ -282,7 +282,7 @@ function build_binutils
 {
         cd "$BUILDDIR/binutils-$TARGET"
         echo "Building binutils"
-        make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" &> make.log
+        make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" 2>&1 > make.log
         if test $? -ne 0; then
                 echo "make of binutils failed - log available: binutils-$TARGET/make.log"
                 exit 1
@@ -295,7 +295,7 @@ function install_binutils
 {
         cd "$BUILDDIR/binutils-$TARGET"
         echo "Installing binutils"
-        make install &> make-install.log
+        make install 2>&1 > make-install.log
         if test $? -ne 0; then
                 echo "install of binutils failed - log available: binutils-$TARGET/make-install.log"
                 exit 1
@@ -362,7 +362,7 @@ function configure_gcc
                 --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj \
                 --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug \
                 --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug \
-                &> configure.log
+                2>&1 > configure.log
         cd "$BUILDDIR"
 }
 
@@ -371,14 +371,14 @@ function build_gcc
 {
         cd "$BUILDDIR/gcc-$TARGET"
         echo "Building gcc"
-        make CFLAGS="-O2" CXXFLAGS="-O2" GCJFLAGS="-O2" LDFLAGS="-s" DEBUG_FLAGS="-g0" &> make.log
+        make CFLAGS="-O2" CXXFLAGS="-O2" GCJFLAGS="-O2" LDFLAGS="-s" DEBUG_FLAGS="-g0" 2>&1 > make.log
         if test $? -ne 0; then
                 echo "make of gcc failed - log available: gcc-$TARGET/make.log"
                 exit 1
         fi
         if [ "x$GCC_ADA" != "x" ]; then
                 cd gcc
-                make "CFLAGS=-O2" "LDFLAGS=-s" gnatlib_and_tools &> make-gnatlib.log
+                make "CFLAGS=-O2" "LDFLAGS=-s" gnatlib_and_tools 2>&1 > make-gnatlib.log
                 if test $? -ne 0; then
                         echo "make of gnatlib and tools failed - log available: gcc-$TARGET/make-gnatlib.log"
                         exit 1
@@ -392,7 +392,7 @@ function install_gcc
 {
         cd "$BUILDDIR/gcc-$TARGET"
         echo "Installing gcc"
-        make install &> make-install.log
+        make install 2>&1 > make-install.log
         if test $? -ne 0; then
                 echo "install of gcc failed - log available: gcc-$TARGET/make-install.log"
                 exit 1
@@ -419,7 +419,7 @@ function 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 &> patch.log
+       patch -p0 < ${SCRIPTDIR}/patches/mingw-utils.patch 2>&1 > patch.log
        cd "$BUILDDIR"
 }
 
@@ -431,7 +431,7 @@ function configure_mingw_utils
        mkdir "mingw-utils"
        cd "mingw-utils"
        echo "Configuring mingw-utils"
-       "$SRCDIR/$MINGW_UTILS/configure" --disable-nonportable --prefix="${PREFIX}/${TARGET}" &> configure.log
+       "$SRCDIR/$MINGW_UTILS/configure" --disable-nonportable --prefix="${PREFIX}/${TARGET}" 2>&1 > configure.log
        cd "$BUILDDIR"
 }
 
@@ -440,7 +440,7 @@ function build_mingw_utils
 {
        cd "$BUILDDIR/mingw-utils"
        echo "Building mingw-utils"
-       make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s" &> make.log
+       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
@@ -453,7 +453,7 @@ function install_mingw_utils
 {
        cd "$BUILDDIR/mingw-utils"
        echo "Installing mingw-utils"
-       make install &> make-install.log
+       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
index 541f2aa93612100afba1908f2032ae0b1af74867..8f1c7f45ccb8b1403e2c23cb3495718067ebc484 100644 (file)
@@ -7,7 +7,7 @@
 
 include ../Makefile.inc
 
-VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t]\+"\(.*\)"/\1/p' < ../../version.h)
+VERSION := $(shell sed -ne 's/.*[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
 
 DEFINES := \
        -DVERSION=$(VERSION) \
index 63a6a51ec90944f3d118d20c692c118e51d5a438..70b916b109ea4bc97f82510cb8f7c010a28a9d6b 100644 (file)
@@ -28,7 +28,7 @@ diff -ru ../../ibiblio/mt-st-0.9b/Makefile ./Makefile
 -install: mt stinit
 -      install -s mt $(BINDIR)
 +install: mt.exe
-+      install -s mt.exe $(BINDIR)
++      install mt.exe $(BINDIR)
        install -c -m 444 mt.1 $(MANDIR)/man1
        (if [ -f $(MANDIR)/man1/mt.1.gz ] ; then \
          rm -f $(MANDIR)/man1/mt.1.gz; gzip $(MANDIR)/man1/mt.1; fi)
index 39dde911b3fa14fb17562134c462f2aad350189f..0a37cd7c2258e2ea9bf48c82daefc20447c20869 100644 (file)
@@ -1,6 +1,6 @@
 Index: SCons/Config/gnu
 --- ../release/nsis-2.17-src/SCons/Config/gnu  2006-04-28 08:54:41.000000000 -0700
-+++ ./SCons/Config/gnu 2006-07-31 05:48:44.000000000 -0700
++++ SCons/Config/gnu   2006-08-07 18:49:47.000000000 -0700
 @@ -65,7 +65,7 @@
  cross_env(stub_env)\r
  \r
@@ -10,7 +10,7 @@ Index: SCons/Config/gnu
  stub_env.Append(CCFLAGS = '-Wall')                # all warnings\r
  stub_env.Append(CCFLAGS = '-x c')                 # force compile as c\r
  \r
-@@ -82,7 +82,7 @@
+@@ -82,8 +82,8 @@
  makensis_env = defenv.Copy()\r
  \r
  if not defenv['DEBUG']:\r
@@ -19,6 +19,7 @@ Index: SCons/Config/gnu
  makensis_env.Append(CCFLAGS = '-Wall')            # all warnings\r
  \r
  conf = FlagsConfigure(makensis_env)\r
+ conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file\r
 @@ -97,7 +97,7 @@
  cross_env(plugin_env)\r
  \r
index 7667e262b0626c2e07693d5878727797d738e71c..626f37929b6fbb4f457edf872b6880b0d74fc8c9 100644 (file)
@@ -205,7 +205,7 @@ Index: Makefile.org
                        if [ -f "$$i" -o -f "$$i.a" ]; then \
                        (       echo installing $$i; \
 -                              if [ "$(PLATFORM)" != "Cygwin" ]; then \
-+                              if [ "$(PLATFORM)" == "Cygwin" ]; then \
++                              if [ "$(PLATFORM)" = "Cygwin" ]; then \
 +                                      c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
 +                                      cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
 +                                      chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
@@ -216,7 +216,7 @@ Index: Makefile.org
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
 -                              else \
 -                                      c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
-+                              elif [ "$(PLATFORM)" == "mingw32" ]; then \
++                              elif [ "$(PLATFORM)" = "mingw32" ]; then \
 +                                      c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/\1eay32.dll/'`; \
 +                                      [ "$$i" = "libcrypto.dll.a" ] && c=libeay32.dll; \
                                        cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
index 10012a9bdc972c8e6ee43cbbda63034737fde8df..3d33c132e24d810aa4a885287d36d51e447d7f47 100644 (file)
@@ -4,6 +4,6 @@ s%ranlib%mingw32-ranlib%
 s%windres%mingw32-windres%
 s%ar rc%mingw32-ar rc%
 s%makefile\.gcc%makefile\.mingw32%
-s%if exist \([^ \t][^ \t]*\) del \1%if [ -e \1 ]; then rm \1; fi%
-s%if not exist \([^ \t][^ \t]*\) mkdir \1%if [ ! -e \1 ]; then mkdir \1; fi%
-s%if not exist \([^ \t][^ \t]*\) copy \([^ \t][^ \t]*\) \1%if [ ! -e \1 ]; then cp \2 \1; fi%
+s%if exist \([^ ][^ ]*\) del \1%if [ -e \1 ]; then rm \1; fi%
+s%if not exist \([^ ][^ ]*\) mkdir \1%if [ ! -e \1 ]; then mkdir \1; fi%
+s%if not exist \([^ ][^ ]*\) copy \([^ ][^ ]*\) \1%if [ ! -e \1 ]; then cp \2 \1; fi%