blob: 715282fd15c1b18f23a97dbe86079d1366dc62c3 [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001inherit pkgconfig
2
3JUCE_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"
10JUCE_X11_DEPS = "libx11 libxext libxinerama libxrandr libxcursor"
11
12PACKAGECONFIG_prepend= "${JUCE_MODULES} "
13PACKAGECONFIG[juce_core] = ",,curl,"
14PACKAGECONFIG[juce_events] = ",,libx11,"
15PACKAGECONFIG[juce_audio_devices] = ",,alsa-lib,"
16PACKAGECONFIG[juce_graphics] = ",,${JUCE_X11_DEPS} freetype,"
17PACKAGECONFIG[juce_gui_basics] = ",,${JUCE_X11_DEPS},"
18PACKAGECONFIG[juce_opengl] = ",,virtual/libgl,"
19
20DEPENDS_prepend = "projucer-native "
21
22export OE_JUCE_PROJUCER = "${STAGING_BINDIR_NATIVE}/Projucer"
23
24juce_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
46EXPORT_FUNCTIONS do_configure
47
48addtask configure after do_unpack do_patch before do_compile