Skip to content

Commit 81f9a23

Browse files
Try fixing macos build
1 parent 32a45f4 commit 81f9a23

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/build_mpos.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,22 @@ elif [ "$target" == "unix" -o "$target" == "macOS" ]; then
122122
stream_wav_file="$codebasedir"/internal_filesystem/lib/mpos/audio/stream_wav.py
123123
sed -i.backup 's/^@micropython\.viper$/#@micropython.viper/' "$stream_wav_file"
124124

125+
if [ "$target" == "macOS" ]; then
126+
echo "homebrew install rlottie fails so it runs into: fatal error: 'rlottie_capi.h' file not found on macos"
127+
sed -i 's/#define[[:space:]]\+MICROPY_RLOTTIE[[:space:]]\+1/#define MICROPY_RLOTTIE 0/' "$codebasedir"/lvgl_micropython/lib/lv_conf.h
128+
fi
129+
125130
# LV_CFLAGS are passed to USER_C_MODULES (compiler flags only, no linker flags)
126131
# STRIP= makes it so that debug symbols are kept
127132
pushd "$codebasedir"/lvgl_micropython/
128133
# USER_C_MODULE doesn't seem to work properly so there are symlinks in lvgl_micropython/extmod/
129134
python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$frozenmanifest"
130135
popd
131136

137+
if [ "$target" == "macOS" ]; then
138+
sed -i 's/#define[[:space:]]\+MICROPY_RLOTTIE[[:space:]]\+0/#define MICROPY_RLOTTIE 1/' "$codebasedir"/lvgl_micropython/lib/lv_conf.h
139+
fi
140+
132141
# Restore @micropython.viper decorator after build
133142
echo "Restoring @micropython.viper decorator..."
134143
sed -i.backup 's/^#@micropython\.viper$/@micropython.viper/' "$stream_wav_file"

0 commit comments

Comments
 (0)