blob: 0f69cab761761bf0080d34a7d8eb6bba34a899e5 [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001# 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"
13HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
14LICENSE = "AGPL-3.0"
15VIRTUAL_NAME ?= "virtual/db"
16RCONFLICTS_${PN} = "db3"
17
18PR = "r1"
19
20# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
21SRC_URI = "http://distfiles.gentoo.org/distfiles/db-${PV}.tar.gz \
22 file://arm-thumb-mutex_db5.patch \
23 file://fix-parallel-build.patch \
24 file://Makefile-let-libso_target-depend-on-bt_rec.patch \
25 file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch \
26 "
27
28SRC_URI[md5sum] = "c65a4d3e930a116abaaf69edfc697f25"
29SRC_URI[sha256sum] = "24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55"
30
31# Exclude NC versions which lack AES encryption
32UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
33UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
34
35LIC_FILES_CHKSUM = "file://LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
36
37# Put virtual/db in any appropriate provider of a
38# relational database, use it as a dependency in
39# place of a specific db and use:
40#
41# PREFERRED_PROVIDER_virtual/db
42#
43# to select the correct db in the build (distro) .conf
44PROVIDES += "${VIRTUAL_NAME}"
45
46inherit autotools
47
48# The executables go in a separate package - typically there
49# is no need to install these unless doing real database
50# management on the system.
51inherit lib_package
52
53PACKAGES =+ "${PN}-cxx"
54FILES_${PN}-cxx = "${libdir}/*cxx*so"
55
56# The dev package has the .so link (as in db3) and the .a's -
57# it is therefore incompatible (cannot be installed at the
58# same time) as the db3 package
59# sort out the .so since they do version prior to the .so
60SOLIBS = "-6*.so"
61FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
62
63#configuration - set in local.conf to override
64# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
65DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
66
67EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
68
69# Cancel the site stuff - it's set for db3 and destroys the configure.
70CONFIG_SITE = ""
71
72AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
73
74do_configure() {
75 cd ${B}
76 gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
77 oe_runconf
78}
79
Patrick Williamsc0f7c042017-02-23 20:41:17 -060080EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
81EXTRA_OEMAKE += "STRIP=true"
82
83do_compile_prepend() {
84 # Stop libtool adding RPATHs
85 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
86}
87
88do_install_append() {
89 mkdir -p ${D}/${includedir}/db60
90 mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
91 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
92 ln -s db60/db.h ${D}/${includedir}/db.h
93 ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
94
95 # The docs end up in /usr/docs - not right.
96 if test -d "${D}/${prefix}/docs"
97 then
98 mkdir -p "${D}/${datadir}"
99 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
100 mv "${D}/${prefix}/docs" "${D}/${docdir}"
101 fi
102
103 chown -R root:root ${D}
104}
105
106# libdb isn't versioned in the typical manner (libdb-6.0.so is the full library
107# name) so skip these checks.
108INSANE_SKIP_${PN} = "dev-so"
109INSANE_SKIP_${PN}-cxx = "dev-so"
110
111BBCLASSEXTEND = "native nativesdk"
112
113RECIPE_NO_UPDATE_REASON = "latest db does not work with RPM-5.x due to changes in locking semantics"