. "$GRIMOIRE/FUNCTIONS" &&

default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

patch -p1 < "${SPELL_DIRECTORY}/root_window.patch" &&

if is_depends_enabled $SPELL fribidi && is_version_less $(installed_version fribidi) 0.19; then
  patch -p0 < "$SPELL_DIRECTORY/fribidi.patch" &&
  autoreconf -fi
fi &&

# Fix pointer comparison with 0 error
sedit 's/\(text_prop.value\) > 0/\1 != NULL/' util/fluxbox-remote.cc
