diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2015-11-15 16:18:39 +0100 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-11-16 21:50:10 +0100 |
| commit | 0e525daafe2958504674a9910bbed7c1b4d3fd38 (patch) | |
| tree | ab265ec69054c64bc7c16a7b7bb55610531d5039 /meta-networking/recipes-support/libldb | |
| parent | df552bed28c6ed983a94ebad4185bc9b2d04486f (diff) | |
| download | meta-openembedded-0e525daafe2958504674a9910bbed7c1b4d3fd38.tar.gz | |
samba, ctdb, libldb, libtdb, libtevent, talloc: move to meta-networking
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/libldb')
| -rwxr-xr-x | meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | 57 | ||||
| -rw-r--r-- | meta-networking/recipes-support/libldb/libldb_1.1.17.bb | 46 |
2 files changed, 103 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch new file mode 100755 index 0000000000..2425a55e39 --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | Some modules such as dynamic library maybe cann't be imported while cross compile, | ||
| 2 | we just check whether does the module exist. | ||
| 3 | |||
| 4 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
| 5 | |||
| 6 | --- ldb-1.1.17.orig/buildtools/wafsamba/samba_bundled.py 2015-07-16 16:42:12.265127110 +0800 | ||
| 7 | +++ ldb-1.1.17/buildtools/wafsamba/samba_bundled.py 2015-07-16 16:45:25.717119550 +0800 | ||
| 8 | @@ -1,7 +1,7 @@ | ||
| 9 | # functions to support bundled libraries | ||
| 10 | |||
| 11 | from Configure import conf | ||
| 12 | -import sys, Logs | ||
| 13 | +import sys, Logs, imp | ||
| 14 | from samba_utils import * | ||
| 15 | |||
| 16 | def PRIVATE_NAME(bld, name, private_extension, private_library): | ||
| 17 | @@ -218,17 +218,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li | ||
| 18 | # versions | ||
| 19 | minversion = minimum_library_version(conf, libname, minversion) | ||
| 20 | |||
| 21 | - try: | ||
| 22 | - m = __import__(modulename) | ||
| 23 | - except ImportError: | ||
| 24 | - found = False | ||
| 25 | - else: | ||
| 26 | + # Find module in PYTHONPATH | ||
| 27 | + stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]]) | ||
| 28 | + if stuff: | ||
| 29 | try: | ||
| 30 | - version = m.__version__ | ||
| 31 | - except AttributeError: | ||
| 32 | + m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2]) | ||
| 33 | + except ImportError: | ||
| 34 | found = False | ||
| 35 | + | ||
| 36 | + if conf.env.CROSS_COMPILE: | ||
| 37 | + # Some modules such as dynamic library maybe cann't be imported | ||
| 38 | + # while cross compile, we just check whether the module exist | ||
| 39 | + Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1])) | ||
| 40 | + found = True | ||
| 41 | else: | ||
| 42 | - found = tuplize_version(version) >= tuplize_version(minversion) | ||
| 43 | + try: | ||
| 44 | + version = m.__version__ | ||
| 45 | + except AttributeError: | ||
| 46 | + found = False | ||
| 47 | + else: | ||
| 48 | + found = tuplize_version(version) >= tuplize_version(minversion) | ||
| 49 | + finally: | ||
| 50 | + if stuff[0]: | ||
| 51 | + stuff[0].close() | ||
| 52 | + else: | ||
| 53 | + found = False | ||
| 54 | + | ||
| 55 | if not found and not conf.LIB_MAY_BE_BUNDLED(libname): | ||
| 56 | Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) | ||
| 57 | sys.exit(1) | ||
diff --git a/meta-networking/recipes-support/libldb/libldb_1.1.17.bb b/meta-networking/recipes-support/libldb/libldb_1.1.17.bb new file mode 100644 index 0000000000..44f061ab6b --- /dev/null +++ b/meta-networking/recipes-support/libldb/libldb_1.1.17.bb | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | SUMMARY = "Hierarchical, reference counted memory pool system with destructors" | ||
| 2 | HOMEPAGE = "http://ldb.samba.org" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+" | ||
| 5 | |||
| 6 | DEPENDS += "libtdb talloc libtevent popt" | ||
| 7 | RDEPENDS_${PN} += "libtevent popt libtalloc openldap" | ||
| 8 | RDEPENDS_pyldb += "python libtdb libtalloc" | ||
| 9 | |||
| 10 | SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \ | ||
| 11 | file://do-not-import-target-module-while-cross-compile.patch \ | ||
| 12 | " | ||
| 13 | |||
| 14 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \ | ||
| 15 | file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780 \ | ||
| 16 | file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891" | ||
| 17 | |||
| 18 | SRC_URI[md5sum] = "7c2ab4e3f2a4186493aa06eabbc61cc0" | ||
| 19 | SRC_URI[sha256sum] = "b9a312aad19e9463716d257d8f2529fd7fc1a5ef24f6dcdc0c4a1930d7bdb6e6" | ||
| 20 | |||
| 21 | inherit waf-samba | ||
| 22 | |||
| 23 | S = "${WORKDIR}/ldb-${PV}" | ||
| 24 | |||
| 25 | EXTRA_OECONF += "--disable-rpath \ | ||
| 26 | --disable-rpath-install \ | ||
| 27 | --bundled-libraries=NONE \ | ||
| 28 | --builtin-libraries=replace \ | ||
| 29 | --with-modulesdir=${libdir}/ldb/modules \ | ||
| 30 | --with-privatelibdir=${libdir}/ldb \ | ||
| 31 | --with-libiconv=${STAGING_DIR_HOST}${prefix}\ | ||
| 32 | " | ||
| 33 | |||
| 34 | PACKAGES += "pyldb pyldb-dbg pyldb-dev" | ||
| 35 | |||
| 36 | FILES_${PN} += "${libdir}/ldb/*" | ||
| 37 | FILES_${PN}-dbg += "${libdir}/ldb/.debug/* \ | ||
| 38 | ${libdir}/ldb/modules/ldb/.debug/*" | ||
| 39 | |||
| 40 | FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ | ||
| 41 | ${libdir}/libpyldb-util.so.1 \ | ||
| 42 | ${libdir}/libpyldb-util.so.1.1.17 \ | ||
| 43 | " | ||
| 44 | FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \ | ||
| 45 | ${libdir}/.debug/libpyldb-util.so.1.1.17" | ||
| 46 | FILES_pyldb-dev = "${libdir}/libpyldb-util.so" | ||
