In your UV map, start off with a projection that introduces as little distortion as possible. Move the lower-left corner of each wall section to (0,0,) in the UV map. Scale if necessary, and then move the walls along the X axis of the UV map, until it looks good.