Index: Portfile
===================================================================
--- Portfile	(revision 142408)
+++ Portfile	(working copy)
@@ -3,7 +3,10 @@
 PortSystem          1.0
 PortGroup           github 1.0
 
+# When updating to the next version, please switch to xz tarball
+# and no longer autoreconf.
 github.setup        Flameeyes unpaper 6.1 unpaper-
+revision            1
 categories          graphics
 maintainers         nomaintainer
 license             GPL-2+
@@ -21,8 +24,11 @@
                     size    2704127
 
 depends_build       port:libxslt \
-                    port:netpbm
+                    port:netpbm \
+                    port:pkgconfig
 
+depends_lib-append  path:lib/libavcodec.dylib:ffmpeg
+
 depends_run         port:netpbm
 
 # tarball does not include configure script
@@ -30,4 +36,8 @@
 use_autoreconf      yes
 
 configure.args      --disable-silent-rules
-configure.cflags-append -O2 -march=native -pipe -flto
+
+if [string match *clang* ${configure.compiler}] {
+    configure.cflags-append \
+                    -flto
+}
