Bypass unresolvable error when cleaning packages with package manager?
The error has been reported at https://trac.macports.org/ticket/54861. A workaround patch has been provided.


diff --git a/multimedia/mlt/Portfile b/multimedia/mlt/Portfile
--- a/multimedia/mlt/Portfile
+++ b/multimedia/mlt/Portfile
@@ -42,7 +42,7 @@ if {${subport} eq "${name}"} {
     if {[info procs qt5.active_version] eq ""} {
         proc qt5.active_version {} {
             global prefix
-            if {[file exists ${prefix}/bin/pkg-config]} {
+            if {[file exists ${prefix}/bin/pkg-config/Qt5Core.pc]} {
                 set av [exec ${prefix}/bin/pkg-config --modversion Qt5Core]
                 return ${av}
             } else {
@@ -53,10 +53,15 @@ if {${subport} eq "${name}"} {

     qt5.depends_component \
                     qtsvg
-    if {[vercmp [qt5.active_version] 5.7.0] &gt;= 0} {
-        configure.cxxflags-append \
-                    -stdlib=libc++ \
-                    -std=c++11
+    pre-configure {
+        # qt5.active_version only works if Qt is installed; we can
+        # be certain that is the case in the pre-configure phase.
+        if {[vercmp [qt5.active_version] 5.7.0] &gt;= 0} {
+            ui_debug "Qt 5.7.0 and up require at least C++11"
+            configure.cxxflags-append \
+                        -stdlib=libc++ \
+                        -std=c++11
+        }
     }
 }