. "$GRIMOIRE/VDEPENDS" &&
vdepends <<< "at-spi2-core >= 2.45.0" &&
#depends  -sub 'TEE' cairo "--enable-system-cairo \
#                           --enable-default-toolkit=cairo-gtk2" &&
depends fontconfig &&
depends freetype2 &&
depends -sub CXX gcc &&
depends gdk-pixbuf2 &&
depends glib2 &&
depends gtk+2 '--enable-xft --disable-freetype2' &&
depends JPEG '--with-system-jpeg' &&
depends libidl &&
depends libx11 &&
depends libxext &&
depends libxrender &&
depends libxt &&
depends nspr '--with-system-nspr' &&
depends -sub "3.20.x" nss  '--with-system-nss' &&
depends pango &&
depends perl &&
depends pysqlite &&
depends python &&
depends -sub "TSAFE SECURE_DELETE ENABLE_UNLOCK_NOTIFY" sqlite '--enable-system-sqlite' &&
depends zip &&
depends zlib '--with-system-zlib' &&

# LDAP support doesn't work (fails to build)
# Let's try again.
#
optional_depends  openldap            \
                  "--enable-ldap"     \
                  "--disable-ldap"    \
                  "for LDAP support"  &&

optional_depends  gnome-vfs2              \
                  "--enable-gnomevfs"     \
                  "--disable-gnomevfs"    \
                  "for GnomeVFS support"  &&

optional_depends  startup-notification  \
                  '--enable-startup-notification' \
                  '--disable-startup-notification' \
                  'for startup notifications'      &&

optional_depends  gconf2  \
                  '--enable-gconf' \
                  '--disable-gconf' \
                  'for gconf support'      &&

optional_depends  'wireless_tools' \
                  '--enable-necko-wifi' \
                  '--disable-necko-wifi' \
                  'for Necko WiFi scanning' &&

# Thunderbird is currently borked and does not compile without alsa-lib, this
# should be fixed after Thunderbird starts using Mozilla core 23
depends alsa-lib &&
#optional_depends  alsa-lib \
#                  '--enable-wave' \
#                  '--disable-wave --disable-ogg --disable-webm' \
#                  'for audio/video support'

if is_depends_enabled $SPELL alsa-lib; then
  # Thunderbird tries to use ogg/ogg.h even with --disable-ogg given
  #optional_depends  libogg \
  #                  '--enable-ogg' \
  #                  '--disable-ogg' \
  #                  'for sound support'
  depends libogg &&

  # configure script checks for yasm even when using the system JPEG
  #optional_depends  yasm \
  #                  '--enable-webm' \
  #                  '--disable-webm' \
  #                  'for WebM video support'
  depends yasm
fi &&

optional_depends  dbus-glib \
                  '--enable-dbus' \
                  '--disable-dbus' \
                  'for dbus support' &&

# Thunderbird is currently borked and does not compile without OpenGL headers
#optional_depends  OPENGL \
#                  '--enable-webgl' \
#                  '--disable-webgl --without-gl-provider' \
#                  'for WebGL support' &&
depends OPENGL &&

optional_depends  gstreamer \
                  '--enable-gstreamer' \
                  '--disable-gstreamer' \
                  'for gstreamer based AV support'

# Auto detection now means: Unless you explicitly specified
# --disable-pulseaudio when it's not present, the configure script will
# place a burning dog turd on your doorstep.
optional_depends  pulseaudio \
                  --enable-pulseaudio \
                  --disable-pulseaudio \
                  'for pulseaudio support'
