summaryrefslogtreecommitdiffstats
path: root/meta/packages/db
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/db
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/db')
-rw-r--r--meta/packages/db/db-native_4.2.52.bb13
-rw-r--r--meta/packages/db/db_4.1.25.bb87
-rw-r--r--meta/packages/db/db_4.2.52.bb97
-rw-r--r--meta/packages/db/db_4.3.29.bb100
-rw-r--r--meta/packages/db/files/arm-thumb-mutex.patch36
5 files changed, 333 insertions, 0 deletions
diff --git a/meta/packages/db/db-native_4.2.52.bb b/meta/packages/db/db-native_4.2.52.bb
new file mode 100644
index 0000000000..5aaeb4329e
--- /dev/null
+++ b/meta/packages/db/db-native_4.2.52.bb
@@ -0,0 +1,13 @@
1# This wrapper builds a native version of the SleepyCat
2# Berkeley DB for those packages which need it (e.g.
3# perl).
4SECTION = "libs"
5VIRTUAL_NAME = "virtual/db-native"
6CONFLICTS = "db3-native"
7#PR tracks the non-native package
8
9inherit native
10
11include db_${PV}.bb
12
13PACKAGES = ""
diff --git a/meta/packages/db/db_4.1.25.bb b/meta/packages/db/db_4.1.25.bb
new file mode 100644
index 0000000000..381c69a616
--- /dev/null
+++ b/meta/packages/db/db_4.1.25.bb
@@ -0,0 +1,87 @@
1# Version 4 of the Berkeley DB from Sleepycat
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB4 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12DESCRIPTION = "Berkeley DB v4."
13HOMEPAGE = "http://www.sleepycat.com"
14LICENSE = "BSD Sleepycat"
15PR = "r2"
16
17SRC_URI = "http://downloads.sleepycat.com/${P}.tar.gz"
18
19inherit autotools
20
21# At present virtual/db is only in the db4 file, but it
22# should probably be in the other candidates (db3, gdbm)
23# because it doesn't make any sense to have multiple
24# relational databases on an embedded machine...
25PROVIDES += " db4 virtual/db"
26
27# bitbake isn't quite clever enough to deal with sleepycat,
28# the distribution sits in the expected directory, but all
29# the builds must occur from a sub-directory. The following
30# persuades bitbake to go to the right place
31S = "${WORKDIR}/${P}/build_unix"
32
33# The executables go in a separate package - typically there
34# is no need to install these unless doing real database
35# management on the system.
36PACKAGES += " ${PN}-bin"
37
38# Package contents
39FILES_${PN} = "${libdir}/libdb*so*"
40FILES_${PN}-bin = "${bindir}"
41# The dev package has the .so link (as in db3) and the .a's -
42# it is therefore incompatible (cannot be installed at the
43# same time) as the db3 package
44FILES_${PN}-dev = "${includedir} ${libdir}"
45
46#configuration - set in local.conf to override
47DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild"
48# Override the MUTEX setting here, the POSIX library is
49# the default - "POSIX/pthreads/library".
50# Don't ignore the nice SWP instruction on the ARM:
51EXTRA_OECONF = "${DB4_CONFIG}"
52# These enable the ARM assembler mutex code, this won't
53# work with thumb compilation...
54ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
55ARM_MUTEX_thumb = ""
56# NOTE: only tested on nslu2, should probably be _armeb
57EXTRA_OECONF_nslu2 = "${DB4_CONFIG} ${ARM_MUTEX}"
58
59# Cancel the site stuff - it's set for db3 and destroys the
60# configure.
61CONFIG_SITE = ""
62do_configure() {
63 echo '#!/bin/sh' >${S}/configure
64 echo 'rm ${S}/configure' >>${S}/configure
65 echo 'exec ../dist/configure "$@"' >>${S}/configure
66 chmod a+x ${S}/configure
67 oe_runconf
68}
69
70do_stage() {
71 oe_runmake DESTDIR="${STAGING_DIR}/${BUILD_SYS}" includedir="${STAGING_INCDIR}" install_include
72 oe_libinstall -so -C .libs libdb-4.1 ${STAGING_LIBDIR}
73 ln -s ${STAGING_LIBDIR}/libdb-4.1.so ${STAGING_LIBDIR}/libdb-4.so
74 ln -s ${STAGING_LIBDIR}/libdb-4.so ${STAGING_LIBDIR}/libdb.so
75}
76
77do_install() {
78 oe_runmake includedir="${D}${includedir}" libdir="${D}${libdir}" bindir="${D}${bindir}" docdir="${D}${docdir}" install
79
80 # The docs end up in /usr/docs - not right.
81 if test -d "${D}/${prefix}/docs"
82 then
83 mkdir -p "${D}/${datadir}"
84 test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}"
85 mv "${D}/${prefix}/docs" "${D}/${docdir}"
86 fi
87}
diff --git a/meta/packages/db/db_4.2.52.bb b/meta/packages/db/db_4.2.52.bb
new file mode 100644
index 0000000000..9e5978fe16
--- /dev/null
+++ b/meta/packages/db/db_4.2.52.bb
@@ -0,0 +1,97 @@
1# Version 4 of the Berkeley DB from Sleepycat
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB4 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12DESCRIPTION = "Berkeley DB v4."
13HOMEPAGE = "http://www.sleepycat.com"
14LICENSE = "BSD Sleepycat"
15VIRTUAL_NAME ?= "virtual/db"
16CONFLICTS = "db3"
17PR = "r3"
18
19SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz"
20#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
21#TODO SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
22
23inherit autotools
24
25# Put virtual/db in any appropriate provider of a
26# relational database, use it as a dependency in
27# place of a specific db and use:
28#
29# PREFERRED_PROVIDER_virtual/db
30#
31# to select the correct db in the build (distro) .conf
32PROVIDES += "${VIRTUAL_NAME}"
33
34# bitbake isn't quite clever enough to deal with sleepycat,
35# the distribution sits in the expected directory, but all
36# the builds must occur from a sub-directory. The following
37# persuades bitbake to go to the right place
38S = "${WORKDIR}/db-${PV}/dist"
39B = "${WORKDIR}/db-${PV}/build_unix"
40
41# The executables go in a separate package - typically there
42# is no need to install these unless doing real database
43# management on the system.
44PACKAGES += " ${PN}-bin"
45
46# Package contents
47FILES_${PN} = "${libdir}/libdb-4*so*"
48FILES_${PN}-bin = "${bindir}"
49# The dev package has the .so link (as in db3) and the .a's -
50# it is therefore incompatible (cannot be installed at the
51# same time) as the db3 package
52FILES_${PN}-dev = "${includedir} ${libdir}"
53
54#configuration - set in local.conf to override
55DB4_CONFIG ?= " --disable-cryptography --disable-queue --disable-replication --disable-verify --enable-hash"
56EXTRA_OECONF = "${DB4_CONFIG}"
57
58# Override the MUTEX setting here, the POSIX library is
59# the default - "POSIX/pthreads/library".
60# Don't ignore the nice SWP instruction on the ARM:
61# These enable the ARM assembler mutex code, this won't
62# work with thumb compilation...
63ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
64MUTEX = ""
65MUTEX_arm = "${ARM_MUTEX}"
66MUTEX_armeb = "${ARM_MUTEX}"
67EXTRA_OECONF += "${MUTEX}"
68
69# Cancel the site stuff - it's set for db3 and destroys the
70# configure.
71CONFIG_SITE = ""
72do_configure() {
73 oe_runconf
74}
75
76do_stage() {
77 # The .h files get installed read-only, the autostage
78 # function just uses cp -pPR, so do this by hand
79 rm -rf ${STAGE_TEMP}
80 mkdir -p ${STAGE_TEMP}
81 oe_runmake DESTDIR="${STAGE_TEMP}" install_include
82 cp -pPRf ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/.
83 rm -rf ${STAGE_TEMP}
84 oe_libinstall -so -C .libs libdb-4.2 ${STAGING_LIBDIR}
85 ln -sf libdb-4.2.so ${STAGING_LIBDIR}/libdb.so
86 ln -sf libdb-4.2.a ${STAGING_LIBDIR}/libdb.a
87}
88
89do_install_append() {
90 # The docs end up in /usr/docs - not right.
91 if test -d "${D}/${prefix}/docs"
92 then
93 mkdir -p "${D}/${datadir}"
94 test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}"
95 mv "${D}/${prefix}/docs" "${D}/${docdir}"
96 fi
97}
diff --git a/meta/packages/db/db_4.3.29.bb b/meta/packages/db/db_4.3.29.bb
new file mode 100644
index 0000000000..a4059aac60
--- /dev/null
+++ b/meta/packages/db/db_4.3.29.bb
@@ -0,0 +1,100 @@
1# Has issues with eds
2DEFAULT_PREFERENCE = "-1"
3
4# Version 4 of the Berkeley DB from Sleepycat
5#
6# At present this package only installs the DB code
7# itself (shared libraries, .a in the dev package),
8# documentation and headers.
9#
10# The headers have the same names as those as v3
11# of the DB, only one version can be used *for dev*
12# at once - DB3 and DB4 can both be installed on the
13# same system at the same time if really necessary.
14SECTION = "libs"
15DESCRIPTION = "Berkeley DB v4."
16HOMEPAGE = "http://www.sleepycat.com"
17LICENSE = "BSD Sleepycat"
18VIRTUAL_NAME ?= "virtual/db"
19CONFLICTS = "db3"
20PR = "r3"
21
22SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz"
23#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
24SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
25
26inherit autotools
27
28# Put virtual/db in any appropriate provider of a
29# relational database, use it as a dependency in
30# place of a specific db and use:
31#
32# PREFERRED_PROVIDER_virtual/db
33#
34# to select the correct db in the build (distro) .conf
35PROVIDES += "${VIRTUAL_NAME}"
36
37# bitbake isn't quite clever enough to deal with sleepycat,
38# the distribution sits in the expected directory, but all
39# the builds must occur from a sub-directory. The following
40# persuades bitbake to go to the right place
41S = "${WORKDIR}/db-${PV}/dist"
42B = "${WORKDIR}/db-${PV}/build_unix"
43
44# The executables go in a separate package - typically there
45# is no need to install these unless doing real database
46# management on the system.
47PACKAGES += " ${PN}-bin"
48
49# Package contents
50FILES_${PN} = "${libdir}/libdb-4*so*"
51FILES_${PN}-bin = "${bindir}"
52# The dev package has the .so link (as in db3) and the .a's -
53# it is therefore incompatible (cannot be installed at the
54# same time) as the db3 package
55FILES_${PN}-dev = "${includedir} ${libdir}"
56
57#configuration - set in local.conf to override
58DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild --enable-compat185"
59EXTRA_OECONF = "${DB4_CONFIG}"
60
61# Override the MUTEX setting here, the POSIX library is
62# the default - "POSIX/pthreads/library".
63# Don't ignore the nice SWP instruction on the ARM:
64# These enable the ARM assembler mutex code, this won't
65# work with thumb compilation...
66ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
67MUTEX = ""
68MUTEX_arm = "${ARM_MUTEX}"
69MUTEX_armeb = "${ARM_MUTEX}"
70EXTRA_OECONF += "${MUTEX}"
71
72# Cancel the site stuff - it's set for db3 and destroys the
73# configure.
74CONFIG_SITE = ""
75do_configure() {
76 oe_runconf
77}
78
79do_stage() {
80 # The .h files get installed read-only, the autostage
81 # function just uses cp -pPR, so do this by hand
82 rm -rf ${STAGE_TEMP}
83 mkdir -p ${STAGE_TEMP}
84 oe_runmake DESTDIR="${STAGE_TEMP}" install_include
85 cp -pPRf ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/.
86 rm -rf ${STAGE_TEMP}
87 oe_libinstall -so -C .libs libdb-4.3 ${STAGING_LIBDIR}
88 ln -sf libdb-4.3.so ${STAGING_LIBDIR}/libdb.so
89 ln -sf libdb-4.3.a ${STAGING_LIBDIR}/libdb.a
90}
91
92do_install_append() {
93 # The docs end up in /usr/docs - not right.
94 if test -d "${D}/${prefix}/docs"
95 then
96 mkdir -p "${D}/${datadir}"
97 test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}"
98 mv "${D}/${prefix}/docs" "${D}/${docdir}"
99 fi
100}
diff --git a/meta/packages/db/files/arm-thumb-mutex.patch b/meta/packages/db/files/arm-thumb-mutex.patch
new file mode 100644
index 0000000000..acd446fcd8
--- /dev/null
+++ b/meta/packages/db/files/arm-thumb-mutex.patch
@@ -0,0 +1,36 @@
1--- db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:33:27.761042518 -0800
2+++ db-4.3.29-dist/../dbinc/mutex.h 2005-11-15 07:55:24.823920060 -0800
3@@ -470,6 +470,25 @@
4 #ifdef LOAD_ACTUAL_MUTEX_CODE
5 #define MUTEX_SET_TEST 1 /* gcc/arm: 0 is clear, 1 is set. */
6
7+#if defined __thumb__
8+#define MUTEX_SET(tsl) ({ \
9+ int __r, __p; \
10+ asm volatile( \
11+ ".align 2\n\t" \
12+ "bx pc\n\t" \
13+ "nop\n\t" \
14+ ".arm\n\t" \
15+ "swpb %0, %2, [%3]\n\t" \
16+ "eor %0, %0, #1\n\t" \
17+ "orr %1, pc, #1\n\t" \
18+ "bx %1\n\t" \
19+ ".force_thumb" \
20+ : "=&r" (__r), "=r" (__p) \
21+ : "r" (1), "r" (tsl) \
22+ ); \
23+ __r & 1; \
24+})
25+#else
26 #define MUTEX_SET(tsl) ({ \
27 int __r; \
28 asm volatile( \
29@@ -480,6 +499,7 @@
30 ); \
31 __r & 1; \
32 })
33+#endif
34
35 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
36 #define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)