How to pass configure configure parameters when installing from source

Ryan Schmidt ryandesign at macports.org
Sat Feb 27 23:03:41 UTC 2021



On Feb 27, 2021, at 07:19, Adrian Georgescu wrote:

> I would like to install ffmpeg from source and skip some default modules.
> 
> I understand that I can use port -s install ffmpeg  to install from source but this will use ffmpeg default build options
> 
> I would like to know how to provide different parameters to ffmpeg configure before building it:
> 
> For example:  
> 
> --disable-swresample     disable libswresample build
> 
> https://github.com/TechSmith/FFmpeg/blob/master/configure

MacPorts isn't designed to let you do that. A port maintainer (see "port info ffmpeg" to find out who that is for this port) decides which configure options to use. In situations where a user might want to enable or disable optional features, we offer variants (see "port variants ffmpeg"). I see no variant relating to swresample. If you believe such a variant would be generally useful you can request one by filing a ticket or creating one yourself and filing a pull request. If such a variant would not be generally useful, you could still add one to your own copy of the portfile ("port edit ffmpeg") though if you sync using the default rsync method your changes will be overwritten next time you sync. If you want to maintain your own changes to a portfile long-term, you can create a "local repository": https://guide.macports.org/#development.local-repositories



More information about the macports-users mailing list