mirror of
https://github.com/schnitzeltony/meta-musicians.git
synced 2026-09-12 03:49:32 +02:00
53
classes/lv2-postinst-helper.bbclass
Normal file
53
classes/lv2-postinst-helper.bbclass
Normal file
@@ -0,0 +1,53 @@
|
||||
# Helper class to handle ontarget-postinst creation of lv2 turtle files
|
||||
|
||||
# File created during compile usually. To create this file makefiles have to be
|
||||
# aligned - see do_configure_prepend at zynaddsubfx or distrho-ports. The file
|
||||
# is expected with the following format
|
||||
# lv2-ttl-generator <path>/plugin.so
|
||||
LV2-TURTLE-BUILD-DATA = "${WORKDIR}/lv2-ttl-generator-data"
|
||||
|
||||
# E.g zynaddsubfx needs to create dummy lv2 turtle files to keep install sane.
|
||||
# To delete them automatically (see below) the contain a dummy string:
|
||||
LV2-DUMMY-TURTLE-STR = "lv2-dummy-turtle-string"
|
||||
|
||||
# To make ontarget postinst/prerm happen, the names of all plugins with their
|
||||
# paths as installed on target a stored in a file called lv2-postinst-manifest
|
||||
LV2-POSTINST-MANIFEST = "${datadir}/${BPN}/lv2-postinst-manifest"
|
||||
|
||||
do_install_append() {
|
||||
# remove dummy lv2-turtles again
|
||||
cd ${D}/${libdir}/lv2
|
||||
for tfile in `grep -rl ${LV2-DUMMY-TURTLE-STR}`; do
|
||||
rm $tfile
|
||||
done
|
||||
|
||||
# create postinst manifest
|
||||
install -d ${D}`dirname ${LV2-POSTINST-MANIFEST}`
|
||||
for sofile in `cat ${LV2-TURTLE-BUILD-DATA} | awk '{ print $2 }'`; do
|
||||
sofile=`basename $sofile`
|
||||
installed=`find ${D}${libdir}/lv2 -name $sofile | sed 's|${D}||g'`
|
||||
echo $installed >> ${D}${LV2-POSTINST-MANIFEST}
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
pkg_postinst_ontarget_${PN}-lv2() {
|
||||
oldpath=`pwd`
|
||||
for sofile in `cat ${LV2-POSTINST-MANIFEST}`; do
|
||||
cd `dirname "$sofile"`
|
||||
lv2-ttl-generator "$sofile"
|
||||
done
|
||||
cd $oldpath
|
||||
}
|
||||
|
||||
pkg_prerm_${PN}-lv2() {
|
||||
for sofile in `cat ${LV2-POSTINST-MANIFEST}`; do
|
||||
path=`dirname "$sofile"`
|
||||
for turtle in `find $path -name '*.ttl'`; do
|
||||
rm $turtle
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
FILES_${PN}-lv2 += "${LV2-POSTINST-MANIFEST}"
|
||||
RDEPENDS_${PN}-lv2 += "lv2-ttl-generator"
|
||||
8
classes/pack_audio_plugins.bbclass
Normal file
8
classes/pack_audio_plugins.bbclass
Normal file
@@ -0,0 +1,8 @@
|
||||
# Auto package audio plugins
|
||||
|
||||
PACKAGES =+ "${PN}-dssi ${PN}-ladspa ${PN}-lv2 ${PN}-vst"
|
||||
|
||||
FILES_${PN}-dssi += "${libdir}/dssi"
|
||||
FILES_${PN}-ladspa += "${libdir}/ladspa"
|
||||
FILES_${PN}-lv2 += "${libdir}/lv2"
|
||||
FILES_${PN}-vst += "${libdir}/vst"
|
||||
22
classes/qemu-ext.bbclass
Normal file
22
classes/qemu-ext.bbclass
Normal file
@@ -0,0 +1,22 @@
|
||||
inherit qemu
|
||||
|
||||
DEPENDS += "qemu-native"
|
||||
|
||||
# This is an extended/modified qemu.bbclass tailored four our needs:
|
||||
#
|
||||
# * add qemu-native to DEPENDS: we can do that because there is no
|
||||
# introspection/interception delayed qemu usage here
|
||||
# * The executable binary is set by absolute path: oe-core's qemu.bbclass
|
||||
# expects it in sysroot. Here we usually run binaries in builddir which are
|
||||
# not yet installed.
|
||||
# * A recipe can set an extra library path in 'QEMU_EXTRA_LIBDIR'. This path is
|
||||
# an absolute path.
|
||||
|
||||
def qemu_run_binary_local(data, rootfs_path, binary):
|
||||
libdir = rootfs_path + data.getVar("libdir", False)
|
||||
base_libdir = rootfs_path + data.getVar("base_libdir", False)
|
||||
extra_libdir = data.getVar("QEMU_EXTRA_LIBDIR", False)
|
||||
if extra_libdir:
|
||||
return qemu_wrapper_cmdline(data, rootfs_path, [libdir, base_libdir, extra_libdir]) + binary
|
||||
else:
|
||||
return qemu_wrapper_cmdline(data, rootfs_path, [libdir, base_libdir]) + binary
|
||||
37
classes/wafold.bbclass
Normal file
37
classes/wafold.bbclass
Normal file
@@ -0,0 +1,37 @@
|
||||
# avoids build breaks when using no-static-libs.inc
|
||||
DISABLE_STATIC = ""
|
||||
|
||||
EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
|
||||
|
||||
python waf_preconfigure() {
|
||||
import subprocess
|
||||
from distutils.version import StrictVersion
|
||||
subsrcdir = d.getVar('S')
|
||||
wafbin = os.path.join(subsrcdir, 'waf')
|
||||
try:
|
||||
result = subprocess.check_output([wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT)
|
||||
version = result.decode('utf-8').split()[1]
|
||||
if StrictVersion(version) >= StrictVersion("1.8.7"):
|
||||
d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode)
|
||||
except FileNotFoundError:
|
||||
bb.fatal("waf does not exist in %s" % subsrcdir)
|
||||
}
|
||||
|
||||
do_configure[prefuncs] += "waf_preconfigure"
|
||||
|
||||
wafold_do_configure() {
|
||||
${S}/waf configure --prefix=${prefix} ${WAF_EXTRA_CONF} ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
|
||||
wafold_do_compile() {
|
||||
${S}/waf build ${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}
|
||||
}
|
||||
|
||||
wafold_do_install() {
|
||||
${S}/waf install --destdir=${D}
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS do_configure do_compile do_install
|
||||
Reference in New Issue
Block a user