mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-13 17:39:57 +00:00
libldb: add new recipe
libldb is required by samba4 Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
This commit is contained in:
committed by
Martin Jansa
parent
3a22c67fe3
commit
772cdf8ef0
Executable
+57
@@ -0,0 +1,57 @@
|
|||||||
|
Some modules such as dynamic library maybe cann't be imported while cross compile,
|
||||||
|
we just check whether does the module exist.
|
||||||
|
|
||||||
|
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
|
||||||
|
|
||||||
|
--- ldb-1.1.17.orig/buildtools/wafsamba/samba_bundled.py 2015-07-16 16:42:12.265127110 +0800
|
||||||
|
+++ ldb-1.1.17/buildtools/wafsamba/samba_bundled.py 2015-07-16 16:45:25.717119550 +0800
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
# functions to support bundled libraries
|
||||||
|
|
||||||
|
from Configure import conf
|
||||||
|
-import sys, Logs
|
||||||
|
+import sys, Logs, imp
|
||||||
|
from samba_utils import *
|
||||||
|
|
||||||
|
def PRIVATE_NAME(bld, name, private_extension, private_library):
|
||||||
|
@@ -218,17 +218,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
|
||||||
|
# versions
|
||||||
|
minversion = minimum_library_version(conf, libname, minversion)
|
||||||
|
|
||||||
|
- try:
|
||||||
|
- m = __import__(modulename)
|
||||||
|
- except ImportError:
|
||||||
|
- found = False
|
||||||
|
- else:
|
||||||
|
+ # Find module in PYTHONPATH
|
||||||
|
+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
|
||||||
|
+ if stuff:
|
||||||
|
try:
|
||||||
|
- version = m.__version__
|
||||||
|
- except AttributeError:
|
||||||
|
+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
|
||||||
|
+ except ImportError:
|
||||||
|
found = False
|
||||||
|
+
|
||||||
|
+ if conf.env.CROSS_COMPILE:
|
||||||
|
+ # Some modules such as dynamic library maybe cann't be imported
|
||||||
|
+ # while cross compile, we just check whether the module exist
|
||||||
|
+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
|
||||||
|
+ found = True
|
||||||
|
else:
|
||||||
|
- found = tuplize_version(version) >= tuplize_version(minversion)
|
||||||
|
+ try:
|
||||||
|
+ version = m.__version__
|
||||||
|
+ except AttributeError:
|
||||||
|
+ found = False
|
||||||
|
+ else:
|
||||||
|
+ found = tuplize_version(version) >= tuplize_version(minversion)
|
||||||
|
+ finally:
|
||||||
|
+ if stuff[0]:
|
||||||
|
+ stuff[0].close()
|
||||||
|
+ else:
|
||||||
|
+ found = False
|
||||||
|
+
|
||||||
|
if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
|
||||||
|
Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
|
||||||
|
sys.exit(1)
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
SUMMARY = "Hierarchical, reference counted memory pool system with destructors"
|
||||||
|
HOMEPAGE = "http://ldb.samba.org"
|
||||||
|
SECTION = "libs"
|
||||||
|
LICENSE = "LGPL-3.0+ & LGPL-2.1+ & GPL-3.0+"
|
||||||
|
|
||||||
|
DEPENDS += "libtdb talloc libtevent popt"
|
||||||
|
RDEPENDS_${PN} += "libtevent popt libtalloc openldap"
|
||||||
|
RDEPENDS_pyldb += "python libtdb libtalloc"
|
||||||
|
|
||||||
|
SRC_URI = "http://samba.org/ftp/ldb/ldb-${PV}.tar.gz \
|
||||||
|
file://do-not-import-target-module-while-cross-compile.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
|
||||||
|
file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780 \
|
||||||
|
file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "7c2ab4e3f2a4186493aa06eabbc61cc0"
|
||||||
|
SRC_URI[sha256sum] = "b9a312aad19e9463716d257d8f2529fd7fc1a5ef24f6dcdc0c4a1930d7bdb6e6"
|
||||||
|
|
||||||
|
inherit waf-samba
|
||||||
|
|
||||||
|
S = "${WORKDIR}/ldb-${PV}"
|
||||||
|
|
||||||
|
EXTRA_OECONF += "--disable-rpath \
|
||||||
|
--disable-rpath-install \
|
||||||
|
--bundled-libraries=NONE \
|
||||||
|
--builtin-libraries=replace \
|
||||||
|
--with-modulesdir=${libdir}/ldb/modules \
|
||||||
|
--with-privatelibdir=${libdir}/ldb \
|
||||||
|
--with-libiconv=${STAGING_DIR_HOST}${prefix}\
|
||||||
|
"
|
||||||
|
|
||||||
|
PACKAGES += "pyldb pyldb-dbg pyldb-dev"
|
||||||
|
|
||||||
|
FILES_${PN} += "${libdir}/ldb/*"
|
||||||
|
FILES_${PN}-dbg += "${libdir}/ldb/.debug/* \
|
||||||
|
${libdir}/ldb/modules/ldb/.debug/*"
|
||||||
|
|
||||||
|
FILES_pyldb = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
|
||||||
|
${libdir}/libpyldb-util.so.1 \
|
||||||
|
${libdir}/libpyldb-util.so.1.1.17 \
|
||||||
|
"
|
||||||
|
FILES_pyldb-dbg = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug \
|
||||||
|
${libdir}/.debug/libpyldb-util.so.1.1.17"
|
||||||
|
FILES_pyldb-dev = "${libdir}/libpyldb-util.so"
|
||||||
Reference in New Issue
Block a user