"The Church teaches that respect for homosexual persons cannot lead in any way to approval of homosexual behavior or to legal recognition of homosexual unions. The common good requires that laws recognize, promote and protect marriage as the basis of the family, the primary unit of society. Legal recognition of homosexual unions or placing them on the same level as marriage would mean not only the approval of deviant behavior, with the consequence of making it a model in present-day society, but would also obscure basic values which belong to the common inheritance of humanity."
"In those situations where homosexual unions have been legally recognized or have been given the legal status and rights belonging to marriage, clear and emphatic opposition is a duty. One must refrain from any kind of formal cooperation in the enactment or application of such gravely unjust laws and, as far as possible, from material cooperation on the level of their application."
"When legislation in favor of the recognition of homosexual unions is proposed for the first time in a legislative assembly, the Catholic law-maker has a moral duty to express his opposition clearly and publicly and to vote against it. To vote in favor of a law so harmful to the common good is gravely immoral. When legislation in favor of the recognition of homosexual unions is already in force, the Catholic politician must oppose it in the ways that are possible for him and make his opposition known; it is his duty to witness to the truth."
http://secretinformationclub.com/pope-benedict-on-homosexual-marriage