Skip to contentSkip to conversation

Uprev Berkley DB to 5.1.19

PATCH In review Mark Hatle 2 participants 3 messages Jan 26, 2011 – Jan 28, 2011

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Uprev Berkley DB to 5.1.19

Uprev Berkley DB to 5.1.19. This is a precursor to the RPM5 uprev.

The code was tested with the Sato date and address book applications.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/db5
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/db5

Thanks,
Mark Hatle <[email protected]>
---

Mark Hatle (1):
BerkleyDB: Uprev db from 4.2 to 5.1.19

 meta/recipes-support/db/db/arm-thumb-mutex.patch   |   36 -------
 .../db/db/arm-thumb-mutex_db5.patch                |   36 +++++++
 meta/recipes-support/db/db/configure_fixes.patch   |   18 ----
 meta/recipes-support/db/db_4.2.52.bb               |  102 --------------------
 .../db/{db_4.3.29.bb => db_5.1.19.bb}              |   39 +++++---
 5 files changed, 63 insertions(+), 168 deletions(-)
 delete mode 100644 meta/recipes-support/db/db/arm-thumb-mutex.patch
 create mode 100644 meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
 delete mode 100644 meta/recipes-support/db/db/configure_fixes.patch
 delete mode 100644 meta/recipes-support/db/db_4.2.52.bb
 rename meta/recipes-support/db/{db_4.3.29.bb => db_5.1.19.bb} (68%)
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/1 BerkleyDB: Uprev db from 4.2 to 5.1.19

The latest version of Berkley DB (5.1.19) is required by RPM. This version is backwards compatible with the 4.2 version that was enabled previously.

---
 meta/recipes-support/db/db/arm-thumb-mutex.patch   |   36 -------
 .../db/db/arm-thumb-mutex_db5.patch                |   36 +++++++
 meta/recipes-support/db/db/configure_fixes.patch   |   18 ----
 meta/recipes-support/db/db_4.2.52.bb               |  102 --------------------
 .../db/{db_4.3.29.bb => db_5.1.19.bb}              |   39 +++++---
 5 files changed, 63 insertions(+), 168 deletions(-)
 delete mode 100644 meta/recipes-support/db/db/arm-thumb-mutex.patch
 create mode 100644 meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
 delete mode 100644 meta/recipes-support/db/db/configure_fixes.patch
 delete mode 100644 meta/recipes-support/db/db_4.2.52.bb
 rename meta/recipes-support/db/{db_4.3.29.bb => db_5.1.19.bb} (68%)
