packages: apr-util/apr-util.spec, apr-util/apr-util-db.patch (NEW) - added ...

qboosh qboosh at pld-linux.org
Fri May 21 22:07:42 CEST 2010


Author: qboosh                       Date: Fri May 21 20:07:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added db patch to allow db4.8 and db5.0; default db version can be changed by dbver rpm macro

---- Files affected:
packages/apr-util:
   apr-util.spec (1.83 -> 1.84) , apr-util-db.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/apr-util/apr-util.spec
diff -u packages/apr-util/apr-util.spec:1.83 packages/apr-util/apr-util.spec:1.84
--- packages/apr-util/apr-util.spec:1.83	Fri Apr 16 15:41:15 2010
+++ packages/apr-util/apr-util.spec	Fri May 21 22:07:37 2010
@@ -10,6 +10,18 @@
 %bcond_without	sqlite3	# without SQLite3 DBD module
 %bcond_without	ldap	# without LDAP module
 %bcond_without	tests
+# define	dbver	db50
+%if 0%{!?dbver:1}
+%  if "%{pld_release}" == "ti"
+%    define	dbver	db45
+%  else
+%    if "%{pld_release}" == "th"
+%      define	dbver	db47
+%    else
+%      define	dbver	db4
+%    endif
+%  endif
+%endif
 #
 Summary:	A companion library to Apache Portable Runtime
 Summary(pl.UTF-8):	Biblioteka towarzysząca Apache Portable Runtime
@@ -24,6 +36,7 @@
 Patch0:		%{name}-link.patch
 Patch1:		%{name}-config-noldap.patch
 Patch2:		%{name}-libtool.patch
+Patch3:		%{name}-db.patch
 URL:		http://apr.apache.org/
 BuildRequires:	apr-devel >= 1:1.3.0
 BuildRequires:	autoconf
@@ -200,6 +213,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 rm -rf xml/expat
 
@@ -230,15 +244,7 @@
 	--enable-layout=PLD \
 	--with-apr=%{_bindir}/apr-1-config \
 	--with-berkeley-db=%{_prefix} \
-%if "%{pld_release}" == "ti"
-	--with-dbm=db45 \
-%else
-%if "%{pld_release}" == "th"
-	--with-dbm=db47 \
-%else
-	--with-dbm=db4 \
-%endif
-%endif
+	--with-dbm=%{dbver} \
 	--with-iconv=%{_prefix} \
 %if %{with ldap}
 	--with-ldap \
@@ -359,6 +365,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.84  2010/05/21 20:07:37  qboosh
+- added db patch to allow db4.8 and db5.0; default db version can be changed by dbver rpm macro
+
 Revision 1.83  2010/04/16 13:41:15  arekm
 - release 3
 

