Created attachment 197558 [details]
Add flavors - default and icu
I have a need to use p5-DBD-SQLite with ICU support. Adding the ICU flavor to this port will make this possible with the latest and most secure sqlite3 available.
Created attachment 197702 [details]
Flavor: default, icu & mini
I liked the use of the flavor.
Maybe you approve of my patch? Take a look at it. Using the default options implies the absence of a custom port configuration.
See: https://www.freebsd.org/doc/en/books/porters-handbook/flavors-using.html. Look especially example 7.3, where flavors directly control build variables, rather than port OPTIONS.
I looked at your patch, but cannot test until tonight. I believe using the OPTIONS_DEFAULT will permit the proper package creation install via 'pkg'. However, I believe this method can be broken by the user if built from the ports tree. This is because regardless of the OPTIONS_DEFAULT value(s), the user can de-select the ICU option during 'make config'. In this case, the resulting package will have the -icu suffix once installed, but SQLite won't actually be linked against ICU. This will lead to unacceptable ambiguity.
This is why my patch completely overrides the OPTIONS list, and makes the ICU dependency non-optional for the -icu flavor. I will test tonight, and revise my patch to include your proposed "mini" flavor.
Created attachment 197729 [details]
Add flavors - default, icu and mini
I tested your patch tonight - and it behaved as I expected: users can de-select the "ICU" option during `make config`. This is not appropriate.
I looked more closely at the Makefile for editors/emacs, and emulated the use of OPTIONS_EXCLUDE to force the relevant build behavior for the icu and mini flavors. While attempting that, I completely re-organized the Makefile to conform to the guidance of , especially . Following the major edit, I audited the two versions to ensure I hadn't missed anything.
Hello. I am sorry.
I can not get used to the list of options sorted by you. I do not see where the description of one option begins, where it ends. And what this option does. I am not ready to accept the application of recommendations listed in the documentation.
I made other suggested fixes to my patch. (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232248)
Thanks for the suggestion.
(In reply to Pavel Volkov from comment #4)
No problem. I was just trying to follow the style guidance in the FreeBSD handbook. :-)