From 50472f87d4533c70068125a1d91e22f2ca4a4d46 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: May 18 2010 17:38:40 +0000 Subject: Fix finding of dbi drivers. (#593090) --- diff --git a/gnucash-libdbi.patch b/gnucash-libdbi.patch new file mode 100644 index 0000000..f955eae --- /dev/null +++ b/gnucash-libdbi.patch @@ -0,0 +1,54 @@ +diff -up gnucash-2.3.12/src/backend/dbi/gnc-backend-dbi.c.foo gnucash-2.3.12/src/backend/dbi/gnc-backend-dbi.c +--- gnucash-2.3.12/src/backend/dbi/gnc-backend-dbi.c.foo 2010-05-18 12:36:31.929812252 -0400 ++++ gnucash-2.3.12/src/backend/dbi/gnc-backend-dbi.c 2010-05-18 12:38:29.962687968 -0400 +@@ -1007,7 +1007,6 @@ void + gnc_module_init_backend_dbi(void) + { + QofBackendProvider *prov; +-#define DEFAULT_DBD_DIR "/usr/lib/dbd" + const gchar* driver_dir; + int num_drivers; + gboolean have_sqlite3_driver = FALSE; +@@ -1019,8 +1018,7 @@ gnc_module_init_backend_dbi(void) + driver_dir = g_getenv( "GNC_DBD_DIR" ); + if ( driver_dir == NULL ) + { +- PWARN( "GNC_DBD_DIR not set: using %s\n", DEFAULT_DBD_DIR ); +- driver_dir = DEFAULT_DBD_DIR; ++ PWARN( "GNC_DBD_DIR not set: using libdi built-in default\n"); + } + + num_drivers = dbi_initialize( driver_dir ); +diff -up gnucash-2.3.12/configure.cow gnucash-2.3.12/configure +--- gnucash-2.3.12/configure.cow 2010-05-18 12:59:45.105061535 -0400 ++++ gnucash-2.3.12/configure 2010-05-18 12:59:46.353810836 -0400 +@@ -1788,16 +1791,16 @@ Optional Packages: + --with-qt3-wizard-package=name + name of package containing qt3-wizard (aqbanking) + --with-dbi-dbd-dir=PATH specify location of libdbi drivers +- [default=/usr/lib/dbd] ++ [default=${libdir}/dbd] + --with-ofx-prefix=DIR specify where to look for libOFX + --with-test-mysql-url=URL +- MySQL database URL for testing default=none ++ MySQL database URL for testing [default=none] + --with-test-pgsql-url=URL +- PgSQL database URL for testing default=none ++ PgSQL database URL for testing [default=none] + --with-help-prefix=PATH specify where to store the help files + --with-perl=FILE which perl executable to use + --with-html-engine=[webkit/gtkhtml] +- Select HTML engine default=gtkhtml ++ Select HTML engine [default=gtkhtml] + + Some influential environment variables: + CC C compiler command +@@ -16328,7 +16355,7 @@ done + if test "${with_dbi_dbd_dir+set}" = set; then : + withval=$with_dbi_dbd_dir; GNC_DBD_DIR="$with_dbi_dbd_dir" + else +- GNC_DBD_DIR="/usr/lib/dbd" ++ GNC_DBD_DIR="${libdir}/dbd" + fi + + diff --git a/gnucash.spec b/gnucash.spec index 6f93179..5e0870b 100644 --- a/gnucash.spec +++ b/gnucash.spec @@ -4,7 +4,7 @@ Name: gnucash Summary: Finance management application Version: 2.3.12 URL: http://gnucash.org/ -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Productivity Source: http://www.gnucash.org/pub/gnucash/sources/unstable/2.3.x/gnucash-%{version}.tar.bz2 @@ -17,6 +17,7 @@ BuildRequires: desktop-file-utils, texinfo BuildRequires: gettext, slib >= 3a1-5, libtool, intltool BuildRequires: python-devel, libdbi-devel Patch0: gnucash-quiet.patch +Patch1: gnucash-libdbi.patch Requires: gnucash-docs >= 2.2.0 Requires: slib >= 3a1-5 Requires: perl(Finance::Quote) @@ -38,11 +39,11 @@ balanced books. %prep %setup -q %patch0 -p1 +%patch1 -p1 find src/quotes -name "*.in" -exec sed -i "s|use lib '@-PERLINCL-@';||g" {} \; %build chmod 644 src/import-export/import-commodity-matcher.c - %configure --enable-error-on-warning=no \ --enable-ofx \ --enable-hbci \ @@ -129,6 +130,9 @@ fi %doc doc/README.german doc/README.francais doc/README.OFX doc/README.HBCI %changelog +* Tue May 18 2010 Bill Nottingham - 2.3.12-3 +- fix finding of dbi drivers (#593090) + * Fri Apr 30 2010 Bill Nottingham - 2.3.12-2 - update to 2.3.12