Marriage is NOT a union between a man and a woman, as far as secular courts are concerned, at least in Mass. and Ca. Marriage is two people making a public contract to henceforth be one economic unit. Churches may define marriage as they choose, and may choose to or not to marry anyone based on whatever criteria suits their religious purpose. But for purposes of the state, everyone has to get a marriage license, and afterward has certain rights and obligations conferred by the state in the matter of the new economic unit.
I think all that should be necessary is that the two parties be legally able to participate in a contract. Period.