blob: 9cb57e6a53ec822a7a762e33e0d3388728ff213b [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 Williamsc124f4f2015-09-15 14:41:29 -050016RCONFLICTS_${PN} = "db3"
17
Brad Bishop316dfdd2018-06-25 12:45:53 -040018CVE_PRODUCT = "oracle_berkeley_db"
19CVE_VERSION = "11.2.${PV}"
20
Patrick Williamsc0f7c042017-02-23 20:41:17 -060021PR = "r1"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022PE = "1"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023
Andrew Geissler82c905d2020-04-13 13:39:40 -050024SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025SRC_URI += "file://fix-parallel-build.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026 file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027 file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
28 file://sequence-type.patch \
Brad Bishop19323692019-04-05 15:28:33 -040029 file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050030 file://0001-clock-Do-not-define-own-timespec.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032# We are not interested in official latest 6.x versions;
33# let's track what debian is using.
34UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
Brad Bishop19323692019-04-05 15:28:33 -040035UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>\d+(\.\d+)+).+\.orig"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036
37SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
38SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
39
Patrick Williamsc0f7c042017-02-23 20:41:17 -060040LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042inherit autotools
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044# 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.
47inherit lib_package
48
49PACKAGES =+ "${PN}-cxx"
50FILES_${PN}-cxx = "${libdir}/*cxx*so"
51
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052# 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
56SOLIBS = "-5*.so"
57FILES_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 Bishop08902b02019-08-20 09:16:51 -040061DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-compat185 --disable-sql"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080063EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064
Andrew Geissler82c905d2020-04-13 13:39:40 -050065PACKAGECONFIG ??= ""
Brad Bishop08902b02019-08-20 09:16:51 -040066PACKAGECONFIG[verify] = "--enable-verify, --disable-verify"
Andrew Geissler82c905d2020-04-13 13:39:40 -050067PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm,"
Brad Bishop08902b02019-08-20 09:16:51 -040068
Brad Bishopd7bf8c12018-02-25 22:55:05 -050069EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070
Brad Bishopd7bf8c12018-02-25 22:55:05 -050071EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060072AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050073
74# Cancel the site stuff - it's set for db3 and destroys the
75# configure.
76CONFIG_SITE = ""
Brad Bishopd7bf8c12018-02-25 22:55:05 -050077
78oe_runconf_prepend() {
79 . ${S}/dist/RELEASE
80 # Edit version information we couldn't pre-compute.
81 sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
82 -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
83 -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
84 -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
85 -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
86 -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
87 -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
88 -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
89 -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
Patrick Williamsc124f4f2015-09-15 14:41:29 -050090}
91
92do_compile_prepend() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060093 # Stop libtool adding RPATHs
Brad Bishopd7bf8c12018-02-25 22:55:05 -050094 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
Patrick Williamsc124f4f2015-09-15 14:41:29 -050095}
96
97do_install_append() {
98 mkdir -p ${D}/${includedir}/db51
99 mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
100 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
101 ln -s db51/db.h ${D}/${includedir}/db.h
102 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
103
104 # The docs end up in /usr/docs - not right.
105 if test -d "${D}/${prefix}/docs"
106 then
107 mkdir -p "${D}/${datadir}"
108 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
109 mv "${D}/${prefix}/docs" "${D}/${docdir}"
110 fi
111
112 chown -R root:root ${D}
Andrew Geissler5a43b432020-06-13 10:46:56 -0500113 if ${@bb.utils.contains('PACKAGECONFIG', 'verify', 'false', 'true', d)}; then
114 rm -f ${D}${bindir}/db_verify
115 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500116}
117
118INSANE_SKIP_${PN} = "dev-so"
119INSANE_SKIP_${PN}-cxx = "dev-so"
120
121BBCLASSEXTEND = "native nativesdk"