Diffusion with condensation and evaporation in porous media