diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/db | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz |
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.patch | 36 | ||||
-rw-r--r-- | meta/recipes-support/db/db/configure_fixes.patch | 18 | ||||
-rw-r--r-- | meta/recipes-support/db/db_4.2.52.bb | 97 | ||||
-rw-r--r-- | meta/recipes-support/db/db_4.3.29.bb | 89 |
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 @@ | |||
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) | ||
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 @@ | |||
1 | If LD is a binary name + parameters db will fail to work out its GNU ld | ||
2 | and disable shared libraries. We don't want this. | ||
3 | |||
4 | RP - 22/11/2007 | ||
5 | |||
6 | Index: dist/configure | ||
7 | =================================================================== | ||
8 | --- dist.orig/configure 2007-11-23 00:47:27.000000000 +0000 | ||
9 | +++ dist/configure 2007-11-23 00:53:22.000000000 +0000 | ||
10 | @@ -5658,7 +5661,7 @@ if test "${lt_cv_prog_gnu_ld+set}" = set | ||
11 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12 | else | ||
13 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
14 | -case `"$LD" -v 2>&1 </dev/null` in | ||
15 | +case `$LD -v 2>&1 </dev/null` in | ||
16 | *GNU* | *'with BFD'*) | ||
17 | lt_cv_prog_gnu_ld=yes | ||
18 | ;; | ||
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 @@ | |||
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. | ||
11 | SECTION = "libs" | ||
12 | DESCRIPTION = "Berkeley DB v4." | ||
13 | HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html" | ||
14 | LICENSE = "BSD Sleepycat" | ||
15 | VIRTUAL_NAME = "virtual/db" | ||
16 | VIRTUAL_NAME_virtclass-native = "virtual/db-native" | ||
17 | |||
18 | CONFLICTS = "db3" | ||
19 | CONFLICTS_virtclass-native = "db3-native" | ||
20 | PR = "r8" | ||
21 | |||
22 | SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz \ | ||
23 | file://configure_fixes.patch;patch=1 " | ||
24 | #SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5" | ||
25 | #TODO SRC_URI += "file://arm-thumb-mutex.patch;patch=1" | ||
26 | |||
27 | inherit autotools | ||
28 | |||
29 | # Put virtual/db in any appropriate provider of a | ||
30 | # relational database, use it as a dependency in | ||
31 | # place of a specific db and use: | ||
32 | # | ||
33 | # PREFERRED_PROVIDER_virtual/db | ||
34 | # | ||
35 | # to select the correct db in the build (distro) .conf | ||
36 | PROVIDES += "${VIRTUAL_NAME}" | ||
37 | |||
38 | # bitbake isn't quite clever enough to deal with sleepycat, | ||
39 | # the distribution sits in the expected directory, but all | ||
40 | # the builds must occur from a sub-directory. The following | ||
41 | # persuades bitbake to go to the right place | ||
42 | S = "${WORKDIR}/db-${PV}/dist" | ||
43 | B = "${WORKDIR}/db-${PV}/build_unix" | ||
44 | |||
45 | # The executables go in a separate package - typically there | ||
46 | # is no need to install these unless doing real database | ||
47 | # management on the system. | ||
48 | PACKAGES += " ${PN}-bin" | ||
49 | |||
50 | # Package contents | ||
51 | FILES_${PN} = "${libdir}/libdb-4*so*" | ||
52 | FILES_${PN}-bin = "${bindir}/*" | ||
53 | # The dev package has the .so link (as in db3) and the .a's - | ||
54 | # it is therefore incompatible (cannot be installed at the | ||
55 | # same time) as the db3 package | ||
56 | FILES_${PN}-dev = "${includedir} ${libdir}/*" | ||
57 | |||
58 | #configuration - set in local.conf to override | ||
59 | DB4_CONFIG ?= " --disable-cryptography --disable-queue --disable-replication --disable-verify --enable-hash" | ||
60 | EXTRA_OECONF = "${DB4_CONFIG}" | ||
61 | |||
62 | # Override the MUTEX setting here, the POSIX library is | ||
63 | # the default - "POSIX/pthreads/library". | ||
64 | # Don't ignore the nice SWP instruction on the ARM: | ||
65 | # These enable the ARM assembler mutex code, this won't | ||
66 | # work with thumb compilation... | ||
67 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
68 | MUTEX = "" | ||
69 | MUTEX_arm = "${ARM_MUTEX}" | ||
70 | MUTEX_armeb = "${ARM_MUTEX}" | ||
71 | EXTRA_OECONF += "${MUTEX}" | ||
72 | |||
73 | ARM_INSTRUCTION_SET = "arm" | ||
74 | |||
75 | # Cancel the site stuff - it's set for db3 and destroys the | ||
76 | # configure. | ||
77 | CONFIG_SITE = "" | ||
78 | do_configure() { | ||
79 | rm -f ${S}/config.sub | ||
80 | cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/config.sub | ||
81 | oe_runconf | ||
82 | } | ||
83 | |||
84 | do_install_append() { | ||
85 | # The docs end up in /usr/docs - not right. | ||
86 | if test -d "${D}/${prefix}/docs" | ||
87 | then | ||
88 | mkdir -p "${D}/${datadir}" | ||
89 | test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}" | ||
90 | mv "${D}/${prefix}/docs" "${D}/${docdir}" | ||
91 | fi | ||
92 | } | ||
93 | |||
94 | # The db package contains symlinks that trip up insane | ||
95 | INSANE_SKIP_db = "1" | ||
96 | |||
97 | 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 @@ | |||
1 | # Has issues with eds | ||
2 | DEFAULT_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. | ||
14 | SECTION = "libs" | ||
15 | DESCRIPTION = "Berkeley DB v4." | ||
16 | HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html" | ||
17 | LICENSE = "BSD Sleepycat" | ||
18 | VIRTUAL_NAME ?= "virtual/db" | ||
19 | CONFLICTS = "db3" | ||
20 | PR = "r8" | ||
21 | |||
22 | SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" | ||
23 | #SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5" | ||
24 | SRC_URI += "file://arm-thumb-mutex.patch;patch=1" | ||
25 | |||
26 | inherit 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 | ||
35 | PROVIDES += "${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 | ||
41 | S = "${WORKDIR}/db-${PV}/dist" | ||
42 | B = "${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. | ||
47 | PACKAGES += " ${PN}-bin" | ||
48 | |||
49 | # Package contents | ||
50 | FILES_${PN} = "${libdir}/libdb-4*so*" | ||
51 | FILES_${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 | ||
55 | FILES_${PN}-dev = "${includedir} ${libdir}/*" | ||
56 | |||
57 | #configuration - set in local.conf to override | ||
58 | # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) | ||
59 | DB4_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --enable-compat185" | ||
60 | |||
61 | EXTRA_OECONF = "${DB4_CONFIG}" | ||
62 | |||
63 | # Override the MUTEX setting here, the POSIX library is | ||
64 | # the default - "POSIX/pthreads/library". | ||
65 | # Don't ignore the nice SWP instruction on the ARM: | ||
66 | # These enable the ARM assembler mutex code, this won't | ||
67 | # work with thumb compilation... | ||
68 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
69 | MUTEX = "" | ||
70 | MUTEX_arm = "${ARM_MUTEX}" | ||
71 | MUTEX_armeb = "${ARM_MUTEX}" | ||
72 | EXTRA_OECONF += "${MUTEX}" | ||
73 | |||
74 | # Cancel the site stuff - it's set for db3 and destroys the | ||
75 | # configure. | ||
76 | CONFIG_SITE = "" | ||
77 | do_configure() { | ||
78 | oe_runconf | ||
79 | } | ||
80 | |||
81 | do_install_append() { | ||
82 | # The docs end up in /usr/docs - not right. | ||
83 | if test -d "${D}/${prefix}/docs" | ||
84 | then | ||
85 | mkdir -p "${D}/${datadir}" | ||
86 | test ! -d "${D}/${docdir}" || rmdir "${D}/${docdir}" | ||
87 | mv "${D}/${prefix}/docs" "${D}/${docdir}" | ||
88 | fi | ||
89 | } | ||