Line emission from clumpy photodissociation regions