blob: 50a469b08094143afabaa13ca513ee849f27bd34 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# Version 6 of the Berkeley DB from Oracle (formerly 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 DB6 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12SUMMARY = "Berkeley Database v6"
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 = "AGPL-3.0"
15VIRTUAL_NAME ?= "virtual/db"
16RCONFLICTS_${PN} = "db3"
17
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
20SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
21SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
22 file://fix-parallel-build.patch \
23 file://Makefile-let-libso_target-depend-on-bt_rec.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024 file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch;patchdir=.. \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 "
26
27SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
28SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
29
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030# Exclude NC versions which lack AES encryption
31UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
32UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
35
36inherit autotools
37
38# Put virtual/db in any appropriate provider of a
39# relational database, use it as a dependency in
40# place of a specific db and use:
41#
42# PREFERRED_PROVIDER_virtual/db
43#
44# to select the correct db in the build (distro) .conf
45PROVIDES += "${VIRTUAL_NAME}"
46
47# bitbake isn't quite clever enough to deal with sleepycat,
48# the distribution sits in the expected directory, but all
49# the builds must occur from a sub-directory. The following
50# persuades bitbake to go to the right place
51S = "${WORKDIR}/db-${PV}/dist"
52B = "${WORKDIR}/db-${PV}/build_unix"
53SPDX_S = "${WORKDIR}/db-${PV}"
54
55# The executables go in a separate package - typically there
56# is no need to install these unless doing real database
57# management on the system.
58inherit lib_package
59
60PACKAGES =+ "${PN}-cxx"
61FILES_${PN}-cxx = "${libdir}/*cxx*so"
62
63
64# The dev package has the .so link (as in db3) and the .a's -
65# it is therefore incompatible (cannot be installed at the
66# same time) as the db3 package
67# sort out the .so since they do version prior to the .so
68SOLIBS = "-6*.so"
69FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
70
71#configuration - set in local.conf to override
72# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
73DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
74
75EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
76
77# Override the MUTEX setting here, the POSIX library is
78# the default - "POSIX/pthreads/library".
79# Don't ignore the nice SWP instruction on the ARM:
80# These enable the ARM assembler mutex code
81ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
82MUTEX = ""
83MUTEX_arm = "${ARM_MUTEX}"
84MUTEX_armeb = "${ARM_MUTEX}"
85EXTRA_OECONF += "${MUTEX}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050086EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087
88# Cancel the site stuff - it's set for db3 and destroys the
89# configure.
90CONFIG_SITE = ""
91do_configure() {
92 gnu-configize --force ${S}
93 export STRIP="true"
94 oe_runconf
95}
96
97do_compile_prepend() {
98 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
99 ${B}/libtool
100}
101
102do_install_append() {
103 mkdir -p ${D}/${includedir}/db60
104 mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
105 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
106 ln -s db60/db.h ${D}/${includedir}/db.h
107 ln -s db60/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"
124