First-principles calculations of luminescence spectrum line shapes for defects in semiconductors: the example of GaN and ZnO.