diff options
Diffstat (limited to 'meta-networking/recipes-support/libldb/libldb_2.8.1.bb')
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb_2.8.1.bb | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb_2.8.1.bb b/meta-networking/recipes-support/libldb/libldb_2.8.1.bb new file mode 100644 index 0000000000..dbb27e6ba6 --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb_2.8.1.bb | |||
@@ -0,0 +1,87 @@ | |||
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 cmocka" | ||
7 | RDEPENDS:pyldb += "python3" | ||
8 | |||
9 | export PYTHONHASHSEED = "1" | ||
10 | export PYTHONARCHDIR = "${PYTHON_SITEPACKAGES_DIR}" | ||
11 | |||
12 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ | ||
13 | file://0001-do-not-import-target-module-while-cross-compile.patch \ | ||
14 | file://0002-ldb-Add-configure-options-for-packages.patch \ | ||
15 | file://0003-Fix-pyext_PATTERN-for-cross-compilation.patch \ | ||
16 | file://run-ptest \ | ||
17 | " | ||
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[libbsd] = "--with-libbsd,--without-libbsd,libbsd" | ||
27 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" | ||
28 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" | ||
29 | PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," | ||
30 | |||
31 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'ldap', '', 'file://avoid-openldap-unless-wanted.patch', d)}" | ||
32 | |||
33 | LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9adade \ | ||
34 | file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ | ||
35 | file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" | ||
36 | |||
37 | SRC_URI[sha256sum] = "b68ce6eb0ccd2870fa3c8c334f2028b5d16606fd41308696c17b71959f7bf59f" | ||
38 | |||
39 | inherit pkgconfig waf-samba ptest | ||
40 | |||
41 | S = "${UNPACKDIR}/ldb-${PV}" | ||
42 | |||
43 | # Cross_compile cannot use preforked process, since fork process earlier than point subproces.popen | ||
44 | # to cross Popen | ||
45 | export WAF_NO_PREFORK = "yes" | ||
46 | |||
47 | EXTRA_OECONF += "--disable-rpath \ | ||
48 | --disable-rpath-install \ | ||
49 | --bundled-libraries=NONE \ | ||
50 | --builtin-libraries=replace \ | ||
51 | --with-modulesdir=${libdir}/ldb/modules \ | ||
52 | --with-privatelibdir=${libdir}/ldb \ | ||
53 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ | ||
54 | " | ||
55 | |||
56 | PACKAGES =+ "pyldb pyldb-dbg pyldb-dev" | ||
57 | |||
58 | NOAUTOPACKAGEDEBUG = "1" | ||
59 | |||
60 | FILES:${PN} += "${libdir}/ldb/*" | ||
61 | FILES:${PN}-dbg += "${bindir}/.debug/* \ | ||
62 | ${libdir}/.debug/* \ | ||
63 | ${libdir}/ldb/.debug/* \ | ||
64 | ${libdir}/ldb/modules/ldb/.debug/*" | ||
65 | |||
66 | FILES:pyldb = "${PYTHON_SITEPACKAGES_DIR}/* \ | ||
67 | ${libdir}/libpyldb-util.*.so.* \ | ||
68 | " | ||
69 | FILES:pyldb-dbg = "${PYTHON_SITEPACKAGES_DIR}/.debug \ | ||
70 | ${libdir}/.debug/libpyldb-util.*.so.*" | ||
71 | FILES:pyldb-dev = "${libdir}/libpyldb-util.*.so" | ||
72 | |||
73 | # Prevent third_party/waf/waflib/Configure.py checking host's path which is | ||
74 | # incorrect for cross building. | ||
75 | export PREFIX = "/" | ||
76 | export LIBDIR = "${libdir}" | ||
77 | export BINDIR = "${bindir}" | ||
78 | |||
79 | do_configure:prepend() { | ||
80 | # For a clean rebuild | ||
81 | rm -fr bin/ | ||
82 | } | ||
83 | |||
84 | do_install_ptest() { | ||
85 | install -d ${D}${PTEST_PATH}/tests | ||
86 | install -m 0755 ${B}/bin/test_ldb_* ${D}${PTEST_PATH}/tests/ | ||
87 | } | ||