juce.bbclass 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. inherit pkgconfig
  2. # List of JUCE modules that requires external dependencies
  3. JUCE_MODULES ??= " \
  4. juce_core \
  5. ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'juce_audio_devices', '', d)} \
  6. ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'juce_graphics juce_gui_basics', '', d)} \
  7. ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'juce_opengl', '', d)} \
  8. "
  9. JUCE_X11_DEPS = "libx11 libxext libxinerama libxrandr libxcursor"
  10. PACKAGECONFIG:prepend= "${JUCE_MODULES} "
  11. PACKAGECONFIG[juce_core] = ",,curl,"
  12. PACKAGECONFIG[juce_audio_devices] = ",,alsa-lib,"
  13. PACKAGECONFIG[juce_graphics] = ",,${JUCE_X11_DEPS} freetype,"
  14. PACKAGECONFIG[juce_gui_basics] = ",,${JUCE_X11_DEPS},"
  15. PACKAGECONFIG[juce_opengl] = ",,virtual/libgl,"
  16. DEPENDS:prepend = "projucer-native "
  17. export OE_JUCE_PROJUCER = "${STAGING_BINDIR_NATIVE}/Projucer"
  18. juce_do_configure() {
  19. if [ -z "${JUCE_JUCERS}" ]; then
  20. JUCERS=`find . -type f -iname "*.jucer"` && IFS=$'\n'
  21. else
  22. JUCERS="${JUCE_JUCERS}"
  23. fi
  24. if [ -z "$JUCERS" ]; then
  25. die "JUCE_JUCERS not set and no profiles found in $PWD"
  26. fi
  27. # XXX: Hack for Projucer, since it requires a X Display even when running in
  28. # console mode. This will be fixed in future. Most cases DISPLAY=:0 will just work,
  29. # the only case why we have JUCE_DISPLAY variable, is in case of a build system,
  30. # such as jenkins, that can have multiple virtual X server running for each build.
  31. test -z "${JUCE_DISPLAY}" && export DISPLAY=:0 || export DISPLAY=${JUCE_DISPLAY}
  32. for i in $JUCERS; do
  33. ${OE_JUCE_PROJUCER} --resave $i
  34. done
  35. }
  36. EXPORT_FUNCTIONS do_configure
  37. addtask configure after do_unpack do_patch before do_compile