First-principles study of the stacking effect on the electronic properties of graphite(s)