Split out common qemu code used for lv2 here

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2017-07-10 23:16:58 +02:00
parent 6056813741
commit cbc223b6cb
4 changed files with 28 additions and 58 deletions

22
classes/qemu-ext.bbclass Normal file
View File

@@ -0,0 +1,22 @@
inherit qemu
DEPENDS += "qemu-native"
# slightly reworked qemu_run_binary: qemu.bbclass expects binary in sysroot but
# our binary is not (yet) installed
# ${@qemu_run_binary_local(d, '$D', '/usr/bin/test_app')} [test_app arguments]
#
def qemu_run_binary_local(data, rootfs_path, binary):
qemu_binary = qemu_target_binary(data)
if qemu_binary == "qemu-allarch":
qemu_binary = "qemuwrapper"
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
qemu_options = data.getVar("QEMU_OPTIONS", True)
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ binary

View File

@@ -20,10 +20,9 @@ PV = "0.0.0+git${SRCPV}"
REQUIRED_DISTRO_FEATURES = "x11"
inherit qemu distro_features_check
inherit qemu-ext distro_features_check
DEPENDS = "\
qemu-native \
DEPENDS += "\
premake3-native \
alsa-lib \
libx11 \
@@ -45,21 +44,6 @@ do_configure() {
NOOPTIMIZATIONS=1 ${S}/scripts/premake-update.sh linux
}
# slightly reworked qemu_run_binary: qemu.bbclass expects binary in sysroot but
# our binary is not (yet) installed
# ${@qemu_run_binary_local(d, '$D', '/usr/bin/test_app')} [test_app arguments]
#
def qemu_run_binary_local(data, rootfs_path, binary):
qemu_binary = qemu_target_binary(data)
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
qemu_options = data.getVar("QEMU_OPTIONS", True)
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ binary
do_compile_append() {
# build ttl-files must be done in quemu
for sofile in `cat ${WORKDIR}/lv2_ttl_generator-data`; do

View File

@@ -3,11 +3,11 @@ HOMEPAGE = "http://tytel.org/helm/"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
inherit autotools-brokensep qemu distro_features_check gtk-icon-cache
inherit autotools-brokensep qemu-ext distro_features_check gtk-icon-cache
REQUIRED_DISTRO_FEATURES = "x11"
DEPENDS = " \
DEPENDS += " \
virtual/libx11 \
libxext \
libxinerama \
@@ -16,10 +16,9 @@ DEPENDS = " \
jack \
freetype \
hicolor-icon-theme \
qemu-native \
"
SRC_URI = " \
SRC_URI += " \
git://github.com/mtytel/helm.git \
file://helm.desktop \
file://0001-remove-msse2-compiler-switch.patch \
@@ -32,23 +31,6 @@ S = "${WORKDIR}/git"
CXXFLAGS += "-I ${STAGING_INCDIR}/freetype2"
# slightly reworked qemu_run_binary: qemu.bbclass expects binary in sysroot but
# we run it before copying to sysroot
# ${@qemu_run_binary_local(d, '$D', '/usr/bin/test_app')} [test_app arguments]
#
def qemu_run_binary_local(data, rootfs_path, binary):
qemu_binary = qemu_target_binary(data)
if qemu_binary == "qemu-allarch":
qemu_binary = "qemuwrapper"
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
qemu_options = data.getVar("QEMU_OPTIONS", True)
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ binary
do_compile_append() {
${@qemu_run_binary_local(d, '${STAGING_DIR_TARGET}', '${S}/builds/linux/LV2/lv2_ttl_generator')} ${S}/builds/linux/LV2/build/helm.so
cp *.ttl ${S}/builds/linux/LV2/helm.lv2/

View File

@@ -3,12 +3,11 @@ HOMEPAGE = "http://zynaddsubfx.sourceforge.net"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=21fa88a5e50a1c608d22612c1fbe1971"
inherit cmake qemu pkgconfig gtk-icon-cache distro_features_check
inherit cmake qemu-ext pkgconfig gtk-icon-cache distro_features_check
REQUIRED_DISTRO_FEATURES = "x11"
DEPENDS += " \
qemu-native \
virtual/libx11 \
alsa-lib \
jack \
@@ -46,23 +45,6 @@ do_configure_prepend() {
}
# slightly reworked qemu_run_binary: qemu.bbclass expects binary in sysroot but
# our binary is not (yet) installed
# ${@qemu_run_binary_local(d, '$D', '/usr/bin/test_app')} [test_app arguments]
#
def qemu_run_binary_local(data, rootfs_path, binary):
qemu_binary = qemu_target_binary(data)
if qemu_binary == "qemu-allarch":
qemu_binary = "qemuwrapper"
libdir = rootfs_path + data.getVar("libdir", False)
base_libdir = rootfs_path + data.getVar("base_libdir", False)
qemu_options = data.getVar("QEMU_OPTIONS", True)
return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+ " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
+ binary
do_compile_append() {
# Build Controller/Spliter
oe_runmake -C ${S}/ExternalPrograms/Controller