Porphyrins are a natural secretion which are normal in gerbils but excessive production causing irritation can mean there is an underlying health prob. Its often triggered by stress, such as a sudden change or simply stress from feeling unwell.
Best thing is to bring him to the vet and see if there is anything else wrong with him and get meds to treat it. The vet can give you an eye ointment which can help it, I can't remember what it is called but im sure he/she'd know. You'll need to have his eye checked for bacterial infection which can happen if it is left untreated, and if it is infected you'll prob need to give him a short course of antibiotics too.
You can keep his eye clean for now by very gently wiping it with a cloth dampened with warm water. Hope he gets better soon
