# Question about option automation in ports



## hunter0one (Sep 14, 2022)

So I've predominantly mixed ports and packages in the past but this usually results in the annoying behavior of having to lock my packages until the next update, also it doesn't mix well when I like to remove some things such as Pulseaudio. 

I've looked at ports-mgmt/poudriere and it seems quite good, but Ive never used it. Im curious if theres a better way to automate build options than just putting a bunch of OPTION_SET and OPTION_UNSET values in make.conf and then using NO_DIALOG when running make. I would like to have priority lists since some ports might not have a build option I want, such as GTK2 over GTK3 and 4 (just an example). None of the tools in the Handbook seem to have this feature. Perhaps there is a way of doing this in make.conf that Im not aware of?


----------



## SirDice (Sep 14, 2022)

hunter0one said:


> Im curious if theres a better way to automate build options than just putting a bunch of OPTION_SET and OPTION_UNSET values in make.conf and then using NO_DIALOG when running make.


poudriere-options(8). There's no need for NO_DIALOG because you're never running make(1) yourself, it's all done by poudriere-bulk(8) and once that gets going it's not going to present _any_ dialog.


----------



## zirias@ (Sep 14, 2022)

I'm not using poudriere-options(8), but that's a matter of taste. I don't like it because it distributes my configuration over lots of individual files and it's IMHO hard to keep that managed.

Instead, I put port-specific options in e.g. /usr/local/etc/poudriere.d/make.conf as well. E.g. I have these options for graphics/gtkam:

```
graphics_gtkam_SET+=    GIMP
graphics_gtkam_UNSET+=  GNOME
```

It's very simple, the variables are normally just `<category>_<portname>_[UN]SET`. If in doubt, every port on freshports has an entry for "Options name" telling you the correct prefix for this variable.

`OPTIONS_SET` and `OPTIONS_UNSET` are global and therefore helpful as well. Ports not understanding anything you set in these will just ignore it.


----------



## hunter0one (Sep 14, 2022)

Thanks. Will give Poudriere a try and the make.conf there.


----------

