In Belgium a marriage between people of the same sex is possible if one of them is Belgian or has their normal abode in Belgium since more than 3 months.
Your future husband or wife must comply with the conditions of the law of the land of origin, for instance with regard to age. But if that legislation forbids a marriage with someone from the same sex, then this clause is not taken into consideration. The same goes for the condition that forbids marriage with a non-muslim.
You have to pay attention to the Belgian public order. This means that a marriage with minors or a marriage with multiple partners is not allowed in Belgium, even though the law of the nation of your partner allows this.
More information can be found in the section on marriage on Belgium's foreign affairs website diplomatie.belgium.be.