summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/db/db_4.3.29.bb
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/packages/db/db_4.3.29.bb')
-rw-r--r--openembedded/packages/db/db_4.3.29.bb99
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 @@
1DEFAULT_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.
13SECTION = "libs"
14DESCRIPTION = "Berkeley DB v4."
15HOMEPAGE = "http://www.sleepycat.com"
16LICENSE = "BSD Sleepycat"
17VIRTUAL_NAME ?= "virtual/db"
18CONFLICTS = "db3"
19PR = "r3"
20
21SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz"
22#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
23SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
24
25inherit 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
34PROVIDES += "${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
40S = "${WORKDIR}/db-${PV}/dist"
41B = "${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.
46PACKAGES += " ${PN}-bin"
47
48# Package contents
49FILES_${PN} = "${libdir}/libdb-4*so*"
50FILES_${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
54FILES_${PN}-dev = "${includedir} ${libdir}"
55
56#configuration - set in local.conf to override
57DB4_CONFIG ?= "--enable-o_direct --enable-smallbuild --enable-compat185"
58EXTRA_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...
65ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
66MUTEX = ""
67MUTEX_arm = "${ARM_MUTEX}"
68MUTEX_armeb = "${ARM_MUTEX}"
69EXTRA_OECONF += "${MUTEX}"
70
71# Cancel the site stuff - it's set for db3 and destroys the
72# configure.
73CONFIG_SITE = ""
74do_configure() {
75 oe_runconf
76}
77
78do_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
91do_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}