# no Java bindings on i486
makedepends=(${makedepends[@]//java-environment>=8/})
makedepends_i686+=('java-environment>=8')

# no Ruby bindings on i486
makedepends=(${makedepends[@]//ruby/})
checkdepends=(${checkdepends[@]//ruby-test-unit/})
makedepends_i686+=(ruby)
checkdepends_i686+=(ruby-test-unit)

# no KDE gui on i486
makedepends=(${makedepends[@]//kdelibs4support/})
makedepends=(${makedepends[@]//kwallet/})
makedepends_i686+=(kdelibs4support kwallet)

# no Gnome gui on i486
makedepends=(${makedepends[@]//libgnome-keyring/})
makedepends_i686+=(libgnome-keyring)

checkdepends_pentium4=("${checkdepends_i686[@]}")
makedepends_pentium4=("${makedepends_i686[@]}")

# i486-specific
if [ "${CARCH}" = "i486" ]; then
  # no Java bindings
  eval "$(
    declare -f build | \
      sed '
        s@--enable-javahl@--disable-javahl@
        s@--with-jdk=/usr/lib/jvm/default@@
        /make/s/javahl//
      '
  )"
  eval "$(
    declare -f package | \
      sed '
        /make/s/install-javahl//
      '
  )"

  # no Ruby bindings
  eval "$(
    declare -f build | \
      sed '
        s@--with-ruby-sitedir=/usr/lib/ruby/vendor_ruby@@
        /make/s/swig-rb//
      '
  )"
  eval "$(
    declare -f check | \
      sed '
        /make/s/check-swig-rb//
      '
  )"
  eval "$(
    declare -f package | \
      sed '
        /make/s/install-swig-rb//
      '
  )"

  # no KDE gui
  eval "$(
    declare -f build | \
      sed '
        s@--with-kwallet@@
      '
  )"

  # no Gnome gui
  eval "$(
    declare -f build | \
      sed '
        s@--with-gnome-keyring@@
        s@--with-jdk=/usr/lib/jvm/default@@
      '
  )"

fi