[Patch] - Use system Berkeley DB 5.0

DJ Lucas <[email protected]> Sun, 18 Jul 2010 11:09:33 -0500
Newsgroups gmane.comp.gnome.ximian.openoffice
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attached patch (against 3.2.1.4) removes db-4.8.patch and replaces with
db-5.patch.  This only fixes the OOo top-level configure script.  It
builds, but I haven't gotten around to thoroughly testing Base to see if
this is actually sane, nor working with minimal deps to test internal
project builds.  I'm honestly not even sure what projects actually use
bdb in OOo.  No other system installed packages have had issues using
db5 that I've encountered yet, except for Apache/APR-Util which
contained no functional changes, only version checks.  I mention that
only because it extends to Neon.

In addition to what is in the patch now, you may want to add
"-I/usr/include/db5{,0}" to CFLAGS.  I'm from a small distro (oh wait,
we are not a distro, we provide a book ;-) ), so no version directories
in /usr/include, but I'm not sure how y'all with the big distros will
handle a system db upgrade when it comes time.

HTH

- -- DJ Lucas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)

iQIcBAEBAgAGBQJMQyc4AAoJEIUM+xKzBYsI5ooQAIFDqvHPg8nD1fIKKgPElkxB
bpk/ydHqCBzDYrQdOUcWBpXyplxQ2F319uplT1eMFdGTLBkOgSHA124WzC5+LRDy
nLnGnu/rJkVysJ39eGNUHWCmdwBj389CWUlRO+nSZ9RkFBN1ozUsTbVYM3wrZppq
4oYK0DeoY2jytRMPrB6rytSlGWMFfEDtyxQvl/moujMwA/vsfofAiAsLmbOUXuP7
Sx06KkY0oSjDzQSQPk7BXmemPiceCPM6IM5d3zGm3pPRQZVzf2PtEsNr5st69EIO
7fGaLR0jcndFYDJUavYseUHaY2L3RaZ1sPhz+bIIBLsU57mV9EvVG4G51+0zMcOd
9wPJPqN5tXcw16kcaPicZ53bo58+v+z1LUxf2cfrW0DsUtopmBheOOqbmXH6vZnA
7O+HEBhcNaSsGTFPKyR0MfPRnphTUJVdrdrHtgwqhh9uKEaTSqWxV6btSJrrj2Xv
K44f/LZSjij3EjleuW1DapSJlShMJ5HBxhjsuN2OUtuhM82W+5Hk43E+TxjdUuCL
QBEfY8YWwg5oWJKo5nXcN2s9yuMdrLuroN8oY/MmCxY2umxY3B/yk4YCCG7aidqA
X0HKDA4Jilgy1Nu8J64hk9hSRFjVnC2gTzQ3QqVVxH/ITJFeUILIOGjha00yO5rw
WF1K2a6bdmeTvokEGkPt
=JW7j
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
ooo-build-3.2.1.4-db5_configure_check-1.patch (text/plain, 2.2 KB)
--- a/patches/dev300/apply	2010-07-17 23:42:50.000000000 -0500
+++ b/patches/dev300/apply	2010-07-17 23:43:13.000000000 -0500
@@ -1250,8 +1250,8 @@
 # [which is a broken setup, but apparently most apps don't break with that ;-)] 
 dmake-space-in-envvar-name.diff, i#101786, jholesov
 
-# support db4.8
-db4.8.diff, rengelha
+# support db5
+db5.diff, rengelha
 
 # find gsicheck in the solver
 transex3-localize-gsicheck-path.diff, i#109378, pmladek
--- a/patches/dev300/db4.8.diff	2010-05-13 12:28:09.000000000 -0500
+++ b/patches/dev300/db4.8.diff	1969-12-31 18:00:00.000000000 -0600
@@ -1,11 +0,0 @@
---- configure.in-old	2009-09-28 20:35:05.000000000 +0200
-+++ configure.in	2009-09-28 20:32:40.000000000 +0200
-@@ -3907,7 +3907,7 @@
-         ], []
-     )
-     AC_MSG_CHECKING([whether db is at least 4.1])
--    for v in `seq 1 7`; do
-+    for v in `seq 1 8`; do
-        AC_TRY_RUN([
- #include <db.h>
- 
--- a/patches/dev300/db5.diff	1969-12-31 18:00:00.000000000 -0600
+++ b/patches/dev300/db5.diff	2010-07-17 23:42:09.000000000 -0500
@@ -0,0 +1,38 @@
+--- configure.in-old	2010-07-17 23:39:32.000000000 -0500
++++ configure.in	2010-07-17 23:15:21.000000000 -0500
+@@ -4149,19 +4149,31 @@
+         ], []
+     )
+     AC_MSG_CHECKING([whether db is at least 4.1])
+-    for v in `seq 1 7`; do
++    for v in `seq 4 5`; do
+        AC_TRY_RUN([
+ #include <db.h>
+ 
+ int main(int argc, char **argv) {
+-       if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
++       if (DB_VERSION_MAJOR==$v) return 0;
++       else return 1;
++}
++       ], [DB_VERSION_MAJOR=$v], [])
++    done
++
++    for v in `seq 1 8`; do
++       AC_TRY_RUN([
++#include <db.h>
++
++int main(int argc, char **argv) {
++       if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v || DB_VERSSION_MAJOR == 5) return 0;
+        else return 1;
+ }
+        ], [DB_VERSION_MINOR=$v], [])
+     done
+-    if test "$DB_VERSION_MINOR" -gt "1"; then
++
++    if test "$DB_VERSION_MAJOR" = "5" || test "$DB_VERSION_MINOR" -gt "1"; then
+        AC_MSG_RESULT([OK])
+-       DB_VERSION=4.$DB_VERSION_MINOR
++       DB_VERSION=$DB_VERSION_MAJOR.$DB_VERSION_MINOR
+     else
+        AC_MSG_ERROR([no. you need at least db 4.1])
+     fi