Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 13 | DESCRIPTION = "Provides the foundational storage services for your application, no matter how demanding and unique your requirements may seem to be" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | LICENSE = "Sleepycat" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 16 | RCONFLICTS:${PN} = "db3" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 18 | CVE_PRODUCT = "oracle_berkeley_db berkeley_db" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | CVE_VERSION = "11.2.${PV}" |
| 20 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 21 | PR = "r1" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | PE = "1" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 23 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | SRC_URI += "file://fix-parallel-build.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ |
| 28 | file://sequence-type.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | file://0001-clock-Do-not-define-own-timespec.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 32 | # We are not interested in official latest 6.x versions; |
| 33 | # let's track what debian is using. |
| 34 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>\d+(\.\d+)+).+\.orig" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | |
| 37 | SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" |
| 38 | SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628" |
| 39 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 40 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 42 | inherit autotools |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 43 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | # The executables go in a separate package - typically there |
| 45 | # is no need to install these unless doing real database |
| 46 | # management on the system. |
| 47 | inherit lib_package |
| 48 | |
| 49 | PACKAGES =+ "${PN}-cxx" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | FILES:${PN}-cxx = "${libdir}/*cxx*so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | # The dev package has the .so link (as in db3) and the .a's - |
| 53 | # it is therefore incompatible (cannot be installed at the |
| 54 | # same time) as the db3 package |
| 55 | # sort out the .so since they do version prior to the .so |
| 56 | SOLIBS = "-5*.so" |
| 57 | FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so" |
| 58 | |
| 59 | #configuration - set in local.conf to override |
| 60 | # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 61 | DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-compat185 --disable-sql" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 63 | EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 65 | PACKAGECONFIG ??= "" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 66 | PACKAGECONFIG[verify] = "--enable-verify, --disable-verify" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 67 | PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm," |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 68 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 69 | EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 70 | AUTOTOOLS_SCRIPT_PATH = "${S}/dist" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 71 | |
| 72 | # Cancel the site stuff - it's set for db3 and destroys the |
| 73 | # configure. |
| 74 | CONFIG_SITE = "" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | oe_runconf:prepend() { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 77 | . ${S}/dist/RELEASE |
| 78 | # Edit version information we couldn't pre-compute. |
| 79 | sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \ |
| 80 | -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \ |
| 81 | -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ |
| 82 | -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ |
| 83 | -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ |
| 84 | -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ |
| 85 | -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \ |
| 86 | -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ |
| 87 | -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 88 | } |
| 89 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 90 | do_compile:prepend() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 91 | # Stop libtool adding RPATHs |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 92 | sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 93 | } |
| 94 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 95 | do_install:append() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 96 | mkdir -p ${D}/${includedir}/db51 |
| 97 | mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/. |
| 98 | mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/. |
| 99 | ln -s db51/db.h ${D}/${includedir}/db.h |
| 100 | ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h |
| 101 | |
| 102 | # The docs end up in /usr/docs - not right. |
| 103 | if test -d "${D}/${prefix}/docs" |
| 104 | then |
| 105 | mkdir -p "${D}/${datadir}" |
| 106 | test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}" |
| 107 | mv "${D}/${prefix}/docs" "${D}/${docdir}" |
| 108 | fi |
| 109 | |
| 110 | chown -R root:root ${D} |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 111 | if ${@bb.utils.contains('PACKAGECONFIG', 'verify', 'false', 'true', d)}; then |
| 112 | rm -f ${D}${bindir}/db_verify |
| 113 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 114 | } |
| 115 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 116 | INSANE_SKIP:${PN} = "dev-so" |
| 117 | INSANE_SKIP:${PN}-cxx = "dev-so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 118 | |
| 119 | BBCLASSEXTEND = "native nativesdk" |