summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/db
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadopenembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.bz2
openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.zip
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-support/db')
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex.patch36
-rw-r--r--meta/recipes-support/db/db/configure_fixes.patch18
-rw-r--r--meta/recipes-support/db/db_4.2.52.bb97
-rw-r--r--meta/recipes-support/db/db_4.3.29.bb89
4 files changed, 240 insertions, 0 deletions
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex.patch b/meta/recipes-support/db/db/arm-thumb-mutex.patch
new file mode 100644
index 0000000000..acd446fcd8
--- /dev/null
+++ b/meta/recipes-support/db/db/arm-thumb-mutex.patch
@@ -0,0 +1,36 @@
+--- 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)
diff --git a/meta/recipes-support/db/db/configure_fixes.patch b/meta/recipes-support/db/db/configure_fixes.patch
new file mode 100644
index 0000000000..80aa0e7c1c
--- /dev/null
+++ b/meta/recipes-support/db/db/configure_fixes.patch
@@ -0,0 +1,18 @@
+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
+ ;;
diff --git a/meta/recipes-support/db/db_4.2.52.bb b/meta/recipes-support/db/db_4.2.52.bb
new file mode 100644
index 0000000000..b3ca493a01
--- /dev/null
+++ b/meta/recipes-support/db/db_4.2.52.bb
@@ -0,0 +1,97 @@
+# Version 4 of the Berkeley DB from Sleepycat
+#
+# At present this package only installs the DB code
+# itself (shared libraries, .a in the dev package),
+# documentation and headers.
+#
+# 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
+# same system at the same time if really necessary.
+SECTION = "libs"
+DESCRIPTION = "Berkeley DB v4."
+HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
+LICENSE = "BSD Sleepycat"
+VIRTUAL_NAME = "virtual/db"
+VIRTUAL_NAME_virtclass-native = "virtual/db-native"
+
+CONFLICTS = "db3"
+CONFLICTS_virtclass-native = "db3-native"
+PR = "r8"
+
+SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz \
+ file://configure_fixes.patch;patch=1 "
+#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
+#TODO SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
+
+inherit autotools
+
+# Put virtual/db in any appropriate provider of a
+# relational database, use it as a dependency in
+# place of a specific db and use:
+#
+# PREFERRED_PROVIDER_virtual/db
+#
+# to select the correct db in the build (distro) .conf
+PROVIDES += "${VIRTUAL_NAME}"
+
+# bitbake isn't quite clever enough to deal with sleepycat,
+# the distribution sits in the expected directory, but all
+# the builds must occur from a sub-directory. The following
+# persuades bitbake to go to the right place
+S = "${WORKDIR}/db-${PV}/dist"
+B = "${WORKDIR}/db-${PV}/build_unix"
+
+# The executables go in a separate package - typically there
+# is no need to install these unless doing real database
+# management on the system.
+PACKAGES += " ${PN}-bin"
+
+# Package contents
+FILES_${PN} = "${libdir}/libdb-4*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
+# same time) as the db3 package
+FILES_${PN}-dev = "${includedir} ${libdir}/*"
+
+#configuration - set in local.conf to override
+DB4_CONFIG ?= " --disable-cryptography --disable-queue --disable-replication --disable-verify --enable-hash"
+EXTRA_OECONF = "${DB4_CONFIG}"
+
+# Override the MUTEX setting here, the POSIX library is
+# the default - "POSIX/pthreads/library".
+# Don't ignore the nice SWP instruction on the ARM:
+# These enable the ARM assembler mutex code, this won't
+# work with thumb compilation...
+ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
+MUTEX = ""
+MUTEX_arm = "${ARM_MUTEX}"
+MUTEX_armeb = "${ARM_MUTEX}"
+EXTRA_OECONF += "${MUTEX}"
+
+ARM_INSTRUCTION_SET = "arm"
+
+# Cancel the site stuff - it's set for db3 and destroys the
+# configure.
+CONFIG_SITE = ""
+do_configure() {
+ rm -f ${S}/config.sub
+ cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config.sub
+ oe_runconf
+}
+
+do_install_append() {
+ # The docs end up in /usr/docs - not right.
+ if test -d "${D}/${prefix}/docs"
+ then
+ mkdir -p "${D}/${datadir}"
+ test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
+ mv "${D}/${prefix}/docs" "${D}/${docdir}"
+ fi
+}
+
+# The db package contains symlinks that trip up insane
+INSANE_SKIP_db = "1"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/db/db_4.3.29.bb b/meta/recipes-support/db/db_4.3.29.bb
new file mode 100644
index 0000000000..04a6680f07
--- /dev/null
+++ b/meta/recipes-support/db/db_4.3.29.bb
@@ -0,0 +1,89 @@
+# Has issues with eds
+DEFAULT_PREFERENCE = "-1"
+
+# Version 4 of the Berkeley DB from Sleepycat
+#
+# At present this package only installs the DB code
+# itself (shared libraries, .a in the dev package),
+# documentation and headers.
+#
+# 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
+# same system at the same time if really necessary.
+SECTION = "libs"
+DESCRIPTION = "Berkeley DB v4."
+HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
+LICENSE = "BSD Sleepycat"
+VIRTUAL_NAME ?= "virtual/db"
+CONFLICTS = "db3"
+PR = "r8"
+
+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"
+
+inherit autotools
+
+# Put virtual/db in any appropriate provider of a
+# relational database, use it as a dependency in
+# place of a specific db and use:
+#
+# PREFERRED_PROVIDER_virtual/db
+#
+# to select the correct db in the build (distro) .conf
+PROVIDES += "${VIRTUAL_NAME}"
+
+# bitbake isn't quite clever enough to deal with sleepycat,
+# the distribution sits in the expected directory, but all
+# the builds must occur from a sub-directory. The following
+# persuades bitbake to go to the right place
+S = "${WORKDIR}/db-${PV}/dist"
+B = "${WORKDIR}/db-${PV}/build_unix"
+
+# The executables go in a separate package - typically there
+# is no need to install these unless doing real database
+# management on the system.
+PACKAGES += " ${PN}-bin"
+
+# Package contents
+FILES_${PN} = "${libdir}/libdb-4*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
+# same time) as the db3 package
+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"
+
+EXTRA_OECONF = "${DB4_CONFIG}"
+
+# Override the MUTEX setting here, the POSIX library is
+# the default - "POSIX/pthreads/library".
+# Don't ignore the nice SWP instruction on the ARM:
+# These enable the ARM assembler mutex code, this won't
+# work with thumb compilation...
+ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
+MUTEX = ""
+MUTEX_arm = "${ARM_MUTEX}"
+MUTEX_armeb = "${ARM_MUTEX}"
+EXTRA_OECONF += "${MUTEX}"
+
+# Cancel the site stuff - it's set for db3 and destroys the
+# configure.
+CONFIG_SITE = ""
+do_configure() {
+ oe_runconf
+}
+
+do_install_append() {
+ # 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}"
+ mv "${D}/${prefix}/docs" "${D}/${docdir}"
+ fi
+}