More of course can be said, but /u/paxottomanica wrote an answer to a similar question awhile back, so this answer may be of interest for you, as well as the dialogue with /u/yodatsracist in the thread, while we wait for more contributions!
Another follow up question: I’ve heard that the criminalization of homosexuality was in part due to colonialism and that in many regions during the pre-colonial era homosexuality was generally condoned. Is there evidence to support this claim?
Follow up question: Would nearby states (in whatever form they were) recognize homosexual marriages of Ottoman immigrants?