aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-02-23 12:22:19 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-23 12:24:28 +0100
commitaa458a136ebd4abc55d502984b5c90ddab458288 (patch)
tree63b1b327a42d645ab72999c87d7d1475b77bb70b /classes
parente274f00fa972447b44a4217b1aa2e7302891bb11 (diff)
add libtalloc and its dependency waf-samba.bbclass
This also adds libtalloc-dev to the SDK, which is a first step to upgrading libosmocore to a 'post external talloc' version.
Diffstat (limited to 'classes')
-rw-r--r--classes/waf-samba.bbclass54
1 files changed, 54 insertions, 0 deletions
diff --git a/classes/waf-samba.bbclass b/classes/waf-samba.bbclass
new file mode 100644
index 0000000..4b6e3c9
--- /dev/null
+++ b/classes/waf-samba.bbclass
@@ -0,0 +1,54 @@
+# waf is a build system which is used by samba related project.
+# Obtain details from https://wiki.samba.org/index.php/Waf
+#
+inherit qemu pythonnative
+
+DEPENDS += "qemu-native python"
+
+CONFIGUREOPTS = " --prefix=${prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --oldincludedir=${oldincludedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ "
+
+do_configure() {
+ qemu_binary="${@qemu_target_binary(d)}"
+ if [ "${qemu_binary}" = "qemu-allarch" ]; then
+ qemu_binary="qemuwrapper"
+ fi
+
+ libdir_qemu="${STAGING_DIR_HOST}/${libdir}"
+ base_libdir_qemu="${STAGING_DIR_HOST}/${base_libdir}"
+
+ CROSS_EXEC="${qemu_binary} \
+ ${QEMU_OPTIONS} \
+ -L ${STAGING_DIR_HOST} \
+ -E LD_LIBRARY_PATH=${libdir_qemu}:${base_libdir_qemu}"
+
+ export BUILD_SYS=${BUILD_SYS}
+ export HOST_SYS=${HOST_SYS}
+ export BUILD_ARCH=${BUILD_ARCH}
+ export HOST_ARCH=${HOST_ARCH}
+ export STAGING_LIBDIR=${STAGING_LIBDIR}
+ export STAGING_INCDIR=${STAGING_INCDIR}
+ export PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
+
+ ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} --cross-compile --cross-execute="${CROSS_EXEC}"
+}
+
+do_compile () {
+ python ./buildtools/bin/waf ${PARALLEL_MAKE}
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}