summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch95
1 files changed, 55 insertions, 40 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
index 77020a34d6..a5fab415c2 100644
--- a/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
+++ b/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
@@ -1,13 +1,19 @@
1Support both db5 and db6. 1From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001
2From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
3Date: Tue, 15 Dec 2015 18:50:21 +0800
4Subject: [PATCH] Support both db5 and db6.
2 5
3Upstream-Status: Inappropriate [configuration] 6Upstream-Status: Inappropriate [configuration]
4 7
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 8Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
9---
10 configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
11 1 file changed, 81 insertions(+), 22 deletions(-)
6 12
7Index: rpm/configure.ac 13diff --git a/configure.ac b/configure.ac
8=================================================================== 14index 02716a0..889a425 100644
9--- rpm.orig/configure.ac 15--- a/configure.ac
10+++ rpm/configure.ac 16+++ b/configure.ac
11@@ -547,8 +547,6 @@ else 17@@ -547,8 +547,6 @@ else
12 MYPATH=$PATH 18 MYPATH=$PATH
13 fi 19 fi
@@ -17,7 +23,7 @@ Index: rpm/configure.ac
17 AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH) 23 AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH)
18 AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH) 24 AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH)
19 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH) 25 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
20@@ -560,22 +558,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/ 26@@ -560,22 +558,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/cmake, $MYPATH)
21 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH) 27 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
22 AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH) 28 AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH)
23 AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH) 29 AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH)
@@ -40,7 +46,7 @@ Index: rpm/configure.ac
40 AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH) 46 AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
41 AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH) 47 AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
42 AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH) 48 AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
43@@ -1604,13 +1586,18 @@ RPM_CHECK_LIB( 49@@ -1598,13 +1580,46 @@ RPM_CHECK_LIB(
44 50
45 dnl # Berkeley-DB & SQLite 51 dnl # Berkeley-DB & SQLite
46 DBLIBSRCS="" 52 DBLIBSRCS=""
@@ -48,55 +54,61 @@ Index: rpm/configure.ac
48+ 54+
49 # XXX won't handle --includedir override 55 # XXX won't handle --includedir override
50-CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}" 56-CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
57-RPM_CHECK_LIB(
51+CPPFLAGS_save="${CPPFLAGS}" 58+CPPFLAGS_save="${CPPFLAGS}"
52+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0" 59+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0"
53+with_db_save="${with_db}" 60+with_db_save="${with_db}"
54 RPM_CHECK_LIB( 61+
62+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
63+#include <db.h>
64+]],
65+[[
66+#if DB_VERSION_MAJOR < 6
67+#error DB_VERSION_MAJOR is below 6
68+#endif
69+]])],
70+[RPM_CHECK_LIB(
55 [Berkeley-DB], [db], 71 [Berkeley-DB], [db],
56 [db-6.0], [db_create], [db.h], 72 [db-6.0], [db_create], [db.h],
57- [yes,external], [db3], 73- [yes,external], [db3],
58+ [yes,external], [db6], 74+ [yes,external], [db6],
59 [ DBLIBSRCS="$DBLIBSRCS db3.c" 75 [ DBLIBSRCS="$DBLIBSRCS db3.c"
60+ DBXY=db60 76+ DBXY=db60
77+ AM_CONDITIONAL(WITH_DB, [ true ])
78+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
79+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
80+ AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
81+ else
82+ WITH_DB_SUBDIR=""
83+ fi
84+ ],
85+ [ AM_CONDITIONAL(WITH_DB, [ false ])
86+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
87+ ])],
88+[with_db="${with_db_save}"
89+ CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3"
90+ RPM_CHECK_LIB(
91+ [Berkeley-DB], [db],
92+ [db-5.3], [db_create], [db.h],
93+ [yes,external], [db53],
94+ [ DBLIBSRCS="$DBLIBSRCS db3.c"
95+ DBXY=db53
61 AM_CONDITIONAL(WITH_DB, [ true ]) 96 AM_CONDITIONAL(WITH_DB, [ true ])
62 AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ]) 97 AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
63 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then 98 if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
64@@ -1619,10 +1606,32 @@ RPM_CHECK_LIB( 99@@ -1616,6 +1631,11 @@ RPM_CHECK_LIB(
65 WITH_DB_SUBDIR="" 100 [ AM_CONDITIONAL(WITH_DB, [ false ])
66 fi 101 AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
67 ],
68- [ AM_CONDITIONAL(WITH_DB, [ false ])
69- AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
70+ [ # Reset a few variables to fresh
71+ with_db="${with_db_save}"
72+ CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3"
73+ RPM_CHECK_LIB(
74+ [Berkeley-DB], [db],
75+ [db-5.3], [db_create], [db.h],
76+ [yes,external], [db53],
77+ [ DBLIBSRCS="$DBLIBSRCS db3.c"
78+ DBXY=db53
79+ AM_CONDITIONAL(WITH_DB, [ true ])
80+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
81+ if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
82+ AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
83+ else
84+ WITH_DB_SUBDIR=""
85+ fi
86+ ],
87+ [ AM_CONDITIONAL(WITH_DB, [ false ])
88+ AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
89+ ])
90 ]) 102 ])
91 103+])
104+
92+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then 105+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
93+ CPPFLAGS="${CPPFLAGS_save}" 106+ CPPFLAGS="${CPPFLAGS_save}"
94+fi 107+fi
95+ 108
96 dnl # Sqlite external 109 dnl # Sqlite external
97 RPM_CHECK_LIB( 110 RPM_CHECK_LIB(
98 [SQLite], [sqlite], 111@@ -1627,10 +1647,11 @@ RPM_CHECK_LIB(
99@@ -1633,10 +1642,11 @@ RPM_CHECK_LIB(
100 112
101 dnl # Sqlite 3.7.0.1 from db-5.1.19 113 dnl # Sqlite 3.7.0.1 from db-5.1.19
102 dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS. 114 dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS.
@@ -109,7 +121,7 @@ Index: rpm/configure.ac
109 [ 121 [
110 AM_CONDITIONAL(WITH_DBSQL, [ true ]) 122 AM_CONDITIONAL(WITH_DBSQL, [ true ])
111 AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library]) 123 AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
112@@ -1650,12 +1660,50 @@ RPM_CHECK_LIB( 124@@ -1644,12 +1665,50 @@ RPM_CHECK_LIB(
113 ], [ 125 ], [
114 AM_CONDITIONAL(WITH_DBSQL, [ false ]) 126 AM_CONDITIONAL(WITH_DBSQL, [ false ])
115 ]) 127 ])
@@ -160,3 +172,6 @@ Index: rpm/configure.ac
160 AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support])) 172 AC_ARG_WITH(db-largefile, AS_HELP_STRING([--with-db-largefile], [build Berkeley-DB with LARGEFILE support]))
161 AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG])) 173 AC_ARG_WITH(db-mutex, AS_HELP_STRING([--with-db-mutex=ARG], [build Berkeley-DB with MUTEX type ARG]))
162 174
175--
1762.6.2
177