Add compiling and installation of opensp, libofx and enable ofx support of gnucash

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15513 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2007-02-06 16:19:23 +00:00
parent f9d161b6da
commit 746bba5aa0
4 changed files with 105 additions and 0 deletions

View File

@ -170,6 +170,15 @@ INNO_DIR=$GLOBAL_DIR\\inno
SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe" SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe"
SVN_DIR=$GLOBAL_DIR\\svn SVN_DIR=$GLOBAL_DIR\\svn
# OFX import in gnucash and ofx directconnect support for aqbanking
OPENSP_URL="$SF_MIRROR/openjade/OpenSP-1.5.2.tar.gz"
OPENSP_DIR=$GLOBAL_DIR\\opensp
OPENSP_PATCH=`pwd`/opensp-1.5.2-patch.diff
LIBOFX_URL="$SF_MIRROR/libofx/libofx-0.8.3.tar.gz"
LIBOFX_DIR=$GLOBAL_DIR\\libofx
LIBOFX_PATCH=`pwd`/libofx-0.8.3-patch.diff
## online banking: gwenhywfar+aqbanking ## online banking: gwenhywfar+aqbanking
GWENHYWFAR_URL="$SF_MIRROR/gwenhywfar/gwenhywfar-2.5.2.tar.gz" GWENHYWFAR_URL="$SF_MIRROR/gwenhywfar/gwenhywfar-2.5.2.tar.gz"
GWENHYWFAR_DIR=$GLOBAL_DIR\\gwenhywfar GWENHYWFAR_DIR=$GLOBAL_DIR\\gwenhywfar
@ -204,6 +213,8 @@ add_step inst_swig
add_step inst_libgsf add_step inst_libgsf
add_step inst_goffice add_step inst_goffice
#add_step inst_glade #add_step inst_glade
add_step inst_opensp
add_step inst_libofx
## Online banking: ## Online banking:
add_step inst_gwenhywfar add_step inst_gwenhywfar
add_step inst_aqbanking add_step inst_aqbanking

View File

