I found that libmraa depends on the kernel build option dev/mem virtual device support and would like to create a PR where libmraa automaticaly selects that option if it is chosen in make menuconfig. I already added once a library to a target but this seams different.
i found libmraa in /package/feeds/packages/libmraa and the part where i think it has to be added is:
DEVKMEM is intentionally disabled in official builds, while you can obviously change that setting for your own builds, automatically selecting it from libmraa won't be accepted (as that would effectively revert the global decision to keep it disabled).
Unless you find a way to change libmraa in a way that doesn't require /dev/kmem access anymore, your only option to "fix" the dependency relation would be to remove the libmraa package from the repo. This would mean that even those who do build the kernel with DEVKMEM access allowed (in their personal builds), wouldn't have libmraa available - progress…?!
Alternatively you could accept the status quo, namely that libmraa isn't usable in official builds, but remains available for those who do build their own firmware.
Packages can’t change kernel config when installed or built. The kernel has a single config for all devices on the same target/sub-target. Since /dev/kmem, as far as I know, can’t be built as a module, you can’t “install” it as a dependency.
If you want to "warn" other users, you could find all the packages that depend on libmraa and add to their description something along the lines of:
WARNING: This package will not run on unmodified OpenWrt builds.
libmraa requires /dev/kmem which is disabled for security reasons.
Users who understand and accept the severe risks of enabling /dev/kmem
will need to build a custom kernel and ROM from source to use this package.
You can find the packages that depend on libmraa with something like