blob: a99d5cea62d323769ca954a245c444443ce89082 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# 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.
11SECTION = "libs"
12SUMMARY = "Berkeley Database v5"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060013DESCRIPTION = "Provides the foundational storage services for your application, no matter how demanding and unique your requirements may seem to be"
Andrew Geissler82c905d2020-04-13 13:39:40 -050014HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015LICENSE = "Sleepycat"
Patrick Williams213cb262021-08-07 19:21:33 -050016RCONFLICTS:${PN} = "db3"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017
William A. Kennington IIIac69b482021-06-02 12:28:27 -070018CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
Brad Bishop316dfdd2018-06-25 12:45:53 -040019CVE_VERSION = "11.2.${PV}"
20
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021PE = "1"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060022
Andrew Geissler82c905d2020-04-13 13:39:40 -050023SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024SRC_URI += "file://fix-parallel-build.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
27 file://sequence-type.patch \
Brad Bishop19323692019-04-05 15:28:33 -040028 file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050029 file://0001-clock-Do-not-define-own-timespec.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031# We are not interested in official latest 6.x versions;
32# let's track what debian is using.
33UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
Brad Bishop19323692019-04-05 15:28:33 -040034UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>\d+(\.\d+)+).+\.orig"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
36SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
37SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
38
Patrick Williamsc0f7c042017-02-23 20:41:17 -060039LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041inherit autotools
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043# 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.
46inherit lib_package
47
48PACKAGES =+ "${PN}-cxx"
Patrick Williams213cb262021-08-07 19:21:33 -050049FILES:${PN}-cxx = "${libdir}/*cxx*so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051# 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
54# sort out the .so since they do version prior to the .so
55SOLIBS = "-5*.so"
56FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
57
58#configuration - set in local.conf to override
59# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
Brad Bishop08902b02019-08-20 09:16:51 -040060DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-compat185 --disable-sql"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063
Andrew Geissler82c905d2020-04-13 13:39:40 -050064PACKAGECONFIG ??= ""
Brad Bishop08902b02019-08-20 09:16:51 -040065PACKAGECONFIG[verify] = "--enable-verify, --disable-verify"
Andrew Geissler82c905d2020-04-13 13:39:40 -050066PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm,"
Brad Bishop08902b02019-08-20 09:16:51 -040067
Brad Bishopd7bf8c12018-02-25 22:55:05 -050068EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060069AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070
71# Cancel the site stuff - it's set for db3 and destroys the
72# configure.
73CONFIG_SITE = ""
Brad Bishopd7bf8c12018-02-25 22:55:05 -050074
Patrick Williams213cb262021-08-07 19:21:33 -050075oe_runconf:prepend() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050076 . ${S}/dist/RELEASE
77 # Edit version information we couldn't pre-compute.
78 sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
79 -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
80 -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
81 -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
82 -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
83 -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
84 -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
85 -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
86 -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087}
88
Patrick Williams213cb262021-08-07 19:21:33 -050089do_compile:prepend() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060090 # Stop libtool adding RPATHs
Andrew Geissler595f6302022-01-24 19:11:47 +000091 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
Patrick Williamsc124f4f2015-09-15 14:41:29 -050092}
93
Patrick Williams213cb262021-08-07 19:21:33 -050094do_install:append() {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050095 mkdir -p ${D}/${includedir}/db51
96 mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
97 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
98 ln -s db51/db.h ${D}/${includedir}/db.h
99 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
100
101 # The docs end up in /usr/docs - not right.
102 if test -d "${D}/${prefix}/docs"
103 then
104 mkdir -p "${D}/${datadir}"
105 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
106 mv "${D}/${prefix}/docs" "${D}/${docdir}"
107 fi
108
109 chown -R root:root ${D}
Andrew Geissler5a43b432020-06-13 10:46:56 -0500110 if ${@bb.utils.contains('PACKAGECONFIG', 'verify', 'false', 'true', d)}; then
111 rm -f ${D}${bindir}/db_verify
112 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500113}
114
Patrick Williams213cb262021-08-07 19:21:33 -0500115INSANE_SKIP:${PN} = "dev-so"
116INSANE_SKIP:${PN}-cxx = "dev-so"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500117
118BBCLASSEXTEND = "native nativesdk"