I would wing it. Take your square ruler and place on the block to make a triangle . This gives you idea of the size to cut. I just add about an inch you can always trim off. Do one to find out with scrap material first. You are making triangles to fit the ends cut square and make 2.
Don't forget the corners will be different. But can do them the same way