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