diff options
author | Richard Purdie <richard@openedhand.com> | 2006-01-24 17:28:08 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-01-24 17:28:08 +0000 |
commit | a44b79ae7b4b05de19fab315a8381734e9ee4e25 (patch) | |
tree | 1d8ac4970448419462911fcc2f6ac4115ba861a4 /openembedded/packages | |
parent | 25e1fcc76a2926970d39ca3cf5d59fa49e283ca5 (diff) | |
download | poky-a44b79ae7b4b05de19fab315a8381734e9ee4e25.tar.gz |
Add db 4.3.29
git-svn-id: https://svn.o-hand.com/repos/poky@236 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages')
-rw-r--r-- | openembedded/packages/db/db-native_4.3.29.bb | 13 | ||||
-rw-r--r-- | openembedded/packages/db/db_4.3.29.bb | 99 | ||||
-rw-r--r-- | openembedded/packages/db/files/arm-thumb-mutex.patch | 36 |
3 files changed, 148 insertions, 0 deletions
diff --git a/openembedded/packages/db/db-native_4.3.29.bb b/openembedded/packages/db/db-native_4.3.29.bb new file mode 100644 index 0000000000..5aaeb4329e --- /dev/null +++ b/openembedded/packages/db/db-native_4.3.29.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). | ||
4 | SECTION = "libs" | ||
5 | VIRTUAL_NAME = "virtual/db-native" | ||
6 | CONFLICTS = "db3-native" | ||
7 | #PR tracks the non-native package | ||
8 | |||
9 | inherit native | ||
10 | |||
11 | include db_${PV}.bb | ||
12 | |||
13 | PACKAGES = "" | ||
diff --git a/openembedded/packages/db/db_4.3.29.bb b/openembedded/packages/db/db_4.3.29.bb new file mode 100644 index 0000000000..206b7817af --- /dev/null +++ b/openembedded/packages/db/db_4.3.29.bb | |||
@@ -0,0 +1,99 @@ | |||
1 | DEFAULT_PREFERENCE = "-1" | ||
2 | |||
3 | # Version 4 of the Berkeley DB from Sleepycat | ||
4 | # | ||
5 | # At present this package only installs the DB code | ||
6 | # itself (shared libraries, .a in the dev package), | ||
7 | # documentation and headers. | ||
8 | # | ||
9 | # The headers have the same names as those as v3 | ||
10 | # of the DB, only one version can be used *for dev* | ||
11 | # at once - DB3 and DB4 can both be installed on the | ||
12 | # same system at the same time if really necessary. | ||
13 | SECTION = "libs" | ||
14 | DESCRIPTION = "Berkeley DB v4." | ||
15 | HOMEPAGE = "http://www.sleepycat.com" | ||
16 | LICENSE = "BSD Sleepycat" | ||
17 | VIRTUAL_NAME ?= "virtual/db" | ||
18 | CONFLICTS = "db3" | ||
19 | PR = "r3" | ||
20 | |||
21 | SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz" | ||
22 | #SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5" | ||
23 | SRC_URI += "file://arm-thumb-mutex.patch;patch=1" | ||
24 | |||
25 | inherit autotools | ||
26 | |||
27 | # Put virtual/db in any appropriate provider of a | ||
28 | # relational database, use it as a dependency in | ||
29 | # place of a specific db and use: | ||
30 | # | ||
31 | # PREFERRED_PROVIDER_virtual/db | ||
32 | # | ||
33 | # to select the correct db in the build (distro) .conf | ||
34 | PROVIDES += "${VIRTUAL_NAME}" | ||
35 | |||
36 | # bitbake isn't quite clever enough to deal with sleepycat, | ||
37 | # the distribution sits in the expected directory, but all | ||
38 | # the builds must occur from a sub-directory. The following | ||
39 | # persuades bitbake to go to the right place | ||
40 | S = "${WORKDIR}/db-${PV}/dist" | ||
41 | B = "${WORKDIR}/db-${PV}/build_unix" | ||
42 | |||
43 | # The executables go in a separate package - typically there | ||
44 | # is no need to install these unless doing real database | ||
45 | # management on the system. | ||
46 | PACKAGES += " ${PN}-bin" | ||
47 | |||
48 | # Package contents | ||
49 | FILES_${PN} = "${libdir}/libdb-4*so*" | ||
50 | FILES_${PN}-bin = "${bindir}" | ||
51 | # The dev package has the .so link (as in db3) and the .a's - | ||
52 | # it is therefore incompatible (cannot be installed at the | ||
53 | # same time) as the db3 package | ||
54 | FILES_${PN}-dev = "${includedir} ${libdir}" | ||
55 | |||
56 | #configuration - set in local.conf to override | ||
57 | DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild --enable-compat185" | ||
58 | EXTRA_OECONF = "${DB4_CONFIG}" | ||
59 | |||
60 | # Override the MUTEX setting here, the POSIX library is | ||
61 | # the default - "POSIX/pthreads/library". | ||
62 | # Don't ignore the nice SWP instruction on the ARM: | ||
63 | # These enable the ARM assembler mutex code, this won't | ||
64 | # work with thumb compilation... | ||
65 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
66 | MUTEX = "" | ||
67 | MUTEX_arm = "${ARM_MUTEX}" | ||
68 | MUTEX_armeb = "${ARM_MUTEX}" | ||
69 | EXTRA_OECONF += "${MUTEX}" | ||
70 | |||
71 | # Cancel the site stuff - it's set for db3 and destroys the | ||
72 | # configure. | ||
73 | CONFIG_SITE = "" | ||
74 | do_configure() { | ||
75 | oe_runconf | ||
76 | } | ||
77 | |||
78 | do_stage() { | ||
79 | # The .h files get installed read-only, the autostage | ||
80 | # function just uses cp -pPR, so do this by hand | ||
81 | rm -rf ${STAGE_TEMP} | ||
82 | mkdir -p ${STAGE_TEMP} | ||
83 | oe_runmake DESTDIR="${STAGE_TEMP}" install_include | ||
84 | cp -pPRf ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/. | ||
85 | rm -rf ${STAGE_TEMP} | ||
86 | oe_libinstall -so -C .libs libdb-4.3 ${STAGING_LIBDIR} | ||
87 | ln -sf libdb-4.3.so ${STAGING_LIBDIR}/libdb.so | ||
88 | ln -sf libdb-4.3.a ${STAGING_LIBDIR}/libdb.a | ||
89 | } | ||
90 | |||
91 | do_install_append() { | ||
92 | # The docs end up in /usr/docs - not right. | ||
93 | if test -d "${D}/${prefix}/docs" | ||
94 | then | ||
95 | mkdir -p "${D}/${datadir}" | ||
96 | test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}" | ||
97 | mv "${D}/${prefix}/docs" "${D}/${docdir}" | ||
98 | fi | ||
99 | } | ||
diff --git a/openembedded/packages/db/files/arm-thumb-mutex.patch b/openembedded/packages/db/files/arm-thumb-mutex.patch new file mode 100644 index 0000000000..acd446fcd8 --- /dev/null +++ b/openembedded/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) | ||