@ -617,6 +617,56 @@ function inst_inno() {
quiet which iscc || die "iscc (Inno Setup Compiler) not installed correctly" quiet which iscc || die "iscc (Inno Setup Compiler) not installed correctly"
} }
function inst_opensp() {
setup Opensp
_OPENSP_UDIR=`unix_path ${OPENSP_DIR}`
add_to_env ${_OPENSP_UDIR}/bin PATH
if test -f ${_OPENSP_UDIR}/bin/libosp-5.dll
then
echo "Opensp already installed. Skipping."
else
wget_unpacked $OPENSP_URL $DOWNLOAD_DIR $TMP_DIR
qpushd $TMP_UDIR/OpenSP-*
[ -n "$OPENSP_PATCH" -a -f "$OPENSP_PATCH" ] && \
patch -p0 < $OPENSP_PATCH
automake lib/Makefile
./configure \
--prefix=${_OPENSP_UDIR} \
--disable-doc-build --disable-static
# The subdir "sx" needs to think we're in MSVC, but
# all the rest builds fine without that define.
make CPPFLAGS="-D_MSC_VER" -C sx || make
make install
qpopd
fi
test -f ${_OPENSP_UDIR}/bin/libosp-5.dll || die "Opensp not installed correctly"
}
function inst_libofx() {
setup Libofx
_LIBOFX_UDIR=`unix_path ${LIBOFX_DIR}`
add_to_env ${_LIBOFX_UDIR}/bin PATH
add_to_env ${_LIBOFX_UDIR}/lib/pkgconfig PKG_CONFIG_PATH
if quiet ${PKG_CONFIG} --exists libofx
then
echo "Libofx already installed. Skipping."
else
wget_unpacked $LIBOFX_URL $DOWNLOAD_DIR $TMP_DIR
qpushd $TMP_UDIR/libofx-*
[ -n "$LIBOFX_PATCH" -a -f "$LIBOFX_PATCH" ] && \
patch -p0 < $LIBOFX_PATCH
./configure \
--prefix=${_LIBOFX_UDIR} \
--with-opensp-includes=${_OPENSP_UDIR}/include/OpenSP \
--with-opensp-libs=${_OPENSP_UDIR}/lib \
--disable-static
make LDFLAGS="${LDFLAGS} -no-undefined"
make install
qpopd
fi
quiet ${PKG_CONFIG} --exists libofx || die "Libofx not installed correctly"
}
function inst_gwenhywfar() { function inst_gwenhywfar() {
setup Gwenhywfar setup Gwenhywfar
_GWENHYWFAR_UDIR=`unix_path ${GWENHYWFAR_DIR}` _GWENHYWFAR_UDIR=`unix_path ${GWENHYWFAR_DIR}`
@ -657,6 +707,7 @@ function inst_aqbanking() {
--with-frontends="cbanking" \ --with-frontends="cbanking" \
--with-backends="aqdtaus aqhbci" \ --with-backends="aqdtaus aqhbci" \
--prefix=${_AQBANKING_UDIR} --prefix=${_AQBANKING_UDIR}
# With aqbanking-2.2.7, this will go as follows: --with-backends="aqdtaus aqhbci aqofxconnect" CPPFLAGS="-I${_LIBOFX_UDIR}/include LDFLAGS="-L${_LIBOFX_UDIR}/lib"
make make
make install make install
qpopd qpopd
@ -706,6 +757,7 @@ function inst_gnucash() {
AQBANKING_OPTIONS="--enable-hbci --with-aqbanking-dir=${_AQBANKING_UDIR}" AQBANKING_OPTIONS="--enable-hbci --with-aqbanking-dir=${_AQBANKING_UDIR}"
AQBANKING_UPATH="${_OPENSSL_UDIR}/bin:${_GWENHYWFAR_UDIR}/bin:${_AQBANKING_UDIR}/bin" AQBANKING_UPATH="${_OPENSSL_UDIR}/bin:${_GWENHYWFAR_UDIR}/bin:${_AQBANKING_UDIR}/bin"
AQBANKING_PATH="${OPENSSL_DIR}\\bin;${GWENHYWFAR_DIR}\\bin;${AQBANKING_DIR}\\bin" AQBANKING_PATH="${OPENSSL_DIR}\\bin;${GWENHYWFAR_DIR}\\bin;${AQBANKING_DIR}\\bin"
LIBOFX_OPTIONS="--enable-ofx --with-ofx-prefix=${_LIBOFX_UDIR}"
qpushd $REPOS_DIR qpushd $REPOS_DIR
if test "x$cross_compile" = xyes ; then if test "x$cross_compile" = xyes ; then
@ -725,6 +777,7 @@ function inst_gnucash() {
--prefix=$_INSTALL_WFSDIR \ --prefix=$_INSTALL_WFSDIR \
--enable-debug \ --enable-debug \
--enable-schemas-install=no \ --enable-schemas-install=no \
${LIBOFX_OPTIONS} \
${AQBANKING_OPTIONS} \ ${AQBANKING_OPTIONS} \
--enable-binreloc \ --enable-binreloc \
CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} -D_WIN32" \ CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} -D_WIN32" \

View File

@ -0,0 +1,28 @@
--- lib/ofx_preproc.cpp~ Tue Jan 9 02:38:33 2007
+++ lib/ofx_preproc.cpp Tue Feb 6 12:31:07 2007
@@ -20,6 +20,7 @@
#include <iostream>
#include <fstream>
#include <stdlib.h>
+#include <io.h> // for mktemp() on win32/mingw
#include <stdio.h>
#include <string>
#include "ParserEventGeneratorKit.h"
@@ -76,7 +77,7 @@
input_file.open(p_filename);
strncpy(tmp_filename,"/tmp/libofxtmpXXXXXX",50);
- mkstemp(tmp_filename);
+ mktemp(tmp_filename);
tmp_file.open(tmp_filename);
message_out(DEBUG,"ofx_proc_file(): Creating temp file: "+string(tmp_filename));
@@ -217,7 +218,7 @@
s_buffer=string(s, size);
strncpy(tmp_filename,"/tmp/libofxtmpXXXXXX",50);
- mkstemp(tmp_filename);
+ mktemp(tmp_filename);
tmp_file.open(tmp_filename);
message_out(DEBUG,"ofx_proc_file(): Creating temp file: "+string(tmp_filename));

View File

@ -0,0 +1,13 @@
--- lib/Makefile.am~ Thu Dec 15 13:13:16 2005
+++ lib/Makefile.am Tue Feb 6 10:57:58 2007
@@ -76,7 +76,9 @@
splibpch.h token.h app_inst.cxx arc_inst.cxx entmgr_inst.cxx \
parser_inst.cxx xentmgr_inst.cxx SubstTable.cxx \
UTF16CodingSystem.cxx Fixed4CodingSystem.cxx \
- memcmp.c memmove.c strerror.c
+ memcmp.c memmove.c strerror.c WinInetStorage.cxx \
+ WinInetStorageMessages.h WinInetStorageMessages.msg \
+ WinInetStorageMessages.rc WinApp.cxx Win32CodingSystem.cxx
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/generic