The find_package(fooBar ...) calls in CMake can be disabled (for non-requried) package by passing CMAKE_DISABLE_FIND_PACKAGE_fooBar:BOOL=TRUE [1].
Ports that have optional dependencies that are triggered by finding a package, need to therefore pass something like
EXIV_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_Exiv2
The proposed helper would shorten this to
EXIV_CMAKE_DISABLE_OFF= Exiv2
It also adds the helper opt_CMAKE_DISABLE_ON -- which passes the argument if the option is on.
The diff also includes a modified devel/kio-extras to serve as an example of the usage.