#!/bin/sh

ports=""
for f in $(find /opt/local/bin) $(find /opt/local/lib -name \*.dylib); do
    if otool -L $f | grep -q 'libpoppler\.7'; then
        ports+="\n$(port provides $f | cut -d ' ' -f 5)"
    fi
done

echo $ports | sort | uniq
