db_5.3.28.bb 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Version 5 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 DB5 can both be installed on the
  10. # same system at the same time if really necessary.
  11. SECTION = "libs"
  12. SUMMARY = "Berkeley Database v5"
  13. HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html"
  14. LICENSE = "Sleepycat"
  15. RCONFLICTS_${PN} = "db3"
  16. CVE_PRODUCT = "oracle_berkeley_db"
  17. CVE_VERSION = "11.2.${PV}"
  18. PR = "r1"
  19. PE = "1"
  20. SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
  21. SRC_URI += "file://fix-parallel-build.patch \
  22. file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
  23. file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
  24. file://sequence-type.patch \
  25. file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \
  26. file://0001-clock-Do-not-define-own-timespec.patch \
  27. "
  28. # We are not interested in official latest 6.x versions;
  29. # let's track what debian is using.
  30. UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
  31. UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>\d+(\.\d+)+).+\.orig"
  32. SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
  33. SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
  34. LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
  35. inherit autotools
  36. # The executables go in a separate package - typically there
  37. # is no need to install these unless doing real database
  38. # management on the system.
  39. inherit lib_package
  40. PACKAGES =+ "${PN}-cxx"
  41. FILES_${PN}-cxx = "${libdir}/*cxx*so"
  42. # The dev package has the .so link (as in db3) and the .a's -
  43. # it is therefore incompatible (cannot be installed at the
  44. # same time) as the db3 package
  45. # sort out the .so since they do version prior to the .so
  46. SOLIBS = "-5*.so"
  47. FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
  48. #configuration - set in local.conf to override
  49. # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
  50. DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-compat185 --disable-sql"
  51. EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true"
  52. PACKAGECONFIG ??= ""
  53. PACKAGECONFIG[verify] = "--enable-verify, --disable-verify"
  54. PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm,"
  55. EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
  56. EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
  57. AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
  58. # Cancel the site stuff - it's set for db3 and destroys the
  59. # configure.
  60. CONFIG_SITE = ""
  61. oe_runconf_prepend() {
  62. . ${S}/dist/RELEASE
  63. # Edit version information we couldn't pre-compute.
  64. sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
  65. -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
  66. -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
  67. -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
  68. -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
  69. -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
  70. -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
  71. -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
  72. -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
  73. }
  74. do_compile_prepend() {
  75. # Stop libtool adding RPATHs
  76. sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
  77. }
  78. do_install_append() {
  79. mkdir -p ${D}/${includedir}/db51
  80. mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
  81. mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
  82. ln -s db51/db.h ${D}/${includedir}/db.h
  83. ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
  84. # The docs end up in /usr/docs - not right.
  85. if test -d "${D}/${prefix}/docs"
  86. then
  87. mkdir -p "${D}/${datadir}"
  88. test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
  89. mv "${D}/${prefix}/docs" "${D}/${docdir}"
  90. fi
  91. chown -R root:root ${D}
  92. if ${@bb.utils.contains('PACKAGECONFIG', 'verify', 'false', 'true', d)}; then
  93. rm -f ${D}${bindir}/db_verify
  94. fi
  95. }
  96. INSANE_SKIP_${PN} = "dev-so"
  97. INSANE_SKIP_${PN}-cxx = "dev-so"
  98. BBCLASSEXTEND = "native nativesdk"