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