The classic era Athenians were pro homosexual - even considered homosexual relationships better then heterosexual ones - and they were pretty libertarian in their rulings on many issue (not all) but they strictly regulated marriage - even passing penalties on single men. Marriage can be regulated by the state and it can be shown regulated heterosexual marriage and hetero marriage only - is as old as democracy.
Religions can not create institutions that are contrary to the laws of the land. If they could Muslims could marry more then one wife as could Mormons.
So license religous authorities that meet such defenition for tax purposes to perform marriage and never allow city or state or federal officials - office clerks - judges - mayors - to marry people of the any sex.
What's next? The mayor's office can circumcise and baptise children?