diff options
Diffstat (limited to 'meta/packages/db/db_4.3.29.bb')
-rw-r--r-- | meta/packages/db/db_4.3.29.bb | 100 |
1 files changed, 100 insertions, 0 deletions
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 | ||
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.sleepycat.com" | ||
17 | LICENSE = "BSD Sleepycat" | ||
18 | VIRTUAL_NAME ?= "virtual/db" | ||
19 | CONFLICTS = "db3" | ||
20 | PR = "r3" | ||
21 | |||
22 | SRC_URI = "http://downloads.sleepycat.com/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 | DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild --enable-compat185" | ||
59 | EXTRA_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... | ||
66 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
67 | MUTEX = "" | ||
68 | MUTEX_arm = "${ARM_MUTEX}" | ||
69 | MUTEX_armeb = "${ARM_MUTEX}" | ||
70 | EXTRA_OECONF += "${MUTEX}" | ||
71 | |||
72 | # Cancel the site stuff - it's set for db3 and destroys the | ||
73 | # configure. | ||
74 | CONFIG_SITE = "" | ||
75 | do_configure() { | ||
76 | oe_runconf | ||
77 | } | ||
78 | |||
79 | do_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 | |||
92 | do_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 | } | ||