aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/classes/juce.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/classes/juce.bbclass')
-rw-r--r--meta-multimedia/classes/juce.bbclass37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-multimedia/classes/juce.bbclass b/meta-multimedia/classes/juce.bbclass
new file mode 100644
index 0000000000..ac97ca348c
--- /dev/null
+++ b/meta-multimedia/classes/juce.bbclass
@@ -0,0 +1,37 @@
+inherit pkgconfig
+
+JUCE_X11_DEPS = "libx11 libxext libxinerama libxinerama libxrandr libxcursor freetype"
+JUCE_DEPS = " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${JUCE_X11_DEPS}', '', d)} \
+ alsa-lib \
+ curl \
+"
+DEPENDS_prepend = "projucer-native ${JUCE_DEPS} "
+
+export OE_JUCE_PROJUCER = "${STAGING_BINDIR_NATIVE}/Projucer"
+
+juce_do_configure() {
+ if [ -z "${JUCE_JUCERS}" ]; then
+ JUCERS=`find . -type f -iname "*.jucer"` && IFS=$'\n'
+ else
+ JUCERS="${JUCE_JUCERS}"
+ fi
+
+ if [ -z "$JUCERS" ]; then
+ die "JUCE_JUCERS not set and no profiles found in $PWD"
+ fi
+
+ # XXX: Hack for Projucer, since it requires a X Display even when running in
+ # console mode. This will be fixed in future. Most cases DISPLAY=:0 will just work,
+ # the only case why we have JUCE_DISPLAY variable, is in case of a build system,
+ # such as jenkins, that can have multiple virtual X server running for each build.
+ test -z "${JUCE_DISPLAY}" && export DISPLAY=:0 || export DISPLAY=${JUCE_DISPLAY}
+
+ for i in $JUCERS; do
+ ${OE_JUCE_PROJUCER} --resave $i
+ done
+}
+
+EXPORT_FUNCTIONS do_configure
+
+addtask configure after do_unpack do_patch before do_compile