I don't have a source, but a while ago, I read something on the internet that said precolonial Africans had a mostly neutral outlook on homosexuality. Is there any truth to this?
Read this :
https://www.ghanaweb.com/GhanaHomePage/NewsArchive/Is-homosexuality-alien-or-not-to-Africa-369821
Also, I recommend Oyèrónkẹ́ Oyěwùmí books, she wrote extensively about gender social constructs in West Africa, specifically with Yoruba people.