spf_url home  'http://www.qemu.org/' &&
spf_url watch 'http://wiki.qemu.org/Download' &&
spf_url src   "http://download.savannah.gnu.org/releases/qemu/qemu-${spf_version?}.tar.gz" &&
spf_depend zlib &&
spf_depend sdl     degree optional &&
spf_depend libx11  degree optional &&
spf_depend xproto  degree optional flags include &&
spf_depend kbproto degree optional flags include &&
spf_depend curl    degree optional &&
spf_depend ncurses degree optional &&
#spf_depend gnutls &&
#spf_depend bluez &&
#spf_depend alsa-lib degree optional &&
spf_cc_ configure_args &&
spf_cc_ make_args &&
spf_cc_ cpp_args &&
spf_cc_ cc_args && # '-O2 -g'
spf_cc_ ld_args && # '-g'
spf_do_install() {
#  prj_x2 prj_set SPF_GCC_GCCLIB '' &&
## -mfpmath=sse -msse2 -mmmx
#  cflags_=`prj_sedarg1 's/ -msse2 / /g' " $cflags_ "` &&
#  prj_append cflags_ -march=pentium ' ' &&
#  prj_append cflags_ -mno-sse2 ' ' &&
  if test -d "${spf_path_conf?}"/sdl/.
    then spf_args configure --enable-sdl
    else spf_args configure --disable-sdl
  fi &&
  if test -d "${spf_path_conf?}"/curl/.
    then spf_args configure --enable-curl
    else spf_args configure --disable-curl
  fi &&
  if test -d "${spf_path_conf?}"/ncurses/.
    then spf_args configure --enable-curses
    else spf_args configure --disable-curses
  fi &&
#  --audio-drv-list=LIST    set audio drivers list:
#                           Available drivers: oss alsa sdl esd pa fmod
#  --disable-vnc-tls        disable TLS encryption for VNC server
#  --enable-vnc-tls         enable TLS encryption for VNC server
#  --fmod-lib               path to FMOD library
#  --fmod-inc               path to FMOD includes
#  --oss-lib                path to OSS library
#  --disable-uuid           disable uuid support
#  --enable-uuid            enable uuid support
#  --kerneldir=PATH         look for kernel includes in PATH
#  prj_u2 prj_set pkg_edits '
#s/^\(CFLAGS\)=/\1+=/
#s/^\(LDFLAGS\)=/\1+=/
#s/^\(LIBS\)=/\1+=/
#' &&
#  prj_sedfile Makefile        "${pkg_edits?}" &&
#  prj_sedfile Makefile.target "${pkg_edits?}" &&
#  spf_trigger_conf_libc &&
#  if test -f "${spf_path_libc?}"/prefix/lib/ld-linux.so.2; then
#    pkg_libc=`prj_quote_c "${spf_path_libc?}"/prefix` &&
#    pkg_libc=`prj_quote_sed : "${pkg_libc?}"` &&
#    prj_sedfile linux-user/main.c \
#      's:\("/lib/ld-linux\.so\.2"\):'"${pkg_libc?}"' \1:'
#  else :
#  fi &&
#  for x_ in *.ld; do
#    sed_ "$x_" '/^SEARCH_DIR/d' || return "$?"
#  done &&
  spf_args configure --prefix="${spf_path_prefix?}" &&
  spf_args configure --interp-prefix="${spf_path_prefix?}"/gnemul/qemu-%M &&
  spf_args configure --extra-cflags="${spf_args_cpp?} ${spf_args_cc?}" &&
  spf_args configure --extra-ldflags="${spf_args_cc?} ${spf_args_ld?}" &&
  eval "./configure ${spf_args_configure?}" &&
#  # --target-list=i386-softmmu \
#  prj_echo "LIBS=$ldflags_" >> config-host.mak
  eval "make ${spf_args_make?} all install"
} &&
spf_do_check() { make test; } &&
spf_tested_version 0.14.1 &&
spf_tested_version 0.13.0 &&
spf_tested_version 0.12.5 &&
spf_tested_version 0.12.4

