diff options
Diffstat (limited to 'openembedded/packages/db/db_4.3.29.bb')
-rw-r--r-- | openembedded/packages/db/db_4.3.29.bb | 99 |
1 files changed, 99 insertions, 0 deletions
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 | } | ||