r14853 - gnucash/trunk/packaging/win32 - More cross-compile preparations.
Christian Stimming
cstim at cvs.gnucash.org
Sun Sep 17 07:03:03 EDT 2006
Author: cstim
Date: 2006-09-17 07:03:02 -0400 (Sun, 17 Sep 2006)
New Revision: 14853
Trac: http://svn.gnucash.org/trac/changeset/14853
Modified:
gnucash/trunk/packaging/win32/custom.sh
gnucash/trunk/packaging/win32/install.sh
Log:
More cross-compile preparations.
Modified: gnucash/trunk/packaging/win32/custom.sh
===================================================================
--- gnucash/trunk/packaging/win32/custom.sh 2006-09-16 18:56:44 UTC (rev 14852)
+++ gnucash/trunk/packaging/win32/custom.sh 2006-09-17 11:03:02 UTC (rev 14853)
@@ -12,12 +12,18 @@
####
HOST_XCOMPILE=""
-cross_compile="no"
+cross_compile=no
+LD=ld
+CC=gcc
+DLLTOOL=dlltool
# For cross-compiling, uncomment the following lines:
-#HOST_XCOMPILE="--host=mingw32"
-#PKG_CONFIG_PATH="" # to avoid using the host's installed packages
-#PATH=/opt/mingw32:$PATH
-#cross_compile=yes
+# HOST_XCOMPILE="--host=mingw32"
+# PKG_CONFIG_PATH="" # to avoid using the host's installed packages
+# PATH=/opt/mingw32/bin:$PATH
+# cross_compile=yes
+# LD=mingw32-ld
+# CC=mingw32-gcc
+# DLLTOOL=mingw32-dlltool
####
MSYS_DIR=$GLOBAL_DIR\\msys
Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh 2006-09-16 18:56:44 UTC (rev 14852)
+++ gnucash/trunk/packaging/win32/install.sh 2006-09-17 11:03:02 UTC (rev 14853)
@@ -163,7 +163,7 @@
function inst_mingw() {
setup MinGW
- if quiet gcc --version
+ if quiet ${CC} --version
then
echo "mingw already installed. skipping."
else
@@ -174,7 +174,7 @@
$LAST_FILE
(echo "y"; echo "y"; echo "$_MINGW_WFSDIR") | sh pi.sh
fi
- quiet gcc --version && quiet ld --help || die "mingw not installed correctly"
+ quiet ${CC} --version && quiet ${LD} --help || die "mingw not installed correctly"
}
function inst_unzip() {
@@ -198,7 +198,7 @@
add_to_env -I$_REGEX_UDIR/include REGEX_CPPFLAGS
add_to_env -L$_REGEX_UDIR/lib REGEX_LDFLAGS
add_to_env $_REGEX_UDIR/bin PATH
- if quiet ld $REGEX_LDFLAGS -lregex -o $TMP_UDIR/ofile
+ if quiet ${LD} $REGEX_LDFLAGS -lregex -o $TMP_UDIR/ofile
then
echo "regex already installed. skipping."
else
@@ -206,7 +206,7 @@
wget_unpacked $REGEX_BIN_URL $DOWNLOAD_DIR $REGEX_DIR
wget_unpacked $REGEX_LIB_URL $DOWNLOAD_DIR $REGEX_DIR
fi
- quiet ld $REGEX_LDFLAGS -lregex -o $TMP_UDIR/ofile || die "regex not installed correctly"
+ quiet ${LD} $REGEX_LDFLAGS -lregex -o $TMP_UDIR/ofile || die "regex not installed correctly"
}
function inst_readline() {
@@ -215,7 +215,7 @@
add_to_env -I$_READLINE_UDIR/include READLINE_CPPFLAGS
add_to_env -L$_READLINE_UDIR/lib READLINE_LDFLAGS
add_to_env $_READLINE_UDIR/bin PATH
- if quiet ld $READLINE_LDFLAGS -lreadline -o $TMP_UDIR/ofile
+ if quiet ${LD} $READLINE_LDFLAGS -lreadline -o $TMP_UDIR/ofile
then
echo "readline already installed. skipping."
else
@@ -223,7 +223,7 @@
wget_unpacked $READLINE_BIN_URL $DOWNLOAD_DIR $READLINE_DIR
wget_unpacked $READLINE_LIB_URL $DOWNLOAD_DIR $READLINE_DIR
fi
- quiet ld $READLINE_LDFLAGS -lreadline -o $TMP_UDIR/ofile || die "readline not installed correctly"
+ quiet ${LD} $READLINE_LDFLAGS -lreadline -o $TMP_UDIR/ofile || die "readline not installed correctly"
}
function inst_indent() {
@@ -326,7 +326,9 @@
(define software-type (lambda () '"'"'ms-dos))' guile.init.bak > guile.init
qpopd
fi
- add_to_env "-I $_GUILE_UDIR/share/aclocal" ACLOCAL_FLAGS
+ if test x$cross_compile != xyes ; then
+ add_to_env "-I $_GUILE_UDIR/share/aclocal" ACLOCAL_FLAGS
+ fi
guile -c '(use-modules (srfi srfi-39))' &&
guile -c "(use-modules (ice-9 slib)) (require 'printf)" || die "guile not installed correctly"
}
@@ -370,7 +372,7 @@
function inst_libxml2() {
setup LibXML2
_LIBXML2_UDIR=`unix_path $LIBXML2_DIR`
- if quiet ld -L$_LIBXML2_UDIR/lib -lxml2 -o $TMP_UDIR/ofile
+ if quiet ${LD} -L$_LIBXML2_UDIR/lib -lxml2 -o $TMP_UDIR/ofile
then
echo "libxml2 already installed. skipping."
else
@@ -380,7 +382,7 @@
cp -r mydir/* .
rm -rf mydir
pexports bin/libxml2.dll > libxml2.def
- dlltool --input-def libxml2.def --output-lib lib/libxml2.a
+ ${DLLTOOL} --input-def libxml2.def --output-lib lib/libxml2.a
rm libxml2.def
_LIBXML2_VERSION=`echo $LAST_FILE | sed 's#.*libxml2-\(.*\).win32.zip#\1#'`
mkdir -p lib/pkgconfig
@@ -399,7 +401,7 @@
EOF
qpopd
fi
- quiet ld -L$_LIBXML2_UDIR/lib -lxml2 -o $TMP_UDIR/ofile || die "libxml2 not installed correctly"
+ quiet ${LD} -L$_LIBXML2_UDIR/lib -lxml2 -o $TMP_UDIR/ofile || die "libxml2 not installed correctly"
}
function inst_expat() {
@@ -490,7 +492,7 @@
[ -f bin/zlib1.dll ] || mv zlib1.dll bin
if [ ! -f lib/libz.dll.a ]; then
qpushd bin
- dlltool -D zlib1.dll -d ../lib/zlib.def -l libz.dll.a
+ ${DLLTOOL} -D zlib1.dll -d ../lib/zlib.def -l libz.dll.a
mv libz.dll.a ../lib
qpopd
fi
@@ -511,6 +513,17 @@
EOF
qpopd
fi
+ if test x$cross_compile = xyes ; then
+ qpushd $GNOME_DIR/lib/pkgconfig
+ perl -pi.bak -e"s!^prefix=.*\$!prefix=$GNOME_DIR!" *.pc
+ #perl -pi.bak -e's!^Libs: !Libs: -L\${prefix}/bin !' *.pc
+ qpopd
+ # Latest gnome-dev packages don't ship with *.la files
+ # anymore. What do we do...?
+ #qpushd $GNOME_DIR/bin
+ # for A in *-0.dll; do ln -sf $A `echo $A|sed 's/\(.*\)-0.dll/\1.dll/'`; done
+ #qpopd
+ fi
quiet gconftool-2 --version &&
pkg-config --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
quiet intltoolize --version || die "gnome not installed correctly"
@@ -579,13 +592,13 @@
wget_unpacked $LIBTOOL_URL $DOWNLOAD_DIR $TMP_DIR
qpushd $TMP_UDIR/autoconf-*
echo "building autoconf..."
- ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR
+ ./configure --prefix=$_AUTOTOOLS_UDIR
make
make install
qpopd
qpushd $TMP_UDIR/automake-*
echo "building automake..."
- ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR
+ ./configure --prefix=$_AUTOTOOLS_UDIR
make
make install
qpopd
@@ -598,7 +611,9 @@
fi
add_to_env -I$_AUTOTOOLS_UDIR/include AUTOTOOLS_CPPFLAGS
add_to_env -L$_AUTOTOOLS_UDIR/lib AUTOTOOLS_LDFLAGS
- add_to_env "-I $_AUTOTOOLS_UDIR/share/aclocal" ACLOCAL_FLAGS
+ if test x$cross_compile != xyes ; then
+ add_to_env "-I $_AUTOTOOLS_UDIR/share/aclocal" ACLOCAL_FLAGS
+ fi
quiet autoconf --help &&
quiet automake --help &&
quiet libtool --help || die "autotools not installed correctly"
@@ -638,6 +653,7 @@
qpushd $TMP_UDIR/goffice-*
[ -n "$GOFFICE_PATCH" -a -f "$GOFFICE_PATCH" ] && \
patch -p1 < $GOFFICE_PATCH
+ aclocal ${ACLOCAL_FLAGS}
automake
autoconf
./configure ${HOST_XCOMPILE} --prefix=$_GOFFICE_UDIR \
More information about the gnucash-changes
mailing list