OK Ghazni was as gay is a well known fact. I can understand that some of the pakistanis look up to him as their hero and nothing wrong in that. This is a free world and you can have a gay or a prophet or a film star as your role model.
There are many historical evidences to prove the same. Infact, the Gay slave of Ghazni was appointed the ruler of Lahore.
You can get many writings on this, and this was easily available on google.
An Introduction to LGBT Studies By Deborah T. Meem, Jonathan F. Alexander, Michelle Gibson
The book is available online in google books.