Solved How to set single option for port multimedia/ffmpeg using poudriere?

I have been using poudriere to build ports for my system but so far have not had need to use anything but the default options for building ports.

I issued command poudriere options -s multimedia/ffmpeg > ffmpeg.txt which provides me with a nice list of options; not sure exactly how many but there are 1,399 lines of output.

The line I am interested to update is the following:
Code:
 FDK_AAC=off: AAC audio encoding via Fraunhofer FDK
Would like to change this to:
Code:
 FDK_AAC=on: AAC audio encoding via Fraunhofer FDK

My question is what is the syntax to change this one setting using poudriere options or is there a better/alternate way to do this by editing some line in the Makefile or elsewhere?

FWIW I am using FreeBSD 13.1 on pc amd64 platform.

Thanks in advance for the help.
 
It's easier to do this through the make.conf file.

Code:
multimedia_ffmpeg_SET= FDK_AAC

It follows the format:
Code:
category_port_SET= OPTION1 OPTION2
category_port_UNSET= OPTION3
See example 4 in ports(7)
 
It's easier to do this through the make.conf file.

Code:
multimedia_ffmpeg_SET= FDK_AAC

It follows the format:
Code:
category_port_SET= OPTION1 OPTION2
category_port_UNSET= OPTION3
Thanks so much. Just for clarification we are talking about /etc/make.conf and not make.conf in some other location?
 
/usr/local/etc/poudriere.d/make.conf, poudriere(8) doesn't use the system's /etc/make.conf. Format and function is the same though.

Code:
   Create optional make.conf
     You can also specify a global make.conf which will be used for all the
     jails.  Any of the following are allowed and will all be used in the
     order shown:

           /usr/local/etc/poudriere.d/make.conf
           /usr/local/etc/poudriere.d/<setname>-make.conf
           /usr/local/etc/poudriere.d/<tree>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-make.conf
           /usr/local/etc/poudriere.d/<tree>-<setname>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<tree>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<setname>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-make.conf
           /usr/local/etc/poudriere.d/hooks/plugins/<plugin>/make.conf

Make sure you don't have any options set in options, as those will overrule whatever is set through the make.conf. You could use _FORCE instead. But I try to keep all my options and settings in the make.conf file, instead of relying on poudriere-options(8). The make.conf makes it a lot easier to see which options I've set (or unset) on which ports.

Code:
   Custom build options
     Before building a package, poudriere can mount a directory containing
     option files if available.  poudriere will check for any of these
     directories in this order:

           /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-options
           /usr/local/etc/poudriere.d/<jailname>-<setname>-options
           /usr/local/etc/poudriere.d/<jailname>-<tree>-options
           /usr/local/etc/poudriere.d/<tree>-<setname>-options
           /usr/local/etc/poudriere.d/<setname>-options
           /usr/local/etc/poudriere.d/<tree>-options
           /usr/local/etc/poudriere.d/<jailname>-options
           /usr/local/etc/poudriere.d/options
 
My multimedia_ffmpeg options,
Code:
OPTIONS_FILE_SET+=ALSA
OPTIONS_FILE_SET+=AMR_NB
OPTIONS_FILE_SET+=AMR_WB
OPTIONS_FILE_SET+=AOM
OPTIONS_FILE_SET+=ARIBB24
OPTIONS_FILE_SET+=ASM
OPTIONS_FILE_SET+=ASS
OPTIONS_FILE_SET+=BS2B
OPTIONS_FILE_SET+=CACA
OPTIONS_FILE_SET+=CDIO
OPTIONS_FILE_SET+=CODEC2
OPTIONS_FILE_SET+=DAV1D
OPTIONS_FILE_UNSET+=DC1394
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=DRM
OPTIONS_FILE_SET+=FDK_AAC
OPTIONS_FILE_SET+=FLITE
OPTIONS_FILE_SET+=FONTCONFIG
OPTIONS_FILE_SET+=FREETYPE
OPTIONS_FILE_SET+=FREI0R
OPTIONS_FILE_SET+=FRIBIDI
OPTIONS_FILE_UNSET+=GLSLANG
OPTIONS_FILE_SET+=GME
OPTIONS_FILE_SET+=GSM
OPTIONS_FILE_SET+=ICONV
OPTIONS_FILE_SET+=ILBC
OPTIONS_FILE_UNSET+=JACK
OPTIONS_FILE_SET+=KVAZAAR
OPTIONS_FILE_SET+=LADSPA
OPTIONS_FILE_SET+=LAME
OPTIONS_FILE_UNSET+=LENSFUN
OPTIONS_FILE_SET+=LIBBLURAY
OPTIONS_FILE_SET+=LIBRSVG2
OPTIONS_FILE_SET+=LIBXML2
OPTIONS_FILE_UNSET+=LTO
OPTIONS_FILE_SET+=LV2
OPTIONS_FILE_UNSET+=MFX
OPTIONS_FILE_SET+=MODPLUG
OPTIONS_FILE_SET+=MYSOFA
OPTIONS_FILE_SET+=NETWORK
OPTIONS_FILE_SET+=NVENC
OPTIONS_FILE_SET+=OPENAL
OPTIONS_FILE_SET+=OPENCL
OPTIONS_FILE_SET+=OPENGL
OPTIONS_FILE_SET+=OPENH264
OPTIONS_FILE_SET+=OPENJPEG
OPTIONS_FILE_UNSET+=OPENMPT
OPTIONS_FILE_SET+=OPTIMIZED_CFLAGS
OPTIONS_FILE_SET+=OPUS
OPTIONS_FILE_UNSET+=POCKETSPHINX
OPTIONS_FILE_UNSET+=PULSEAUDIO
OPTIONS_FILE_SET+=RABBITMQ
OPTIONS_FILE_SET+=RAV1E
OPTIONS_FILE_SET+=RIST
OPTIONS_FILE_SET+=RTCPU
OPTIONS_FILE_UNSET+=RUBBERBAND
OPTIONS_FILE_SET+=SDL
OPTIONS_FILE_UNSET+=SMB
OPTIONS_FILE_SET+=SNAPPY
OPTIONS_FILE_SET+=SNDIO
OPTIONS_FILE_SET+=SOXR
OPTIONS_FILE_SET+=SPEEX
OPTIONS_FILE_SET+=SRT
OPTIONS_FILE_SET+=SSH
OPTIONS_FILE_SET+=SVTAV1
OPTIONS_FILE_UNSET+=SVTHEVC
OPTIONS_FILE_UNSET+=SVTVP9
OPTIONS_FILE_UNSET+=TENSORFLOW
OPTIONS_FILE_SET+=TESSERACT
OPTIONS_FILE_SET+=THEORA
OPTIONS_FILE_SET+=TWOLAME
OPTIONS_FILE_SET+=V4L
OPTIONS_FILE_UNSET+=VAAPI
OPTIONS_FILE_UNSET+=VAPOURSYNTH
OPTIONS_FILE_UNSET+=VDPAU
OPTIONS_FILE_SET+=VIDSTAB
OPTIONS_FILE_SET+=VMAF
OPTIONS_FILE_SET+=VORBIS
OPTIONS_FILE_SET+=VO_AMRWBENC
OPTIONS_FILE_SET+=VPX
OPTIONS_FILE_UNSET+=VULKAN
OPTIONS_FILE_SET+=WEBP
OPTIONS_FILE_SET+=X264
OPTIONS_FILE_SET+=X265
OPTIONS_FILE_SET+=XCB
OPTIONS_FILE_SET+=XVID
OPTIONS_FILE_SET+=XVIDEO
OPTIONS_FILE_SET+=ZIMG
OPTIONS_FILE_SET+=ZMQ
OPTIONS_FILE_SET+=ZVBI
OPTIONS_FILE_UNSET+=GCRYPT
OPTIONS_FILE_SET+=GMP
OPTIONS_FILE_UNSET+=LIBRTMP
OPTIONS_FILE_UNSET+=GNUTLS
OPTIONS_FILE_UNSET+=MBEDTLS
OPTIONS_FILE_SET+=OPENSSL
OPTIONS_FILE_SET+=GPL3
OPTIONS_FILE_SET+=NONFREE
 
