<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Feb 7, 2021, at 9:17 AM, John Hoyt <<a href="mailto:john.hoyt@gmail.com" class="">john.hoyt@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The key is that you don’t have to download any ports--and possibly build some from source.  An installer is kept that contains a compressed archive of all the files contained in the port. <br class=""></blockquote><div class=""><br class=""></div><div class="">Thanks Craig, that is a great tip!</div><div class=""><br class=""></div><div class="">BTW - I'm trying a variant of your suggested "PKG_CONFIG_SYSTEM_INCLUDE_PATH" fix.</div><div class=""><br class=""></div><div class="">It turns out that I already have in the compile script where PKGMGR_INST_PATH=/opt/local :</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class="gmail_quote"><div class="">PKG_CONFIG_SYSTEM_INCLUDE_PATH=$PKGMGR_INST_PATH/include<br class=""></div></div></blockquote><div class="gmail_quote"><div class=""><br class=""></div><div class="">Which I believe sets the search path to look for macports dylibs first, then the local ones - hence why a local ffmpeg install stomps the dylibs in the mythtv compile.</div><div class=""><br class=""></div><div class="">I'm changing that to:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class="gmail_quote"><div class="">PKG_CONFIG_SYSTEM_INCLUDE_PATH=$SRC_DIR/external:$PKGMGR_INST_PATH/include</div></div></blockquote><br class=""><div class="">Which I hope makes the compiler / pkg_config first look for the locally compiled mythtv ffmpeg libraries.</div></div></div></blockquote></div><div class=""><br class=""></div><div class="">The pkg-config environment variable works sort of the opposite that you might expect.  "PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include” means DON’T supply that include path in the list of returned directories as it is assumed to be the default (last) search path when compiling.  </div><div class=""><br class=""></div><div class="">I found out about this on the pkg-config mailing list:<br class=""><br class=""><blockquote type="cite" class="">This isn't documented (should be), but you can override pkg-config's notion of the system include path with the environment variable PKG_CONFIG_SYSTEM_INCLUDE_PATH. If that's not set, it uses the compiled in defaults. That's been in pkg-config for a long time, so it should work with the version you have. This should be in the form of a path style variable with : separators.<br class=""></blockquote></div><div class=""><br class=""></div><div class="">Craig</div><div class=""><br class=""></div></body></html>