Skip to content

[OS X]: adaptations for VLC built the MacPorts way

MacPorts has ports for VLC (2.1.5) and VLC-devel (currently 2.2.0 rc2) which install the components of interest to other ports in Linux/Posix style under its install prefix (typically /opt/local), and alter the VLC.app app bundle such that these components are found through symlinks to the directories in which they are installed:

VLC.app/Contents/MacOS/lib -> ${prefix}/lib VLC.app/Contents/MacOS/plugins -> ${prefix}/lib/plugins

VLC.app/Contents/MacOS/share and /opt/local/share/vlc have slightly different contents so I have left them as is for now.

VLC 2.1.5 had issues with this scheme for instance when calling the non app-bundle executable ${prefix}/bin/vlc, or when loading libvlc in any 3rd party application like phonon-backend-vlc . The plugins weren't found. This has been remedied to a large extent by Rémy Denis-Courmont in darwin/dirs.c ; attached are the remaining changes I have found necessary. Though perfectly transparent, I'm not expecting these changes to be incorporated. It would be useful though, and I would be very much interested in constructive feedback how to improve them (or the MacPorts install scheme).

Note that these don't make ${prefix}/bin/vlc functional beyond finding its plugins, at least not with the standard OS X interface module (DBus control appears to work, though). Also note that the executable built this way has an issue initialising OpenGL, which is not due to the attached patches.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information