Yes, you can also set (or unset) options 'globally'. Again, see example 4 in the ports(7) man page.

Code:
OPTIONS_SET+= XVID
This would enable the XVID option on every port that has this option.
 
not sure exactly how many but there are 1,399 lines of output.
I suppose the options for all dependencies were also displayed there.
With poudriere options -c -j <name of jail> -n multimedia/ffmpeg you can set the options just for the specified port.
 
/usr/local/etc/poudriere.d/make.conf, poudriere(8) doesn't use the system's /etc/make.conf. Format and function is the same though.

Code:
   Create optional make.conf
     You can also specify a global make.conf which will be used for all the
     jails.  Any of the following are allowed and will all be used in the
     order shown:

           /usr/local/etc/poudriere.d/make.conf
           /usr/local/etc/poudriere.d/<setname>-make.conf
           /usr/local/etc/poudriere.d/<tree>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-make.conf
           /usr/local/etc/poudriere.d/<tree>-<setname>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<tree>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<setname>-make.conf
           /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-make.conf
           /usr/local/etc/poudriere.d/hooks/plugins/<plugin>/make.conf

Make sure you don't have any options set in options, as those will overrule whatever is set through the make.conf. You could use _FORCE instead. But I try to keep all my options and settings in the make.conf file, instead of relying on poudriere-options(8). The make.conf makes it a lot easier to see which options I've set (or unset) on which ports.

Code:
   Custom build options
     Before building a package, poudriere can mount a directory containing
     option files if available.  poudriere will check for any of these
     directories in this order:

           /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-options
           /usr/local/etc/poudriere.d/<jailname>-<setname>-options
           /usr/local/etc/poudriere.d/<jailname>-<tree>-options
           /usr/local/etc/poudriere.d/<tree>-<setname>-options
           /usr/local/etc/poudriere.d/<setname>-options
           /usr/local/etc/poudriere.d/<tree>-options
           /usr/local/etc/poudriere.d/<jailname>-options
           /usr/local/etc/poudriere.d/options
Thanks!! I'm glad I asked!!!
 
I like having as many options turned on as practical, but this can create hard-to-debug circular dependencies. Especially if you set a global option in just one of several places to do it, and don't make a note of it.

To combat that, I try to avoid global options to the extent practical, and just do a run of make config for every port. Those options do get remembered in /var/db/ports, and Poudriere does take advantage of that to offer up "Custom Build Options" (See the poudriere(8) manpage, "Custom Build Options" section, for more details). Once I have a config I like, then I feed it to Poudriere.

As an example of why I avoid global make options: I normally say yes to having documentation installed. This can be automated by OPTIONS_FILE_SET+=DOCS, right?

Not so fast!

On one occasion, devel/doxygen failed to compile for me. So later in the process, I was turning off the doxygen makefile knobs. But, there are a few ports where DOCS flag really means "use doxygen to go through the source code and generate documentation from that", as opposed to "download the documentation from the project's web site". I had to hunt down those ports and turn off the DOCS flag - which would be on by default if I had OPTIONS_FILE_SET+=DOCS global option set, and I probably would not be able to override that flag without a lot of work.
 
Back
Top