# patch per architecture
if [ "$CARCH" = 'i486' ]; then
  eval "$(
    declare -f build | \
      sed '
        0,/cmake/s/cmake /cmake -DSDL_SSEMATH=OFF -DSDL_MMX=OFF -DSDL_3DNOW=OFF -DSDL_SSE=OFF -DSDL_SSE2=OFF -DSDL_SSE3=OFF /
      '
  )"
fi
if [ "$CARCH" = 'i686' ]; then
  eval "$(
    declare -f build | \
      sed '
        0,/cmake/s/cmake /cmake -DSDL_SSEMATH=ON -DSDL_MMX=ON -DSDL_3DNOW=ON -DSDL_SSE=ON -DSDL_SSE2=OFF -DSDL_SSE3=OFF /
      '
  )"
fi
if [ "$CARCH" = 'pentium4' ]; then
  eval "$(
    declare -f build | \
      sed '
        0,/cmake/s/cmake /cmake -DSDL_SSEMATH=ON -DSDL_MMX=ON -DSDL_3DNOW=ON -DSDL_SSE=ON -DSDL_SSE2=ON -DSDL_SSE3=OFF /
      '
  )"
fi