blob: 3927235ef13f6873e47407def5eaa57e924dab95 [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001inherit pkgconfig
2
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003# List of JUCE modules that requires external dependencies
Patrick Williamsddad1a12017-02-23 20:36:32 -06004JUCE_MODULES ??= " \
5 juce_core \
Patrick Williamsddad1a12017-02-23 20:36:32 -06006 ${@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,"
Patrick Williamsddad1a12017-02-23 20:36:32 -060014PACKAGECONFIG[juce_audio_devices] = ",,alsa-lib,"
15PACKAGECONFIG[juce_graphics] = ",,${JUCE_X11_DEPS} freetype,"
16PACKAGECONFIG[juce_gui_basics] = ",,${JUCE_X11_DEPS},"
17PACKAGECONFIG[juce_opengl] = ",,virtual/libgl,"
18
19DEPENDS_prepend = "projucer-native "
20
21export OE_JUCE_PROJUCER = "${STAGING_BINDIR_NATIVE}/Projucer"
22
23juce_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
45EXPORT_FUNCTIONS do_configure
46
47addtask configure after do_unpack do_patch before do_compile