]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/win32/build-depkgs-mingw-w64
Fix some trivial errors and implemented the restore of IRIX xattrs.
[bacula/bacula] / bacula / src / win32 / build-depkgs-mingw-w64
index 998c28d01793cf2b2ac9fb7ceb5862400b531fef..3bc822092c3de05ae00b24aa066d5b17975ed9dd 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/sh
 #
+#  This file may help you build the dependency packages that
+#  are needed to cross compile the Win64 bit version of the Bacula
+#  File daemon.  This file is provided as is, and we don't guarantee
+#  that it will work. We run it only on Ubuntu Hardy.  Trying to use
+#  it on any other GNU/Linux distro will probably require changes.
+#
 #  This file is driven by the parameters that are defined in
 #    the file External-mingw-w64
 #
@@ -215,7 +221,7 @@ process_pthreads()
    then
            echo Patching pthreads
            >patch.log
-           do_patch pthreads-w64+bacula.patch
+           do_patch pthreads-w64.patch
    fi
    echo Building pthreads
    > make.log
@@ -236,6 +242,11 @@ process_openssl()
            >patch.log
            do_patch openssl-w64.patch
            echo Configuring openssl
+           echo ./Configure --prefix=${DEPPKG_DIR} \
+                       shared zlib-dynamic no-dso no-hw \
+                       threads \
+                       --with-zlib-include=${DEPPKG_DIR}/include \
+                       mingw64
            ./Configure --prefix=${DEPPKG_DIR} \
                        shared zlib-dynamic no-dso no-hw \
                        threads \
@@ -246,16 +257,25 @@ process_openssl()
    perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
    perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
    perl util/mkdef.pl crypto ssl NT update
-   CFLAG=-I${DEPPKG_DIR}/include do_make Makefile all
+   sed -i 's/CC=/CC=mingw32-gcc #/' crypto/comp/Makefile
+   sed -i 's/AR=/AR=mingw32-ar r #/'  crypto/comp/Makefile
+   sed -i "s:^CFLAGS=:CFLAGS= -I${DEPPKG_DIR}/include:" crypto/comp/Makefile
+
+   do_make Makefile all
+   cd engines
+   touch lib4758cca.bad libaep.bad libatalla.bad libcswift.bad libchil.bad libgmp.bad libnuron.bad libsureware.bad libubsec.bad libcapi.bad
+   cd ..
+   do_make Makefile all
    echo Installing openssl
-   do_make Makefile install_sw
+   do_make Makefile install_sw install
+   cp *.dll ${DEPPKG_DIR}/bin
 }
 
 if [ "$#" -eq 0 ]
 then
-#   process_zlib
-#   process_pcre
-#   process_pthreads
+   process_zlib
+   process_pcre
+   process_pthreads
    process_openssl
 else
    for dependency in "$@"