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