meta/recipes-support/db/db/arm-thumb-mutex.patch deleted +0 -36
deleted file mode 100644
index acd446f..0000000
@@ -1,36 +0,0 @@
---- db-4.3.29-dist/../dbinc/mutex.h	2005-11-15 07:33:27.761042518 -0800
-+++ db-4.3.29-dist/../dbinc/mutex.h	2005-11-15 07:55:24.823920060 -0800
-@@ -470,6 +470,25 @@
- #ifdef LOAD_ACTUAL_MUTEX_CODE
- #define	MUTEX_SET_TEST	1		/* gcc/arm: 0 is clear, 1 is set. */
- 
-+#if defined __thumb__
-+#define	MUTEX_SET(tsl) ({						\
-+	int __r, __p;							\
-+	asm volatile(							\
-+		".align	2\n\t"						\
-+		"bx	pc\n\t"						\
-+		"nop\n\t"						\
-+		".arm\n\t"						\
-+		"swpb	%0, %2, [%3]\n\t"				\
-+		"eor	%0, %0, #1\n\t"					\
-+		"orr	%1, pc, #1\n\t"					\
-+		"bx	%1\n\t"						\
-+		".force_thumb"						\
-+	    : "=&r" (__r), "=r" (__p)					\
-+	    : "r" (1), "r" (tsl)					\
-+	    );								\
-+	__r & 1;							\
-+})
-+#else
- #define	MUTEX_SET(tsl) ({						\
- 	int __r;							\
- 	asm volatile(							\
-@@ -480,6 +499,7 @@
- 	    );								\
- 	__r & 1;							\
- })
-+#endif
- 
- #define	MUTEX_UNSET(tsl)	(*(volatile tsl_t *)(tsl) = 0)
- #define	MUTEX_INIT(tsl)		MUTEX_UNSET(tsl)
meta/recipes-support/db/db/arm-thumb-mutex_db5.patch new file +36 -0
new file mode 100644
index 0000000..37d0d93
@@ -0,0 +1,36 @@
+--- db-5.1.19/../src/dbinc/mutex_int.h.orig	2011-01-05 19:21:42.181805366 -0600
++++ db-5.1.19/../src/dbinc/mutex_int.h	2011-01-05 19:24:53.141853117 -0600
+@@ -474,6 +474,25 @@
+ 
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+ /* gcc/arm: 0 is clear, 1 is set. */
++#if defined __thumb__
++#define	MUTEX_SET(tsl) ({						\
++	int __r, __p;							\
++	__asm__ volatile(						\
++		".align 2\n\t"                                          \
++		"bx     pc\n\t"                                         \
++		"nop\n\t"                                               \
++		".arm\n\t"                                              \
++		"swpb   %0, %2, [%3]\n\t"                               \
++		"eor    %0, %0, #1\n\t"                                 \
++		"orr    %1, pc, #1\n\t"                                 \
++		"bx     %1\n\t"                                         \
++		".force_thumb"                                          \
++	    : "=&r" (__r), "=r" (__p)                                   \
++	    : "r" (1), "r" (tsl)                                        \
++	    );                                                          \
++	__r & 1;							\
++})
++#else
+ #define	MUTEX_SET(tsl) ({						\
+ 	int __r;							\
+ 	__asm__ volatile(						\
+@@ -484,6 +503,7 @@
+ 	    );								\
+ 	__r & 1;							\
+ })
++#endif
+ 
+ #define	MUTEX_UNSET(tsl)	(*(volatile tsl_t *)(tsl) = 0)
+ #define	MUTEX_INIT(tsl)         (MUTEX_UNSET(tsl), 0)
meta/recipes-support/db/db/configure_fixes.patch deleted +0 -18
deleted file mode 100644
index 80aa0e7..0000000
@@ -1,18 +0,0 @@
-If LD is a binary name + parameters db will fail to work out its GNU ld
-and disable shared libraries. We don't want this.
-
-RP - 22/11/2007
-
-Index: dist/configure
-===================================================================
---- dist.orig/configure	2007-11-23 00:47:27.000000000 +0000
-+++ dist/configure	2007-11-23 00:53:22.000000000 +0000
-@@ -5658,7 +5661,7 @@ if test "${lt_cv_prog_gnu_ld+set}" = set
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
--case `"$LD" -v 2>&1 </dev/null` in
-+case `$LD -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
-   lt_cv_prog_gnu_ld=yes
-   ;;
meta/recipes-support/db/db_4.2.52.bb deleted +0 -102

102 lines not on this page · raw message

meta/recipes-support/db/db_5.1.19.bb renamed from meta/recipes-support/db/db_4.3.29.bb +27 -12
similarity index 68%
rename from meta/recipes-support/db/db_4.3.29.bb
rename to meta/recipes-support/db/db_5.1.19.bb
index 04a6680..919e532 100644
@@ -1,7 +1,4 @@
-# Has issues with eds
-DEFAULT_PREFERENCE = "-1"
-
-# Version 4 of the Berkeley DB from Sleepycat
+# Version 5 of the Berkeley DB from Sleepycat
 #
 # At present this package only installs the DB code
 # itself (shared libraries, .a in the dev package),
@@ -9,19 +6,24 @@ DEFAULT_PREFERENCE = "-1"
 #
 # The headers have the same names as those as v3
 # of the DB, only one version can be used *for dev*
-# at once - DB3 and DB4 can both be installed on the
+# at once - DB3 and DB5 can both be installed on the
 # same system at the same time if really necessary.
 SECTION = "libs"
-DESCRIPTION = "Berkeley DB v4."
+DESCRIPTION = "Berkeley DB v5."
 HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
 LICENSE = "BSD Sleepycat"
 VIRTUAL_NAME ?= "virtual/db"
 CONFLICTS = "db3"
-PR = "r8"
+PR = "r1"
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
 #SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
-SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
+SRC_URI += "file://arm-thumb-mutex_db5.patch;patch=1"
+
+SRC_URI[md5sum] = "76fcbfeebfcd09ba0b4d96bfdf8d884d"
+SRC_URI[sha256sum] = "0194d4ca9266ba1a1c0bfbc233b18bfd05f63163453c81ebcdfdc7112d5ac850"
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=86f9294f39f38ef9e89690bcd2320e7a"
 
 inherit autotools
 
@@ -47,7 +49,7 @@ B = "${WORKDIR}/db-${PV}/build_unix"
 PACKAGES += " ${PN}-bin"
 
 # Package contents
-FILES_${PN} = "${libdir}/libdb-4*so*"
+FILES_${PN} = "${libdir}/libdb-5*so*"
 FILES_${PN}-bin = "${bindir}/*"
 # The dev package has the .so link (as in db3) and the .a's -
 # it is therefore incompatible (cannot be installed at the
@@ -56,9 +58,9 @@ FILES_${PN}-dev = "${includedir} ${libdir}/*"
 
 #configuration - set in local.conf to override
 # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB4_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --enable-compat185"
+DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --disable-compat185 --disable-sql"
 
-EXTRA_OECONF = "${DB4_CONFIG}"
+EXTRA_OECONF = "${DB5_CONFIG}"
 
 # Override the MUTEX setting here, the POSIX library is
 # the default - "POSIX/pthreads/library".
@@ -79,11 +81,24 @@ do_configure() {
 }
 
 do_install_append() {
+	mkdir -p ${D}/${includedir}/db51
+	#mv ${D}/${includedir}/db_185.h ${D}/${includedir}/db51/.
+	mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
+	mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
+	#mv ${D}/${includedir}/dbsql.h ${D}/${includedir}/db51/.
+	#ln -s db51/db_185.h ${D}/${includedir}/db_185.h
+	ln -s db51/db.h ${D}/${includedir}/db.h
+	ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
+	#ln -s db51/dbsql.h ${D}/${includedir}/dbsql.h
+
 	# The docs end up in /usr/docs - not right.
 	if test -d "${D}/${prefix}/docs"
 	then
 		mkdir -p "${D}/${datadir}"
-		test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}"
+		test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
 		mv "${D}/${prefix}/docs" "${D}/${docdir}"
 	fi
 }
+
+BBCLASSEXTEND = "native nativesdk"
+
Signature · 1 line
1.7.3.4
#2 lore raw
In reply to Mark Hatle
Quoted 22 lines · Mark Hatle

Uprev Berkley DB to 5.1.19. This is a precursor to the RPM5 uprev.

The code was tested with the Sato date and address book applications.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/db5
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/db5

Thanks,
Mark Hatle<[email protected]>
---

Mark Hatle (1):
BerkleyDB: Uprev db from 4.2 to 5.1.19

  meta/recipes-support/db/db/arm-thumb-mutex.patch   |   36 -------
  .../db/db/arm-thumb-mutex_db5.patch                |   36 +++++++
  meta/recipes-support/db/db/configure_fixes.patch   |   18 ----
  meta/recipes-support/db/db_4.2.52.bb               |  102 --------------------
  .../db/{db_4.3.29.bb =>  db_5.1.19.bb}              |   39 +++++---
  5 files changed, 63 insertions(+), 168 deletions(-)
Quoted 6 lines

delete mode 100644 meta/recipes-support/db/db/arm-thumb-mutex.patch create mode 100644 meta/recipes-support/db/db/arm-thumb-mutex_db5.patch delete mode 100644 meta/recipes-support/db/db/configure_fixes.patch delete mode 100644 meta/recipes-support/db/db_4.2.52.bb rename meta/recipes-support/db/{db_4.3.29.bb => db_5.1.19.bb} (68%)

Pulled into Master

Thanks
Sau!