Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # 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. |
| 11 | SECTION = "libs" |
| 12 | SUMMARY = "Berkeley Database v5" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | LICENSE = "Sleepycat" |
| 15 | VIRTUAL_NAME ?= "virtual/db" |
| 16 | RCONFLICTS_${PN} = "db3" |
| 17 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 18 | PR = "r1" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | PE = "1" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 20 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 22 | SRC_URI += "file://arm-thumb-mutex_db5.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | file://fix-parallel-build.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 25 | file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ |
| 26 | file://sequence-type.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 28 | # We are not interested in official latest 6.x versions; |
| 29 | # let's track what debian is using. |
| 30 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/" |
| 31 | UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>.+)\.orig" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | |
| 33 | SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" |
| 34 | SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628" |
| 35 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 36 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 38 | inherit autotools |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | |
| 40 | # Put virtual/db in any appropriate provider of a |
| 41 | # relational database, use it as a dependency in |
| 42 | # place of a specific db and use: |
| 43 | # |
| 44 | # PREFERRED_PROVIDER_virtual/db |
| 45 | # |
| 46 | # to select the correct db in the build (distro) .conf |
| 47 | PROVIDES += "${VIRTUAL_NAME}" |
| 48 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 49 | # The executables go in a separate package - typically there |
| 50 | # is no need to install these unless doing real database |
| 51 | # management on the system. |
| 52 | inherit lib_package |
| 53 | |
| 54 | PACKAGES =+ "${PN}-cxx" |
| 55 | FILES_${PN}-cxx = "${libdir}/*cxx*so" |
| 56 | |
| 57 | |
| 58 | # The dev package has the .so link (as in db3) and the .a's - |
| 59 | # it is therefore incompatible (cannot be installed at the |
| 60 | # same time) as the db3 package |
| 61 | # sort out the .so since they do version prior to the .so |
| 62 | SOLIBS = "-5*.so" |
| 63 | FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so" |
| 64 | |
| 65 | #configuration - set in local.conf to override |
| 66 | # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) |
| 67 | DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql" |
| 68 | |
| 69 | EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot" |
| 70 | |
| 71 | # Override the MUTEX setting here, the POSIX library is |
| 72 | # the default - "POSIX/pthreads/library". |
| 73 | # Don't ignore the nice SWP instruction on the ARM: |
| 74 | # These enable the ARM assembler mutex code, this won't |
| 75 | # work with thumb compilation... |
| 76 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" |
| 77 | MUTEX = "" |
| 78 | MUTEX_arm = "${ARM_MUTEX}" |
| 79 | MUTEX_armeb = "${ARM_MUTEX}" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 80 | EXTRA_OECONF += "${MUTEX} STRIP=true" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 81 | EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 82 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 83 | EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 84 | AUTOTOOLS_SCRIPT_PATH = "${S}/dist" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | |
| 86 | # Cancel the site stuff - it's set for db3 and destroys the |
| 87 | # configure. |
| 88 | CONFIG_SITE = "" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 89 | |
| 90 | oe_runconf_prepend() { |
| 91 | . ${S}/dist/RELEASE |
| 92 | # Edit version information we couldn't pre-compute. |
| 93 | sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \ |
| 94 | -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \ |
| 95 | -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ |
| 96 | -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ |
| 97 | -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ |
| 98 | -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ |
| 99 | -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \ |
| 100 | -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ |
| 101 | -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | do_compile_prepend() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 105 | # Stop libtool adding RPATHs |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 106 | sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | do_install_append() { |
| 110 | mkdir -p ${D}/${includedir}/db51 |
| 111 | mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/. |
| 112 | mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/. |
| 113 | ln -s db51/db.h ${D}/${includedir}/db.h |
| 114 | ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h |
| 115 | |
| 116 | # The docs end up in /usr/docs - not right. |
| 117 | if test -d "${D}/${prefix}/docs" |
| 118 | then |
| 119 | mkdir -p "${D}/${datadir}" |
| 120 | test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}" |
| 121 | mv "${D}/${prefix}/docs" "${D}/${docdir}" |
| 122 | fi |
| 123 | |
| 124 | chown -R root:root ${D} |
| 125 | } |
| 126 | |
| 127 | INSANE_SKIP_${PN} = "dev-so" |
| 128 | INSANE_SKIP_${PN}-cxx = "dev-so" |
| 129 | |
| 130 | BBCLASSEXTEND = "native nativesdk" |