Skip to contentSkip to conversation

juce: Improved juce class and recipes

PATCH New Felipe F. Tonello 1 participant 1 message Jul 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 juce: Improved juce class and recipes

This allows recipes that inherits juce class to have more modular dependencies and change it if necessary.

---
 meta-multimedia/classes/juce.bbclass               | 23 ++++++++++++++++------
 .../juce/nativesdk-projucer_git.bb                 |  1 +
 .../recipes-multimedia/juce/projucer-native_git.bb |  1 +
 3 files changed, 19 insertions(+), 6 deletions(-)
meta-multimedia/classes/juce.bbclass +17 -6
index ac97ca348c3f..715282fd15c1 100644
@@ -1,12 +1,23 @@
 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 \
+JUCE_MODULES ??= " \
+  juce_core \
+  juce_events \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'juce_audio_devices', '', d)} \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'juce_graphics juce_gui_basics', '', d)} \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'juce_opengl', '', d)} \
 "
-DEPENDS_prepend = "projucer-native ${JUCE_DEPS} "
+JUCE_X11_DEPS = "libx11 libxext libxinerama libxrandr libxcursor"
+
+PACKAGECONFIG_prepend= "${JUCE_MODULES} "
+PACKAGECONFIG[juce_core] = ",,curl,"
+PACKAGECONFIG[juce_events] = ",,libx11,"
+PACKAGECONFIG[juce_audio_devices] = ",,alsa-lib,"
+PACKAGECONFIG[juce_graphics] = ",,${JUCE_X11_DEPS} freetype,"
+PACKAGECONFIG[juce_gui_basics] = ",,${JUCE_X11_DEPS},"
+PACKAGECONFIG[juce_opengl] = ",,virtual/libgl,"
+
+DEPENDS_prepend = "projucer-native "
 
 export OE_JUCE_PROJUCER = "${STAGING_BINDIR_NATIVE}/Projucer"
 
meta-multimedia/recipes-multimedia/juce/nativesdk-projucer_git.bb +1 -0
index 93b23b1b5a81..7836bae691a3 100644
@@ -1,2 +1,3 @@
 inherit nativesdk
 include projucer.inc
+BBCLASSEXTEND = "nativesdk"
meta-multimedia/recipes-multimedia/juce/projucer-native_git.bb +1 -0
index b919a7dcb353..fb54fb9e9888 100644
@@ -1,2 +1,3 @@
 inherit native
 include projucer.inc
+BBCLASSEXTEND = "native"
Signature · 1 line
2.9.0