I know it can be done. TenFourFox does it. It builds with Macports infrastructure, required parts to support c++11 are moved into the application bundle, and there are scripts that appear to update the install names as you describe. There is a description in the "building tenfourfox" page. <https://github.com/classilla/tenfourfox/wiki/HowToBuild45>
For 10.5+ only, all the libs could be @rpath based instead I believe. Ken > On Jan 12, 2018, at 11:15 PM, Mojca Miklavec <mo...@macports.org> wrote: > > Hi. > > I would like to build and distribute some poppler-based command-line > utilities (I would compile them with compiler from MacPorts, but > distribute it to users with MacPorts). > > I could use either gcc or clang, but what are the options to make that > work for 10.5/10.6? > Can libc++ or libstdc++ be linked with something like > @executable_path/../libl/libstdc++.dylib and then distributed > alongside the binaries? Can lib[std]c++ be built statically (I have an > impression that's not possible on mac)? What consequences would such > packages have for, say, users of 10.13 trying to run such binaries? > > If this is not feasible, I would target 10.7, but if it's feasible, I > would optionally try to get it working also for PPC. I'm willing to > spend a bit of extra effort, but I have no experience with > transferring the binaries to a computer without lib[std]c++ libraries > yet. The target audience would be users of any system from the minimum > supported version up to 10.10. There will be another version for those > using a supported system compiled on 10.11. > > Thank you, > Mojca