blob: 093ee449097a2ed76ce8e523121a50a6f6acc387 [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"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014LICENSE = "Sleepycat"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015RCONFLICTS_${PN} = "db3"
16
Brad Bishop316dfdd2018-06-25 12:45:53 -040017CVE_PRODUCT = "oracle_berkeley_db"
18CVE_VERSION = "11.2.${PV}"
19
Patrick Williamsc0f7c042017-02-23 20:41:17 -060020PR = "r1"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021PE = "1"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060022
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060024SRC_URI += "file://arm-thumb-mutex_db5.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 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 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030# We are not interested in official latest 6.x versions;
31# let's track what debian is using.
32UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
33UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>.+)\.orig"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
35SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
36SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
37
Patrick Williamsc0f7c042017-02-23 20:41:17 -060038LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
Brad Bishopd7bf8c12018-02-25 22:55:05 -050040inherit autotools
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042# The executables go in a separate package - typically there
43# is no need to install these unless doing real database
44# management on the system.
45inherit lib_package
46
47PACKAGES =+ "${PN}-cxx"
48FILES_${PN}-cxx = "${libdir}/*cxx*so"
49
50
51# 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)
60DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
61
62EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
63
64# Override the MUTEX setting here, the POSIX library is
65# the default - "POSIX/pthreads/library".
66# Don't ignore the nice SWP instruction on the ARM:
67# These enable the ARM assembler mutex code, this won't
68# work with thumb compilation...
69ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
70MUTEX = ""
71MUTEX_arm = "${ARM_MUTEX}"
72MUTEX_armeb = "${ARM_MUTEX}"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060073EXTRA_OECONF += "${MUTEX} STRIP=true"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050074EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060075
Brad Bishopd7bf8c12018-02-25 22:55:05 -050076EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060077AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050078
79# Cancel the site stuff - it's set for db3 and destroys the
80# configure.
81CONFIG_SITE = ""
Brad Bishopd7bf8c12018-02-25 22:55:05 -050082
83oe_runconf_prepend() {
84 . ${S}/dist/RELEASE
85 # Edit version information we couldn't pre-compute.
86 sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
87 -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
88 -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
89 -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
90 -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
91 -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
92 -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
93 -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
94 -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
Patrick Williamsc124f4f2015-09-15 14:41:29 -050095}
96
97do_compile_prepend() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060098 # Stop libtool adding RPATHs
Brad Bishopd7bf8c12018-02-25 22:55:05 -050099 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500100}
101
102do_install_append() {
103 mkdir -p ${D}/${includedir}/db51
104 mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
105 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
106 ln -s db51/db.h ${D}/${includedir}/db.h
107 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
108
109 # The docs end up in /usr/docs - not right.
110 if test -d "${D}/${prefix}/docs"
111 then
112 mkdir -p "${D}/${datadir}"
113 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
114 mv "${D}/${prefix}/docs" "${D}/${docdir}"
115 fi
116
117 chown -R root:root ${D}
118}
119
120INSANE_SKIP_${PN} = "dev-so"
121INSANE_SKIP_${PN}-cxx = "dev-so"
122
123BBCLASSEXTEND = "native nativesdk"