Is there a way to satisfy a certain port dependency with another package (than the specified one) in MacPorts? More specifically, to use the package XYZ-devel instead of just XYZ for a second port that requires XYZ?
Thanks in advance.
Is there a way to satisfy a certain port dependency with another package (than the specified one) in MacPorts? More specifically, to use the package XYZ-devel instead of just XYZ for a second port that requires XYZ?
Thanks in advance.
You can use the "port variants" command to display the list of available variants for a given port. Ex:
[michaelsafyan@codemage ~]$ port variants ffmpeg ffmpeg has the variants: darwin_10: Platform variant, selected automatically no_gpl: disallow use of GPL code, license will be LGPL no_mmx: disable all x86 asm optimizations speex: enable Speex decoding via libspeex
You can then use "+variantname" to activate or "-variantname" to deactivate a given variant for the install (for example, one can use "sudo port install ffmpeg +speex" to install ffmpeg with the speex variant). This is the only way (that won't break MacPorts) that you can select between different configurations and dependencies.
If the -devel
port is not offered as a variant, then the only way is to edit the Portfile.
$ sudo port edit $the_port
will open the specified port in an editor. You can change the dependency from the release port to the -devel
port there.
Note that:
-devel
version (unlikely, but possible).port selfupdate
. If you don't want to have to "fix" the Portfile each time you update, you may want to set up a local Portfile repository.