On the relaxation and the homogenization of some classes of variational integrals with mixed boundary conditions