aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/classes
diff options
context:
space:
mode:
authorBian Naimeng <biannm@cn.fujitsu.com>2015-06-16 14:18:25 +0900
committerMartin Jansa <Martin.Jansa@gmail.com>2015-08-24 14:01:37 +0200
commit962e346df99696a10657a2ea7b2166dfaf290289 (patch)
treec7ca2b6123ddf55fd0060116fec987303e82f829 /meta-oe/classes
parent7ceb57db0bdf2bb1e206190c44caee07389794ee (diff)
downloadmeta-openembedded-962e346df99696a10657a2ea7b2166dfaf290289.tar.gz
meta-openembedded-962e346df99696a10657a2ea7b2166dfaf290289.tar.bz2
meta-openembedded-962e346df99696a10657a2ea7b2166dfaf290289.zip
waf-samba: add new class
waf-samba is a build system used by samba related software Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r--meta-oe/classes/waf-samba.bbclass51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-oe/classes/waf-samba.bbclass b/meta-oe/classes/waf-samba.bbclass
new file mode 100644
index 000000000..23c55567d
--- /dev/null
+++ b/meta-oe/classes/waf-samba.bbclass
@@ -0,0 +1,51 @@
+# 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 libxslt-native docbook-xsl-stylesheets-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}"
+ oldest_kernel_qemu=${OLDEST_KERNEL}
+
+ CROSS_EXEC="${qemu_binary} \
+ -r ${oldest_kernel_qemu} \
+ -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_install() {
+ oe_runmake install DESTDIR=${D}
+}