db_4.3.29.bb 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Has issues with eds
  2. DEFAULT_PREFERENCE = "-1"
  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 = "r7"
  20. SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
  21. #SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
  22. SRC_URI += "file://arm-thumb-mutex.patch;patch=1"
  23. inherit autotools
  24. # Put virtual/db in any appropriate provider of a
  25. # relational database, use it as a dependency in
  26. # place of a specific db and use:
  27. #
  28. # PREFERRED_PROVIDER_virtual/db
  29. #
  30. # to select the correct db in the build (distro) .conf
  31. PROVIDES += "${VIRTUAL_NAME}"
  32. # bitbake isn't quite clever enough to deal with sleepycat,
  33. # the distribution sits in the expected directory, but all
  34. # the builds must occur from a sub-directory. The following
  35. # persuades bitbake to go to the right place
  36. S = "${WORKDIR}/db-${PV}/dist"
  37. B = "${WORKDIR}/db-${PV}/build_unix"
  38. # The executables go in a separate package - typically there
  39. # is no need to install these unless doing real database
  40. # management on the system.
  41. PACKAGES += " ${PN}-bin"
  42. # Package contents
  43. FILES_${PN} = "${libdir}/libdb-4*so*"
  44. FILES_${PN}-bin = "${bindir}/*"
  45. # The dev package has the .so link (as in db3) and the .a's -
  46. # it is therefore incompatible (cannot be installed at the
  47. # same time) as the db3 package
  48. FILES_${PN}-dev = "${includedir} ${libdir}/*"
  49. #configuration - set in local.conf to override
  50. # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
  51. DB4_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --enable-compat185"
  52. EXTRA_OECONF = "${DB4_CONFIG}"
  53. # Override the MUTEX setting here, the POSIX library is
  54. # the default - "POSIX/pthreads/library".
  55. # Don't ignore the nice SWP instruction on the ARM:
  56. # These enable the ARM assembler mutex code, this won't
  57. # work with thumb compilation...
  58. ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
  59. MUTEX = ""
  60. MUTEX_arm = "${ARM_MUTEX}"
  61. MUTEX_armeb = "${ARM_MUTEX}"
  62. EXTRA_OECONF += "${MUTEX}"
  63. # Cancel the site stuff - it's set for db3 and destroys the
  64. # configure.
  65. CONFIG_SITE = ""
  66. do_configure() {
  67. oe_runconf
  68. }
  69. do_stage() {
  70. # The .h files get installed read-only, the autostage
  71. # function just uses cp -pPR, so do this by hand
  72. rm -rf ${STAGE_TEMP}
  73. mkdir -p ${STAGE_TEMP}
  74. oe_runmake DESTDIR="${STAGE_TEMP}" install_include
  75. cp -pPRf ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/.
  76. rm -rf ${STAGE_TEMP}
  77. oe_libinstall -so -C .libs libdb-4.3 ${STAGING_LIBDIR}
  78. ln -sf libdb-4.3.so ${STAGING_LIBDIR}/libdb.so
  79. ln -sf libdb-4.3.a ${STAGING_LIBDIR}/libdb.a
  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. }