default_pre_build       &&
cd ${SOURCE_DIRECTORY}  &&

echo "TARGET_ARCH = desktop" >> makefiles/target.mk
if [ "$UI" = "qt" ]; then
  echo "UI_TYPE = qt" >> makefiles/target.mk
fi &&
if [ "$UI" = "gtk2" ]; then
  echo "UI_TYPE = gtk" >> makefiles/target.mk
fi &&

if is_depends_enabled fribidi glib2; then
  sed -i "s:gtk+-2.0:gtk+-2.0 glib-2.0:g" makefiles/arch/desktop.mk &&
  sed -i "s:subdir.mk:gtksubdir.mk:" zlibrary/text/Makefile
fi &&

sed -i 's/Library::Library \&Library/Library \&Library/' fbreader/src/library/Library.cpp &&

if [[ "$FBREADER_BRANCH" == "scm" ]];then
  sed -i "s/ccache gcc/gcc/" makefiles/arch/desktop.mk
fi &&

sed -i 's;linebreak;unibreak;g' makefiles/config.mk \
       zlibrary/text/Makefile &&

sed -i '148s;false;0;' fbreader/src/database/booksdb/BooksDB.cpp