================================================================
Index: packages/apr-util/apr-util-db.patch
diff -u /dev/null packages/apr-util/apr-util-db.patch:1.1
--- /dev/null	Fri May 21 22:07:42 2010
+++ packages/apr-util/apr-util-db.patch	Fri May 21 22:07:37 2010
@@ -0,0 +1,146 @@
+--- apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c.orig	2008-11-21 09:22:35.000000000 +0100
++++ apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c	2010-05-21 09:34:59.958939260 +0200
+@@ -37,7 +37,9 @@
+  * DB_185, DB2, DB3, and DB4.
+  */
+ 
+-#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
++#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR > 4)
++#define DB_VER 4
++#elif   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
+ /* We will treat anything greater than 4.1 as DB4.
+  * We can treat 4.0 as DB3.
+  */
+--- apr-util-1.3.9/build/dbm.m4.orig	2008-11-21 07:32:58.000000000 +0100
++++ apr-util-1.3.9/build/dbm.m4	2010-05-21 09:40:46.866935908 +0200
+@@ -112,7 +112,7 @@
+         changequote([,])
+         unset $cache_id
+         AC_CHECK_HEADER([$bdb_header], [
+-          if test "$1" = "3" -o "$1" = "4"; then
++          if test "$1" = "3" -o "$1" = "4" -o "$1" = "5"; then
+             # We generate a separate cache variable for each prefix and libname
+             # we search under.  That way, we avoid caching information that
+             # changes if the user runs `configure' with a different set of
+@@ -522,6 +522,44 @@
+     apu_db_version=4
+   fi
+ ])
++dnl
++dnl APU_CHECK_DB48: is DB4.8 present?
++dnl
++dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
++dnl
++AC_DEFUN([APU_CHECK_DB48], [
++  places=$1
++  if test -z "$places"; then
++    places="std /usr/local/BerkeleyDB.4.8 /boot/home/config"
++  fi
++  APU_CHECK_BERKELEY_DB("4", "8", "-1",
++    "$places",
++    "db48/db.h db4/db.h db.h",
++    "db-4.8 db4-4.8 db48 db4 db"
++  )
++  if test "$apu_have_db" = "1"; then
++    apu_db_version=4
++  fi
++])
++dnl
++dnl APU_CHECK_DB50: is DB5.0 present?
++dnl
++dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
++dnl
++AC_DEFUN([APU_CHECK_DB50], [
++  places=$1
++  if test -z "$places"; then
++    places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
++  fi
++  APU_CHECK_BERKELEY_DB("5", "0", "-1",
++    "$places",
++    "db50/db.h db5/db.h db.h",
++    "db-5.0 db5-5.0 db50 db5 db"
++  )
++  if test "$apu_have_db" = "1"; then
++    apu_db_version=5
++  fi
++])
+ 
+ AC_DEFUN([APU_CHECK_DB], [
+   requested=$1
+@@ -606,6 +644,18 @@
+       AC_MSG_ERROR(Berkeley db4 not found)
+     fi
+     ;;
++  db48)
++    APU_CHECK_DB48("$check_places")
++    if test "$apu_db_version" != "4"; then
++      AC_MSG_ERROR(Berkeley db4 not found)
++    fi
++    ;;
++  db50)
++    APU_CHECK_DB50("$check_places")
++    if test "$apu_db_version" != "5"; then
++      AC_MSG_ERROR(Berkeley db5 not found)
++    fi
++    ;;
+   default)
+     APU_CHECK_DB_ALL("$check_places")
+     ;;
+@@ -618,6 +668,10 @@
+ AC_DEFUN([APU_CHECK_DB_ALL], [
+   all_places=$1
+  
++  APU_CHECK_DB50("$all_places")
++  if test "$apu_db_version" != "5"; then
++  APU_CHECK_DB48("$all_places")
++  if test "$apu_db_version" != "4"; then
+   APU_CHECK_DB47("$all_places")
+   if test "$apu_db_version" != "4"; then
+     APU_CHECK_DB46("$all_places")
+@@ -652,6 +706,8 @@
+       fi
+     fi
+   fi
++  fi
++  fi
+   AC_MSG_CHECKING(for Berkeley DB)
+   if test "$apu_have_db" = "1"; then
+     AC_MSG_RESULT(found db$apu_db_version)
+@@ -679,11 +735,11 @@
+   apu_db_version=0
+ 
+   AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
+-      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47}])],
++      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50}])],
+   [
+     if test "$withval" = "yes"; then
+       AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
+-        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
++        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47,db48,db50])
+     fi
+     requested="$withval"
+   ], [
+@@ -882,6 +938,14 @@
+       apu_use_db=1
+       apu_default_dbm=db4
+       ;;
++    db48)
++      apu_use_db=1
++      apu_default_dbm=db4
++      ;;
++    db50)
++      apu_use_db=1
++      apu_default_dbm=db5
++      ;;
+     default)
+       dnl ### use more sophisticated DBMs for the default?
+       apu_default_dbm="sdbm (default)"
+@@ -889,7 +953,7 @@
+       ;;
+     *)
+       AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
+-        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
++        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50])
+       ;;
+   esac
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/apr-util/apr-util.spec?r1=1.83&r2=1.84&f=u



More information about the pld-cvs-commit mailing list