Any form of sexual attraction including being gay is based on desire which is unwholesome and result experiences which are painful in the future. Buddhism deals with correcting you metal tendencies by getting rid of the roots which creates misery. This is done through practicing Vipassana and is a gradual process. Through Vipassana you can transcend any sexual preferences and orientation. To get more insights into this it is best you take a course at: https://www.dhamma.org or http://www.internationalmeditationcentre.org/
See: Saññoga Sutta
Homosexuality is considered a deviant pratice. This is rooted in excessive lust.
Now, bhikshus, amongst those humans whose life-span was 500 years, three things were widespread,
that is, abnormal lust, excessive desire and deviant conduct.
With the increase of abnormal lust, excessive desire and deviant conduct,
the life-span of beings declined, their beauty declined, too.
For these humans whose life-span and beauty were declining, whose lifespan was 500 years, that of some of their children was 250 years, and some 200 years.
More lust in deviant practices is worse off that non deviant pratice like hetrosexuality, which in some cases in the past may have been less rooted in desire, but both are rooted in unwholesomeness.
See: Cakka,vatti Siha,nāda Sutta
Is is bit unclear as to whether this is a transgression of morality but it is considered less ideal than being straight. Being straight also is based on unwholesome roots of attachment. In any case lack of fidelity and cheating in a sexual relationship would be a moral transgression.
Also Buddhism do not hold any specific attitudes towards anything as such but your choice of action is shaped by the expected results of a action or view which you cling onto. Has iterated before, homosexuality is a result of excessive lust, one should approach these practices more cautiously and perhaps practice meditation to overcome lust. If you die with lust the chancesare that your next birth will be bad.
Though in the time of the Buddha these practices would have been there this would not have been widespread as now due to longevity during the period would have resulted in the amount of lust would have been less. Hence would have not come up much.
If you look at resent history homosexuality this was not wide spread as it is now.
Having said this you should not have prejudice or negative attitude towards homosexuals. This could lead to you creating negative Karma for your self if you follow through with any action.