Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Hierarchical, reference counted memory pool system with destructors" |
| 2 | HOMEPAGE = "https://ldb.samba.org" |
| 3 | SECTION = "libs" |
| 4 | LICENSE = "LGPL-3.0-or-later & LGPL-2.1-or-later & GPL-3.0-or-later" |
| 5 | |
| 6 | DEPENDS += "libtdb libtalloc libtevent popt" |
| 7 | RDEPENDS:pyldb += "python3" |
| 8 | |
| 9 | export PYTHONHASHSEED="1" |
| 10 | |
| 11 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ |
| 12 | file://0001-do-not-import-target-module-while-cross-compile.patch \ |
| 13 | file://0002-ldb-Add-configure-options-for-packages.patch \ |
| 14 | file://0003-Fix-pyext_PATTERN-for-cross-compilation.patch \ |
| 15 | " |
| 16 | |
| 17 | SRC_URI:append:libc-musl = " file://cmocka-fix-musl-libc-conflicting-types-error.patch" |
| 18 | |
| 19 | PACKAGECONFIG ??= "\ |
| 20 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl', d)} \ |
| 21 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \ |
| 22 | " |
| 23 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" |
| 24 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" |
| 25 | PACKAGECONFIG[ldap] = ",,openldap" |
| 26 | PACKAGECONFIG[libaio] = "--with-libaio,--without-libaio,libaio" |
| 27 | PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" |
| 28 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" |
| 29 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" |
| 30 | PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," |
| 31 | |
| 32 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" |
| 33 | |
| 34 | LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ |
| 35 | file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ |
| 36 | file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" |
| 37 | |
| 38 | SRC_URI[md5sum] = "3a5f54f511fb237b83e1f34e2c7e25cd" |
| 39 | SRC_URI[sha256sum] = "467403f77df86782c3965bb175440baa2ed751a9feb9560194bd8c06bf1736c9" |
| 40 | |
| 41 | inherit pkgconfig waf-samba |
| 42 | |
| 43 | S = "${WORKDIR}/ldb-${PV}" |
| 44 | |
| 45 | #cross_compile cannot use preforked process, since fork process earlier than point subproces.popen |
| 46 | #to cross Popen |
| 47 | export WAF_NO_PREFORK="yes" |
| 48 | |
| 49 | EXTRA_OECONF += "--disable-rpath \ |
| 50 | --disable-rpath-install \ |
| 51 | --bundled-libraries=cmocka \ |
| 52 | --builtin-libraries=replace \ |
| 53 | --with-modulesdir=${libdir}/ldb/modules \ |
| 54 | --with-privatelibdir=${libdir}/ldb \ |
| 55 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ |
| 56 | " |
| 57 | |
| 58 | PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" |
| 59 | |
| 60 | NOAUTOPACKAGEDEBUG = "1" |
| 61 | |
| 62 | FILES:${PN} += "${libdir}/ldb/*" |
| 63 | FILES:${PN}-dbg += "${bindir}/.debug/* \ |
| 64 | ${libdir}/.debug/* \ |
| 65 | ${libdir}/ldb/.debug/* \ |
| 66 | ${libdir}/ldb/modules/ldb/.debug/*" |
| 67 | |
| 68 | FILES:pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ |
| 69 | ${libdir}/libpyldb-util.*.so.* \ |
| 70 | " |
| 71 | FILES:pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ |
| 72 | ${libdir}/.debug/libpyldb-util.*.so.*" |
| 73 | FILES:pyldb-dev = "${libdir}/libpyldb-util.*.so" |
| 74 | |
| 75 | # Prevent third_party/waf/waflib/Configure.py checking host's path which is |
| 76 | # incorrect for cross building. |
| 77 | export PREFIX = "/" |
| 78 | export LIBDIR = "${libdir}" |
| 79 | export BINDIR = "${bindir}" |
| 80 | |
| 81 | do_configure:prepend() { |
| 82 | # For a clean rebuild |
| 83 | rm -fr bin/ |
| 84 | } |